File: editorsettingsbookmarksbasepanel.cpp

package info (click to toggle)
codelite 14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 112,816 kB
  • sloc: cpp: 483,662; ansic: 150,144; php: 9,569; lex: 4,186; python: 3,417; yacc: 2,820; sh: 1,147; makefile: 52; xml: 13
file content (146 lines) | stat: -rw-r--r-- 7,059 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: editor_options_bookmarks.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "editorsettingsbookmarksbasepanel.h"


// Declare the bitmap loading function
extern void wxCrafterZg1KYTInitBitmapResources();

static bool bBitmapLoaded = false;


EditorSettingsBookmarksBasePanel::EditorSettingsBookmarksBasePanel(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterZg1KYTInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer2 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer2);
    
    m_displaySelection = new wxCheckBox(this, wxID_ANY, _("Display Breakpoints / Bookmarks margin"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_displaySelection->SetValue(true);
    
    bSizer2->Add(m_displaySelection, 0, wxALL, 5);
    
    wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(0, 2, 0, 0);
    fgSizer1->SetFlexibleDirection( wxBOTH );
    fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer1->AddGrowableCol(1);
    
    bSizer2->Add(fgSizer1, 0, wxALL|wxEXPAND, 5);
    
    m_staticText3 = new wxStaticText(this, wxID_ANY, _("Bookmark Shape:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText3, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_bookMarkShapeArr;
    m_bookMarkShape = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_bookMarkShapeArr, 0);
    
    fgSizer1->Add(m_bookMarkShape, 0, wxALL|wxEXPAND, 5);
    
    m_staticText10 = new wxStaticText(this, wxID_ANY, _("Select bookmark type:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    fgSizer1->Add(m_staticText10, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_choiceBMTypeArr;
    m_choiceBMTypeArr.Add(wxT("1 - Default bookmark"));
    m_choiceBMTypeArr.Add(wxT("2"));
    m_choiceBMTypeArr.Add(wxT("3"));
    m_choiceBMTypeArr.Add(wxT("4"));
    m_choiceBMTypeArr.Add(wxT("5 - Find-bar bookmark"));
    m_choiceBMType = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceBMTypeArr, 0);
    m_choiceBMType->SetToolTip(_("Select the bookmark type from the following list"));
    m_choiceBMType->SetSelection(0);
    
    fgSizer1->Add(m_choiceBMType, 0, wxALL|wxEXPAND, 5);
    
    m_staticText41 = new wxStaticText(this, wxID_ANY, _("Bookmark label:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText41, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_BookmarkLabel = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_BookmarkLabel->SetToolTip(_("The label shown in e.g. a tooltip. You can set it to something descriptive if you wish."));
    #if wxVERSION_NUMBER >= 3000
    m_BookmarkLabel->SetHint(wxT(""));
    #endif
    
    fgSizer1->Add(m_BookmarkLabel, 0, wxALL|wxEXPAND, 5);
    
    m_staticText4 = new wxStaticText(this, wxID_ANY, _("Background colour:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText4, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_backgroundColor = new wxColourPickerCtrl(this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize(-1, -1), wxCLRP_DEFAULT_STYLE);
    
    fgSizer1->Add(m_backgroundColor, 0, wxALL|wxEXPAND, 5);
    
    m_staticText5 = new wxStaticText(this, wxID_ANY, _("Foreground colour:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText5, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_foregroundColor = new wxColourPickerCtrl(this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize(-1, -1), wxCLRP_DEFAULT_STYLE);
    
    fgSizer1->Add(m_foregroundColor, 0, wxALL|wxEXPAND, 5);
    
    m_staticLine18 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLI_HORIZONTAL);
    
    bSizer2->Add(m_staticLine18, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* flexGridSizer4 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer4->SetFlexibleDirection( wxBOTH );
    flexGridSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer4->AddGrowableCol(1);
    
    bSizer2->Add(flexGridSizer4, 0, wxALL|wxEXPAND, 5);
    
    m_staticText66 = new wxStaticText(this, wxID_ANY, _("'Highlight Matching Word' colour:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    flexGridSizer4->Add(m_staticText66, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_highlightColor = new wxColourPickerCtrl(this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize(-1, -1), wxCLRP_DEFAULT_STYLE);
    m_highlightColor->SetToolTip(_("This lets you set the 'Highlight Matching Word' colour (the colour of words that match the selection). To set the colour of the selection itself, see 'Settings > Syntax Highlight and Fonts'."));
    
    flexGridSizer4->Add(m_highlightColor, 0, wxALL|wxEXPAND, 5);
    
    m_staticText54 = new wxStaticText(this, wxID_ANY, _("'Highlight Matching Word' alpha:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    flexGridSizer4->Add(m_staticText54, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_spinCtrlHighlightAlpha = new wxSpinCtrl(this, wxID_ANY, wxT("128"), wxDefaultPosition, wxSize(-1,-1), wxSP_ARROW_KEYS);
    m_spinCtrlHighlightAlpha->SetToolTip(_("This affects the intensity of the colour set in the field above (for words matching the selection). Choose a value between 0 and 256. Higher values give a less-transparent background."));
    m_spinCtrlHighlightAlpha->SetRange(0, 255);
    m_spinCtrlHighlightAlpha->SetValue(128);
    
    flexGridSizer4->Add(m_spinCtrlHighlightAlpha, 0, wxALL|wxEXPAND, 5);
    
    m_clearHighlitWords = new wxCheckBox(this, wxID_ANY, _("Find/FindNext clears highlit matching words"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_clearHighlitWords->SetValue(false);
    m_clearHighlitWords->SetToolTip(_("By default, 'Find', FindNext and FindPrevious  will clear all  current 'Highlight Matching Word' matches. Untick this box to prevent that happening."));
    
    bSizer2->Add(m_clearHighlitWords, 0, wxALL, 10);
    
    SetName(wxT("EditorSettingsBookmarksBasePanel"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    m_choiceBMType->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(EditorSettingsBookmarksBasePanel::OnBookmarkChanged), NULL, this);
    
}

EditorSettingsBookmarksBasePanel::~EditorSettingsBookmarksBasePanel()
{
    m_choiceBMType->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(EditorSettingsBookmarksBasePanel::OnBookmarkChanged), NULL, this);
    
}