KiCad PCB EDA Suite
dialog_config_equfiles_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jan 1 2016)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_CONFIG_EQUFILES_BASE::DIALOG_CONFIG_EQUFILES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxStaticBoxSizer* sbEquivChoiceSizer;
20  sbEquivChoiceSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprint/Component equ files (.equ files)") ), wxHORIZONTAL );
21 
22  wxBoxSizer* bSizerFlist;
23  bSizerFlist = new wxBoxSizer( wxVERTICAL );
24 
25  m_ListEquiv = new wxListBox( sbEquivChoiceSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE );
26  m_ListEquiv->SetMinSize( wxSize( 350,-1 ) );
27 
28  bSizerFlist->Add( m_ListEquiv, 1, wxRIGHT|wxLEFT|wxEXPAND, 5 );
29 
30 
31  sbEquivChoiceSizer->Add( bSizerFlist, 1, wxEXPAND, 5 );
32 
33  wxBoxSizer* bSizerButtons;
34  bSizerButtons = new wxBoxSizer( wxVERTICAL );
35 
36  m_buttonAddEqu = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_ADD_EQU, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
37  bSizerButtons->Add( m_buttonAddEqu, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
38 
39  m_buttonRemoveEqu = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_REMOVE_EQU, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
40  bSizerButtons->Add( m_buttonRemoveEqu, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
41 
42  m_buttonMoveUp = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_EQU_UP, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
43  bSizerButtons->Add( m_buttonMoveUp, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
44 
45  m_buttonMoveDown = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_EQU_DOWN, _("Move Down"), wxDefaultPosition, wxDefaultSize, 0 );
46  bSizerButtons->Add( m_buttonMoveDown, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
47 
48  m_buttonEdit = new wxButton( sbEquivChoiceSizer->GetStaticBox(), wxID_ANY, _("Edit Equ File"), wxDefaultPosition, wxDefaultSize, 0 );
49  bSizerButtons->Add( m_buttonEdit, 0, wxALL|wxEXPAND, 5 );
50 
51 
52  sbEquivChoiceSizer->Add( bSizerButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
53 
54 
55  bMainSizer->Add( sbEquivChoiceSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
56 
57  wxBoxSizer* bSizerLower;
58  bSizerLower = new wxBoxSizer( wxHORIZONTAL );
59 
60  wxBoxSizer* bSizerEnvVar;
61  bSizerEnvVar = new wxBoxSizer( wxVERTICAL );
62 
63  m_staticText2 = new wxStaticText( this, wxID_ANY, _("Available environment variables for relative paths:"), wxDefaultPosition, wxDefaultSize, 0 );
64  m_staticText2->Wrap( -1 );
65  bSizerEnvVar->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
66 
67  m_gridEnvVars = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
68 
69  // Grid
70  m_gridEnvVars->CreateGrid( 2, 2 );
71  m_gridEnvVars->EnableEditing( true );
72  m_gridEnvVars->EnableGridLines( true );
73  m_gridEnvVars->EnableDragGridSize( false );
74  m_gridEnvVars->SetMargins( 0, 0 );
75 
76  // Columns
77  m_gridEnvVars->EnableDragColMove( false );
78  m_gridEnvVars->EnableDragColSize( true );
79  m_gridEnvVars->SetColLabelSize( 25 );
80  m_gridEnvVars->SetColLabelValue( 0, _("Name") );
81  m_gridEnvVars->SetColLabelValue( 1, _("Value") );
82  m_gridEnvVars->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
83 
84  // Rows
85  m_gridEnvVars->AutoSizeRows();
86  m_gridEnvVars->EnableDragRowSize( true );
87  m_gridEnvVars->SetRowLabelSize( 30 );
88  m_gridEnvVars->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
89 
90  // Label Appearance
91 
92  // Cell Defaults
93  m_gridEnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
94  bSizerEnvVar->Add( m_gridEnvVars, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
95 
96 
97  bSizerLower->Add( bSizerEnvVar, 1, wxEXPAND, 5 );
98 
99  wxString m_rbPathOptionChoiceChoices[] = { _("Absolute path"), _("Relative path") };
100  int m_rbPathOptionChoiceNChoices = sizeof( m_rbPathOptionChoiceChoices ) / sizeof( wxString );
101  m_rbPathOptionChoice = new wxRadioBox( this, wxID_ANY, _("Path option:"), wxDefaultPosition, wxDefaultSize, m_rbPathOptionChoiceNChoices, m_rbPathOptionChoiceChoices, 1, wxRA_SPECIFY_COLS );
102  m_rbPathOptionChoice->SetSelection( 1 );
103  bSizerLower->Add( m_rbPathOptionChoice, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
104 
105 
106  bMainSizer->Add( bSizerLower, 0, wxEXPAND, 5 );
107 
108  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
109  bMainSizer->Add( m_staticline2, 0, wxEXPAND|wxALL, 5 );
110 
111  m_sdbSizer = new wxStdDialogButtonSizer();
112  m_sdbSizerOK = new wxButton( this, wxID_OK );
113  m_sdbSizer->AddButton( m_sdbSizerOK );
114  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
115  m_sdbSizer->AddButton( m_sdbSizerCancel );
116  m_sdbSizer->Realize();
117 
118  bMainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
119 
120 
121  this->SetSizer( bMainSizer );
122  this->Layout();
123 
124  this->Centre( wxBOTH );
125 
126  // Connect Events
127  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnCloseWindow ) );
128  m_buttonAddEqu->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnAddFiles ), NULL, this );
129  m_buttonRemoveEqu->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnRemoveFiles ), NULL, this );
130  m_buttonMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveUp ), NULL, this );
131  m_buttonMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveDown ), NULL, this );
132  m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnEditEquFile ), NULL, this );
133  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnOkClick ), NULL, this );
134 }
135 
137 {
138  // Disconnect Events
139  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnCloseWindow ) );
140  m_buttonAddEqu->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnAddFiles ), NULL, this );
141  m_buttonRemoveEqu->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnRemoveFiles ), NULL, this );
142  m_buttonMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveUp ), NULL, this );
143  m_buttonMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveDown ), NULL, this );
144  m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnEditEquFile ), NULL, this );
145  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnOkClick ), NULL, this );
146 
147 }
DIALOG_CONFIG_EQUFILES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(454, 338), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnRemoveFiles(wxCommandEvent &event)
virtual void OnOkClick(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
virtual void OnButtonMoveDown(wxCommandEvent &event)
virtual void OnButtonMoveUp(wxCommandEvent &event)
virtual void OnAddFiles(wxCommandEvent &event)
virtual void OnCloseWindow(wxCloseEvent &event)
virtual void OnEditEquFile(wxCommandEvent &event)