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


C++ OptionsConfigPtr类代码示例

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


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

示例1: EditorSettingsTerminalBase

EditorSettingsTerminal::EditorSettingsTerminal( wxWindow* parent )
    : EditorSettingsTerminalBase( parent )
    , TreeBookNode<EditorSettingsTerminal>()

{
    OptionsConfigPtr options = EditorConfigST::Get()->GetOptions();
    m_textCtrlProgramConsoleCmd->SetValue(options->GetProgramConsoleCommand());
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:8,代码来源:editorsettingsterminal.cpp

示例2: GetToolbarIconSize

int PluginManager::GetToolbarIconSize()
{
    // for now return 24 by default
    OptionsConfigPtr options = EditorConfigST::Get()->GetOptions();
    if(options) {
        return options->GetIconsSize();
    }
    return 24;
}
开发者ID:kaustubhcs,项目名称:codelite,代码行数:9,代码来源:pluginmanager.cpp

示例3: EditorSettingsTerminalBase

EditorSettingsTerminal::EditorSettingsTerminal( wxWindow* parent )
    : EditorSettingsTerminalBase( parent )
    , TreeBookNode<EditorSettingsTerminal>()

{
    OptionsConfigPtr options = EditorConfigST::Get()->GetOptions();
    m_textCtrlProgramConsoleCmd->SetValue(options->GetProgramConsoleCommand());
    m_checkBoxUseCodeLiteTerminal->SetValue( options->HasOption( OptionsConfig::Opt_Use_CodeLite_Terminal) );
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:9,代码来源:editorsettingsterminal.cpp

示例4: DoToggleReplacebar

void QuickFindBar::DoToggleReplacebar()
{
    OptionsConfigPtr options = EditorConfigST::Get()->GetOptions();
    bool show = !options->GetShowReplaceBar();

    options->SetShowReplaceBar(show);
    EditorConfigST::Get()->SetOptions(options);

    ShowReplacebar(show);
}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:10,代码来源:quickfindbar.cpp

示例5: wxT

OptionsConfigPtr EditorConfig::GetOptions() const
{
    wxXmlNode* node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Options"));
    // node can be null ...
    OptionsConfigPtr opts = new OptionsConfig(node);

    // import legacy tab-width setting into opts
    long tabWidth = const_cast<EditorConfig*>(this)->GetInteger(wxT("EditorTabWidth"), -1);
    if(tabWidth != -1) { opts->SetTabWidth(tabWidth); }
    return opts;
}
开发者ID:eranif,项目名称:codelite,代码行数:11,代码来源:editor_config.cpp

示例6: DoPopulateDefaultLabels

void BookmarkManager::OnEditorSettingsChanged(wxCommandEvent& e)
{
    e.Skip();
    DoPopulateDefaultLabels();
    OptionsConfigPtr options = EditorConfigST::Get()->GetOptions();
    for(int i = smt_FIRST_BMK_TYPE; i <= smt_LAST_BMK_TYPE; ++i) {
        wxString new_label = options->GetBookmarkLabel(i - smt_FIRST_BMK_TYPE);
        new_label.Trim().Trim(false);

        if(!new_label.IsEmpty()) {
            m_markerLabels.erase(i);
            m_markerLabels.insert(std::make_pair(i, new_label));
        }
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:15,代码来源:bookmark_manager.cpp

示例7: DoGetGlobalEOL

int CodeFormatter::DoGetGlobalEOL() const
{
    OptionsConfigPtr options = m_mgr->GetEditorSettings();
    if(options->GetEolMode() == wxT("Unix (LF)")) {
        return 2;
    } else if(options->GetEolMode() == wxT("Mac (CR)")) {
        return 1;
    } else if(options->GetEolMode() == wxT("Windows (CRLF)")) {
        return 0;
    } else {
// set the EOL by the hosting OS
#if defined(__WXMAC__)
        return 2;
#elif defined(__WXGTK__)
        return 2;
#else
        return 0;
#endif
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:20,代码来源:codeformatter.cpp

示例8: SetOptions

void EditorConfig::SetOptions(OptionsConfigPtr opts)
{
	// locate the current node
	wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Options"));
	if( node ){
		m_doc->GetRoot()->RemoveChild(node);
		delete node;
	}

	m_doc->GetRoot()->AddChild(opts->ToXml());
	m_doc->Save(m_fileName.GetFullPath());
}
开发者ID:BackupTheBerlios,项目名称:codelite-svn,代码行数:12,代码来源:editor_config.cpp

示例9: EditorSettingsFoldingBase

EditorSettingsFolding::EditorSettingsFolding( wxWindow* parent )
		: EditorSettingsFoldingBase( parent )
		, TreeBookNode<EditorSettingsFolding>()
{
	OptionsConfigPtr options = EditorConfigST::Get()->GetOptions();
	m_displayMargin->SetValue(options->GetDisplayFoldMargin());
	m_underlineFolded->SetValue(options->GetUnderlineFoldLine());
	m_foldPreprocessors->SetValue(options->GetFoldPreprocessor());
	m_foldCompact->SetValue(options->GetFoldCompact());
	m_foldElse->SetValue(options->GetFoldAtElse());
	
	const wxString FoldStyles[] = { wxTRANSLATE("Simple"), 
									wxTRANSLATE("Arrows"), 
									wxTRANSLATE("Flatten Tree Square Headers"), 
									wxTRANSLATE("Flatten Tree Circular Headers") };
									
	m_stringManager.AddStrings(sizeof(FoldStyles)/sizeof(wxString), FoldStyles, options->GetFoldStyle(), m_foldStyle);
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:18,代码来源:editorsettingsfolding.cpp

示例10: SetOptions

void EditorConfig::SetOptions(OptionsConfigPtr opts)
{
    // remove legacy tab-width setting
    wxXmlNode* child = XmlUtils::FindNodeByName(m_doc->GetRoot(), wxT("ArchiveObject"), wxT("EditorTabWidth"));
    if(child) {
        m_doc->GetRoot()->RemoveChild(child);
        delete child;
    }

    // locate the current node
    wxString nodeName = wxT("Options");
    wxXmlNode* node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), nodeName);
    if(node) {
        m_doc->GetRoot()->RemoveChild(node);
        delete node;
    }
    m_doc->GetRoot()->AddChild(opts->ToXml());

    DoSave();
    wxCommandEvent evt(wxEVT_EDITOR_CONFIG_CHANGED);
    evt.SetString(nodeName);
    EventNotifier::Get()->AddPendingEvent(evt);
}
开发者ID:eranif,项目名称:codelite,代码行数:23,代码来源:editor_config.cpp

示例11: Save

void EditorSettingsFolding::Save(OptionsConfigPtr options)
{
	options->SetDisplayFoldMargin(m_displayMargin->GetValue());
	options->SetUnderlineFoldLine(m_underlineFolded->GetValue());
	options->SetFoldPreprocessor(m_foldPreprocessors->GetValue());
	options->SetFoldCompact(m_foldCompact->GetValue());
	options->SetFoldAtElse(m_foldElse->GetValue());
	
	// Get the foldstyle selection, unlocalised
	wxString foldStyle = m_stringManager.GetStringSelection();
	
	// thses 2 styles no longer exists...
	if(foldStyle == _("Arrows with Background Colour") || foldStyle == _("Simple with Background Colour"))
		foldStyle.Clear();
		
	if (foldStyle.IsEmpty()) {
		foldStyle = wxT("Arrows");
	}
	
	options->SetFoldStyle(foldStyle);
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:21,代码来源:editorsettingsfolding.cpp

示例12: GetOptions

void EditorConfig::SetPaneStickiness(const wxString& caption, bool stickiness)
{
    OptionsConfigPtr options = GetOptions();
    if(caption == _("Build")) {
        options->SetHideOutputPaneNotIfBuild(stickiness);
    } else if(caption == _("Search")) {
        options->SetHideOutputPaneNotIfSearch(stickiness);
    } else if(caption == _("Replace")) {
        options->SetHideOutputPaneNotIfReplace(stickiness);
    } else if(caption == _("References")) {
        options->SetHideOutputPaneNotIfReferences(stickiness);
    } else if(caption == _("Output")) {
        options->SetHideOutputPaneNotIfOutput(stickiness);
    } else if(caption == _("Debug")) {
        options->SetHideOutputPaneNotIfDebug(stickiness);
    } else if(caption == _("Trace")) {
        options->SetHideOutputPaneNotIfTrace(stickiness);
    } else if(caption == _("Tasks")) {
        options->SetHideOutputPaneNotIfTasks(stickiness);
    } else if(caption == _("BuildQ")) {
        options->SetHideOutputPaneNotIfBuildQ(stickiness);
    } else if(caption == _("CppCheck")) {
        options->SetHideOutputPaneNotIfCppCheck(stickiness);
    } else if(caption == _("Subversion")) {
        options->SetHideOutputPaneNotIfSvn(stickiness);
    } else if(caption == _("Cscope")) {
        options->SetHideOutputPaneNotIfCscope(stickiness);
    } else if(caption == _("Git")) {
        options->SetHideOutputPaneNotIfGit(stickiness);
    } else if(caption == _("MemCheck")) {
        options->SetHideOutputPaneNotIfMemCheck(stickiness);
    } else {
        return;
    }

    SetOptions(options);
    Save();
}
开发者ID:eranif,项目名称:codelite,代码行数:38,代码来源:editor_config.cpp

示例13: Save

void EditorOptionsGeneralGuidesPanel::Save(OptionsConfigPtr options)
{
    options->SetDisplayLineNumbers(m_displayLineNumbers->IsChecked());
    options->SetHighlightMatchedBraces(m_checkBoxMatchBraces->IsChecked());
    options->SetShowIndentationGuidelines(m_showIndentationGuideLines->IsChecked());
    options->SetHighlightCaretLine(m_highlightCaretLine->IsChecked());
    options->SetCaretLineColour(m_caretLineColourPicker->GetColour());
    options->SetEolMode(m_EOLstringManager.GetStringSelection());
    options->SetHideChangeMarkerMargin(m_checkBoxHideChangeMarkerMargin->IsChecked());
    options->SetDisableSemicolonShift(m_checkBoxDisableSemicolonShift->IsChecked());
    options->SetDebuggerMarkerLine(m_colourPickerDbgLine->GetColour());
    options->EnableOption(OptionsConfig::Opt_Mark_Debugger_Line, m_checkBoxMarkdebuggerLine->IsChecked());

    // save the whitespace visibility
    wxString Whitespace = m_WSstringManager.GetStringSelection();
    int style(wxSTC_WS_INVISIBLE); // invisible
    if(Whitespace == wxT("Visible always")) {
        style = wxSTC_WS_VISIBLEALWAYS;
    } else if(Whitespace == wxT("Visible after indentation")) {
        style = wxSTC_WS_VISIBLEAFTERINDENT;
    } else if(Whitespace == wxT("Indentation only")) {
        style = wxSTC_WS_VISIBLEAFTERINDENT;
    }
    options->SetShowWhitspaces(style);
}
开发者ID:LoviPanda,项目名称:codelite,代码行数:25,代码来源:editor_options_general_guides_panel.cpp

示例14: DisplayHigherValues

void EditorSettingsLocal::DisplayHigherValues( const OptionsConfigPtr options )
{
	// There should be 'global' (or workspace if this will be a project setting) values for each setting
	// Insert them all, but leave the enabling checkboxes ticked, so the items will be disabled
	m_indentsUsesTabs->SetValue(options->GetIndentUsesTabs());
	m_indentWidth->SetValue(options->GetIndentWidth());
	m_tabWidth->SetValue(options->GetTabWidth());
	m_displayLineNumbers->SetValue(options->GetDisplayLineNumbers());
	m_showIndentationGuideLines->SetValue(options->GetShowIndentationGuidelines());

	m_highlightCaretLine->SetValue(options->GetHighlightCaretLine());
	m_checkBoxTrimLine->SetValue(options->GetTrimLine());
	m_checkBoxAppendLF->SetValue(options->GetAppendLF());

	m_checkBoxHideChangeMarkerMargin->SetValue( options->GetHideChangeMarkerMargin() );
	m_checkBoxDisplayFoldMargin->SetValue( options->GetDisplayFoldMargin() );
	m_displayBookmarkMargin->SetValue( options->GetDisplayBookmarkMargin() );

	const wxString WhitespaceStyle[] = { wxTRANSLATE("Invisible"), wxTRANSLATE("Visible always"), wxTRANSLATE("Visible after indentation"), wxTRANSLATE("Indentation only") };
	wxString currentWhitespace;
	switch (options->GetShowWhitspaces()) {
	case wxSTC_WS_VISIBLEALWAYS:
		currentWhitespace = wxT("Visible always");
		break;
	case wxSTC_WS_VISIBLEAFTERINDENT:
		currentWhitespace = wxT("Visible after indentation");
		break;
	default:
		currentWhitespace = wxT("Invisible");
		break;
	}
	m_WSstringManager.AddStrings(sizeof(WhitespaceStyle)/sizeof(wxString), WhitespaceStyle, currentWhitespace, m_whitespaceStyle);

	const wxString EOLChoices[] = { wxTRANSLATE("Default"), wxT("Mac (CR)"), wxT("Windows (CRLF)"), wxT("Unix (LF)") };
	m_EOLstringManager.AddStrings(sizeof(EOLChoices)/sizeof(wxString), EOLChoices, options->GetEolMode(), m_choiceEOL);

	wxArrayString astrEncodings;
	wxFontEncoding fontEnc;
	int iCurrSelId = 0;
	size_t iEncCnt = wxFontMapper::GetSupportedEncodingsCount();
	for (size_t i = 0; i < iEncCnt; i++) {
		fontEnc = wxFontMapper::GetEncoding(i);
		if (wxFONTENCODING_SYSTEM == fontEnc) { // skip system, it is changed to UTF-8 in optionsconfig
			continue;
		}
		astrEncodings.Add(wxFontMapper::GetEncodingName(fontEnc));
		if (fontEnc == options->GetFileFontEncoding()) {
			iCurrSelId = i;
		}
	}
	m_fileEncoding->Append(astrEncodings);
	m_fileEncoding->SetSelection(iCurrSelId);
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:53,代码来源:editorsettingslocal.cpp

示例15:

LocalOptionsConfig::LocalOptionsConfig(OptionsConfigPtr opts, wxXmlNode* node)
{
    // Used for reading local values, which are merged into the passed OptionsConfigPtr only if valid
    if(node) {
        bool answer;
        wxString str;
        long l;
        if(XmlUtils::ReadBoolIfExists(node, wxT("DisplayFoldMargin"), answer)) { opts->SetDisplayFoldMargin(answer); }
        if(XmlUtils::ReadBoolIfExists(node, wxT("DisplayBookmarkMargin"), answer)) {
            opts->SetDisplayBookmarkMargin(answer);
        }
        if(XmlUtils::ReadBoolIfExists(node, wxT("HighlightCaretLine"), answer)) { opts->SetHighlightCaretLine(answer); }
        if(XmlUtils::ReadBoolIfExists(node, wxT("EditorTrimEmptyLines"), answer)) { opts->SetTrimLine(answer); }
        if(XmlUtils::ReadBoolIfExists(node, wxT("EditorAppendLf"), answer)) { opts->SetAppendLF(answer); }
        if(XmlUtils::ReadBoolIfExists(node, wxT("ShowLineNumber"), answer)) { opts->SetDisplayLineNumbers(answer); }
        if(XmlUtils::ReadBoolIfExists(node, wxT("IndentationGuides"), answer)) {
            opts->SetShowIndentationGuidelines(answer);
        }
        if(XmlUtils::ReadBoolIfExists(node, wxT("IndentUsesTabs"), answer)) { opts->SetIndentUsesTabs(answer); }
        if(XmlUtils::ReadBoolIfExists(node, wxT("HideChangeMarkerMargin"), answer)) {
            opts->SetHideChangeMarkerMargin(answer);
        }
        if(XmlUtils::ReadLongIfExists(node, wxT("IndentWidth"), l)) { opts->SetIndentWidth(l); }
        if(XmlUtils::ReadLongIfExists(node, wxT("TabWidth"), l)) { opts->SetTabWidth(l); }
        if(XmlUtils::ReadLongIfExists(node, wxT("ShowWhitespaces"), l)) { opts->SetShowWhitspaces(l); }
        if(XmlUtils::ReadStringIfExists(node, wxT("EOLMode"), str)) { opts->SetEolMode(str); }
        if(XmlUtils::ReadStringIfExists(node, wxT("FileFontEncoding"), str)) { opts->SetFileFontEncoding(str); }
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:29,代码来源:localworkspace.cpp


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