1 ///////////////////////////////////////////////////////////////////////////
2 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
6 ///////////////////////////////////////////////////////////////////////////
7 
8 #include "widgets/wx_grid.h"
9 
10 #include "dialog_pcm_base.h"
11 
12 ///////////////////////////////////////////////////////////////////////////
13 
DIALOG_PCM_BASE(wxWindow * parent,wxWindowID id,const wxString & title,const wxPoint & pos,const wxSize & size,long style)14 DIALOG_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, 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->SetColLabelSize( 22 );
86 	m_gridPendingActions->SetColLabelValue( 0, _("Action") );
87 	m_gridPendingActions->SetColLabelValue( 1, _("Package") );
88 	m_gridPendingActions->SetColLabelValue( 2, _("Version") );
89 	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_TOP );
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 
138 	m_BottomSizer->Add( 0, 0, 1, 0, 5 );
139 
140 	m_sdbSizer1 = new wxStdDialogButtonSizer();
141 	m_sdbSizer1OK = new wxButton( this, wxID_OK );
142 	m_sdbSizer1->AddButton( m_sdbSizer1OK );
143 	m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
144 	m_sdbSizer1->AddButton( m_sdbSizer1Apply );
145 	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
146 	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
147 	m_sdbSizer1->Realize();
148 
149 	m_BottomSizer->Add( m_sdbSizer1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
150 
151 
152 	m_MainSizer->Add( m_BottomSizer, 0, wxEXPAND|wxLEFT, 5 );
153 
154 
155 	this->SetSizer( m_MainSizer );
156 	this->Layout();
157 	m_MainSizer->Fit( this );
158 
159 	this->Centre( wxBOTH );
160 
161 	// Connect Events
162 	m_choiceRepository->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PCM_BASE::OnRepositoryChoice ), NULL, this );
163 	m_buttonManage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnManageRepositoriesClicked ), NULL, this );
164 	m_gridPendingActions->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_PCM_BASE::OnPendingActionsCellClicked ), NULL, this );
165 	m_discardActionButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnDiscardActionClicked ), NULL, this );
166 	m_refreshButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnRefreshClicked ), NULL, this );
167 	m_installLocalButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnInstallFromFileClicked ), NULL, this );
168 	m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnApplyChangesClicked ), NULL, this );
169 	m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnDiscardChangesClicked ), NULL, this );
170 	m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnCloseClicked ), NULL, this );
171 }
172 
~DIALOG_PCM_BASE()173 DIALOG_PCM_BASE::~DIALOG_PCM_BASE()
174 {
175 	// Disconnect Events
176 	m_choiceRepository->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PCM_BASE::OnRepositoryChoice ), NULL, this );
177 	m_buttonManage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnManageRepositoriesClicked ), NULL, this );
178 	m_gridPendingActions->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_PCM_BASE::OnPendingActionsCellClicked ), NULL, this );
179 	m_discardActionButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnDiscardActionClicked ), NULL, this );
180 	m_refreshButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnRefreshClicked ), NULL, this );
181 	m_installLocalButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnInstallFromFileClicked ), NULL, this );
182 	m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnApplyChangesClicked ), NULL, this );
183 	m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnDiscardChangesClicked ), NULL, this );
184 	m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCM_BASE::OnCloseClicked ), NULL, this );
185 
186 }
187