File: quickfindbarbase.cpp

package info (click to toggle)
codelite 12.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 95,112 kB
  • sloc: cpp: 424,040; ansic: 18,284; php: 9,569; lex: 4,186; yacc: 2,820; python: 2,294; sh: 312; makefile: 51; xml: 13
file content (185 lines) | stat: -rw-r--r-- 6,426 bytes parent folder | download | duplicates (2)
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: quickfindbarbase.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "quickfindbarbase.h"


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

static bool bBitmapLoaded = false;


QuickFindBarBase::QuickFindBarBase(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);
        wxCrafteryhjh4ZInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* mainSizer = new wxBoxSizer(wxHORIZONTAL);
    this->SetSizer(mainSizer);
    
    SetName(wxT("QuickFindBarBase"));
    SetSizeHints(400,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
}

QuickFindBarBase::~QuickFindBarBase()
{
}

QuickFindBarOptionsMenuBase::QuickFindBarOptionsMenuBase(wxWindow* parent,long style)
    : wxPopupTransientWindow(parent, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafteryhjh4ZInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer60 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer60);
    
    m_panel71 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL|wxBORDER_SIMPLE);
    
    boxSizer60->Add(m_panel71, 1, wxEXPAND, 5);
    
    wxGridSizer* gridSizer49 = new wxGridSizer(0, 2, 0, 0);
    m_panel71->SetSizer(gridSizer49);
    
    m_checkBoxCase = new wxCheckBox(m_panel71, wxID_ANY, _("Case Sensitive"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxCase->SetValue(false);
    m_checkBoxCase->SetToolTip(_("Use case sensitive match"));
    
    gridSizer49->Add(m_checkBoxCase, 0, wxALL|wxALIGN_LEFT, 3);
    
    m_checkBoxRegex = new wxCheckBox(m_panel71, wxID_ANY, _("Regular Expression"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxRegex->SetValue(false);
    m_checkBoxRegex->SetToolTip(_("Use regular expression"));
    
    gridSizer49->Add(m_checkBoxRegex, 0, wxALL|wxALIGN_LEFT, 3);
    
    m_checkBoxWord = new wxCheckBox(m_panel71, wxID_ANY, _("Match a whole word"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxWord->SetValue(false);
    m_checkBoxWord->SetToolTip(_("Match a whole word only"));
    
    gridSizer49->Add(m_checkBoxWord, 0, wxALL|wxALIGN_LEFT, 3);
    
    m_checkBoxWildcard = new wxCheckBox(m_panel71, wxID_ANY, _("Use wildcard syntax"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxWildcard->SetValue(false);
    m_checkBoxWildcard->SetToolTip(_("Use wildcard syntax (* and ?)"));
    
    gridSizer49->Add(m_checkBoxWildcard, 0, wxALL|wxALIGN_LEFT, 3);
    
    m_checkBoxMultipleSelections = new wxCheckBox(m_panel71, wxID_ANY, _("Enable multiple selections"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxMultipleSelections->SetValue(false);
    m_checkBoxMultipleSelections->SetToolTip(_("Select each match without de-selectiing the previous match"));
    
    gridSizer49->Add(m_checkBoxMultipleSelections, 0, wxALL|wxALIGN_LEFT, 3);
    
    SetName(wxT("QuickFindBarOptionsMenuBase"));
    SetSizeHints(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    // Connect events
    m_checkBoxRegex->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(QuickFindBarOptionsMenuBase::OnCheckBoxRegex), NULL, this);
    m_checkBoxWildcard->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(QuickFindBarOptionsMenuBase::OnCheckWild), NULL, this);
    
}

QuickFindBarOptionsMenuBase::~QuickFindBarOptionsMenuBase()
{
    m_checkBoxRegex->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(QuickFindBarOptionsMenuBase::OnCheckBoxRegex), NULL, this);
    m_checkBoxWildcard->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(QuickFindBarOptionsMenuBase::OnCheckWild), NULL, this);
    
}

QuickFindBarImages::QuickFindBarImages()
    : wxImageList(16, 16, true)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafteryhjh4ZInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("m_bmpMenu"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("m_bmpMenu"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("marker-16"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("marker-16"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("case-sensitive"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("case-sensitive"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("word"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("word"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("regex"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("regex"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("replace-controls"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("replace-controls"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("find-bar-close-16"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("find-bar-close-16"), bmp ) );
    }
    
}

QuickFindBarImages::~QuickFindBarImages()
{
}