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  m_buttonRemoveEqu->SetToolTip( _("Unload the selected library") );
41 
42  bSizerButtons->Add( m_buttonRemoveEqu, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
43 
44  m_buttonMoveUp = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_EQU_UP, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
45  bSizerButtons->Add( m_buttonMoveUp, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
46 
47  m_buttonMoveDown = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_EQU_DOWN, _("Move Down"), wxDefaultPosition, wxDefaultSize, 0 );
48  bSizerButtons->Add( m_buttonMoveDown, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
49 
50  m_buttonEdit = new wxButton( sbEquivChoiceSizer->GetStaticBox(), wxID_ANY, _("Edit Equ File"), wxDefaultPosition, wxDefaultSize, 0 );
51  bSizerButtons->Add( m_buttonEdit, 0, wxALL|wxEXPAND, 5 );
52 
53 
54  sbEquivChoiceSizer->Add( bSizerButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
55 
56 
57  bMainSizer->Add( sbEquivChoiceSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
58 
59  wxBoxSizer* bSizerLower;
60  bSizerLower = new wxBoxSizer( wxHORIZONTAL );
61 
62  wxBoxSizer* bSizerEnvVar;
63  bSizerEnvVar = new wxBoxSizer( wxVERTICAL );
64 
65  m_staticText2 = new wxStaticText( this, wxID_ANY, _("Available environment variables for relative paths:"), wxDefaultPosition, wxDefaultSize, 0 );
66  m_staticText2->Wrap( -1 );
67  bSizerEnvVar->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
68 
69  m_gridEnvVars = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
70 
71  // Grid
72  m_gridEnvVars->CreateGrid( 2, 2 );
73  m_gridEnvVars->EnableEditing( true );
74  m_gridEnvVars->EnableGridLines( true );
75  m_gridEnvVars->EnableDragGridSize( false );
76  m_gridEnvVars->SetMargins( 0, 0 );
77 
78  // Columns
79  m_gridEnvVars->EnableDragColMove( false );
80  m_gridEnvVars->EnableDragColSize( true );
81  m_gridEnvVars->SetColLabelSize( 25 );
82  m_gridEnvVars->SetColLabelValue( 0, _("Name") );
83  m_gridEnvVars->SetColLabelValue( 1, _("Value") );
84  m_gridEnvVars->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
85 
86  // Rows
87  m_gridEnvVars->AutoSizeRows();
88  m_gridEnvVars->EnableDragRowSize( true );
89  m_gridEnvVars->SetRowLabelSize( 30 );
90  m_gridEnvVars->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
91 
92  // Label Appearance
93 
94  // Cell Defaults
95  m_gridEnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
96  bSizerEnvVar->Add( m_gridEnvVars, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
97 
98 
99  bSizerLower->Add( bSizerEnvVar, 1, wxEXPAND, 5 );
100 
101  wxString m_rbPathOptionChoiceChoices[] = { _("Absolute path"), _("Relative path") };
102  int m_rbPathOptionChoiceNChoices = sizeof( m_rbPathOptionChoiceChoices ) / sizeof( wxString );
103  m_rbPathOptionChoice = new wxRadioBox( this, wxID_ANY, _("Path option:"), wxDefaultPosition, wxDefaultSize, m_rbPathOptionChoiceNChoices, m_rbPathOptionChoiceChoices, 1, wxRA_SPECIFY_COLS );
104  m_rbPathOptionChoice->SetSelection( 1 );
105  bSizerLower->Add( m_rbPathOptionChoice, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
106 
107 
108  bMainSizer->Add( bSizerLower, 0, wxEXPAND, 5 );
109 
110  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
111  bMainSizer->Add( m_staticline2, 0, wxEXPAND|wxALL, 5 );
112 
113  m_sdbSizer = new wxStdDialogButtonSizer();
114  m_sdbSizerOK = new wxButton( this, wxID_OK );
115  m_sdbSizer->AddButton( m_sdbSizerOK );
116  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
117  m_sdbSizer->AddButton( m_sdbSizerCancel );
118  m_sdbSizer->Realize();
119 
120  bMainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
121 
122 
123  this->SetSizer( bMainSizer );
124  this->Layout();
125 
126  this->Centre( wxBOTH );
127 
128  // Connect Events
129  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnCloseWindow ) );
130  m_buttonAddEqu->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnAddFiles ), NULL, this );
131  m_buttonRemoveEqu->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnRemoveFiles ), NULL, this );
132  m_buttonMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveUp ), NULL, this );
133  m_buttonMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveDown ), NULL, this );
134  m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnEditEquFile ), NULL, this );
135  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnOkClick ), NULL, this );
136 }
137 
139 {
140  // Disconnect Events
141  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnCloseWindow ) );
142  m_buttonAddEqu->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnAddFiles ), NULL, this );
143  m_buttonRemoveEqu->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnRemoveFiles ), NULL, this );
144  m_buttonMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveUp ), NULL, this );
145  m_buttonMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveDown ), NULL, this );
146  m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnEditEquFile ), NULL, this );
147  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnOkClick ), NULL, this );
148 
149 }
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)