Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends

cbEditor Class Reference

A file editor. More...

#include <cbeditor.h>

Inheritance diagram for cbEditor:
Inheritance graph
[legend]
Collaboration diagram for cbEditor:
Collaboration graph
[legend]

List of all members.

Public Types

enum  SplitType { stNoSplit = 0, stHorizontal, stVertical }

Public Member Functions

virtual void Activate ()
 Activate this editor.
bool AddBreakpoint (int line=-1, bool notifyDebugger=true)
virtual void AddToContextMenu (wxMenu *popup, ModuleType type, bool pluginsdone)
void AutoComplete ()
bool CanPaste () const
bool CanRedo () const
bool CanSelectAll () const
bool CanUndo () const
void ClearHistory ()
virtual bool Close ()
 Close this editor.
void Copy ()
virtual wxMenu * CreateContextSubMenu (long id)
 UnIndents current line/block.
void Cut ()
virtual void DisplayContextMenu (const wxPoint &position, ModuleType type=mtUnknown)
 Display context menu.
void DoIndent ()
void DoUnIndent ()
 Indents current line/block.
bool FixFoldState ()
void FoldAll ()
void FoldBlockFromLine (int line=-1)
EditorColourSetGetColourSet () const
cbStyledTextCtrlGetControl () const
wxFontEncoding GetEncoding () const
wxString GetEncodingName () const
virtual const wxString & GetFilename () const
 Get the editor's filename (if applicable).
HighlightLanguage GetLanguage () const
wxDateTime GetLastModificationTime () const
cbStyledTextCtrlGetLeftSplitViewControl () const
int GetLineIndentInSpaces (int line=-1) const
wxString GetLineIndentString (int line=-1) const
bool GetModified () const
ProjectFileGetProjectFile () const
cbStyledTextCtrlGetRightSplitViewControl () const
virtual const wxString & GetShortName () const
 Returns the editor's short name.
SplitType GetSplitType () const
virtual const wxString & GetTitle ()
 The editor's title.
bool GetUseBom () const
void GotoLine (int line, bool centerOnScreen=true)
void GotoMatchingBrace ()
void GotoNextBookmark ()
void GotoNextBreakpoint ()
void GotoNextChanged ()
void GotoPreviousBookmark ()
void GotoPreviousBreakpoint ()
void GotoPreviousChanged ()
bool HasBookmark (int line) const
bool HasBreakpoint (int line) const
bool HasSelection () const
void HighlightBraces ()
virtual bool IsBuiltinEditor () const
 Is this a built-in editor?
virtual bool IsContextMenuOpened () const
bool IsOK () const
bool IsReadOnly () const
virtual void operator= (const cbEditor &rhs)
void Paste ()
void Print (bool selectionOnly, PrintColourMode pcm, bool line_numbers)
virtual bool QueryClose ()
 Can this be closed (destroyed)?
void Redo ()
bool Reload (bool detectEncoding=true)
bool RemoveBreakpoint (int line=-1, bool notifyDebugger=true)
bool Save ()
bool SaveAs ()
bool SaveFoldState ()
void SelectAll ()
void SetChangeCollection (bool collectChange)
void SetColourSet (EditorColourSet *theme)
void SetDebugLine (int line)
void SetEditorTitle (const wxString &title)
void SetEncoding (wxFontEncoding encoding)
void SetErrorLine (int line)
virtual void SetFilename (const wxString &filename)
 Sets the editor's filename.
void SetFoldingIndicator (int id)
void SetLanguage (HighlightLanguage lang=HL_AUTO)
void SetModified (bool modified=true)
void SetProjectFile (ProjectFile *project_file, bool preserve_modified=false)
virtual void SetTitle (const wxString &newTitle)
 Set the editor's title.
void SetUseBom (bool bom)
void Split (SplitType split)
virtual bool ThereAreOthers () const
 Are there other editors besides this?
void ToggleAllFolds ()
void ToggleBookmark (int line=-1)
void ToggleBreakpoint (int line=-1, bool notifyDebugger=true)
void ToggleFoldBlockFromLine (int line=-1)
void Touch ()
void Undo ()
void UnfoldAll ()
void UnfoldBlockFromLine (int line=-1)
void Unsplit ()
void UpdateProjectFile ()
virtual bool VisibleToTree () const

Static Public Member Functions

static void ApplyStyles (cbStyledTextCtrl *control)
 Apply the editor defaults to any (possibly foreign) cbStyledTextCtrl.

Protected Member Functions

 cbEditor (wxWindow *parent, const wxString &filename, EditorColourSet *theme=0L)
 cbEditor (wxWindow *parent, LoaderBase *fileLdr, const wxString &filename, EditorColourSet *theme=0L)
 cbEditor (const cbEditor &rhs)
virtual wxMenu * CreateContextSubMenu (int id)
virtual wxString CreateUniqueFilename ()
virtual void InitFilename (const wxString &filename)
 ~cbEditor ()

Protected Attributes

wxString m_Filename
bool m_IsBuiltinEditor
wxString m_Shortname

Private Member Functions

cbStyledTextCtrlCreateEditor ()
void DestroySplitView ()
void DetectEncoding ()
void DoAskForCodeCompletion ()
void DoFoldAll (int fold)
void DoFoldBlockFromLine (int line, int fold)
bool DoFoldLine (int line, int fold)
void DoInitializations (const wxString &filename, LoaderBase *fileLdr=0)
bool LineHasMarker (int marker, int line=-1) const
void MarkerNext (int marker)
void MarkerPrevious (int marker)
void MarkerToggle (int marker, int line=-1)
void MarkLine (int marker, int line)
void NotifyPlugins (wxEventType type, int intArg=0, const wxString &strArg=wxEmptyString, int xArg=0, int yArg=0)
void OnAfterBuildContextMenu (ModuleType type)
bool OnBeforeBuildContextMenu (const wxPoint &position, ModuleType type)
void OnClose (wxCloseEvent &event)
void OnContextMenuEntry (wxCommandEvent &event)
void OnEditorChange (wxScintillaEvent &event)
void OnEditorCharAdded (wxScintillaEvent &event)
void OnEditorDwellEnd (wxScintillaEvent &event)
void OnEditorDwellStart (wxScintillaEvent &event)
void OnEditorModified (wxScintillaEvent &event)
void OnEditorUpdateUI (wxScintillaEvent &event)
void OnMarginClick (wxScintillaEvent &event)
void OnScintillaEvent (wxScintillaEvent &event)
void OnUserListSelection (wxScintillaEvent &event)
void OnZoom (wxScintillaEvent &event)
bool Open (bool detectEncoding=true)
void SetEditorStyle ()
void SetEditorStyleAfterFileOpen ()
void SetEditorStyleBeforeFileOpen ()
void SetMarkerStyle (int marker, int markerType, wxColor fore, wxColor back)
void UnderlineFoldedLines (bool underline)

Static Private Member Functions

static wxColour GetOptionColour (const wxString &option, const wxColour _default)
static void InternalSetEditorStyleAfterFileOpen (cbStyledTextCtrl *control)
static void InternalSetEditorStyleBeforeFileOpen (cbStyledTextCtrl *control)

Private Attributes

cbStyledTextCtrlm_foldBackup
int m_ID
int m_Index
bool m_IsOK
HighlightLanguage m_lang
wxDateTime m_LastModified
bool m_Modified
cbStyledTextCtrlm_pControl
cbStyledTextCtrlm_pControl2
cbEditorInternalDatam_pData
 Use this to add new vars/functions w/out breaking the ABI.
ProjectFilem_pProjectFile
wxBoxSizer * m_pSizer
wxSplitterWindow * m_pSplitter
EditorColourSetm_pTheme
SplitType m_SplitType
wxTimer m_timerWait

Friends

struct cbEditorInternalData
class EditorManager

Detailed Description

A file editor.

This class represents one builtin editor in Code::Blocks. It holds all the necessary information about an editor. When you want to access a Code::Blocks editor, this is the class you want to get at ;)

To do this, use Manager::Get()->GetEditorManager() functions.

The actual editor component used is Scintilla and it can be accessed through the member function GetControl().

Definition at line 43 of file cbeditor.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index