File: filechecklistbase.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 (162 lines) | stat: -rw-r--r-- 6,784 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
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: filechecklistbase.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "filechecklistbase.h"


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

static bool bBitmapLoaded = false;


FileCheckListBase::FileCheckListBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCraftertLrKnvInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer1);
    
    m_caption = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer1->Add(m_caption, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer3 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer1->Add(bSizer3, 1, wxEXPAND, 5);
    
    wxArrayString m_fileCheckListArr;
    m_fileCheckList = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxSize(400,300), m_fileCheckListArr, wxLB_SINGLE);
    
    bSizer3->Add(m_fileCheckList, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer4 = new wxBoxSizer(wxVERTICAL);
    
    bSizer3->Add(bSizer4, 0, wxEXPAND, 5);
    
    m_clearAll = new wxButton(this, wxID_ANY, _("C&lear All"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer4->Add(m_clearAll, 0, wxALL|wxEXPAND, 5);
    
    m_checkAllButton = new wxButton(this, wxID_ANY, _("Check &All"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer4->Add(m_checkAllButton, 0, wxALL|wxEXPAND, 5);
    
    m_selectedFilePath = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_selectedFilePath->SetHint(wxT(""));
    #endif
    
    bSizer1->Add(m_selectedFilePath, 0, wxALL|wxEXPAND, 5);
    
    m_stdBtnSizer2 = new wxStdDialogButtonSizer();
    
    bSizer1->Add(m_stdBtnSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer2->AddButton(m_buttonOK);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer2->AddButton(m_buttonCancel);
    m_stdBtnSizer2->Realize();
    
    SetName(wxT("FileCheckListBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_clearAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FileCheckListBase::OnClearAll), NULL, this);
    m_checkAllButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FileCheckListBase::OnCheckAll), NULL, this);
    
}

FileCheckListBase::~FileCheckListBase()
{
    m_clearAll->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FileCheckListBase::OnClearAll), NULL, this);
    m_checkAllButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FileCheckListBase::OnCheckAll), NULL, this);
    
}

FilesModifiedDlgBase::FilesModifiedDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCraftertLrKnvInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer26 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer26);
    
    m_staticText34 = new wxStaticText(this, wxID_ANY, _("Some files were modified outside of the editor.\nWhat would you like to do?"), wxDefaultPosition, wxSize(-1,-1), 0);
    wxFont m_staticText34Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText34Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText34->SetFont(m_staticText34Font);
    
    boxSizer26->Add(m_staticText34, 0, wxALL, 5);
    
    m_cmdLnkBtn30 = new wxCommandLinkButton(this, ID_BUTTON_LOAD, _("Reload."), _("Reload all the externally modified files"), wxDefaultPosition, wxSize(-1,-1), wxBU_LEFT);
    
    boxSizer26->Add(m_cmdLnkBtn30, 1, wxALL|wxEXPAND, 5);
    
    m_cmdLnkBtn28 = new wxCommandLinkButton(this, ID_BUTTON_CHOOSE, _("Choose."), _("Let me choose which file or files to reload"), wxDefaultPosition, wxSize(-1,-1), wxBU_LEFT);
    m_cmdLnkBtn28->SetFocus();
    
    boxSizer26->Add(m_cmdLnkBtn28, 1, wxALL|wxEXPAND, 5);
    
    m_cmdLnkBtnNone = new wxCommandLinkButton(this, ID_BUTTON_IGNORE, _("Ignore."), _("Don't reload any the externally modified files"), wxDefaultPosition, wxSize(-1,-1), wxBU_LEFT);
    
    boxSizer26->Add(m_cmdLnkBtnNone, 1, wxALL|wxEXPAND, 5);
    
    m_checkBoxRemember = new wxCheckBox(this, wxID_ANY, _("Remember my answer"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxRemember->SetValue(false);
    
    boxSizer26->Add(m_checkBoxRemember, 0, wxALL, 5);
    
    SetName(wxT("FilesModifiedDlgBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_cmdLnkBtn30->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FilesModifiedDlgBase::OnLoad), NULL, this);
    m_cmdLnkBtn28->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FilesModifiedDlgBase::OnChoose), NULL, this);
    m_cmdLnkBtnNone->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FilesModifiedDlgBase::OnIgnore), NULL, this);
    
}

FilesModifiedDlgBase::~FilesModifiedDlgBase()
{
    m_cmdLnkBtn30->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FilesModifiedDlgBase::OnLoad), NULL, this);
    m_cmdLnkBtn28->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FilesModifiedDlgBase::OnChoose), NULL, this);
    m_cmdLnkBtnNone->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FilesModifiedDlgBase::OnIgnore), NULL, this);
    
}