void CodeEdit::SetEditorSettings(const EditorSettings& settings) { m_indentationSize = settings.GetIndentSize(); SetIndent(m_indentationSize); SetTabWidth(m_indentationSize); bool useTabs = settings.GetUseTabs(); bool showWhiteSpace = settings.GetShowWhiteSpace(); SetUseTabs(useTabs); SetTabIndents(useTabs); SetBackSpaceUnIndents(useTabs); SetViewWhiteSpace(showWhiteSpace); SetMultipleSelection(true); SetAdditionalSelectionTyping(true); SetMultiPaste(1); SetVirtualSpaceOptions(1); if (settings.GetShowLineNumbers()) { // Figure out how wide the margin needs to be do display // the most number of linqes we'd reasonbly have. int marginSize = TextWidth(wxSTC_STYLE_LINENUMBER, "_99999"); SetMarginWidth(0, marginSize); SetMarginType(0,wxSTC_MARGIN_NUMBER); } else { SetMarginWidth(0, 0); } m_enableAutoComplete = settings.GetEnableAutoComplete(); }
void Edit::OnMultipleSelectionsTyping(wxCommandEvent& WXUNUSED(event)) { bool isSet = GetAdditionalSelectionTyping(); SetAdditionalSelectionTyping(!isSet); }