Code::Blocks  SVN r11506
Classes | Macros | Functions | Variables
cbeditor.cpp File Reference
#include "sdk_precomp.h"
#include "cbstyledtextctrl.h"
#include "cbcolourmanager.h"
#include <stack>
#include <wx/fontutil.h>
#include <wx/splitter.h>
#include "cbeditorprintout.h"
#include "cbdebugger_interfaces.h"
#include "editor_hooks.h"
#include "encodingdetector.h"
#include "filefilters.h"
#include "projectfileoptionsdlg.h"
Include dependency graph for cbeditor.cpp:

Go to the source code of this file.

Classes

struct  cbEditorInternalData
 

Macros

#define ERROR_STYLE   wxSCI_MARK_SMALLRECT
 
#define BOOKMARK_STYLE   wxSCI_MARK_ARROW
 
#define BREAKPOINT_STYLE   wxSCI_MARK_CIRCLE
 
#define DEBUG_STYLE   wxSCI_MARK_ARROW
 
#define DEBUG_STYLE_HIGHLIGHT   wxSCI_MARK_BACKGROUND
 
#define BREAKPOINT_OTHER_MARKER   1
 
#define BREAKPOINT_DISABLED_MARKER   2
 
#define BREAKPOINT_MARKER   3
 
#define BOOKMARK_MARKER   4
 
#define ERROR_MARKER   5
 
#define DEBUG_MARKER   6
 
#define DEBUG_MARKER_HIGHLIGHT   7
 
#define C_LINE_MARGIN   0
 
#define C_MARKER_MARGIN   1
 
#define C_CHANGEBAR_MARGIN   2
 
#define C_FOLDING_MARGIN   3
 

Functions

static void CountLineEnds (cbStyledTextCtrl *control, int &linesCR, int &linesLF, int &linesCRLF)
 
static int DetectLineEnds (cbStyledTextCtrl *control)
 
void OverrideUseTabsPerLanguage (cbStyledTextCtrl *control)
 

Variables

const wxString g_EditorModified = _T("*")
 
const int idEmptyMenu = wxNewId()
 
const int idEdit = wxNewId()
 
const int idUndo = wxNewId()
 
const int idRedo = wxNewId()
 
const int idClearHistory = wxNewId()
 
const int idCut = wxNewId()
 
const int idCopy = wxNewId()
 
const int idPaste = wxNewId()
 
const int idDelete = wxNewId()
 
const int idUpperCase = wxNewId()
 
const int idLowerCase = wxNewId()
 
const int idSelectAll = wxNewId()
 
const int idSwapHeaderSource = wxNewId()
 
const int idOpenContainingFolder = wxNewId()
 
const int idBookmarks = wxNewId()
 
const int idBookmarksToggle = wxNewId()
 
const int idBookmarksPrevious = wxNewId()
 
const int idBookmarksNext = wxNewId()
 
const int idBookmarksClearAll = wxNewId()
 
const int idFolding = wxNewId()
 
const int idFoldingFoldAll = wxNewId()
 
const int idFoldingUnfoldAll = wxNewId()
 
const int idFoldingToggleAll = wxNewId()
 
const int idFoldingFoldCurrent = wxNewId()
 
const int idFoldingUnfoldCurrent = wxNewId()
 
const int idFoldingToggleCurrent = wxNewId()
 
const int idInsert = wxNewId()
 
const int idSplit = wxNewId()
 
const int idSplitHorz = wxNewId()
 
const int idSplitVert = wxNewId()
 
const int idUnsplit = wxNewId()
 
const int idProperties = wxNewId()
 
const int idAddFileToProject = wxNewId()
 
const int idRemoveFileFromProject = wxNewId()
 
const int idShowFileInProject = wxNewId()
 
const int idOpenUrl = wxNewId()
 
const int idBookmarkAdd = wxNewId()
 
const int idBookmarkRemove = wxNewId()
 
const int idBookmarkRemoveAll = wxNewId()
 
const int idBreakpointAdd = wxNewId()
 
const int idBreakpointEdit = wxNewId()
 
const int idBreakpointRemove = wxNewId()
 
const long idBreakpointEnable = wxNewId()
 
const long idBreakpointDisable = wxNewId()
 

Macro Definition Documentation

◆ BOOKMARK_MARKER

#define BOOKMARK_MARKER   4

◆ BOOKMARK_STYLE

#define BOOKMARK_STYLE   wxSCI_MARK_ARROW

Definition at line 58 of file cbeditor.cpp.

Referenced by cbEditor::InternalSetEditorStyleBeforeFileOpen().

◆ BREAKPOINT_DISABLED_MARKER

#define BREAKPOINT_DISABLED_MARKER   2

◆ BREAKPOINT_MARKER

#define BREAKPOINT_MARKER   3

◆ BREAKPOINT_OTHER_MARKER

#define BREAKPOINT_OTHER_MARKER   1

◆ BREAKPOINT_STYLE

#define BREAKPOINT_STYLE   wxSCI_MARK_CIRCLE

Definition at line 59 of file cbeditor.cpp.

Referenced by cbEditor::InternalSetEditorStyleBeforeFileOpen().

◆ C_CHANGEBAR_MARGIN

#define C_CHANGEBAR_MARGIN   2

◆ C_FOLDING_MARGIN

#define C_FOLDING_MARGIN   3

◆ C_LINE_MARGIN

#define C_LINE_MARGIN   0

◆ C_MARKER_MARGIN

#define C_MARKER_MARGIN   1

◆ DEBUG_MARKER

#define DEBUG_MARKER   6

◆ DEBUG_MARKER_HIGHLIGHT

#define DEBUG_MARKER_HIGHLIGHT   7

◆ DEBUG_STYLE

#define DEBUG_STYLE   wxSCI_MARK_ARROW

Definition at line 60 of file cbeditor.cpp.

Referenced by cbEditor::InternalSetEditorStyleBeforeFileOpen().

◆ DEBUG_STYLE_HIGHLIGHT

#define DEBUG_STYLE_HIGHLIGHT   wxSCI_MARK_BACKGROUND

Definition at line 61 of file cbeditor.cpp.

Referenced by cbEditor::InternalSetEditorStyleBeforeFileOpen().

◆ ERROR_MARKER

#define ERROR_MARKER   5

◆ ERROR_STYLE

#define ERROR_STYLE   wxSCI_MARK_SMALLRECT

Definition at line 57 of file cbeditor.cpp.

Referenced by cbEditor::InternalSetEditorStyleBeforeFileOpen().

Function Documentation

◆ CountLineEnds()

static void CountLineEnds ( cbStyledTextCtrl control,
int &  linesCR,
int &  linesLF,
int &  linesCRLF 
)
static

Definition at line 600 of file cbeditor.cpp.

Referenced by DetectLineEnds().

◆ DetectLineEnds()

static int DetectLineEnds ( cbStyledTextCtrl control)
static

◆ OverrideUseTabsPerLanguage()

void OverrideUseTabsPerLanguage ( cbStyledTextCtrl control)
inline

Variable Documentation

◆ g_EditorModified

const wxString g_EditorModified = _T("*")

Definition at line 55 of file cbeditor.cpp.

Referenced by EditorManager::IsOpen().

◆ idAddFileToProject

const int idAddFileToProject = wxNewId()

Definition at line 536 of file cbeditor.cpp.

Referenced by cbEditor::OnContextMenuEntry().

◆ idBookmarkAdd

const int idBookmarkAdd = wxNewId()

◆ idBookmarkRemove

const int idBookmarkRemove = wxNewId()

◆ idBookmarkRemoveAll

const int idBookmarkRemoveAll = wxNewId()

◆ idBookmarks

const int idBookmarks = wxNewId()

Definition at line 518 of file cbeditor.cpp.

Referenced by cbEditor::AddToContextMenu(), and cbEditor::CreateContextSubMenu().

◆ idBookmarksClearAll

const int idBookmarksClearAll = wxNewId()

Definition at line 522 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idBookmarksNext

const int idBookmarksNext = wxNewId()

Definition at line 521 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idBookmarksPrevious

const int idBookmarksPrevious = wxNewId()

Definition at line 520 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idBookmarksToggle

const int idBookmarksToggle = wxNewId()

Definition at line 519 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idBreakpointAdd

const int idBreakpointAdd = wxNewId()

◆ idBreakpointDisable

const long idBreakpointDisable = wxNewId()

◆ idBreakpointEdit

const int idBreakpointEdit = wxNewId()

◆ idBreakpointEnable

const long idBreakpointEnable = wxNewId()

◆ idBreakpointRemove

const int idBreakpointRemove = wxNewId()

◆ idClearHistory

const int idClearHistory = wxNewId()

Definition at line 508 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idCopy

const int idCopy = wxNewId()

Definition at line 510 of file cbeditor.cpp.

Referenced by cbEditor::AddToContextMenu(), and cbEditor::OnContextMenuEntry().

◆ idCut

const int idCut = wxNewId()

Definition at line 509 of file cbeditor.cpp.

Referenced by cbEditor::AddToContextMenu(), and cbEditor::OnContextMenuEntry().

◆ idDelete

const int idDelete = wxNewId()

Definition at line 512 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idEdit

const int idEdit = wxNewId()

Definition at line 505 of file cbeditor.cpp.

Referenced by cbEditor::AddToContextMenu(), and cbEditor::CreateContextSubMenu().

◆ idEmptyMenu

const int idEmptyMenu = wxNewId()

Definition at line 504 of file cbeditor.cpp.

Referenced by cbEditor::AddToContextMenu(), and cbEditor::CreateContextSubMenu().

◆ idFolding

const int idFolding = wxNewId()

Definition at line 523 of file cbeditor.cpp.

Referenced by cbEditor::AddToContextMenu(), and cbEditor::CreateContextSubMenu().

◆ idFoldingFoldAll

const int idFoldingFoldAll = wxNewId()

Definition at line 524 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idFoldingFoldCurrent

const int idFoldingFoldCurrent = wxNewId()

Definition at line 527 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idFoldingToggleAll

const int idFoldingToggleAll = wxNewId()

Definition at line 526 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idFoldingToggleCurrent

const int idFoldingToggleCurrent = wxNewId()

Definition at line 529 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idFoldingUnfoldAll

const int idFoldingUnfoldAll = wxNewId()

Definition at line 525 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idFoldingUnfoldCurrent

const int idFoldingUnfoldCurrent = wxNewId()

Definition at line 528 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idInsert

const int idInsert = wxNewId()

Definition at line 530 of file cbeditor.cpp.

Referenced by cbEditor::AddToContextMenu(), and cbEditor::CreateContextSubMenu().

◆ idLowerCase

const int idLowerCase = wxNewId()

Definition at line 514 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idOpenContainingFolder

const int idOpenContainingFolder = wxNewId()

Definition at line 517 of file cbeditor.cpp.

Referenced by cbEditor::OnContextMenuEntry().

◆ idOpenUrl

const int idOpenUrl = wxNewId()

Definition at line 539 of file cbeditor.cpp.

Referenced by cbEditor::AddToContextMenu(), and cbEditor::OnContextMenuEntry().

◆ idPaste

const int idPaste = wxNewId()

Definition at line 511 of file cbeditor.cpp.

Referenced by cbEditor::AddToContextMenu(), and cbEditor::OnContextMenuEntry().

◆ idProperties

const int idProperties = wxNewId()

Definition at line 535 of file cbeditor.cpp.

Referenced by cbEditor::OnContextMenuEntry(), and BreakpointsDlg::OnRightClick().

◆ idRedo

const int idRedo = wxNewId()

Definition at line 507 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idRemoveFileFromProject

const int idRemoveFileFromProject = wxNewId()

Definition at line 537 of file cbeditor.cpp.

Referenced by cbEditor::OnContextMenuEntry().

◆ idSelectAll

const int idSelectAll = wxNewId()

Definition at line 515 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idShowFileInProject

const int idShowFileInProject = wxNewId()

Definition at line 538 of file cbeditor.cpp.

Referenced by cbEditor::OnContextMenuEntry().

◆ idSplit

const int idSplit = wxNewId()

Definition at line 531 of file cbeditor.cpp.

◆ idSplitHorz

const int idSplitHorz = wxNewId()

Definition at line 532 of file cbeditor.cpp.

Referenced by cbEditor::OnContextMenuEntry().

◆ idSplitVert

const int idSplitVert = wxNewId()

Definition at line 533 of file cbeditor.cpp.

Referenced by cbEditor::OnContextMenuEntry().

◆ idSwapHeaderSource

const int idSwapHeaderSource = wxNewId()

Definition at line 516 of file cbeditor.cpp.

Referenced by cbEditor::OnContextMenuEntry().

◆ idUndo

const int idUndo = wxNewId()

Definition at line 506 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().

◆ idUnsplit

const int idUnsplit = wxNewId()

Definition at line 534 of file cbeditor.cpp.

Referenced by cbEditor::OnContextMenuEntry().

◆ idUpperCase

const int idUpperCase = wxNewId()

Definition at line 513 of file cbeditor.cpp.

Referenced by cbEditor::CreateContextSubMenu(), and cbEditor::OnContextMenuEntry().