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

#include "plugindlgbase.h"


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

static bool bBitmapLoaded = false;


PluginMgrDlgBase::PluginMgrDlgBase(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);
        wxCEF4InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer1);
    
    wxBoxSizer* boxSizer16 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer1->Add(boxSizer16, 1, wxEXPAND, 5);
    
    wxBoxSizer* boxSizer12 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer16->Add(boxSizer12, 0, wxALL|wxEXPAND, 5);
    
    wxArrayString m_checkListPluginsListArr;
    m_checkListPluginsList = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxSize(200,-1), m_checkListPluginsListArr, wxLB_SINGLE);
    
    boxSizer12->Add(m_checkListPluginsList, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer14 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer16->Add(boxSizer14, 1, wxALL|wxEXPAND, 5);
    
    m_htmlWinDesc = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxSize(300,300), wxHW_SCROLLBAR_AUTO|wxBORDER_THEME);
    m_htmlWinDesc->SetPage(wxT("<b>wxHtmlWindow control!</b>"));
    
    boxSizer14->Add(m_htmlWinDesc, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer18 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer16->Add(boxSizer18, 0, wxALL|wxEXPAND, 5);
    
    m_button20 = new wxButton(this, wxID_ANY, _("Check &All"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer18->Add(m_button20, 0, wxALL|wxEXPAND, 5);
    
    m_button22 = new wxButton(this, wxID_ANY, _("Uncheck All"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer18->Add(m_button22, 0, wxALL|wxEXPAND, 5);
    
    m_stdBtnSizer26 = new wxStdDialogButtonSizer();
    
    bSizer1->Add(m_stdBtnSizer26, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer26->AddButton(m_buttonOK);
    
    m_button30 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer26->AddButton(m_button30);
    m_stdBtnSizer26->Realize();
    
    SetName(wxT("PluginMgrDlgBase"));
    SetSizeHints(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_checkListPluginsList->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(PluginMgrDlgBase::OnItemSelected), NULL, this);
    m_button20->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnCheckAll), NULL, this);
    m_button20->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(PluginMgrDlgBase::OnCheckAllUI), NULL, this);
    m_button22->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnUncheckAll), NULL, this);
    m_button22->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(PluginMgrDlgBase::OnUncheckAllUI), NULL, this);
    m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnButtonOK), NULL, this);
    
}

PluginMgrDlgBase::~PluginMgrDlgBase()
{
    m_checkListPluginsList->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(PluginMgrDlgBase::OnItemSelected), NULL, this);
    m_button20->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnCheckAll), NULL, this);
    m_button20->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(PluginMgrDlgBase::OnCheckAllUI), NULL, this);
    m_button22->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnUncheckAll), NULL, this);
    m_button22->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(PluginMgrDlgBase::OnUncheckAllUI), NULL, this);
    m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PluginMgrDlgBase::OnButtonOK), NULL, this);
    
}