57 #define ERROR_STYLE wxSCI_MARK_SMALLRECT 58 #define BOOKMARK_STYLE wxSCI_MARK_ARROW 59 #define BREAKPOINT_STYLE wxSCI_MARK_CIRCLE 60 #define DEBUG_STYLE wxSCI_MARK_ARROW 61 #define DEBUG_STYLE_HIGHLIGHT wxSCI_MARK_BACKGROUND 63 #define BREAKPOINT_OTHER_MARKER 1 64 #define BREAKPOINT_DISABLED_MARKER 2 65 #define BREAKPOINT_MARKER 3 66 #define BOOKMARK_MARKER 4 67 #define ERROR_MARKER 5 68 #define DEBUG_MARKER 6 69 #define DEBUG_MARKER_HIGHLIGHT 7 71 #define C_LINE_MARGIN 0 // Line numbers 72 #define C_MARKER_MARGIN 1 // Bookmarks, Breakpoints... 73 #define C_CHANGEBAR_MARGIN 2 74 #define C_FOLDING_MARGIN 3 117 #ifdef fileload_measuring 127 #ifdef fileload_measuring 151 for (
int line = 0; line < maxLines; line++)
159 while ((i >= lineStart) && ((ch ==
_T(
' ')) || (ch ==
_T(
'\t'))))
197 if (cfg->
ReadBool(
_T(
"/show_line_numbers"),
true))
204 if (cfg->
ReadBool(
_T(
"/margin/dynamic_width"),
false))
206 int lineNumChars = 1;
209 while (lineCount >= 10)
215 int lineNumWidth = lineNumChars * pixelWidth + pixelWidth * 0.75;
223 lineNumWidth = lineNumChars * pixelWidth2 + pixelWidth2 * 0.75;
239 int* pLineNumbersWidth =
nullptr;
247 if (cfg->
ReadBool(
_T(
"/margin/dynamic_width"),
false))
249 int lineNumChars = 1;
252 while (lineCount >= 10)
258 int lineNumWidth = lineNumChars * pixelWidth + pixelWidth * 0.75;
260 if (lineNumWidth != *pLineNumbersWidth)
263 *pLineNumbersWidth = lineNumWidth;
313 "((ht|f)tp(s?)\\:\\/\\/)" 317 "([\\w\\-]+(\\.[\\w\\-]+)+)" 320 "(\\/?)([\\w\\-\\.\\?\\,\\'\\/\\\\\\+&%\\$#]*)?" 321 "([\\d\\w\\.\\/\\%\\+\\-\\=\\&\\?\\:\\\\\\"\\'\\,\\|\\~\\;]*)"));
332 while ( (startPos > 0) && (space.
Find(curCh) == -1) )
342 while ( (endPos < maxPos) && (space.
Find(curCh) == -1) )
377 int currLine = (line == -1)
381 unsigned int len = text.
Length();
383 for (
unsigned int i = 0; i < len; ++i)
385 if (text[i] ==
_T(
' ') || text[i] ==
_T(
'\t'))
404 int lineCount[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
410 for (
int line = std::max(0, stc->
GetLineCount() / 2 - 500); line < maxLine; ++line)
420 for (
int i = 2; i < 9; ++i)
422 if (indent.
Length() % i == 0)
428 if (lineCount[0] > 0 && lineCount[1] == 0)
430 double total = lineCount[0] + lineCount[1];
433 else if (lineCount[0] / total > 0.75)
435 else if (lineCount[1] / total < 0.75)
438 total = lineCount[1];
440 for (
int i = 2; i < 8; ++i)
442 if (lineCount[i] > lineCount[tabSize])
445 if (lineCount[tabSize] / total < 0.65)
451 if ((lineCount[2] - lineCount[6]) / total < 0.1)
453 if ( lineCount[2] > lineCount[4] * 1.8
454 || lineCount[4] / total < 0.5 )
458 if ( lineCount[4] > lineCount[8] * 1.8
459 || lineCount[8] / total < 0.5 )
463 if (lineCount[8] / total < 0.6)
468 if ( lineCount[3] > lineCount[6] * 1.8
469 || lineCount[6] / total < 0.5 )
471 if (lineCount[6] / total < 0.6)
476 if (lineCount[tabSize] / total < 0.7)
606 int lengthDoc = control->GetLength();
607 const int maxLengthDoc = 1000000;
609 char chNext = control->GetCharAt(0);
610 for (
int i = 0; i < lengthDoc; i++)
613 chNext = control->GetCharAt(i + 1);
626 else if (i > maxLengthDoc)
640 if (platform::windows)
643 eolModeStr =
_T(
"\"CR-LF\"");
648 eolModeStr =
_T(
"\"LF\"");
660 if ( (linesLF > linesCR) && (linesLF > linesCRLF) )
663 eolModeStr =
_T(
"\"LF\"");
665 else if ( (linesCR > linesLF) && (linesCR > linesCRLF) )
668 eolModeStr =
_T(
"\"CR\"");
670 else if ( (linesCRLF > linesLF) && (linesCRLF > linesCR))
673 eolModeStr =
_T(
"\"CR-LF\"");
676 unsigned int delay = 2000;
677 if ( ( (linesCR>0) && (linesCRLF>0) )
678 || ( (linesLF>0) && (linesCRLF>0) )
679 || ( (linesCR>0) && (linesLF>0) ) )
683 InfoWindow::Display(
_(
"Mixed Line Endings"),
_(
"Mixed line endings found, setting mode ") + eolModeStr, delay);
696 m_SplitType(stNoSplit),
762 static int untitledCounter = 1;
768 f.
Printf(
_(
"Untitled%d"), untitledCounter++);
800 if (
Manager::Get()->GetConfigManager(
_T(
"editor"))->ReadBool(
_T(
"/folding/fold_all_on_open"),
false))
817 event.SetEditor(
this);
818 event.SetInt(intArg);
819 event.SetString(strArg);
890 bool wasmodified =
false;
891 if (preserve_modified)
919 if (
Manager::Get()->GetConfigManager(
_T(
"editor"))->ReadBool(
_T(
"/folding/show_folds"),
true) )
927 if (
Manager::Get()->GetConfigManager(
_T(
"editor"))->ReadBool(
_T(
"/tab_text_relative"),
true))
942 dbg << _T(
"[ed] Short name: ") <<
GetShortName() << _T(
'\n');
943 dbg << _T(
"[ed] Modified: ") <<
GetModified() << _T(
'\n');
948 if (preserve_modified)
1006 size.x = std::max(size.x, -1);
1007 size.y = std::max(size.y, -1);
1044 int scintilla_events[] =
1047 wxEVT_SCI_STYLENEEDED,
1049 wxEVT_SCI_SAVEPOINTREACHED,
1050 wxEVT_SCI_SAVEPOINTLEFT,
1051 wxEVT_SCI_ROMODIFYATTEMPT,
1052 wxEVT_SCI_DOUBLECLICK,
1055 wxEVT_SCI_MACRORECORD,
1057 wxEVT_SCI_NEEDSHOWN,
1062 wxEVT_SCI_START_DRAG,
1063 wxEVT_SCI_DRAG_OVER,
1066 wxEVT_SCI_HOTSPOT_CLICK,
1067 wxEVT_SCI_HOTSPOT_DCLICK,
1068 wxEVT_SCI_CALLTIP_CLICK,
1069 wxEVT_SCI_AUTOCOMP_SELECTION,
1072 wxEVT_SCI_AUTOCOMP_CANCELLED,
1077 while (scintilla_events[i] != -1)
1139 #if defined ( __WXGTK__ ) && wxCHECK_VERSION(3, 0, 0) 1145 #if defined ( __WXGTK__ ) && wxCHECK_VERSION(3, 0, 0) 1205 #if defined ( __WXGTK__ ) && wxCHECK_VERSION(3, 0, 0) 1210 #if defined ( __WXGTK__ ) && wxCHECK_VERSION(3, 0, 0) 1264 if (mgr->
ReadBool(
_T(
"/tab_text_relative"),
true))
1379 if (mgr->
ReadBool(
_T(
"/word_wrap_style_home_end"),
true))
1391 if (mgr->
ReadBool(
_T(
"/simplified_home"),
false))
1412 if (mgr->
ReadBool(
_T(
"/simplified_home"),
false))
1426 const int caretBuffer = mgr->
ReadInt(
wxT(
"/caret_buffer"), 2);
1427 if (caretBuffer == 0)
1432 else if (caretBuffer > 0 && caretBuffer <= 10)
1479 bool imageBP = mgr->
ReadBool(
_T(
"/margin_1_image_bp"),
true);
1485 if (iconBP.
IsOk() && iconBPDis.
IsOk() && iconBPOth.
IsOk())
1515 if (mgr->
ReadBool(
_T(
"/margin/use_changebar"),
true))
1536 const bool multiTyping = mgr->
ReadBool(
_T(
"/selection/multi_typing"),
false);
1540 unsigned virtualSpace = 0;
1541 if (mgr->
ReadBool(
_T(
"/selection/use_rect_vspace"),
false))
1543 if (mgr->
ReadBool(
_T(
"/selection/use_vspace"),
false))
1567 if (mgr->
ReadBool(
_T(
"/detect_indent"),
false))
1571 if (indentStyle == 0)
1573 else if (indentStyle != -1)
1584 if (mgr->
ReadBool(
_T(
"/folding/show_folds"),
true))
1680 if (!
Open(detect_encoding))
1743 #ifdef fileload_measuring 1758 #ifdef fileload_measuring 1783 #ifdef fileload_measuring 1851 int StoredIndex = 0;
1865 Filter = mgr->
Read(
_T(
"/file_dialogs/save_file_as/filter"),
_T(
"C/C++ files"));
1877 Path = mgr->
Read(
_T(
"/file_dialogs/save_file_as/directory"), Path);
1886 dlg.SetFilterIndex(StoredIndex);
1888 if (dlg.ShowModal() !=
wxID_OK)
1910 int Index = dlg.GetFilterIndex();
1913 mgr->
Write(
_T(
"/file_dialogs/save_file_as/filter"), Filter);
1914 wxString Test = dlg.GetDirectory();
1915 mgr->
Write(
_T(
"/file_dialogs/save_file_as/directory"), dlg.GetDirectory());
1928 for (
int i = 0; i < count; ++i)
1942 if (backupLength == realLength)
1945 if (mgr->
ReadBool(
_T(
"/folding/show_folds"),
true))
1948 for (
int i = 0; i < count; ++i)
1952 if (oldFoldLevel != newFoldLevel)
1985 Manager::Get()->
GetLogManager()->
Log(
_T(
"cbEditor::AutoComplete() is obsolete.\nUse AutoComplete(cbEditor &ed) from the Abbreviations plugin instead."));
2000 for (
int line = 0; line < count; ++line)
2033 FoldRange(
int start,
int end,
bool hasContracted) :
2036 hasContracted(hasContracted)
2044 std::stack<FoldRange> parentFolds;
2047 for (
int line = 0; line < count; ++line)
2049 while (!parentFolds.empty() && parentFolds.top().end < line)
2068 hasContracted =
true;
2071 if (parentFolds.empty())
2072 hasContracted =
false;
2074 hasContracted = parentFolds.top().hasContracted;
2076 parentFolds.push(FoldRange(line, lastChild, hasContracted));
2128 ctrl->
FoldLine(foldLine,
int(fold));
2130 if (foldFlags & FoldFlags::ensureVisible)
2154 wxColor f(0xff, 0xff, 0xff);
2155 wxColor b(0x80, 0x80, 0x80);
2251 const int endPos = startPos + control->
LineLength(line);
2252 if (endPos <= startPos)
2255 int tokenPos = control->
FindText(startPos, endPos, tokenName,
2284 if (!notifyDebugger)
2307 if (!notifyDebugger)
2326 if (!notifyDebugger)
2338 bool toggle =
false;
2396 for (DebuggerManager::RegisteredPlugins::const_iterator it = plugins.begin(); it != plugins.end(); ++it)
2403 cb::shared_ptr<const cbBreakpoint> bp = debugger->
GetBreakpoint(ii);
2406 if (bp->IsEnabled())
2418 cb::shared_ptr<const cbBreakpoint> bp = debugger->
GetBreakpoint(ii);
2484 if (fromLine == toLine)
2503 if (fromLine == toLine)
2709 control->
GotoPos(matchingBrace);
2730 if (ch ==
_T(
'{') || ch ==
_T(
'[') || ch ==
_T(
'(') ||
2731 ch ==
_T(
'}') || ch ==
_T(
']') || ch ==
_T(
')'))
2736 const int currColum = control->
GetColumn(currPos);
2737 const int newColum = control->
GetColumn(newPos);
2754 int currLine = (line == -1)
2758 unsigned int len = text.
Length();
2760 for (
unsigned int i = 0; i < len; ++i)
2762 if (text[i] ==
_T(
' '))
2766 else if (text[i] ==
_T(
'\t'))
2849 wxMenu *bookmarks =
nullptr, *folding =
nullptr, *editsubmenu =
nullptr, *insert =
nullptr;
2855 if (
Manager::Get()->GetConfigManager(
_T(
"editor"))->ReadBool(
_T(
"/folding/show_folds"),
false))
2894 if (insert || bookmarks || folding)
2906 wxMenu* insert =
nullptr;
2927 wxPoint clientpos(ScreenToClient(position));
2934 bool inside1 = r.
Contains(clientpos);
2939 clientpos = control->ScreenToClient(position);
2940 if (clientpos.
x < margin)
2955 if (hasBreak || hasBreakDisabled)
2961 if (hasBreakDisabled)
3060 "Perhaps your current printer is not set correctly?"),
_(
"Printing"),
wxICON_ERROR);
3092 const int id =
event.GetId();
3100 else if (
id ==
idCut)
3221 int lineYpix =
event.GetPosition();
3229 int lineYpix =
event.GetPosition();
3243 if (
Manager::Get()->GetEditorManager()->GetActiveEditor() ==
this)
3266 const wxChar ch =
event.GetKey();
3274 if (autoIndent && currLine > 0)
3280 for (
int i = currLine - 1; i >= 0; --i)
3283 if (!(prevLineStr.
IsEmpty() || prevLineStr[0] ==
_T(
'\n') || prevLineStr[0] ==
_T(
'\r')))
3306 bool braceCompleted =
false;
3307 if (
Manager::Get()->GetConfigManager(
_T(
"editor"))->ReadBool(
_T(
"/selection_brace_completion"),
false)
3314 if ( !braceCompleted
3315 &&
Manager::Get()->GetConfigManager(
_T(
"editor"))->ReadBool(
_T(
"/brace_completion"),
true) )
3336 wxRect screenRect = control->GetScreenRect();
3338 ptEvent = control->ClientToScreen(ptEvent);
3340 wxPoint ptClient = control->ScreenToClient(ptScreen);
3342 double distance = sqrt( (ptScreen.
x - ptEvent.x) * (ptScreen.
x - ptEvent.x)
3343 + (ptScreen.
y - ptEvent.y) * (ptScreen.
y - ptEvent.y) );
3344 if (!screenRect.
Contains(ptScreen) || distance > 10)
3351 newEvent.
SetX(ptClient.
x);
3352 newEvent.
SetY(ptClient.
y);
3383 int linesAdded =
event.GetLinesAdded();
3386 if ((isAdd || isDel) && linesAdded != 0)
3402 for (DebuggerManager::RegisteredPlugins::const_iterator it = plugins.begin(); it != plugins.end(); ++it)
3404 if (it->first != active)
3423 int line =
event.GetLine();
3470 if (mgr->
ReadBool(
_T(
"/folding/show_folds"),
true))
virtual void GotoPreviousBookmark()
Go to previous bookmark.
ProjectFile * GetFileByFilename(const wxString &filename, bool isRelative=true, bool isUnixFilename=false)
Access a file of the project.
#define wxSCI_VS_USERACCESSIBLE
static wxFontEncoding GetEncodingFromName(const wxString &encoding)
static int DetectIndentStyle(cbStyledTextCtrl *stc)
Detect the indentation style used in a document.
wxString F(const wxChar *msg,...)
sprintf-like function
void IndicatorSetForeground(int indicator, const wxColour &fore)
Set the foreground colour of an indicator.
wxPoint wxGetMousePosition()
virtual const wxString & GetShortName() const
Returns the editor's short name.
static void Display(const wxString &title, const wxString &message, unsigned int delay=5000, unsigned int hysteresis=1)
wxPrintOrientation GetOrientation() const
cbStyledTextCtrl * m_pControl
wxFontEncoding GetEncoding() const
void SelectAll() override
Select everything in the editor.
#define wxSCI_CARET_SLOP
Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
wxString relativeToCommonTopLevelPath
The relative filename to the common top-level path.
cbDebuggerPlugin * GetActiveDebugger()
void ReplaceSelection(const wxString &text)
Replace the selected text with the argument text.
#define wxSCI_CMD_HOMEWRAP
Like Home but when word-wrap is enabled goes first to start of display line HomeDisplay, then to start of document line Home.
int MarkerGet(int line)
Get a bit mask of all the markers set on a line.
void OverrideUseTabsPerLanguage(cbStyledTextCtrl *control)
#define BREAKPOINT_DISABLED_MARKER
#define BREAKPOINT_OTHER_MARKER
void LowerCase()
Transform the selection to lower case.
void SetDocPointer(void *docPointer)
Change the document object used.
virtual bool Detach(wxWindow *window)
#define wxSCI_MARGIN_NUMBER
wxSplitterWindow * m_pSplitter
#define wxSCI_MARKNUM_FOLDEROPENMID
const int idBookmarksPrevious
int GetFoldParent(int line) const
Find the parent line of a child line.
void FoldLine(int line, int action)
Expand or contract a fold header.
void MarkerDefineBitmap(int markerNumber, const wxBitmap &bmp)
Define a marker from a bitmap.
void EnsureVisible(int line)
Ensure a particular line is visible by expanding any header line hiding it.
#define wxSCI_MARK_LCORNER
PluginManager * GetPluginManager() const
void EmptyUndoBuffer(bool collectChangeHistory=false)
Delete the undo history.
void MarkerSetBackground(int markerNumber, const wxColour &back)
Set the background colour used for a particular marker number.
int GetZoom() const
Retrieve the zoom level.
void SetSashPosition(int position, bool redraw=true)
wxString relativeFilename
The relative (to the project) filename of this file.
const int idBreakpointAdd
void StyleClearAll()
Clear all the styles and make equivalent to the global default style.
bool FromString(const wxString &s)
#define wxSCI_MARKNUM_FOLDER
#define wxSCI_MARK_ARROWDOWN
const int idBookmarkRemove
#define wxSCI_MARK_BACKGROUND
Invisible mark that only sets the line background colour.
int MarkerNext(int lineStart, int markerMask)
Find the next line at or after lineStart that includes a marker in mask.
void SetEOLMode(int eolMode)
Set the current end of line mode.
void Assign(const wxFileName &filepath)
ConfigManager * GetConfigManager(const wxString &name_space) const
const int idFoldingFoldCurrent
#define wxSCI_MARKNUM_FOLDEROPEN
void MarkLine(int marker, int line)
bool CanRedo() const override
Is there something to redo?
int ReadInt(const wxString &name, int defaultVal=0)
bool GetSelectionEmpty() const
Is every selected range empty?
Base class for debugger plugins.
virtual bool SplitHorizontally(wxWindow *window1, wxWindow *window2, int sashPosition=0)
virtual void RebuildTree()=0
Rebuild the project manager's tree.
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
const int idFoldingFoldAll
bool FixFoldState()
Fix fold states by comparing foldBackup with m_pControl.
void UpperCase()
Transform the selection to upper case.
#define wxSCI_MARGIN_SYMBOL
void OnEditorModified(wxScintillaEvent &event)
int MarkerPrevious(int lineStart, int markerMask)
Find the previous line before lineStart that includes a marker in mask.
#define wxSCI_PRINT_INVERTLIGHT
PrintColourMode - invert the light value of each style for printing.
cbEditorInternalData * m_pData
void SetTabIndents(bool tabIndents)
Sets whether a tab pressed when caret is within indentation indents.
void CmdKeyAssign(int key, int modifiers, int cmd)
When key+modifier combination keyDefinition is pressed perform sciCommand.
void Paste()
Paste the contents of the clipboard into the document replacing the selection.
bool GetFoldExpanded(int line) const
Is a header line expanded?
void SetIndentationGuides(int indentView)
Show or hide indentation guides.
void Copy() override
Copy selected text/object to clipboard.
#define wxSCI_MARK_VLINE
Shapes used for outlining column.
void MarkerSetForeground(int markerNumber, const wxColour &fore)
Set the foreground colour used for a particular marker number.
#define wxSCI_CMD_VCHOMEEXTEND
Like VCHome but extending selection to new caret position.
void EnsureFinalLineEnd()
Add extra blank line to the file.
bool ShowOptions(wxWindow *parent)
Show the file properties dialog.
const int idOpenContainingFolder
DLLIMPORT bool HasRegisteredHooks()
Are there any hooks registered?
#define wxSCI_CMD_WORDPARTLEFT
Move to the previous change in capitalisation.
EditorColourSet * m_pTheme
void BraceHighlight(int posA, int posB)
Highlight the characters at two positions.
static wxFontEncoding GetDefaultEncoding()
DLLIMPORT wxBitmap cbLoadBitmap(const wxString &filename, wxBitmapType bitmapType=wxBITMAP_TYPE_PNG)
This function loads a bitmap from disk.
bool Reload(bool detectEncoding=true)
Reloads the file from disk.
bool wxFileExists(const wxString &filename)
int editorSplitActive
Last active splitview (1 or 2).
void GotoLine(int line, bool centerOnScreen=true) override
Move the caret at the specified line.
wxFileName file
The full filename of this file.
void RemoveFileFromProject(ProjectFile *pfile, cbProject *project)
Remove a file from a project.
void EnsureVisibleEnforcePolicy(int line)
Ensure a particular line is visible by expanding any header line hiding it.
int GetColumn(int pos) const
Retrieve the column number of a position, taking tab width into account.
void SetCaretPeriod(int periodMilliseconds)
Get the time in milliseconds that the caret is on and off. 0 = steady on.
void EnsureConsistentLineEnds()
Make sure all the lines end with the same EOL mode.
void SetColourSet(EditorColourSet *theme)
Set the colour set to use.
void BreakpointMarkerToggle(int line)
#define wxSCI_MARK_CIRCLEMINUSCONNECTED
#define wxSCI_FIND_WHOLEWORD
int editorPos_2
The last known caret position in an editor for this file (right/bottom control if split)...
virtual void ShowFileInTree(ProjectFile &projectFile)=0
void SetMarginType(int margin, int marginType)
Set a margin to be either numeric or symbolic.
bool GotoTokenPosition(int line, const wxString &tokenName)
Move the caret at the specified line.
void SetWhitespaceForeground(bool useSetting, const wxColour &fore)
Set the foreground colour of all whitespace and whether to use this setting.
bool DoSelectionBraceCompletion(const wxChar &ch)
Put braces/quotes around the current selection in the editor.
bool IndicatorGetUnder(int indicator) const
Retrieve whether indicator drawn under or over text.
bool ReadBool(const wxString &name, bool defaultVal=false)
void UnderlineFoldedLines(bool underline)
void UnfoldAll()
Unfold all editor folds (shows blocks of code).
#define wxSCI_FOLDLEVELBASE
void SetCaretForeground(const wxColour &fore)
Set the foreground colour of the caret.
DLLIMPORT bool NormalizePath(wxFileName &f, const wxString &base)
virtual int GetBreakpointsCount() const =0
void Print(bool selectionOnly, PrintColourMode pcm, bool line_numbers)
Print the file.
cbStyledTextCtrl * m_pControl2
virtual bool IsOk() const
FileManager * GetFileManager() const
DLLIMPORT bool GetFilterIndexFromName(const wxString &FiltersList, const wxString &FilterName, int &Index)
Get the index of the filter 'FilterName' in the FiltersList.
#define C_CHANGEBAR_MARGIN
int ReplaceTarget(const wxString &text)
Replace the target text with the argument text.
#define wxSCI_MODEVENTMASKALL
cbEditor(wxWindow *parent, const wxString &filename, EditorColourSet *theme)
cbEditor constructor.
void SetSelectionNCaretVirtualSpace(int selection, int space)
Set the virtual space of the caret of the nth selection.
void Paste() override
Paste selected text/object from clipboard.
void SetText(const wxString &text)
Replace the contents of the document with the argument text.
wxString GetLine(int line) const
Retrieve the contents of a line.
virtual void SwitchToProjectsPage()=0
Switches the management's notebook to the Projects tab.
void NotifyPlugins(wxEventType type, int intArg=0, const wxString &strArg=wxEmptyString, int xArg=0, int yArg=0)
bool Matches(const wxString &text, int flags=0) const
bool LineHasMarker(int marker, int line=-1) const
bool Open(bool detectEncoding=true)
void OnEditorDwellStart(wxScintillaEvent &event)
#define wxSCI_VS_RECTANGULARSELECTION
static wxString GetEncodingName(wxFontEncoding encoding)
int GetSelectionStart() const
Returns the position at the start of the selection.
void IndicatorSetUnder(int indicator, bool under)
Set an indicator to draw under text or over(default).
wxIntPtr SendMsg(int msg, wxUIntPtr wp=0, wxIntPtr lp=0) const
Send a message to Scintilla.
bool Close(const wxString &filename, bool dontsave=false)
void SetSelectionNAnchorVirtualSpace(int selection, int space)
Set the virtual space of the anchor of the nth selection.
void Unsplit()
Unsplit the editor window.
void SetReadOnly(bool readOnly)
Set to read only or read write.
cbProjectManagerUI & GetUI()
virtual bool HasBookmark(int line) const
Does line has bookmark?
const int idBreakpointEdit
void Cut()
Cut the selection to the clipboard.
void MarkerDelete(int line, int markerNumber)
Delete a marker from a line.
void Cut() override
Cut selected text/object to clipboard.
#define wxSCI_MARK_CIRCLEMINUS
cbEditorInternalData(cbEditor *owner, LoaderBase *fileLoader=nullptr)
void SetFoldExpanded(int line, bool expanded)
Show the children of a header line.
void OnEditorChange(wxScintillaEvent &event)
bool HasSelection() const override
Is there a selection?
void SetFoldMarginColour(bool useSetting, const wxColour &back)
Set one of the colours used as a chequerboard pattern in the fold margin.
int m_byteOrderMarkLength
void DoBraceCompletion(const wxChar &ch)
Automated braces/quotes completion.
const int idFoldingUnfoldCurrent
EVTIMPORT const wxEventType cbEVT_EDITOR_SPLIT
bool m_ensure_consistent_line_ends
void SetModified(bool modified=true) override
Set the editor's modification state to modified.
void SetVisiblePolicy(int visiblePolicy, int visibleSlop)
Set the way the display area is determined when a particular line is to be moved to by Find...
virtual void EnableBreakpoint(const wxString &filename, int line, bool enable)=0
bool OpenContainingFolder()
#define wxSCI_MARK_BOXPLUSCONNECTED
#define wxSCI_MARK_CIRCLEPLUSCONNECTED
void SetSavePoint()
Remember the current position in the undo history as the position at which the document was saved...
const int idFoldingToggleAll
int GetModificationType() const
int editorZoom
The zoom-factor of the editor for this file (left/top control if split).
void * GetDocPointer()
Retrieve a pointer to the document object.
Represents a file in a Code::Blocks project.
int GetLexer() const
Retrieve the lexing language of the document.
#define wxSCI_CMD_LINEENDWRAP
Like LineEnd but when word-wrap is enabled goes first to end of display line LineEndDisplay, then to start of document line LineEnd.
int editorPos
The last known caret position in an editor for this file (left/top control if split).
void HighlightBraces()
Highlights the brace pair (one of the braces must be under the cursor)
void IndicatorSetStyle(int indicator, int indicatorStyle)
Set an indicator to plain, squiggle or TT.
#define wxSCI_CARET_EVEN
If CARET_EVEN is not set, instead of having symmetrical UZs, the left and bottom UZs are extended up ...
int GetFoldLevelPrev() const
size_t find(const wxString &str, size_t nStart=0) const
A generic Code::Blocks event.
#define wxSCI_CARET_STRICT
If CARET_STRICT is set, the policy is enforced...
#define wxSCI_MARKNUM_FOLDERSUB
int GetLineEndPosition(int line) const
Get the position after the last visible characters on a line.
#define wxSCI_CMD_BACKTAB
Dedent the selected lines.
#define wxSCI_CMD_VCHOMEWRAPEXTEND
Like VCHomeExtend but when word-wrap is enabled extends first to start of display line VCHomeDisplayE...
DLLIMPORT bool GetFilterNameFromIndex(const wxString &FiltersList, int Index, wxString &FilterName)
Get the Filter name for the Index-th filter in the FiltersList.
void DoFoldAll(FoldMode fold)
void SetZoom(int zoom)
Set zoomfactor for builtin editors.
const int idFoldingUnfoldAll
EditorManager * GetEditorManager() const
void SetEncoding(wxFontEncoding encoding)
int ContractedFoldNext(int lineStart)
Find the next line at or after lineStart that is a contracted fold header line.
void SetProperty(const wxString &key, const wxString &value)
Set up a value that may be used by a lexer for some optional feature.
#define wxSCI_CMD_LINEENDWRAPEXTEND
Like LineEndExtend but when word-wrap is enabled extends first to end of display line LineEndDisplayE...
void SetCaretLineVisible(bool show)
Display the background of the line containing the caret in a different colour.
int FindChangedLine(const int fromLine, const int toLine) const
Find a changed line, if fromLine > toLine search is performed backwards.
wxDateTime GetLastFocusTime() const
#define wxSCI_CMD_WORDPARTRIGHTEXTEND
Move to the next change in capitalisation extending selection to new caret position.
#define wxSCI_KEYMOD_SHIFT
Try to detect the encoding of a file on disk.
void GotoNextChanged() override
Goto next changed line.
#define wxSCI_CMD_TAB
If selection is empty or all on one line replace the selection with a tab character.
wxUSE_UNICODE_dependent wxChar
wxString GetSelectedText()
Retrieve the selected text.
#define wxSCI_CMD_WORDLEFTEXTEND
Move caret left one word extending selection to new caret position.
int editorSplitPos
Last splitter position.
void MarkerNext(int marker)
void SetWrapMode(int wrapMode)
Sets whether text is word wrapped.
bool CanPaste() const
Will a paste succeed?
#define wxSCI_C_STRINGEOL
ProjectManager * GetProjectManager() const
Functions returning pointers to the respective sub-manager instances.
#define wxSCI_STYLE_LINENUMBER
cbStyledTextCtrl * m_foldBackup
void SetChangeCollection(bool collectChange) override
PluginManager manages plugins.
const wxString space(_T(" "))
void DoFoldBlockFromLine(int line, FoldMode fold, unsigned foldFlags)
wxPrintData & GetPrintData()
bool Contains(int x, int y) const
virtual void SetErrorLine(int line)
Highlight the specified line as error.
const int idAddFileToProject
void Write(const wxString &name, const wxString &value, bool ignoreEmpty=false)
DebuggerManager * GetDebuggerManager() const
wxPaperSize GetPaperId() const
void ShowLines(int lineStart, int lineEnd)
Make a range of lines visible.
int editorTopLine
The last known caret line in an editor for this file (left/top control if split). ...
virtual const wxString & GetFilename() const
Get the editor's filename (if applicable).
void SetLanguage(HighlightLanguage lang, bool colourise)
Sets the language for this editor.
DLLIMPORT wxString UnixFilename(const wxString &filename, wxPathFormat format=wxPATH_NATIVE)
void SetMarginWidth(int margin, int pixelWidth)
Set the width of a margin to a width expressed in pixels.
void SetZoom(int zoomInPoints)
Set the zoom level.
void SetAdditionalSelectionTyping(bool additionalSelectionTyping)
Set whether typing can be performed into multiple selections.
Represents a Code::Blocks project.
virtual void InitFilename(const wxString &filename)
Initializes filename data.
void OnClose(wxCloseEvent &event)
bool SaveAs() override
Save editor contents under a different filename.
int GetEOLMode() const
Retrieve the current end of line mode - one of wxSCI_EOL_CRLF, wxSCI_EOL_CR, or wxSCI_EOL_LF.
int GetLineIndentInSpaces(int line=-1) const
Returns the specified line's (0-based) indentation (whitespace) in spaces.
int GetCurrentLine()
Manually declared methods.
void OnUserListSelection(wxScintillaEvent &event)
void SetDimension(int x, int y, int width, int height)
void Copy()
Copy the selection to the clipboard.
#define wxSCI_FIND_MATCHCASE
void SetReadOnly(bool readonly=true) override
Set the editor read-only.
#define wxSCI_FOLDACTION_EXPAND
#define wxSCI_IV_LOOKBOTH
#define wxSCI_KEYMOD_CTRL
void SetViewEOL(bool visible)
Make the end of line characters visible or invisible.
cbStyledTextCtrl * GetControl() const
Returns a pointer to the underlying cbStyledTextCtrl object (which itself is the wxWindows implementa...
virtual bool HasBreakpoint(int line) const
Does line has debugger breakpoint? If line is -1, use current line.
#define wxSCI_CMD_VCHOMEWRAP
Like VCHome but when word-wrap is enabled goes first to start of display line VCHomeDisplay, then behaves like VCHome.
wxColour GetColour(const wxString &id) const
bool SetNativeFontInfo(const wxString &info)
ModuleType
The type of module offering a context menu.
#define wxSCI_MARKNUM_FOLDEREND
wxFontEncoding m_encoding
virtual const wxString & GetTitle() const
Read the target's title.
int editorSplit
Split type of the editor as int.
void BraceBadLight(int pos)
Highlight the character at a position indicating there is no matching brace.
#define wxSCI_PRINT_BLACKONWHITE
PrintColourMode - force black text on white background for printing.
virtual void RefreshBreakpointMarkers()
Refresh all markers for the breakpoints (only the markers for the current debugger will be shown) ...
int GetTabWidth() const
Retrieve the visible size of a tab.
virtual bool AddBreakpoint(cbDebuggerPlugin *plugin, const wxString &filename, int line)=0
wxSizerItem * Add(wxWindow *window, const wxSizerFlags &flags)
int GetFoldLevel(int line) const
Retrieve the fold level of a line.
bool IsReadOnly() const override
Is the editor read-only?
size_t Replace(const wxString &strOld, const wxString &strNew, bool replaceAll=true)
#define wxSCI_CMD_WORDPARTLEFTEXTEND
Move to the previous change in capitalisation extending selection to new caret position.
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt=true)
int IndicatorGetStyle(int indicator) const
Retrieve the style of an indicator.
#define wxSCI_CMD_HOME
Move caret to first position on line.
bool AddBreakpoint(int line=-1, bool notifyDebugger=true)
Add debugger breakpoint at specified line.
void MarkerDeleteAll(int markerNumber)
Delete all markers with a particular number from all lines.
const wxSize wxDefaultSize
bool GetModify() const
Is the document different from when it was last saved?
#define wxSCI_CMD_WORDPARTRIGHT
Move to the change next in capitalisation.
const wxPoint wxDefaultPosition
void Redo() override
Redo changes.
const int idFoldingToggleCurrent
void SetChangeCollection(bool collectChange)
Choose between collecting actions into the changes history and discarding them.
virtual void ToggleBookmark(int line=-1)
Toggle bookmark at specified line.
virtual void ClearAllBookmarks()
Clear all bookmarks.
#define wxSCI_PRINT_COLOURONWHITE
PrintColourMode - text stays coloured, but all background is forced to be white for printing...
bool CanUndo() const override
Is there something to undo?
bool GetMatch(size_t *start, size_t *len, size_t index=0) const
int FindText(int minPos, int maxPos, const wxString &text, int flags=0, int *findEnd=NULL)
Find some text in the document.
Base class that all "editors" should inherit from.
LogManager * GetLogManager() const
int GetCurrentPos() const
Returns the position of the caret.
bool SetItemMinSize(wxWindow *window, int width, int height)
wxString & Truncate(size_t len)
cbProject * GetActiveProject()
Retrieve the active project.
wxString Read(const wxString &key, const wxString &defaultVal=wxEmptyString)
EVTIMPORT const wxEventType cbEVT_EDITOR_UPDATE_UI
int GetLength() const
Returns the number of bytes in the document.
void OnZoom(wxScintillaEvent &event)
virtual wxString GetBasePath() const
Read the target's base path, e.g. if GetFilename() returns "/usr/local/bin/xxx", base path will retur...
#define wxSCI_MARKNUM_CHANGESAVED
void StripTrailingSpaces()
Strip trailing blanks before saving.
int SetSelectionInt(int caret, int anchor)
Set a simple selection.
static int DetectLineEnds(cbStyledTextCtrl *control)
void SetCaretStyle(int caretStyle)
Set the style of the caret to be drawn.
cbStyledTextCtrl * CreateEditor()
void SetFoldingIndicator(int id)
Sets the type of folding indicator where id is one of the following: 0->Arrow, 1->Circle, 2->Square, 3->simple.
size_t find_last_not_of(const wxString &str, size_t nStart=npos) const
void StyleSetFont(int styleNum, const wxFont &font)
Set style size, face, bold, italic, and underline attributes from a wxFont's attributes.
#define wxSCI_LEX_MAKEFILE
static void InternalSetEditorStyleAfterFileOpen(cbStyledTextCtrl *control)
void GotoMatchingBrace()
Jumps to the matching brace (if there is one).
void SetMarginSensitive(int margin, bool sensitive)
Make a margin sensitive or insensitive to mouse clicks.
int editorTopLine_2
The last known caret line in an editor for this file(right/bottom control if split).
const int idBookmarksToggle
void OnMarginClick(wxScintillaEvent &event)
static wxFontEncoding GetSystemEncoding()
#define wxSCI_FOLDACTION_TOGGLE
int GetAnchor() const
Returns the position of the opposite end of the selection to the caret.
LoaderBase * m_pFileLoader
void OnScintillaEvent(wxScintillaEvent &event)
notify all the registered EditorHook functions
static wxString GetLineIndentString(int line, cbStyledTextCtrl *stc)
const int idBreakpointRemove
void MarkerPrevious(int marker)
const long idBreakpointDisable
#define wxSCI_CMD_WORDLEFT
Move caret left one word.
wxString GetCurLine(int *linePos=NULL)
Retrieve the text of the line containing the caret.
#define wxSCI_CMD_WORDRIGHT
Move caret right one word.
void SetMultiPaste(int multiPaste)
Change the effect of pasting when there are multiple selections.
int GetEdgeMode() const
Retrieve the edge highlight mode.
#define wxSCI_CMD_VCHOME
Move caret to before first visible character on line.
void NotifyPlugins(CodeBlocksEvent &event)
void SetMouseDwellTime(int periodMilliseconds)
Sets the time the mouse must sit still to generate a mouse dwell event.
void SetModEventMask(int eventMask)
Set which document modification events are sent to the container.
const int idBookmarkRemoveAll
bool CanUndo() const
Are there any undoable actions in the undo history?
bool editorOpen
If true, the file is open inside an editor.
static bool Access(const wxString &name, wxFile::OpenMode mode)
const wxString & _(const wxString &string)
wxString & Trim(bool fromRight=true)
void SetLineNumberColWidth(bool both=true)
Set line number column width.
virtual void EditorLinesAddedOrRemoved(cbEditor *editor, int startline, int lines)
Notify the debugger that lines were added or removed in an editor.
int GetSelectionEnd() const
Returns the position at the end of the selection.
#define wxSCI_CMD_WORDRIGHTEXTEND
Move caret right one word extending selection to new caret position.
void SetViewWhiteSpace(int viewWS)
Make white space characters invisible, always visible or visible outside indentation.
int GetSashPosition() const
#define wxSCI_MOD_INSERTTEXT
Notifications Type of modification and the action which caused the modification.
std::map< cbDebuggerPlugin *, PluginData > RegisteredPlugins
wxColour GetCaretLineBackground() const
Get the colour of the background of the line containing the caret.
#define wxSCI_MARK_BOXMINUS
bool m_strip_trailing_spaces
void SetFoldingColWidth(bool both=true)
void MakeNearbyLinesVisible(int line)
Scroll minimum amount such that 2 lines above and below line are shown.
#define wxSCI_FOLDACTION_CONTRACT
static void Yield()
Whenever you need to call wxYield(), call Manager::Yield(). It's safer.
cb_must_consume_result LoaderBase * Load(const wxString &file, bool reuseEditors=false)
Loads a file, once this function is called, the actually loading process is done in the worker thread...
#define wxSCI_STYLE_DEFAULT
Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles...
int PositionFromPoint(wxPoint pt) const
Find the position from a point within the window.
wxArray< int > wxArrayInt
int BraceMatch(int pos, int maxReStyle=0)
Find the position of a matching brace or wxSCI_INVALID_POSITION if no match.
static void ApplyStyles(cbStyledTextCtrl *control)
Apply the editor defaults to any (possibly foreign) cbStyledTextCtrl.
int PositionFromLine(int line) const
Retrieve the position at the start of a line.
void DoInitializations(const wxString &filename, LoaderBase *fileLdr=nullptr)
static bool IsBusy()
For use with plugins.
void UnfoldBlockFromLine(int line=-1)
Unfolds the block containing line.
static wxString GetDataFolder(bool global=true)
const int idRemoveFileFromProject
void Colourise(int start, int end)
Colourise a segment of the document using the current lexing language.
DLLIMPORT wxString GetFilterString(const wxString &ext=wxEmptyString)
Generates and returns the filter string for use in file dialogs.
#define wxSCI_CMD_HOMEEXTEND
Move caret to first position on line extending selection to new caret position.
void SetZoom(int zoom, bool both=true)
DLLIMPORT void DeInitPrinting()
ColourManager * GetColourManager() const
void SetPrintMagnification(int magnification)
Sets the print magnification added to the point size of each style for printing.
void Redo()
Redoes the next action on the undo history.
#define wxSCI_CMD_LINEENDEXTEND
Move caret to last position on line extending selection to new caret position.
wxString GetEncodingName() const
#define wxSCI_MARKNUM_FOLDERTAIL
void SetTabWidth(int tabWidth)
Change the visible size of a tab to be a multiple of the width of a space character.
bool SaveFoldState()
Save fold states within a new cbStyledTextCtrl.
void SetMinimumPaneSize(int paneSize)
void Touch()
Sets the last modification time for the file to 'now'.
void SetProjectFile(ProjectFile *project_file, bool preserve_modified=false)
Set the ProjectFile pointer associated with this editor.
void SetEditorStyleBeforeFileOpen()
bool GetReadOnly() const
In read-only mode?
void SelectAll()
Select all the text in the document.
void HideLines(int lineStart, int lineEnd)
Make a range of lines invisible.
void MarkerToggle(int marker, int line=-1)
void InsertText(int pos, const wxString &text)
Insert string at a position.
int GetCharAt(int pos) const
Returns the character byte at the position.
DLLIMPORT void PlaceWindow(wxTopLevelWindow *w, cbPlaceDialogMode mode=pdlBest, bool enforce=false)
ProjectFile * m_pProjectFile
void FoldAll()
Fold all editor folds (hides blocks of code).
void MarkerDefine(int markerNumber, int markerSymbol, const wxColour &foreground=wxNullColour, const wxColour &background=wxNullColour)
Set the symbol used for a particular marker number, and optionally the fore and background colours...
virtual void SetTitle(const wxString &newTitle)
Set the editor's title.
void EndUndoAction()
End a sequence of actions that is undone and redone as a unit.
RegisteredPlugins const & GetAllDebuggers() const
wxString GetPath(int flags=wxPATH_GET_VOLUME, wxPathFormat format=wxPATH_NATIVE) const
wxColour IndicatorGetForeground(int indicator) const
Retrieve the foreground colour of an indicator.
void FoldBlockFromLine(int line=-1)
Folds the block containing line.
bool GetLineVisible(int line) const
Is a line visible?
static void CountLineEnds(cbStyledTextCtrl *control, int &linesCR, int &linesLF, int &linesCRLF)
void Start(long milliseconds=0)
~cbEditor() override
cbEditor destructor.
cbAuiNotebook * GetNotebook()
void SetEdgeColumn(int column)
Set the column number of the edge.
virtual cb::shared_ptr< cbBreakpoint > GetBreakpoint(int index)=0
cbBreakpointsDlg * GetBreakpointDialog()
Returns a pointer to the breakpoints dialog.
void SetBackSpaceUnIndents(bool bsUnIndents)
Sets whether a backspace pressed when caret is within indentation unindents.
DLLIMPORT wxString GetEOLStr(int eolMode=-1)
Reads settings if eolMode is -1 Expected input (defined in sdk/wxscintilla/include/wx/wxscintilla.h) is: wxSCI_EOL_CRLF=0, wxSCI_EOL_CR=1, or wxSCI_EOL_LF=2.
void Log(const wxString &msg, int i=app_log, Logger::level lv=Logger::info)
int LineLength(int line) const
How many characters are on a line, including end of line characters?
void GotoPos(int caret)
Set caret to a position and ensure it is visible.
wxString GetFullName() const
int GetMarginMask(int margin) const
Retrieve the marker mask of a margin.
wxString GetLineIndentString(int line=-1) const
Returns the specified line's (0-based) indentation (whitespace) string.
int GetBOMSizeInBytes() const
#define wxSCI_INVALID_POSITION
#define wxSCI_MARKNUM_CHANGEUNSAVED
void ClearAll()
Delete all text in the document.
EVTIMPORT const wxEventType cbEVT_EDITOR_BEFORE_SAVE
const int idBookmarksClearAll
#define wxSCI_MASK_FOLDERS
#define wxSCI_MARKNUM_LASTUNUSED
void SetLanguageDependentColours(cbStyledTextCtrl &control)
void SetFoldMarginHiColour(bool useSetting, const wxColour &fore)
Set the other colour used as a chequerboard pattern in the fold margin.
void ToggleFold(int line)
Switch a header line between expanded and contracted.
void DebugLog(const wxString &msg, Logger::level lv=Logger::info)
void SetUseTabs(bool useTabs)
Indentation will only use space characters if useTabs is false, otherwise it will use a combination o...
bool IsBraceShortcutActive()
bool m_ensure_final_line_end
const int idBookmarksNext
void ClearHistory() override
Clear Undo- (and Changebar-) history.
DLLIMPORT void InitPrinting()
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.
wxString & Prepend(const wxString &str)
bool CanPaste() const override
Is there something to paste?
DLLIMPORT bool cbSaveToFile(const wxString &filename, const wxString &contents, wxFontEncoding encoding=wxFONTENCODING_SYSTEM, bool bom=false)
Writes a wxString to a file.
void SetHighlightGuide(int column)
Set the highlighted indentation guide column.
#define DEBUG_MARKER_HIGHLIGHT
const int idShowFileInProject
void Undo()
Undo one action in the undo history.
void OnEditorUpdateUI(wxScintillaEvent &event)
virtual int GetPointSize() const
wxFont StyleGetFont(int style)
Get the font of a style.
int GetStyleAt(int pos) const
Returns the style byte at the position.
#define wxSCI_MARK_TCORNER
virtual void SetDebugLine(int line)
Highlight the line the debugger will execute next.
void DoIndent()
Indents current line/block.
#define wxScintillaEventHandler(func)
int GetLineCount() const
Returns the number of lines in the document. There is always at least one.
void SetMarkerStyle(int marker, int markerType, wxColor fore, wxColor back)
cbProject * GetParentProject()
#define wxSCI_CMD_LINEEND
Move caret to last position on line.
bool Save() override
Save editor contents.
void SetMultipleSelection(bool multipleSelection)
Set whether multiple selections can be made.
int editorZoom_2
The zoom-factor of the editor for this file(right/bottom control if split).
void SetTargetStart(int start)
Sets the position that starts the target which is used for updating the document without affecting th...
virtual void ToggleBreakpoint(int line=-1, bool notifyDebugger=true)
Toggle debugger breakpoint at specified line.
#define wxSCI_PRINT_NORMAL
PrintColourMode - use same colours as screen.
virtual void GotoNextBreakpoint()
Go to next debugger breakpoint.
int LineFromPosition(int pos) const
Retrieve the line containing a position.
wxFontEncoding GetFontEncoding() const
void ChooseCaretX()
Set the last x chosen value to be the caret x position.
#define wxSCI_CARETSTYLE_LINE
virtual void GotoPreviousBreakpoint()
Go to previous debugger breakpoint.
#define EVT_SCI_ZOOM(id, fn)
#define wxSCI_MOD_DELETETEXT
void DoUnIndent()
UnIndents current line/block.
wxString GetText() const
Retrieve all the text in the document.
void OnEditorDwellEnd(wxScintillaEvent &event)
void Undo() override
Undo changes.
void AutoComplete()
This method is obsolete, use the abbreviations plugin instead.
static void InternalSetEditorStyleBeforeFileOpen(cbStyledTextCtrl *control)
int Find(wxUniChar ch, bool fromEnd=false) const
EVTIMPORT const wxEventType cbEVT_EDITOR_OPEN
int TextWidth(int style, const wxString &text)
Measure the pixel width of some text in a particular style.
int GetMarginWidth(int margin) const
Retrieve the width of a margin in pixels.
void SetTargetEnd(int end)
Sets the position that ends the target which is used for updating the document without affecting the ...
void ConnectEvents(cbStyledTextCtrl *stc)
static wxPrinterError GetLastError()
void Split(SplitType split)
Split the editor window.
void ToggleFoldBlockFromLine(int line=-1)
Toggles folding of the block containing line.
HighlightLanguage Apply(cbEditor *editor, HighlightLanguage lang, bool colourise)
wxArrayInt editorFoldLinesArray
Fold lines.
void SetEditorTitle(const wxString &title)
Sets the editor title.
virtual bool SupportsFeature(cbDebuggerFeature::Flags flag)=0
void SetEditorStyleAfterFileOpen()
bool wxLaunchDefaultBrowser(const wxString &url, int flags=0)
#define wxSCI_MARK_CIRCLEPLUS
#define wxSCI_MARK_LCORNERCURVE
const long idBreakpointEnable
#define wxSCI_MARKNUM_FOLDERMIDTAIL
void SetFoldLevel(int line, int level)
Set the fold level of a line.
#define wxSCI_CMD_HOMEWRAPEXTEND
Like HomeExtend but when word-wrap is enabled extends first to start of display line HomeDisplayExten...
#define wxSCI_FOLDLEVELNUMBERMASK
virtual bool SplitVertically(wxWindow *window1, wxWindow *window2, int sashPosition=0)
#define DEBUG_STYLE_HIGHLIGHT
void SetVirtualSpaceOptions(int virtualSpaceOptions)
Set options for virtual space behaviour.
void SetFileState(FileVisualState state)
Set the visual state (modified, read-only, etc).
void BeginUndoAction()
Start a sequence of actions that is undone and redone as a unit.
int Printf(const wxString &pszFormat,...)
EVTIMPORT const wxEventType cbEVT_EDITOR_UNSPLIT
void SetMarginMask(int margin, int mask)
Set a mask that determines which markers are displayed in a margin.
bool CanSelectAll() const override
Can the editor select everything?
virtual void SetWildcard(const wxString &wildCard)
EVTIMPORT const wxEventType cbEVT_EDITOR_SAVE
virtual bool IsActive() const
wxDateTime GetModificationTime() const
#define wxSCI_MARK_BOXMINUSCONNECTED
void SetFoldFlags(int flags)
Set some style options for folding.
wxString GetFullPath(wxPathFormat format=wxPATH_NATIVE) const
#define wxSCI_MOD_CHANGEFOLD
#define wxSCI_MARK_BOXPLUS
virtual bool RemoveBreakpoint(cbDebuggerPlugin *plugin, const wxString &filename, int line)=0
#define wxSCI_KEYMOD_NORM
void SetEdgeColour(const wxColour &edgeColour)
Change the colour used in edge indication.
virtual wxPrintDialogData & GetPrintDialogData() const
bool CanRedo() const
Are there any redoable actions in the undo history?
void SetPrintColourMode(int mode)
Modify colours when printing for clearer printed text.
int GetMarginType(int margin) const
Retrieve the type of a margin.
void SetCaretWidth(int pixelWidth)
Set the width of the insert mode caret.
bool GetModified() const override
Returns true if editor is modified, false otherwise.
void SetEdgeMode(int edgeMode)
The edge may be displayed by a line (wxSCI_EDGE_LINE/wxSCI_EDGE_MULTILINE) or by highlighting text th...
void OnEditorCharAdded(wxScintillaEvent &event)
void GotoLine(int line)
Set caret to start of a line and ensure it is visible.
friend struct cbEditorInternalData
void ToggleAllFolds()
Toggle all editor folds (inverts the show/hide state of blocks of code).
#define BREAKPOINT_MARKER
#define wxSCI_MARK_LEFTRECT
void SetYCaretPolicy(int caretPolicy, int caretSlop)
Set the way the line the caret is on is kept visible.
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.
void ConvertEOLs(int eolMode)
Convert all line endings in the document to one mode.
wxDateTime m_LastModified
EVTIMPORT const wxEventType cbEVT_EDITOR_MODIFIED
void GotoPreviousChanged() override
Goto previous changed line.
bool RemoveBreakpoint(int line=-1, bool notifyDebugger=true)
Remove debugger breakpoint at specified line.
void UpdateProjectFile()
Updates the associated ProjectFile object with the editor's caret position, top visible line and its ...
void SetEditorStyle()
Applies the styles that match the filename of the editor.
virtual void EditBreakpoint(const wxString &filename, int line)=0
int GetFirstVisibleLine() const
Retrieve the display line at the top of the display.
DLLIMPORT void CallHooks(cbEditor *editor, wxScintillaEvent &event)
Call all registered hooks using the supplied parameters.
virtual void GotoNextBookmark()
Go to next bookmark.
int GetLastChild(int line, int level) const
Find the last child line of a header line.