KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eda_reorderable_list_dialog_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
9
11
13
14EDA_REORDERABLE_LIST_DIALOG_BASE::EDA_REORDERABLE_LIST_DIALOG_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( 320,220 ), wxDefaultSize );
17
18 wxBoxSizer* bSizerMain;
19 bSizerMain = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bTop;
22 bTop = new wxBoxSizer( wxHORIZONTAL );
23
24 wxFlexGridSizer* fgSizer1;
25 fgSizer1 = new wxFlexGridSizer( 0, 3, 3, 0 );
26 fgSizer1->AddGrowableCol( 0 );
27 fgSizer1->AddGrowableCol( 2 );
28 fgSizer1->AddGrowableRow( 1 );
29 fgSizer1->SetFlexibleDirection( wxBOTH );
30 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31
32 m_availableListLabel = new wxStaticText( this, wxID_ANY, _("Available:"), wxDefaultPosition, wxDefaultSize, 0 );
33 m_availableListLabel->Wrap( -1 );
34 fgSizer1->Add( m_availableListLabel, 0, 0, 5 );
35
36
37 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
38
39 m_enabledListLabel = new wxStaticText( this, wxID_ANY, _("Enabled:"), wxDefaultPosition, wxDefaultSize, 0 );
40 m_enabledListLabel->Wrap( -1 );
41 fgSizer1->Add( m_enabledListLabel, 0, 0, 5 );
42
43 m_availableListBox = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxBORDER_SIMPLE|wxVSCROLL );
44 m_availableListBox->SetMinSize( wxSize( 140,20 ) );
45
46 fgSizer1->Add( m_availableListBox, 1, wxEXPAND, 5 );
47
48 wxBoxSizer* bMiddleButtons;
49 bMiddleButtons = new wxBoxSizer( wxVERTICAL );
50
51 m_btnAdd = new wxButton( this, wxID_ANY, _(">"), wxDefaultPosition, wxSize( 24,24 ), 0 );
52 bMiddleButtons->Add( m_btnAdd, 0, wxBOTTOM, 10 );
53
54 m_btnRemove = new wxButton( this, wxID_ANY, _("<"), wxDefaultPosition, wxSize( 24,24 ), 0 );
55 bMiddleButtons->Add( m_btnRemove, 0, wxBOTTOM|wxALIGN_CENTER_HORIZONTAL, 20 );
56
57
58 fgSizer1->Add( bMiddleButtons, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
59
60 m_enabledListBox = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxBORDER_SIMPLE|wxVSCROLL );
61 m_enabledListBox->SetMinSize( wxSize( 140,20 ) );
62
63 fgSizer1->Add( m_enabledListBox, 3, wxEXPAND, 5 );
64
65
66 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
67
68
69 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
70
71 wxBoxSizer* bSizer4;
72 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
73
74 m_btnUp = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
75 m_btnUp->SetToolTip( _("Move up") );
76
77 bSizer4->Add( m_btnUp, 0, 0, 5 );
78
79 m_btnDown = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
80 m_btnDown->SetToolTip( _("Move down") );
81
82 bSizer4->Add( m_btnDown, 0, wxLEFT, 5 );
83
84
85 fgSizer1->Add( bSizer4, 0, wxEXPAND, 5 );
86
87
88 bTop->Add( fgSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
89
90
91 bSizerMain->Add( bTop, 1, wxEXPAND, 5 );
92
93 m_ButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
94
95 m_sdbSizer = new wxStdDialogButtonSizer();
96 m_sdbSizerOK = new wxButton( this, wxID_OK );
97 m_sdbSizer->AddButton( m_sdbSizerOK );
98 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
99 m_sdbSizer->AddButton( m_sdbSizerCancel );
100 m_sdbSizer->Realize();
101
102 m_ButtonsSizer->Add( m_sdbSizer, 1, wxALL, 5 );
103
104
105 bSizerMain->Add( m_ButtonsSizer, 0, wxEXPAND, 5 );
106
107
108 this->SetSizer( bSizerMain );
109 this->Layout();
110
111 this->Centre( wxBOTH );
112
113 // Connect Events
114 m_availableListBox->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onAvailableListItemSelected ), NULL, this );
115 m_btnAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onAddItem ), NULL, this );
116 m_btnRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onRemoveItem ), NULL, this );
117 m_enabledListBox->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onEnabledListItemSelected ), NULL, this );
118 m_btnUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onMoveUp ), NULL, this );
119 m_btnDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onMoveDown ), NULL, this );
120}
121
123{
124 // Disconnect Events
125 m_availableListBox->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onAvailableListItemSelected ), NULL, this );
126 m_btnAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onAddItem ), NULL, this );
127 m_btnRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onRemoveItem ), NULL, this );
128 m_enabledListBox->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onEnabledListItemSelected ), NULL, this );
129 m_btnUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onMoveUp ), NULL, this );
130 m_btnDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EDA_REORDERABLE_LIST_DIALOG_BASE::onMoveDown ), NULL, this );
131
132}
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
virtual void onMoveUp(wxCommandEvent &event)=0
virtual void onEnabledListItemSelected(wxListEvent &event)=0
virtual void onAddItem(wxCommandEvent &event)=0
virtual void onMoveDown(wxCommandEvent &event)=0
virtual void onRemoveItem(wxCommandEvent &event)=0
EDA_REORDERABLE_LIST_DIALOG_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(580, 260), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onAvailableListItemSelected(wxListEvent &event)=0
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)