KiCad PCB EDA Suite
dialog_bom_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 5 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "dialog_bom_base.h"
9 
11 
12 DIALOG_BOM_BASE::DIALOG_BOM_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( wxSize( -1,-1 ), wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bUpperSizer;
20  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxBoxSizer* bLeftSizer;
23  bLeftSizer = new wxBoxSizer( wxVERTICAL );
24 
25  m_staticTextPluginTitle = new wxStaticText( this, wxID_ANY, _("BOM plugins:"), wxDefaultPosition, wxDefaultSize, 0 );
26  m_staticTextPluginTitle->Wrap( -1 );
27  bLeftSizer->Add( m_staticTextPluginTitle, 0, wxTOP, 5 );
28 
29  m_lbPlugins = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
30  m_lbPlugins->SetMinSize( wxSize( 250,-1 ) );
31 
32  bLeftSizer->Add( m_lbPlugins, 1, wxEXPAND, 5 );
33 
34 
35  bUpperSizer->Add( bLeftSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
36 
37  wxBoxSizer* bRightSizer;
38  bRightSizer = new wxBoxSizer( wxVERTICAL );
39 
40  wxBoxSizer* bNameSizer;
41  bNameSizer = new wxBoxSizer( wxHORIZONTAL );
42 
43  m_staticTextName = new wxStaticText( this, wxID_ANY, _("Plugin nickname:"), wxDefaultPosition, wxDefaultSize, 0 );
44  m_staticTextName->Wrap( -1 );
45  bNameSizer->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL, 5 );
46 
47  m_textCtrlName = new wxTextCtrl( this, IN_NAMELINE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
48  bNameSizer->Add( m_textCtrlName, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
49 
50 
51  bRightSizer->Add( bNameSizer, 0, wxEXPAND|wxTOP|wxLEFT, 6 );
52 
53  m_Messages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
54  m_Messages->SetMinSize( wxSize( 300,200 ) );
55 
56  bRightSizer->Add( m_Messages, 1, wxEXPAND|wxLEFT, 5 );
57 
58 
59  bUpperSizer->Add( bRightSizer, 2, wxEXPAND|wxRIGHT|wxTOP, 10 );
60 
61 
62  bMainSizer->Add( bUpperSizer, 2, wxEXPAND|wxALL, 5 );
63 
64  wxBoxSizer* bPluginButtons;
65  bPluginButtons = new wxBoxSizer( wxHORIZONTAL );
66 
67  m_buttonAddPlugin = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
68  m_buttonAddPlugin->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
69  m_buttonAddPlugin->SetToolTip( _("Add a new plugin and its command line to the list") );
70 
71  bPluginButtons->Add( m_buttonAddPlugin, 0, wxRIGHT|wxLEFT, 5 );
72 
73  m_buttonDelPlugin = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
74  m_buttonDelPlugin->SetToolTip( _("Remove the current plugin from list") );
75 
76  bPluginButtons->Add( m_buttonDelPlugin, 0, wxRIGHT, 5 );
77 
78 
79  bPluginButtons->Add( 0, 0, 0, wxRIGHT|wxLEFT, 5 );
80 
81  m_buttonEdit = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
82  m_buttonEdit->SetToolTip( _("Edit the plugin file in the text editor") );
83 
84  bPluginButtons->Add( m_buttonEdit, 0, wxRIGHT, 5 );
85 
86 
87  bMainSizer->Add( bPluginButtons, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
88 
89  wxBoxSizer* bbottomSizer;
90  bbottomSizer = new wxBoxSizer( wxVERTICAL );
91 
92  m_staticTextCmd = new wxStaticText( this, wxID_ANY, _("Command line:"), wxDefaultPosition, wxDefaultSize, 0 );
93  m_staticTextCmd->Wrap( -1 );
94  bbottomSizer->Add( m_staticTextCmd, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
95 
96  m_textCtrlCommand = new wxTextCtrl( this, ID_CMDLINE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
97  m_textCtrlCommand->SetMinSize( wxSize( 380,-1 ) );
98 
99  bbottomSizer->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
100 
101  m_checkBoxShowConsole = new wxCheckBox( this, wxID_ANY, _("Show console window"), wxDefaultPosition, wxDefaultSize, 0 );
102  m_checkBoxShowConsole->SetValue(true);
103  m_checkBoxShowConsole->SetToolTip( _("By default, command line runs with hidden console window and output is redirected to \"Plugin info\" field.\nSet this option to show the window of the running command.") );
104 
105  bbottomSizer->Add( m_checkBoxShowConsole, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
106 
107 
108  bMainSizer->Add( bbottomSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
109 
110  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
111  bMainSizer->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
112 
113  m_sdbSizer1 = new wxStdDialogButtonSizer();
114  m_sdbSizer1OK = new wxButton( this, wxID_OK );
115  m_sdbSizer1->AddButton( m_sdbSizer1OK );
116  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
117  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
118  m_sdbSizer1Help = new wxButton( this, wxID_HELP );
119  m_sdbSizer1->AddButton( m_sdbSizer1Help );
120  m_sdbSizer1->Realize();
121 
122  bMainSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
123 
124 
125  this->SetSizer( bMainSizer );
126  this->Layout();
127 
128  this->Centre( wxBOTH );
129 
130  // Connect Events
131  this->Connect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_BOM_BASE::OnIdle ) );
132  m_lbPlugins->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_BOM_BASE::OnPluginSelected ), NULL, this );
133  m_textCtrlName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_BOM_BASE::OnNameEdited ), NULL, this );
134  m_buttonAddPlugin->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnAddPlugin ), NULL, this );
135  m_buttonDelPlugin->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnRemovePlugin ), NULL, this );
136  m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnEditPlugin ), NULL, this );
137  m_textCtrlCommand->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_BOM_BASE::OnCommandLineEdited ), NULL, this );
138  m_checkBoxShowConsole->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnShowConsoleChanged ), NULL, this );
139  m_sdbSizer1Help->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnHelp ), NULL, this );
140  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnRunPlugin ), NULL, this );
141 }
142 
144 {
145  // Disconnect Events
146  this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_BOM_BASE::OnIdle ) );
147  m_lbPlugins->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_BOM_BASE::OnPluginSelected ), NULL, this );
148  m_textCtrlName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_BOM_BASE::OnNameEdited ), NULL, this );
149  m_buttonAddPlugin->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnAddPlugin ), NULL, this );
150  m_buttonDelPlugin->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnRemovePlugin ), NULL, this );
151  m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnEditPlugin ), NULL, this );
152  m_textCtrlCommand->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_BOM_BASE::OnCommandLineEdited ), NULL, this );
153  m_checkBoxShowConsole->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnShowConsoleChanged ), NULL, this );
154  m_sdbSizer1Help->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnHelp ), NULL, this );
155  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnRunPlugin ), NULL, this );
156 
157 }
wxBitmapButton * m_buttonEdit
wxBitmapButton * m_buttonAddPlugin
wxStaticText * m_staticTextName
virtual void OnRunPlugin(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1
wxStaticLine * m_staticline2
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:53
virtual void OnPluginSelected(wxCommandEvent &event)
wxListBox * m_lbPlugins
wxTextCtrl * m_textCtrlName
virtual void OnEditPlugin(wxCommandEvent &event)
virtual void OnNameEdited(wxCommandEvent &event)
wxCheckBox * m_checkBoxShowConsole
wxButton * m_sdbSizer1Help
wxStaticText * m_staticTextCmd
wxTextCtrl * m_textCtrlCommand
wxBitmapButton * m_buttonDelPlugin
virtual void OnAddPlugin(wxCommandEvent &event)
wxTextCtrl * m_Messages
wxButton * m_sdbSizer1OK
virtual void OnIdle(wxIdleEvent &event)
DIALOG_BOM_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Bill of Material"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(617, 433), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnCommandLineEdited(wxCommandEvent &event)
wxButton * m_sdbSizer1Cancel
virtual void OnRemovePlugin(wxCommandEvent &event)
wxStaticText * m_staticTextPluginTitle
virtual void OnShowConsoleChanged(wxCommandEvent &event)
virtual void OnHelp(wxCommandEvent &event)