当前位置: 首页>>代码示例>>C++>>正文


C++ wxConfigBase类代码示例

本文整理汇总了C++中wxConfigBase的典型用法代码示例。如果您正苦于以下问题:C++ wxConfigBase类的具体用法?C++ wxConfigBase怎么用?C++ wxConfigBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了wxConfigBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Save

void FileHistory::Save(wxConfigBase& config)
{
	wxString old = config.GetPath();
	config.SetPath(m_configSubdir);
	wxFileHistory::Save(config);
	config.SetPath(old);
}
开发者ID:Marlinc,项目名称:0ad,代码行数:7,代码来源:FileHistory.cpp

示例2: LoadFromSubDir

void FileHistory::LoadFromSubDir(wxConfigBase& config)
{
	wxString old = config.GetPath();
	config.SetPath(m_configSubdir);
	Load(config);
	config.SetPath(old);
}
开发者ID:Valvador,项目名称:PyroSpaceFork,代码行数:7,代码来源:FileHistory.cpp

示例3: Load

void ButcherOptions::Load(wxConfigBase &config)
{
    long rlong;

    config.SetPath(wxT("/options"));
    config.Read(wxT("editmode"), &rlong, EM_ADVANCED);
    editmode_=static_cast<editmode_t>(rlong);
}
开发者ID:RangelReale,项目名称:htmlbutcher,代码行数:8,代码来源:BUtil.cpp

示例4: Save

void FileHistory::Save(wxConfigBase & config, const wxString & group)
{
   config.DeleteGroup(group);
   config.SetPath(group);

   // Stored in reverse order
   int n = mHistory.GetCount() - 1;
   for (size_t i = 1; i <= mHistory.GetCount(); i++) {
      config.Write(wxString::Format(wxT("file%02d"), (int)i), mHistory[n--]);
   }

   config.SetPath(wxT(".."));
}
开发者ID:LBoggino,项目名称:audacity,代码行数:13,代码来源:FileHistory.cpp

示例5: SaveFileConfig

void wxSTEditorOptions::SaveFileConfig(wxConfigBase &config)
{
    wxFileHistory *fileHistory = GetFileHistory();
    if (!fileHistory)
        return;

    wxString configPath = FixConfigPath(GetConfigPath(STE_OPTION_CFGPATH_FILEHISTORY), false);
    config.Write(configPath+wxT("/LastDir"), GetDefaultFilePath());

    int n, count = fileHistory->GetCount();
    for (n = 0; n < count; n++)
        config.Write(configPath + wxString::Format(wxT("/file%d"), n+1), fileHistory->GetHistoryFile(n));
}
开发者ID:cubemoon,项目名称:game-editor,代码行数:13,代码来源:steopts.cpp

示例6: SaveConfig

void wxSTEditorFrame::SaveConfig(wxConfigBase &config, const wxString &configPath_)
{
    wxString configPath = wxSTEditorOptions::FixConfigPath(configPath_, false);
    if (GetMenuBar() && GetMenuBar()->FindItem(ID_STF_SHOW_SIDEBAR))
    {
        wxString val = GetMenuBar()->IsChecked(ID_STF_SHOW_SIDEBAR) ? "1" : "0";
        config.Write(configPath + "/ShowSidebar", val);
    }

    wxRect rect = GetRect();
    if ((rect.x>=0) && (rect.y>=0) && (rect.width>=100) && (rect.height>=100))
       config.Write(configPath + "/FrameSize", wxString::Format("%d,%d,%d,%d", rect.x, rect.y, rect.width, rect.height));
}
开发者ID:burzumishi,项目名称:caprice32wx,代码行数:13,代码来源:steframe.cpp

示例7: Save

void wxFileHistoryBase::Save(wxConfigBase& config)
{
    size_t i;
    for (i = 0; i < m_fileMaxFiles; i++)
    {
        wxString buf;
        buf.Printf(wxT("file%d"), (int)i+1);
        if (i < m_fileHistory.GetCount())
            config.Write(buf, wxString(m_fileHistory[i]));
        else
            config.Write(buf, wxEmptyString);
    }
}
开发者ID:Anonymous2,项目名称:project64,代码行数:13,代码来源:filehistorycmn.cpp

示例8: SaveFileConfig

void wxSTEditorOptions::SaveFileConfig(wxConfigBase &config)
{
    const wxString oldpath = config.GetPath();
    wxFileHistory *fileHistory = GetFileHistory();
    if (!fileHistory)
        return;

    wxString configPath = FixConfigPath(GetConfigPath(STE_OPTION_CFGPATH_FILEHISTORY), false);
    config.Write(configPath+wxT("/LastDir"), GetDefaultFilePath());

    config.SetPath(configPath);
    fileHistory->Save(config);
    config.SetPath(oldpath);
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:14,代码来源:steopts.cpp

示例9: LoadFileConfig

void wxSTEditorOptions::LoadFileConfig( wxConfigBase &config)
{
    const wxString oldpath = config.GetPath();
    wxFileHistory *fileHistory = GetFileHistory();
    if (!fileHistory)
        return;

    wxString configPath = FixConfigPath(GetConfigPath(STE_OPTION_CFGPATH_FILEHISTORY), false);
    wxString value, key = configPath+wxT("/LastDir");
    if (config.Read(key, &value) && wxDirExists(value))
        SetDefaultFilePath(value);

    config.SetPath(configPath);
    fileHistory->Load(config);
    config.SetPath(oldpath);
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:16,代码来源:steopts.cpp

示例10: Load

void wxFileHistoryBase::Load(const wxConfigBase& config)
{
    RemoveExistingHistory();

    m_fileHistory.Clear();

    wxString buf;
    buf.Printf(wxT("file%d"), 1);

    wxString historyFile;
#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
#   pragma ivdep
#   pragma swp
#   pragma unroll
#   pragma prefetch
#   if 0
#       pragma simd noassert
#   endif
#endif /* VDM auto patch */
    while ((m_fileHistory.GetCount() < m_fileMaxFiles) &&
           config.Read(buf, &historyFile) && !historyFile.empty())
    {
        m_fileHistory.Add(historyFile);

        buf.Printf(wxT("file%d"), (int)m_fileHistory.GetCount()+1);
        historyFile = wxEmptyString;
    }

    AddFilesToMenu();
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:30,代码来源:filehistorycmn.cpp

示例11: Load

void FileHistory::Load(wxConfigBase & config, const wxString & group)
{
   mHistory.Clear();

   config.SetPath(group);

   wxString file;
   long ndx;
   bool got = config.GetFirstEntry(file, ndx);
   while (got) {
      AddFileToHistory(config.Read(file), false);
      got = config.GetNextEntry(file, ndx);
   }

   config.SetPath(wxT(".."));

   AddFilesToMenu();
}
开发者ID:LBoggino,项目名称:audacity,代码行数:18,代码来源:FileHistory.cpp

示例12: SaveConfig

void wxSTEditorOptions::SaveConfig(wxConfigBase &config)
{
    if (HasConfigOption(STE_CONFIG_PREFS) && GetEditorPrefs().Ok())
        GetEditorPrefs().SaveConfig(config, GetConfigPath(STE_OPTION_CFGPATH_PREFS));
    if (HasConfigOption(STE_CONFIG_STYLES) && GetEditorStyles().Ok())
        GetEditorStyles().SaveConfig(config, GetConfigPath(STE_OPTION_CFGPATH_STYLES));
    if (HasConfigOption(STE_CONFIG_LANGS) && GetEditorLangs().Ok())
        GetEditorLangs().SaveConfig(config, GetConfigPath(STE_OPTION_CFGPATH_LANGS));

    if (GetEditorPrefs().Ok() || GetEditorStyles().Ok() || GetEditorLangs().Ok())
        config.Flush(true); // what is current only?
}
开发者ID:cubemoon,项目名称:game-editor,代码行数:12,代码来源:steopts.cpp

示例13: installPluginsList

/* Read the initialized plugins in config and fill the list
 * of names
 */
void DIALOG_BOM::installPluginsList()
{
    wxString list, active_plugin_name;
    m_config->Read( BOM_PLUGINS_KEY, &list );
    m_config->Read( BOM_PLUGIN_SELECTED_KEY, &active_plugin_name );

    if( !list.IsEmpty() )
    {
        BOM_CFG_READER_PARSER cfg_parser( &m_plugins, TO_UTF8( list ),
                                          wxT( "plugins" ) );
        try
        {
            cfg_parser.Parse();
        }
        catch( const IO_ERROR& ioe )
        {
//            wxLogMessage( ioe.errorText );
        }
    }

    // Populate list box
    for( unsigned ii = 0; ii < m_plugins.GetCount(); ii+=2 )
    {
        m_lbPlugins->Append( m_plugins[ii] );

        if( active_plugin_name == m_plugins[ii] )
            m_lbPlugins->SetSelection( ii/2 );
    }

    pluginInit();
}
开发者ID:Elphel,项目名称:kicad-source-mirror,代码行数:34,代码来源:dialog_bom.cpp

示例14: OnCloseWindow

void DIALOG_PRINT_FOR_MODEDIT::OnCloseWindow( wxCloseEvent& event )
{
    if( m_config )
    {
        m_config->Write( OPTKEY_PRINT_MODULE_SCALE, m_ScaleOption->GetSelection() );
        m_config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White );
    }

    EndModal( 0 );
}
开发者ID:RyuKojiro,项目名称:kicad-source-mirror,代码行数:10,代码来源:dialog_print_for_modedit.cpp

示例15: OnNetSortingOptionSelected

void DIALOG_COPPER_ZONE::OnNetSortingOptionSelected( wxCommandEvent& event )
{
    initListNetsParams();
    buildAvailableListOfNets();

    m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
    if( m_Config )
    {
        m_Config->Write( ZONE_NET_SORT_OPTION_KEY, (long) m_NetDisplayOption->GetSelection() );
        wxString Filter = m_DoNotShowNetNameFilter->GetValue();
        m_Config->Write( ZONE_NET_FILTER_STRING_KEY, Filter );
    }
}
开发者ID:barrem,项目名称:kicad-source-mirror,代码行数:13,代码来源:dialog_copper_zones.cpp


注:本文中的wxConfigBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。