101 bool IsOK()
const {
return m_IsOK; }
106 void SetEditorTitle(
const wxString& title);
118 void SetProjectFile(
ProjectFile* project_file,
bool preserve_modified =
false);
131 void UpdateProjectFile();
134 bool Save()
override;
140 bool SaveFoldState();
152 void ToggleAllFolds();
155 void SetFoldingIndicator(
int id);
158 void FoldBlockFromLine(
int line = -1);
161 void UnfoldBlockFromLine(
int line = -1);
164 void ToggleFoldBlockFromLine(
int line = -1);
173 void GotoMatchingBrace();
176 void HighlightBraces();
179 int GetLineIndentInSpaces(
int line = -1)
const;
182 wxString GetLineIndentString(
int line = -1)
const;
191 bool Reload(
bool detectEncoding =
true);
198 void Print(
bool selectionOnly,
PrintColourMode pcm,
bool line_numbers);
206 void GotoLine(
int line,
bool centerOnScreen =
true)
override;
212 bool GotoTokenPosition(
int line,
const wxString& tokenName);
215 bool AddBreakpoint(
int line = -1,
bool notifyDebugger =
true);
218 bool RemoveBreakpoint(
int line = -1,
bool notifyDebugger =
true);
221 virtual void ToggleBreakpoint(
int line = -1,
bool notifyDebugger =
true);
227 virtual void GotoNextBreakpoint();
230 virtual void GotoPreviousBreakpoint();
233 virtual void RefreshBreakpointMarkers();
236 virtual void ClearAllBookmarks();
239 virtual void ToggleBookmark(
int line = -1);
242 virtual bool HasBookmark(
int line)
const;
245 virtual void GotoNextBookmark();
248 virtual void GotoPreviousBookmark();
251 virtual void SetDebugLine(
int line);
254 virtual void SetErrorLine(
int line);
265 void Undo()
override;
266 void Redo()
override;
272 void Copy()
override;
273 void Paste()
override;
304 bool GetUseBom()
const;
305 void SetUseBom(
bool bom );
307 void SetZoom(
int zoom,
bool both =
true);
312 void AutoIndentDone();
316 void SetEditorStyle();
321 bool LineHasMarker(
int marker,
int line = -1)
const;
322 void MarkerToggle(
int marker,
int line = -1);
323 void MarkerNext(
int marker);
324 void MarkerPrevious(
int marker);
325 void MarkLine(
int marker,
int line);
340 void DoFoldBlockFromLine(
int line,
FoldMode fold,
unsigned foldFlags);
341 void SetMarkerStyle(
int marker,
int markerType, wxColor fore, wxColor back);
342 void UnderlineFoldedLines(
bool underline);
345 void SetEditorStyleBeforeFileOpen();
346 void SetEditorStyleAfterFileOpen();
347 static void InternalSetEditorStyleBeforeFileOpen(
cbStyledTextCtrl* control);
349 bool Open(
bool detectEncoding =
true);
350 void DoAskForCodeCompletion();
352 void NotifyPlugins(
wxEventType type,
int intArg = 0,
const wxString& strArg = wxEmptyString,
int xArg = 0,
int yArg = 0);
374 bool OnBeforeBuildContextMenu(
const wxPoint& position,
ModuleType type)
override;
375 void OnAfterBuildContextMenu(
ModuleType type)
override;
377 void DestroySplitView();
381 void BreakpointMarkerToggle(
int line);
cbStyledTextCtrl * m_pControl
virtual void SetReadOnly(bool=true)
Set the editor read-only.
virtual bool CanPaste() const
Is there something to paste?
wxSplitterWindow * m_pSplitter
virtual bool HasSelection() const
Is there a selection?
wxDateTime GetLastModificationTime() const
Returns the last modification time for the file.
cbEditorInternalData * m_pData
bool IsOK() const
Returns true if editor is OK, i.e.
virtual void SelectAll()
Select everything in the editor.
EditorColourSet * m_pTheme
virtual bool IsReadOnly() const
Is the editor read-only?
virtual void Redo()
Redo changes.
virtual void SetChangeCollection(cb_optional bool collectChange)
Enable or disable changebar.
virtual void Paste()
Paste selected text/object from clipboard.
cbStyledTextCtrl * m_pControl2
virtual bool CanRedo() const
Is there something to redo?
cbStyledTextCtrl * GetLeftSplitViewControl() const
Returns a pointer to the left (or top) split-view cbStyledTextCtrl.
Represents a file in a Code::Blocks project.
virtual void Copy()
Copy selected text/object to clipboard.
virtual void SetModified(bool=true)
Set the modification status.
cbStyledTextCtrl * m_foldBackup
ModuleType
The type of module offering a context menu.
virtual bool SaveAs()
Save editor contents under a different filename.
EditorColourSet * GetColourSet() const
Get the colour set in use.
Base class that all "editors" should inherit from.
const wxString g_EditorModified
virtual void Undo()
Undo changes.
void operator=(cb_unused const cbEditor &rhs)
Don't use this.
virtual bool GetModified() const
Is it modified?
SplitType GetSplitType() const
Returns the state of split-view for this editor.
ProjectFile * m_pProjectFile
virtual void ClearHistory()
Clear Undo- (and Changebar-) history.
virtual void GotoLine(int, bool=true)
Move the caret at the specified line.
bool HasBreakpoint(cbDebuggerPlugin &plugin, wxString const &filename, int line)
ProjectFile * GetProjectFile() const
Read the ProjectFile pointer associated with this editor.
virtual void Cut()
Cut selected text/object to clipboard.
virtual bool CanSelectAll() const
Can the editor select everything?
cbStyledTextCtrl * GetRightSplitViewControl() const
Returns a pointer to the right (or bottom) split-view cbStyledTextCtrl.
HighlightLanguage GetLanguage() const
virtual bool CanUndo() const
Is there something to undo?
virtual bool Save()
Save contents.
virtual void GotoPreviousChanged()
Goto previous changed line.
wxDateTime m_LastModified
virtual void GotoNextChanged()
Goto next changed line.