KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_pcm_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
8#include "widgets/wx_grid.h"
9
10#include "dialog_pcm_base.h"
11
13
14DIALOG_PCM_BASE::DIALOG_PCM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15{
16 this->SetSizeHints( wxSize( 940,550 ), wxDefaultSize );
17
18 wxBoxSizer* m_MainSizer;
19 m_MainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* m_TopSizer;
22 m_TopSizer = new wxBoxSizer( wxVERTICAL );
23
24 m_dialogNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
25 m_panelRepository = new wxPanel( m_dialogNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
26 wxBoxSizer* bSizer4;
27 bSizer4 = new wxBoxSizer( wxVERTICAL );
28
29 wxBoxSizer* bSizer6;
30 bSizer6 = new wxBoxSizer( wxHORIZONTAL );
31
32 wxArrayString m_choiceRepositoryChoices;
33 m_choiceRepository = new wxChoice( m_panelRepository, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRepositoryChoices, 0 );
34 m_choiceRepository->SetSelection( 0 );
35 bSizer6->Add( m_choiceRepository, 1, wxALIGN_CENTER|wxALL, 5 );
36
37 m_buttonManage = new wxButton( m_panelRepository, wxID_ANY, _("Manage..."), wxDefaultPosition, wxDefaultSize, 0 );
38 bSizer6->Add( m_buttonManage, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
39
40
41 bSizer4->Add( bSizer6, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
42
43 m_contentNotebook = new wxNotebook( m_panelRepository, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
44 m_contentNotebook->SetMinSize( wxSize( 900,400 ) );
45
46
47 bSizer4->Add( m_contentNotebook, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 3 );
48
49
50 m_panelRepository->SetSizer( bSizer4 );
51 m_panelRepository->Layout();
52 bSizer4->Fit( m_panelRepository );
53 m_dialogNotebook->AddPage( m_panelRepository, _("Repository (%d)"), true );
54 m_panelInstalledHolder = new wxPanel( m_dialogNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
55 wxBoxSizer* bSizer7;
56 bSizer7 = new wxBoxSizer( wxVERTICAL );
57
58
59 m_panelInstalledHolder->SetSizer( bSizer7 );
60 m_panelInstalledHolder->Layout();
61 bSizer7->Fit( m_panelInstalledHolder );
62 m_dialogNotebook->AddPage( m_panelInstalledHolder, _("Installed (%d)"), false );
63 m_panelPending = new wxPanel( m_dialogNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
64 m_panelPending->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
65
66 wxBoxSizer* bSizer8;
67 bSizer8 = new wxBoxSizer( wxVERTICAL );
68
69 m_gridPendingActions = new WX_GRID( m_panelPending, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
70
71 // Grid
72 m_gridPendingActions->CreateGrid( 0, 4 );
73 m_gridPendingActions->EnableEditing( false );
74 m_gridPendingActions->EnableGridLines( true );
75 m_gridPendingActions->EnableDragGridSize( false );
76 m_gridPendingActions->SetMargins( 0, 0 );
77
78 // Columns
79 m_gridPendingActions->SetColSize( 0, 100 );
80 m_gridPendingActions->SetColSize( 1, 200 );
81 m_gridPendingActions->SetColSize( 2, 80 );
82 m_gridPendingActions->SetColSize( 3, 200 );
83 m_gridPendingActions->EnableDragColMove( false );
84 m_gridPendingActions->EnableDragColSize( true );
85 m_gridPendingActions->SetColLabelValue( 0, _("Action") );
86 m_gridPendingActions->SetColLabelValue( 1, _("Package") );
87 m_gridPendingActions->SetColLabelValue( 2, _("Version") );
88 m_gridPendingActions->SetColLabelValue( 3, _("Repository") );
90 m_gridPendingActions->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
91
92 // Rows
93 m_gridPendingActions->EnableDragRowSize( false );
94 m_gridPendingActions->SetRowLabelSize( 0 );
95 m_gridPendingActions->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
96
97 // Label Appearance
98
99 // Cell Defaults
100 m_gridPendingActions->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
101 bSizer8->Add( m_gridPendingActions, 1, wxEXPAND|wxALL, 5 );
102
103 wxBoxSizer* bSizer9;
104 bSizer9 = new wxBoxSizer( wxHORIZONTAL );
105
106 m_discardActionButton = new wxBitmapButton( m_panelPending, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
107 m_discardActionButton->SetToolTip( _("Discard action") );
108
109 bSizer9->Add( m_discardActionButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
110
111
112 bSizer9->Add( 0, 0, 1, wxEXPAND, 5 );
113
114
115 bSizer8->Add( bSizer9, 0, wxEXPAND, 0 );
116
117
118 m_panelPending->SetSizer( bSizer8 );
119 m_panelPending->Layout();
120 bSizer8->Fit( m_panelPending );
121 m_dialogNotebook->AddPage( m_panelPending, _("Pending (%d)"), false );
122
123 m_TopSizer->Add( m_dialogNotebook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
124
125
126 m_MainSizer->Add( m_TopSizer, 1, wxEXPAND, 5 );
127
128 wxBoxSizer* m_BottomSizer;
129 m_BottomSizer = new wxBoxSizer( wxHORIZONTAL );
130
131 m_refreshButton = new wxButton( this, wxID_ANY, _("Refresh"), wxDefaultPosition, wxDefaultSize, 0 );
132 m_BottomSizer->Add( m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
133
134 m_installLocalButton = new wxButton( this, wxID_ANY, _("Install from File..."), wxDefaultPosition, wxDefaultSize, 0 );
135 m_BottomSizer->Add( m_installLocalButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
136
137 m_openPackageDirButton = new wxButton( this, wxID_ANY, _("Open Package Directory"), wxDefaultPosition, wxDefaultSize, 0 );
138 m_BottomSizer->Add( m_openPackageDirButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
139
140
141 m_BottomSizer->Add( 0, 0, 1, 0, 5 );
142
143 m_sdbSizer1 = new wxStdDialogButtonSizer();
144 m_sdbSizer1OK = new wxButton( this, wxID_OK );
145 m_sdbSizer1->AddButton( m_sdbSizer1OK );
146 m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
147 m_sdbSizer1->AddButton( m_sdbSizer1Apply );
148 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
149 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
150 m_sdbSizer1->Realize();
151
152 m_BottomSizer->Add( m_sdbSizer1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
153
154
155 m_MainSizer->Add( m_BottomSizer, 0, wxEXPAND|wxLEFT, 5 );
156
157
158 this->SetSizer( m_MainSizer );
159 this->Layout();
160 m_MainSizer->Fit( this );
161
162 this->Centre( wxBOTH );
163
164 // Connect Events
165 m_choiceRepository->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PCM_BASE::OnRepositoryChoice ), NULL, this );
166 m_buttonManage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnManageRepositoriesClicked ), NULL, this );
167 m_gridPendingActions->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_PCM_BASE::OnPendingActionsCellClicked ), NULL, this );
168 m_discardActionButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnDiscardActionClicked ), NULL, this );
169 m_refreshButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnRefreshClicked ), NULL, this );
170 m_installLocalButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnInstallFromFileClicked ), NULL, this );
171 m_openPackageDirButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnOpenPackageDirClicked ), NULL, this );
172 m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnApplyChangesClicked ), NULL, this );
173 m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnDiscardChangesClicked ), NULL, this );
174 m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnCloseClicked ), NULL, this );
175}
176
178{
179 // Disconnect Events
180 m_choiceRepository->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PCM_BASE::OnRepositoryChoice ), NULL, this );
181 m_buttonManage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnManageRepositoriesClicked ), NULL, this );
182 m_gridPendingActions->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_PCM_BASE::OnPendingActionsCellClicked ), NULL, this );
183 m_discardActionButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnDiscardActionClicked ), NULL, this );
184 m_refreshButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnRefreshClicked ), NULL, this );
185 m_installLocalButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnInstallFromFileClicked ), NULL, this );
186 m_openPackageDirButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnOpenPackageDirClicked ), NULL, this );
187 m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnApplyChangesClicked ), NULL, this );
188 m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnDiscardChangesClicked ), NULL, this );
189 m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnCloseClicked ), NULL, this );
190
191}
virtual void OnDiscardActionClicked(wxCommandEvent &event)
wxPanel * m_panelRepository
virtual void OnDiscardChangesClicked(wxCommandEvent &event)
wxChoice * m_choiceRepository
virtual void OnManageRepositoriesClicked(wxCommandEvent &event)
virtual void OnRefreshClicked(wxCommandEvent &event)
virtual void OnInstallFromFileClicked(wxCommandEvent &event)
wxNotebook * m_contentNotebook
virtual void OnOpenPackageDirClicked(wxCommandEvent &event)
WX_GRID * m_gridPendingActions
wxButton * m_sdbSizer1OK
virtual void OnPendingActionsCellClicked(wxGridEvent &event)
virtual void OnRepositoryChoice(wxCommandEvent &event)
virtual void OnCloseClicked(wxCommandEvent &event)
wxButton * m_buttonManage
wxStdDialogButtonSizer * m_sdbSizer1
virtual void OnApplyChangesClicked(wxCommandEvent &event)
wxButton * m_sdbSizer1Cancel
wxButton * m_openPackageDirButton
wxBitmapButton * m_discardActionButton
wxButton * m_refreshButton
DIALOG_PCM_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Plugin And Content Manager"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxNotebook * m_dialogNotebook
wxButton * m_sdbSizer1Apply
wxButton * m_installLocalButton
wxPanel * m_panelInstalledHolder
wxPanel * m_panelPending
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:84
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:136
#define _(s)