58 _T(
"syntax-highlight"),
99 : m_TextColourControl(
nullptr),
102 m_DefCodeFileType(0),
103 m_ThemeModified(false),
104 m_EnableChangebar(false),
105 m_pImageList(
nullptr)
108 XRCCTRL(*
this,
"wxID_OK",
wxButton)->SetDefault();
110 XRCCTRL(*
this,
"lblEditorFont",
wxStaticText)->SetLabel(
_(
"This is sample text"));
112 UpdateSampleFont(
false);
117 XRCCTRL(*
this,
"chkSmartIndent",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/smart_indent"),
true));
118 XRCCTRL(*
this,
"chkBraceCompletion",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/brace_completion"),
true));
119 XRCCTRL(*
this,
"chkDetectIndent",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/detect_indent"),
false));
121 m_EnableScrollWidthTracking = cfg->
ReadBool(
_T(
"/margin/scroll_width_tracking"),
false);
122 XRCCTRL(*
this,
"chkScrollWidthTracking",
wxCheckBox)->SetValue(m_EnableScrollWidthTracking);
123 m_EnableChangebar = cfg->
ReadBool(
_T(
"/margin/use_changebar"),
true);
124 XRCCTRL(*
this,
"chkUseChangebar",
wxCheckBox)->SetValue(m_EnableChangebar);
125 XRCCTRL(*
this,
"chkShowIndentGuides",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/show_indent_guides"),
false));
126 XRCCTRL(*
this,
"chkBraceSmartIndent",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/brace_smart_indent"),
true));
127 XRCCTRL(*
this,
"chkSelectionBraceCompletion",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/selection_brace_completion"),
false));
129 XRCCTRL(*
this,
"chkBackspaceUnindents",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/backspace_unindents"),
true));
131 XRCCTRL(*
this,
"chkWordWrapStyleHomeEnd",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/word_wrap_style_home_end"),
true));
132 XRCCTRL(*
this,
"chkPosixRegex",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/use_posix_style_regexes"),
false));
133 #ifdef wxHAS_REGEX_ADVANCED 134 XRCCTRL(*
this,
"chkAdvancedRegex",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/use_advanced_regexes"),
false));
136 XRCCTRL(*
this,
"chkAdvancedRegex",
wxCheckBox)->SetValue(
false);
137 XRCCTRL(*
this,
"chkAdvancedRegex",
wxCheckBox)->Enable(
false);
139 XRCCTRL(*
this,
"chkShowLineNumbers",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/show_line_numbers"),
true));
140 XRCCTRL(*
this,
"chkHighlightCaretLine",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/highlight_caret_line"),
false));
141 XRCCTRL(*
this,
"chkSimplifiedHome",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/simplified_home"),
false));
145 XRCCTRL(*
this,
"chkSyncEditorWithProjectManager",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/sync_editor_with_project_manager"),
false));
147 XRCCTRL(*
this,
"cmbViewWS",
wxChoice)->SetSelection(cfg->
ReadInt(
_T(
"/view_whitespace"), 0));
148 XRCCTRL(*
this,
"cmbCaretBuffer",
wxChoice)->SetSelection(cfg->
ReadInt(
wxT(
"/caret_buffer"), 2));
149 XRCCTRL(*
this,
"rbTabText",
wxRadioBox)->SetSelection(cfg->
ReadBool(
_T(
"/tab_text_relative"),
false)? 1 : 0);
151 XRCCTRL(*
this,
"chkTrackPreprocessor",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/track_preprocessor"),
true));
152 XRCCTRL(*
this,
"chkCollectPrjDefines",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/collect_prj_defines"),
true));
153 XRCCTRL(*
this,
"chkPlatDefines",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/platform_defines"),
false));
154 XRCCTRL(*
this,
"chkColoursWxSmith",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/highlight_wxsmith"),
true));
158 XRCCTRL(*
this,
"chkStripTrailings",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/eol/strip_trailing_spaces"),
true));
159 XRCCTRL(*
this,
"chkEnsureFinalEOL",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/eol/ensure_final_line_end"),
true));
160 XRCCTRL(*
this,
"chkEnsureConsistentEOL",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/eol/ensure_consistent_line_ends"),
false));
167 XRCCTRL(*
this,
"lstCaretStyle",
wxChoice)->SetSelection(caretStyle);
168 XRCCTRL(*
this,
"spnCaretWidth",
wxSpinCtrl)->SetValue(cfg->
ReadInt(
_T(
"/caret/width"), 1));
170 XRCCTRL(*
this,
"btnCaretColour",
wxButton)->SetBackgroundColour(caretColour);
171 XRCCTRL(*
this,
"slCaretPeriod",
wxSlider)->SetValue(cfg->
ReadInt(
_T(
"/caret/period"), 500));
175 XRCCTRL(*
this,
"btnWSColour",
wxButton)->SetBackgroundColour(whiteSpaceColour);
178 XRCCTRL(*
this,
"chkEnableVirtualSpace",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/selection/use_vspace"),
false));
179 XRCCTRL(*
this,
"chkEnableRectVirtualSpace",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/selection/use_rect_vspace"),
false));
180 bool multiSelectEnabled = cfg->
ReadBool(
_T(
"/selection/multi_select"),
false);
181 XRCCTRL(*
this,
"chkEnableMultipleSelections",
wxCheckBox)->SetValue(multiSelectEnabled);
182 XRCCTRL(*
this,
"chkEnableAdditionalSelectionTyping",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/selection/multi_typing"),
false));
183 XRCCTRL(*
this,
"chkEnableAdditionalSelectionTyping",
wxCheckBox)->Enable(multiSelectEnabled);
186 XRCCTRL(*
this,
"chkEnableFolding",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/folding/show_folds"),
true));
187 XRCCTRL(*
this,
"chkFoldOnOpen",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/folding/fold_all_on_open"),
false));
188 XRCCTRL(*
this,
"chkFoldPreprocessor",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/folding/fold_preprocessor"),
false));
189 XRCCTRL(*
this,
"chkFoldComments",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/folding/fold_comments"),
true));
190 XRCCTRL(*
this,
"chkFoldXml",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/folding/fold_xml"),
true));
191 XRCCTRL(*
this,
"chkUnderlineFoldedLine",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/folding/underline_folded_line"),
true));
192 XRCCTRL(*
this,
"lstIndicators",
wxChoice)->SetSelection(cfg->
ReadInt(
_T(
"/folding/indicator"), 2));
193 XRCCTRL(*
this,
"chkFoldLimit",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/folding/limit"),
false));
194 XRCCTRL(*
this,
"spnFoldLimitLevel",
wxSpinCtrl)->SetValue(cfg->
ReadInt(
_T(
"/folding/limit_level"), 1));
198 XRCCTRL(*
this,
"lstGutterMode",
wxChoice)->SetSelection(cfg->
ReadInt(
_T(
"/gutter/mode"), 0));
199 XRCCTRL(*
this,
"btnGutterColour",
wxButton)->SetBackgroundColour(gutterColour);
200 XRCCTRL(*
this,
"spnGutterColumn",
wxSpinCtrl)->SetRange(1, 500);
201 XRCCTRL(*
this,
"spnGutterColumn",
wxSpinCtrl)->SetValue(cfg->
ReadInt(
_T(
"/gutter/column"), 80));
204 XRCCTRL(*
this,
"spnMarginWidth",
wxSpinCtrl)->SetValue(cfg->
ReadInt(
_T(
"/margin/width_chars"), 6));
205 XRCCTRL(*
this,
"chkDynamicWidth",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/margin/dynamic_width"),
false));
206 XRCCTRL(*
this,
"spnMarginWidth",
wxSpinCtrl)->Enable(!cfg->
ReadBool(
_T(
"/margin/dynamic_width"),
false));
207 XRCCTRL(*
this,
"chkAddBPByLeftClick",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/margin_1_sensitive"),
true));
208 XRCCTRL(*
this,
"chkImageBP",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/margin_1_image_bp"),
true));
221 for (
size_t i = 0; i < count; ++i)
225 cmbEnc->Append(enc_name);
226 if (enc_name.
CmpNoCase(def_enc_name) == 0)
231 XRCCTRL(*
this,
"rbEncodingUseOption",
wxRadioBox)->SetSelection(cfg->
ReadInt(
_T(
"/default_encoding/use_option"), 0));
232 XRCCTRL(*
this,
"chkEncodingFindLatin2",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/default_encoding/find_latin2"),
false));
233 XRCCTRL(*
this,
"chkEncodingUseSystem",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/default_encoding/use_system"),
true));
236 XRCCTRL(*
this,
"cmbDefCodeFileType",
wxChoice)->SetSelection(m_DefCodeFileType);
238 key.
Printf(
_T(
"/default_code/set%d"), IdxToFileType[m_DefCodeFileType]);
244 XRCCTRL(*
this,
"txtDefCode",
wxTextCtrl)->SetFont(tmpFont);
246 for(
size_t idx = 0; idx <
sizeof(
IdxToFileType)/
sizeof(*IdxToFileType); ++ idx)
248 key.
Printf(
_T(
"/default_code/set%d"), IdxToFileType[idx]);
254 XRCCTRL(*
this,
"chkCodeCompletion",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/code_completion"),
true));
255 XRCCTRL(*
this,
"chkCCCaseSensitive",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/case_sensitive"),
false));
256 XRCCTRL(*
this,
"chkAutoselectSingle",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/auto_select_single"),
false));
257 XRCCTRL(*
this,
"spnAutolaunchCount",
wxSpinCtrl)->SetValue(cfg->
ReadInt(
_T(
"/auto_launch_count"), 3));
258 XRCCTRL(*
this,
"chkDocumentationPopup",
wxCheckBox)->SetValue(cfg->
ReadBool(
_T(
"/documentation_popup"),
true));
259 XRCCTRL(*
this,
"cmbTooltipMode",
wxChoice)->SetSelection(cfg->
ReadInt(
_T(
"/tooltip_mode"), 1));
261 LoadListbookImages();
274 GetSizer()->SetSizeHints(
this);
294 const wxString noimg =
_T(
"images/settings/generic-plugin");
344 lb->SetImageList(
nullptr);
358 while (label.Replace(
_T(
" & "),
_T(
" && ")))
360 XRCCTRL(*
this,
"lblBigTitle",
wxStaticText)->SetLabel(label);
361 XRCCTRL(*
this,
"pnlTitleInfo",
wxPanel)->Layout();
367 if (event.GetOldSelection() != -1 &&
event.GetSelection() != -1)
395 const bool hightlightCaretLine = XRCCTRL(*
this,
"chkHighlightCaretLine",
wxCheckBox)->GetValue();
398 const bool showIndentGuides = XRCCTRL(*
this,
"chkShowIndentGuides",
wxCheckBox)->GetValue();
420 for (
int i = 0; i < count; ++i)
423 if (colours->FindString(opt->
name) == -1)
424 colours->Append(opt->
name);
426 if (colours->GetCount() > 0)
427 colours->SetSelection(0);
461 XRCCTRL(*
this,
"btnColoursFore",
wxButton)->SetLabel(
_(
"\"Default\""));
465 XRCCTRL(*
this,
"btnColoursFore",
wxButton)->SetBackgroundColour(c);
466 XRCCTRL(*
this,
"btnColoursFore",
wxButton)->SetLabel(
_T(
""));
473 XRCCTRL(*
this,
"btnColoursBack",
wxButton)->SetLabel(
_(
"\"Default\""));
477 XRCCTRL(*
this,
"btnColoursBack",
wxButton)->SetBackgroundColour(c);
478 XRCCTRL(*
this,
"btnColoursBack",
wxButton)->SetLabel(
_T(
""));
481 XRCCTRL(*
this,
"chkColoursBold",
wxCheckBox)->SetValue(opt->
bold);
489 bool isDefault = (opt->
name ==
_(
"Default"));
490 XRCCTRL(*
this,
"btnForeSetDefault",
wxButton)->Enable(!isDefault);
491 XRCCTRL(*
this,
"btnBackSetDefault",
wxButton)->Enable(!isDefault);
504 wxColour c = XRCCTRL(*
this,
"btnColoursFore",
wxButton)->GetBackgroundColour();
509 c = XRCCTRL(*
this,
"btnColoursBack",
wxButton)->GetBackgroundColour();
514 opt->
bold = XRCCTRL(*
this,
"chkColoursBold",
wxCheckBox)->GetValue();
536 XRCCTRL(*
this,
"lblEditorFont",
wxStaticText)->SetFont(tmpFont);
548 XRCCTRL(*
this,
"lblEditorFont",
wxStaticText)->SetFont(font);
566 for (
unsigned int i = 0; i < list.
GetCount(); ++i)
568 cmbThemes->Append(cfg->
Read(
_T(
"/colour_sets/") + list[i] +
_T(
"/name"), list[i]));
573 long int cookie = cmbThemes->
FindString(group);
608 wxString key = cmbThemes->GetStringSelection();
619 if (colour_set && key == colour_set->
GetName())
630 cmbLangs->Append(
_(
"Plain text"));
632 for (
unsigned int i = 0; i < langs.
GetCount(); ++i)
634 cmbLangs->Append(langs[i]);
642 cmbLangs->Enable(langs.
GetCount() != 0);
645 wxString str_sel = cmbLangs->GetStringSelection();
670 wxRegEx regex(
wxT(
"^[A-Za-z][A-Za-z_0-9]*$"));
675 cbMessageBox(
_(
"You've entered invalid characters for the name of the theme. " 676 "Only alphanumeric characters and '_' are allowed! The first character should be a letter. " 677 "Please try again."),
689 wxTextEntryDialog dlg(
this,
_(
"Please enter the name of the new colour theme:"),
_(
"New theme name"));
695 if (!CheckColourThemeName(name,
this))
699 cmbThemes->Append(name);
712 cmbThemes->Delete(idx);
722 if (dlg.ShowModal() !=
wxID_OK)
726 if (!CheckColourThemeName(name,
this))
753 dlg.m_pTheme->SetKeywords(dlg.m_Lang, dlg.m_LastSet, dlg.txtKeywords->GetValue());
774 tmp.
Printf(
_(
"Are you sure you want to reset all settings to defaults for \"%s\"?"),
791 for (
size_t ii = 0; ii < listLang.
GetCount(); ++ii)
807 Connect(menuID, wxEVT_COMMAND_MENU_SELECTED,
821 Disconnect(it->first, wxEVT_COMMAND_MENU_SELECTED,
831 long id =
event.GetId();
841 if (optSource && optDest)
859 for (
size_t ii = 0; ii < listLang.
GetCount(); ++ii)
867 menu.
Append(menuID, listLang[ii]);
868 Connect(menuID, wxEVT_COMMAND_MENU_SELECTED,
879 Disconnect(it->first, wxEVT_COMMAND_MENU_SELECTED,
889 long id =
event.GetId();
893 const wxString &srcLang = it->second.langID;
902 if (!optSource && optDest->
name ==
wxT(
"Comment"))
930 int sel = XRCCTRL(*
this,
"cmbDefCodeFileType",
wxChoice)->GetSelection();
942 wxWindow* sender = FindWindowById(event.GetId());
943 data.
SetColour(sender->GetBackgroundColour());
950 sender->SetBackgroundColour(colour);
954 if (event.GetId() == XRCID(
"btnColoursFore") ||
955 event.GetId() == XRCID(
"btnColoursBack"))
962 if (event.GetId() == XRCID(
"btnForeSetDefault"))
963 button = FindWindowById(XRCID(
"btnColoursFore"));
964 else if (event.GetId() == XRCID(
"btnBackSetDefault"))
965 button = FindWindowById(XRCID(
"btnColoursBack"));
969 button->SetLabel(
_(
"\"Default\""));
990 XRCCTRL(*
this,
"spnMarginWidth",
wxSpinCtrl)->Enable(!event.IsChecked());
999 cfg->
Write(
_T(
"/font"), XRCCTRL(*
this,
"lblEditorFont",
wxStaticText)->GetFont().GetNativeFontInfoDesc());
1001 cfg->
Write(
_T(
"/auto_indent"), XRCCTRL(*
this,
"chkAutoIndent",
wxCheckBox)->GetValue());
1002 cfg->
Write(
_T(
"/smart_indent"), XRCCTRL(*
this,
"chkSmartIndent",
wxCheckBox)->GetValue());
1003 cfg->
Write(
_T(
"/brace_completion"), XRCCTRL(*
this,
"chkBraceCompletion",
wxCheckBox)->GetValue());
1004 cfg->
Write(
_T(
"/detect_indent"), XRCCTRL(*
this,
"chkDetectIndent",
wxCheckBox)->GetValue());
1005 cfg->
Write(
_T(
"/use_tab"), XRCCTRL(*
this,
"chkUseTab",
wxCheckBox)->GetValue());
1006 cfg->
Write(
_T(
"/show_indent_guides"), XRCCTRL(*
this,
"chkShowIndentGuides",
wxCheckBox)->GetValue());
1007 cfg->
Write(
_T(
"/brace_smart_indent"), XRCCTRL(*
this,
"chkBraceSmartIndent",
wxCheckBox)->GetValue());
1008 cfg->
Write(
_T(
"/selection_brace_completion"), XRCCTRL(*
this,
"chkSelectionBraceCompletion",
wxCheckBox)->GetValue());
1009 cfg->
Write(
_T(
"/tab_indents"), XRCCTRL(*
this,
"chkTabIndents",
wxCheckBox)->GetValue());
1010 cfg->
Write(
_T(
"/backspace_unindents"), XRCCTRL(*
this,
"chkBackspaceUnindents",
wxCheckBox)->GetValue());
1011 cfg->
Write(
_T(
"/word_wrap"), XRCCTRL(*
this,
"chkWordWrap",
wxCheckBox)->GetValue());
1012 cfg->
Write(
_T(
"/word_wrap_style_home_end"), XRCCTRL(*
this,
"chkWordWrapStyleHomeEnd",
wxCheckBox)->GetValue());
1013 cfg->
Write(
_T(
"/use_posix_style_regexes"), XRCCTRL(*
this,
"chkPosixRegex",
wxCheckBox)->GetValue());
1014 #ifdef wxHAS_REGEX_ADVANCED 1015 cfg->
Write(
_T(
"/use_advanced_regexes"), XRCCTRL(*
this,
"chkAdvancedRegex",
wxCheckBox)->GetValue());
1018 cfg->
Write(
_T(
"/show_line_numbers"), XRCCTRL(*
this,
"chkShowLineNumbers",
wxCheckBox)->GetValue());
1019 cfg->
Write(
_T(
"/highlight_caret_line"), XRCCTRL(*
this,
"chkHighlightCaretLine",
wxCheckBox)->GetValue());
1020 cfg->
Write(
_T(
"/simplified_home"), XRCCTRL(*
this,
"chkSimplifiedHome",
wxCheckBox)->GetValue());
1021 cfg->
Write(
_T(
"/camel_case"), XRCCTRL(*
this,
"chkCamelCase",
wxCheckBox)->GetValue());
1023 cfg->
Write(
_T(
"/track_preprocessor"), XRCCTRL(*
this,
"chkTrackPreprocessor",
wxCheckBox)->GetValue());
1024 cfg->
Write(
_T(
"/collect_prj_defines"), XRCCTRL(*
this,
"chkCollectPrjDefines",
wxCheckBox)->GetValue());
1025 cfg->
Write(
_T(
"/platform_defines"), XRCCTRL(*
this,
"chkPlatDefines",
wxCheckBox)->GetValue());
1026 cfg->
Write(
_T(
"/highlight_wxsmith"), XRCCTRL(*
this,
"chkColoursWxSmith",
wxCheckBox)->GetValue());
1027 cfg->
Write(
_T(
"/no_stl_in_c"), XRCCTRL(*
this,
"chkNoStlC",
wxCheckBox)->GetValue());
1029 bool resetZoom = XRCCTRL(*
this,
"chkResetZoom",
wxCheckBox)->GetValue();
1030 bool zoomAll = XRCCTRL(*
this,
"chkZoomAll",
wxCheckBox)->GetValue();
1031 if (zoomAll || resetZoom)
1038 cfg->
Write(
_T(
"/reset_zoom"), resetZoom);
1039 cfg->
Write(
_T(
"/zoom_all"), zoomAll);
1040 cfg->
Write(
_T(
"/sync_editor_with_project_manager"), XRCCTRL(*
this,
"chkSyncEditorWithProjectManager",
wxCheckBox)->GetValue());
1042 cfg->
Write(
_T(
"/tab_size"), XRCCTRL(*
this,
"spnTabSize",
wxSpinCtrl)->GetValue());
1043 cfg->
Write(
_T(
"/view_whitespace"), XRCCTRL(*
this,
"cmbViewWS",
wxChoice)->GetSelection());
1044 cfg->
Write(
_T(
"/caret_buffer"), XRCCTRL(*
this,
"cmbCaretBuffer",
wxChoice)->GetSelection());
1045 cfg->
Write(
_T(
"/tab_text_relative"), XRCCTRL(*
this,
"rbTabText",
wxRadioBox)->GetSelection() ?
true :
false);
1049 cfg->
Write(
_T(
"/caret/style"), XRCCTRL(*
this,
"lstCaretStyle",
wxChoice)->GetSelection());
1050 cfg->
Write(
_T(
"/caret/width"), XRCCTRL(*
this,
"spnCaretWidth",
wxSpinCtrl)->GetValue());
1051 wxColour caretColour = XRCCTRL(*
this,
"btnCaretColour",
wxButton)->GetBackgroundColour();
1053 cfg->
Write(
_T(
"/caret/period"), XRCCTRL(*
this,
"slCaretPeriod",
wxSlider)->GetValue());
1056 wxColour wsColour = XRCCTRL(*
this,
"btnWSColour",
wxButton)->GetBackgroundColour();
1060 bool enableFolding = XRCCTRL(*
this,
"chkEnableFolding",
wxCheckBox)->GetValue();
1074 cfg->
Write(
_T(
"/folding/show_folds"), enableFolding);
1075 cfg->
Write(
_T(
"/folding/fold_all_on_open"), XRCCTRL(*
this,
"chkFoldOnOpen",
wxCheckBox)->GetValue());
1076 cfg->
Write(
_T(
"/folding/fold_preprocessor"), XRCCTRL(*
this,
"chkFoldPreprocessor",
wxCheckBox)->GetValue());
1077 cfg->
Write(
_T(
"/folding/fold_comments"), XRCCTRL(*
this,
"chkFoldComments",
wxCheckBox)->GetValue());
1078 cfg->
Write(
_T(
"/folding/fold_xml"), XRCCTRL(*
this,
"chkFoldXml",
wxCheckBox)->GetValue());
1079 cfg->
Write(
_T(
"/folding/underline_folded_line"), XRCCTRL(*
this,
"chkUnderlineFoldedLine",
wxCheckBox)->GetValue());
1080 cfg->
Write(
_T(
"/folding/indicator"), XRCCTRL(*
this,
"lstIndicators",
wxChoice)->GetSelection());
1081 cfg->
Write(
_T(
"/folding/limit"), XRCCTRL(*
this,
"chkFoldLimit",
wxCheckBox)->GetValue());
1082 cfg->
Write(
_T(
"/folding/limit_level"), XRCCTRL(*
this,
"spnFoldLimitLevel",
wxSpinCtrl)->GetValue());
1085 cfg->
Write(
_T(
"/show_eol"), XRCCTRL(*
this,
"chkShowEOL",
wxCheckBox)->GetValue());
1086 cfg->
Write(
_T(
"/eol/strip_trailing_spaces"), XRCCTRL(*
this,
"chkStripTrailings",
wxCheckBox)->GetValue());
1087 cfg->
Write(
_T(
"/eol/ensure_final_line_end"), XRCCTRL(*
this,
"chkEnsureFinalEOL",
wxCheckBox)->GetValue());
1088 cfg->
Write(
_T(
"/eol/ensure_consistent_line_ends"), XRCCTRL(*
this,
"chkEnsureConsistentEOL",
wxCheckBox)->GetValue());
1089 cfg->
Write(
_T(
"/eol/eolmode"), (
int)XRCCTRL(*
this,
"cmbEOLMode",
wxChoice)->GetSelection());
1092 cfg->
Write(
_T(
"/gutter/mode"), XRCCTRL(*
this,
"lstGutterMode",
wxChoice)->GetSelection());
1093 wxColour gutterColour = XRCCTRL(*
this,
"btnGutterColour",
wxButton)->GetBackgroundColour();
1095 cfg->
Write(
_T(
"/gutter/column"), XRCCTRL(*
this,
"spnGutterColumn",
wxSpinCtrl)->GetValue());
1098 cfg->
Write(
_T(
"/margin/width_chars"), XRCCTRL(*
this,
"spnMarginWidth",
wxSpinCtrl)->GetValue());
1099 cfg->
Write(
_T(
"/margin/dynamic_width"), XRCCTRL(*
this,
"chkDynamicWidth",
wxCheckBox)->GetValue());
1100 cfg->
Write(
_T(
"/margin_1_sensitive"), (
bool)XRCCTRL(*
this,
"chkAddBPByLeftClick",
wxCheckBox)->GetValue());
1101 cfg->
Write(
_T(
"/margin_1_image_bp"), (
bool)XRCCTRL(*
this,
"chkImageBP",
wxCheckBox)->GetValue());
1104 cfg->
Write(
_T(
"/selection/use_vspace"), (
bool)XRCCTRL(*
this,
"chkEnableVirtualSpace",
wxCheckBox)->GetValue());
1105 cfg->
Write(
_T(
"/selection/use_rect_vspace"), (
bool)XRCCTRL(*
this,
"chkEnableRectVirtualSpace",
wxCheckBox)->GetValue());
1106 cfg->
Write(
_T(
"/selection/multi_select"), (
bool)XRCCTRL(*
this,
"chkEnableMultipleSelections",
wxCheckBox)->GetValue());
1107 cfg->
Write(
_T(
"/selection/multi_typing"), (
bool)XRCCTRL(*
this,
"chkEnableAdditionalSelectionTyping",
wxCheckBox)->GetValue());
1110 cfg->
Write(
_T(
"/margin/scroll_width_tracking"), XRCCTRL(*
this,
"chkScrollWidthTracking",
wxCheckBox)->GetValue());
1113 bool enableChangebar = XRCCTRL(*
this,
"chkUseChangebar",
wxCheckBox)->GetValue();
1114 cfg->
Write(
_T(
"/margin/use_changebar"), enableChangebar);
1133 int sel = XRCCTRL(*
this,
"cmbDefCodeFileType",
wxChoice)->GetSelection();
1150 cfg->
Write(
_T(
"/colour_sets/active_lang"), XRCCTRL(*
this,
"cmbLangs",
wxChoice)->GetStringSelection());
1156 cfg->
Write(
_T(
"/default_encoding"), cmbEnc->GetStringSelection());
1158 cfg->
Write(
_T(
"/default_encoding/use_option"), XRCCTRL(*
this,
"rbEncodingUseOption",
wxRadioBox)->GetSelection());
1159 cfg->
Write(
_T(
"/default_encoding/find_latin2"), XRCCTRL(*
this,
"chkEncodingFindLatin2",
wxCheckBox)->GetValue());
1160 cfg->
Write(
_T(
"/default_encoding/use_system"), XRCCTRL(*
this,
"chkEncodingUseSystem",
wxCheckBox)->GetValue());
1164 cfg->
Write(
_T(
"/code_completion"), XRCCTRL(*
this,
"chkCodeCompletion",
wxCheckBox)->GetValue());
1165 cfg->
Write(
_T(
"/case_sensitive"), XRCCTRL(*
this,
"chkCCCaseSensitive",
wxCheckBox)->GetValue());
1166 cfg->
Write(
_T(
"/auto_select_single"), XRCCTRL(*
this,
"chkAutoselectSingle",
wxCheckBox)->GetValue());
1167 cfg->
Write(
_T(
"/auto_launch_count"), XRCCTRL(*
this,
"spnAutolaunchCount",
wxSpinCtrl)->GetValue());
1168 cfg->
Write(
_T(
"/documentation_popup"), XRCCTRL(*
this,
"chkDocumentationPopup",
wxCheckBox)->GetValue());
1169 cfg->
Write(
_T(
"/tooltip_mode"), XRCCTRL(*
this,
"cmbTooltipMode",
wxChoice)->GetSelection());
1195 XRCCTRL(*
this,
"chkEnableAdditionalSelectionTyping",
wxCheckBox)->Enable( event.IsChecked() );
DLLIMPORT wxArrayString GetArrayFromString(const wxString &text, const wxString &separator=DEFAULT_ARRAY_SEP, bool trimSpaces=true)
void EndModal(int retCode)
virtual bool AddPage(wxWindow *page, const wxString &text, bool select=false, int imageId=NO_IMAGE)
wxString GetLanguageName(HighlightLanguage lang)
void EndModal(int retCode)
void UpdateColourControls(const OptionColour *opt)
#define wxSCI_MARGIN_NUMBER
PluginManager * GetPluginManager() const
void OnColoursCopyAllFrom(wxCommandEvent &event)
virtual bool SetPageImage(size_t page, int image)=0
virtual int GetSelection() const=0
Data folder in user's dir.
void OnChooseColour(wxCommandEvent &event)
bool FromString(const wxString &s)
void OnSetDefaultColour(wxCommandEvent &event)
ConfigManager * GetConfigManager(const wxString &name_space) const
void OnCaretStyle(wxCommandEvent &event)
int ReadInt(const wxString &name, int defaultVal=0)
void UpdateListbookImages()
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
SettingsIconsStyle
Icons styles for settings dialogs.
void OnChooseFont(wxCommandEvent &event)
void SetIndentationGuides(int indentView)
Show or hide indentation guides.
virtual int GetSelection() const
void SetColourSet(EditorColourSet *theme)
DLLIMPORT wxBitmap cbLoadBitmap(const wxString &filename, wxBitmapType bitmapType=wxBITMAP_TYPE_PNG)
This function loads a bitmap from disk.
void GetConfigurationPanels(int group, wxWindow *parent, ConfigurationPanelsArray &arrayToFill)
DLLIMPORT wxString cbGetTextFromUser(const wxString &message, const wxString &caption=cbGetTextFromUserPromptStr, const wxString &default_value=wxEmptyString, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord, bool centre=true)
void LoadListbookImages()
void OnChangeDefCodeFileType(wxCommandEvent &event)
void SetMarginType(int margin, int marginType)
Set a margin to be either numeric or symbolic.
bool ReadBool(const wxString &name, bool defaultVal=false)
void UnfoldAll()
Unfold all editor folds (shows blocks of code).
static size_t GetSupportedEncodingsCount()
virtual wxString GetTitle() const =0
void OnColourComponent(wxCommandEvent &event)
void OnAddColourTheme(wxCommandEvent &event)
virtual size_t GetPageCount() const
bool Matches(const wxString &text, int flags=0) const
virtual void OnApply()=0
Called when the user chooses to apply the configuration.
virtual void OnCancel()=0
Called when the user chooses to cancel the configuration.
static wxString GetEncodingName(wxFontEncoding encoding)
FileType
Known file types.
const wxArrayString & GetFileMasks(HighlightLanguage lang)
void FillColourComponents()
DLLIMPORT wxString GetStringFromArray(const wxArrayString &array, const wxString &separator=DEFAULT_ARRAY_SEP, bool SeparatorAtEnd=true)
static const int cgEditor
Editor related.
void OnDeleteColourTheme(wxCommandEvent &event)
virtual unsigned int GetCount() const
const wxString base_imgs[]
int CmpNoCase(const wxString &s) const
static wxString LocateDataFile(const wxString &filename, int search_dirs=sdAllKnown)
Locate a file in an installation- and platform-independent way.
void SetName(const wxString &name)
wxFont GetChosenFont() const
void SetZoom(int zoom)
Set zoomfactor for builtin editors.
const FileType IdxToFileType[]
EditorManager * GetEditorManager() const
wxImageList * m_pImageList
void SetCaretLineVisible(bool show)
Display the background of the line containing the caret in a different colour.
virtual void SetString(unsigned int pos, const wxString &s)
wxArrayString m_DefaultCode
will store the default code during configuration for each type
void SetChangeCollection(bool collectChange) override
void Write(const wxString &name, const wxString &value, bool ignoreEmpty=false)
virtual int GetImageCount() const
void SetMarginWidth(int margin, int pixelWidth)
Set the width of a margin to a width expressed in pixels.
void OnRenameColourTheme(wxCommandEvent &event)
void SetInitialFont(const wxFont &font)
#define wxSCI_IV_LOOKBOTH
wxColour GetColour(const wxString &id) const
wxArrayString EnumerateSubPaths(const wxString &path)
bool SetNativeFontInfo(const wxString &info)
wxString GetSampleCode(HighlightLanguage lang, int *breakLine, int *debugLine, int *errorLine)
static wxString GetSystemEncodingName()
void UpdateSampleFont(bool askForNewFont)
~EditorConfigurationDlg()
void SetFileMasks(HighlightLanguage lang, const wxString &masks, const wxString &=_(","))
void MarkerDeleteAll(int markerNumber)
Delete all markers with a particular number from all lines.
wxString DescribeKeyWordSets() const
Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer...
void OnEditFilemasks(wxCommandEvent &event)
static wxColour GetColour(wxSystemColour index)
wxString Read(const wxString &key, const wxString &defaultVal=wxEmptyString)
void OnBoldItalicUline(wxCommandEvent &event)
EditorColourSet * m_Theme
wxArrayString GetAllHighlightLanguages()
void StyleSetFont(int styleNum, const wxFont &font)
Set style size, face, bold, italic, and underline attributes from a wxFont's attributes.
int GetOptionCount(HighlightLanguage lang)
const wxString & _(const wxString &string)
OptionColour * GetOptionByName(HighlightLanguage lang, const wxString &name)
EditorBase * GetEditor(int index)
Base class for plugin configuration panels.
cbEditor * GetBuiltinEditor(EditorBase *eb)
#define wxSCI_STYLE_DEFAULT
Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles...
virtual wxString GetBitmapBaseName() const =0
bool LoadFile(const wxString &filename)
Load the contents of filename into the editor.
static wxString GetDataFolder(bool global=true)
ColourManager * GetColourManager() const
void SetTabWidth(int tabWidth)
Change the visible size of a tab to be a multiple of the width of a space character.
EditorColourSet * GetColourSet()
void Reset(HighlightLanguage lang)
void DeleteSubPath(const wxString &strPath)
DLLIMPORT void PlaceWindow(wxTopLevelWindow *w, cbPlaceDialogMode mode=pdlBest, bool enforce=false)
cbAuiNotebook * GetNotebook()
bool AttachUnknownControl(const wxString &name, wxWindow *control, wxWindow *parent=NULL)
OptionColour * GetOptionByIndex(HighlightLanguage lang, int index)
void OnPageChanged(wxListbookEvent &event)
void OnMultipleSelections(wxCommandEvent &event)
void OnDynamicCheck(wxCommandEvent &event)
void UpdateOptionsWithSameName(HighlightLanguage lang, OptionColour *base)
static wxFontEncoding GetEncoding(size_t n)
void ClearHistory() override
Clear Undo- (and Changebar-) history.
DLLIMPORT void SetSettingsIconsStyle(wxListCtrl *lc, SettingsIconsStyle style)
Set the icons style for the supplied list control.
int MarkerAdd(int line, int markerNumber)
Add a marker to a line, returning an ID which can be used to find or delete the marker.
void OnColoursCopyFrom(wxCommandEvent &event)
size_t Add(const wxString &str, size_t copies=1)
void OnChangeLang(wxCommandEvent &event)
void Sort(bool reverseOrder=false)
#define wxSCI_CARETSTYLE_LINE
int Add(const wxBitmap &bitmap, const wxBitmap &mask=wxNullBitmap)
virtual wxString GetPageText(size_t nPage) const=0
void SetColour(const wxString &id, const wxColour &colour)
static wxXmlResource * Get()
HighlightLanguage Apply(cbEditor *editor, HighlightLanguage lang, bool colourise)
void OnEditKeywords(wxCommandEvent &event)
wxColourData & GetColourData()
int Printf(const wxString &pszFormat,...)
ConfigurationPanelsArray m_PluginPanels
void SetColour(const wxColour &colour)
void OnColourTheme(wxCommandEvent &event)
virtual void SetSelection(int n)
void SetParentDialog(wxWindow *dialog)
Sets the panel's parent dialog.
wxListView * GetListView() const
void OnColoursReset(wxCommandEvent &event)
cbStyledTextCtrl * m_TextColourControl
wxString GetNativeFontInfoDesc() const
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.
HighlightLanguage GetHighlightLanguage(int lexer)
const wxFontData & GetFontData() const
virtual int FindString(const wxString &s, bool bCase=false) const