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


C++ OptionsConfigPtr::EnableOption方法代码示例

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


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

示例1: 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

示例2: Save

void EditorSettingsTerminal::Save(OptionsConfigPtr options)
{
    options->SetProgramConsoleCommand (m_textCtrlProgramConsoleCmd->GetValue());
    options->EnableOption( OptionsConfig::Opt_Use_CodeLite_Terminal, m_checkBoxUseCodeLiteTerminal->IsChecked() );
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:5,代码来源:editorsettingsterminal.cpp

示例3: Save

void EditorSettingsDockingWindows::Save(OptionsConfigPtr options)
{
    options->SetHideOutpuPaneOnUserClick(m_checkBoxHideOutputPaneOnClick->IsChecked());
    options->SetHideOutputPaneNotIfBuild(m_checkBoxHideOutputPaneNotIfBuild->IsChecked());
    options->SetHideOutputPaneNotIfSearch(m_checkBoxHideOutputPaneNotIfSearch->IsChecked());
    options->SetHideOutputPaneNotIfReplace(m_checkBoxHideOutputPaneNotIfReplace->IsChecked());
    options->SetHideOutputPaneNotIfReferences(m_checkBoxHideOutputPaneNotIfReferences->IsChecked());
    options->SetHideOutputPaneNotIfOutput(m_checkBoxHideOutputPaneNotIfOutput->IsChecked());
    options->SetHideOutputPaneNotIfTrace(m_checkBoxHideOutputPaneNotIfTrace->IsChecked());
    options->SetHideOutputPaneNotIfTasks(m_checkBoxHideOutputPaneNotIfTasks->IsChecked());
    options->SetHideOutputPaneNotIfBuildQ(m_checkBoxHideOutputPaneNotIfBuildQ->IsChecked());
    options->SetHideOutputPaneNotIfCppCheck(m_checkBoxHideOutputPaneNotIfCppCheck->IsChecked());
    options->SetHideOutputPaneNotIfSvn(m_checkBoxHideOutputPaneNotIfSvn->IsChecked());
    options->SetHideOutputPaneNotIfCscope(m_checkBoxHideOutputPaneNotIfCscope->IsChecked());
    options->SetHideOutputPaneNotIfGit(m_checkBoxHideOutputPaneNotIfGit->IsChecked());
    options->SetHideOutputPaneNotIfDebug(m_checkBoxHideOutputPaneNotIfDebug->IsChecked());
    options->SetHideOutputPaneNotIfMemCheck(m_checkBoxHideOutputPaneNotIfMemCheck->IsChecked());
    options->SetFindBarAtBottom(m_checkBoxFindBarAtBottom->IsChecked());
    options->SetDontAutoFoldResults(m_checkBoxDontFoldSearchResults->IsChecked());
    options->SetShowDebugOnRun(m_checkBoxShowDebugOnRun->IsChecked());
    options->SetDockingStyle(m_radioBoxHint->GetSelection());
    options->SetShowDockingWindowCaption(!m_checkBoxHideCaptions->IsChecked());
    options->SetEnsureCaptionsVisible(m_checkBoxEnsureCaptionsVisible->IsChecked());
    options->SetTabColourMatchesTheme(m_checkBoxEditorTabsFollowsTheme->IsChecked());
    options->SetTabColourDark(m_checkBoxUseDarkTabTheme->IsChecked());
    options->SetTabHasXButton(m_checkBoxShowXButton->IsChecked());
    options->SetMouseScrollSwitchTabs(m_checkBoxMouseScrollSwitchTabs->IsChecked());
    
    // Set the tab style:
    // DEFAULT 0
    // MINIMAL 1
    // TRAPEZOID 2
    int tabStyleSelection = m_choiceTabStyle->GetSelection();
    options->EnableOption(OptionsConfig::Opt_TabStyleMinimal, (tabStyleSelection == 1));
    options->EnableOption(OptionsConfig::Opt_TabStyleTRAPEZOID, (tabStyleSelection == 2));

    int ht(0);
    switch(m_choiceTabHeight->GetSelection()) {
    case 3:
        ht = OptionsConfig::nbTabHt_Tiny;
        break;
    case 2:
        ht = OptionsConfig::nbTabHt_Short;
        break;
    case 1:
        ht = OptionsConfig::nbTabHt_Medium;
        break;
    default:
        ht = OptionsConfig::nbTabHt_Tall;
    }
    options->SetNotebookTabHeight(ht);

    switch(m_choiceOutputTabsOrientation->GetSelection()) {
    case 0:
        options->SetOutputTabsDirection(wxTOP);
        break;
    case 1:
        options->SetOutputTabsDirection(wxBOTTOM);
        break;
    default:
        break;
    }
    switch(m_choiceWorkspaceTabsOrientation->GetSelection()) {
    case 0:
        options->SetWorkspaceTabsDirection(wxLEFT);
        break;
    case 1:
        options->SetWorkspaceTabsDirection(wxRIGHT);
        break;
    case 2:
        options->SetWorkspaceTabsDirection(wxTOP);
        break;
    case 3:
        options->SetWorkspaceTabsDirection(wxBOTTOM);
        break;
    default:
        break;
    }
}
开发者ID:stahta01,项目名称:codelite,代码行数:79,代码来源:editorsettingsdockingwidows.cpp


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