KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_bom_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
10#include "dialog_bom_base.h"
11
13
14DIALOG_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 )
15{
16 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
17
18 wxBoxSizer* bMainSizer;
19 bMainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bUpperSizer;
22 bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
23
24 wxBoxSizer* bLeftSizer;
25 bLeftSizer = new wxBoxSizer( wxVERTICAL );
26
27 m_staticTextGeneratorTitle = new wxStaticText( this, wxID_ANY, _("BOM generator scripts:"), wxDefaultPosition, wxDefaultSize, 0 );
29 bLeftSizer->Add( m_staticTextGeneratorTitle, 0, wxTOP, 5 );
30
31 m_lbGenerators = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
32 m_lbGenerators->SetMinSize( wxSize( 250,-1 ) );
33
34 bLeftSizer->Add( m_lbGenerators, 1, wxEXPAND, 5 );
35
36
37 bUpperSizer->Add( bLeftSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
38
39 wxBoxSizer* bRightSizer;
40 bRightSizer = new wxBoxSizer( wxVERTICAL );
41
42 wxBoxSizer* bNameSizer;
43 bNameSizer = new wxBoxSizer( wxHORIZONTAL );
44
45 m_staticTextName = new wxStaticText( this, wxID_ANY, _("Generator nickname:"), wxDefaultPosition, wxDefaultSize, 0 );
46 m_staticTextName->Wrap( -1 );
47 bNameSizer->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL, 5 );
48
49 m_textCtrlName = new wxTextCtrl( this, IN_NAMELINE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
50 bNameSizer->Add( m_textCtrlName, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
51
52
53 bRightSizer->Add( bNameSizer, 0, wxEXPAND|wxTOP|wxLEFT, 6 );
54
55 m_Messages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
56 m_Messages->SetMinSize( wxSize( 300,200 ) );
57
58 bRightSizer->Add( m_Messages, 1, wxEXPAND|wxLEFT, 5 );
59
60
61 bUpperSizer->Add( bRightSizer, 2, wxEXPAND|wxRIGHT|wxTOP, 10 );
62
63
64 bMainSizer->Add( bUpperSizer, 2, wxEXPAND|wxALL, 5 );
65
66 wxBoxSizer* bGeneratorButtons;
67 bGeneratorButtons = new wxBoxSizer( wxHORIZONTAL );
68
69 m_buttonAddGenerator = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
70 m_buttonAddGenerator->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
71 m_buttonAddGenerator->SetToolTip( _("Add a new BOM generator and its command line to the list") );
72
73 bGeneratorButtons->Add( m_buttonAddGenerator, 0, wxRIGHT|wxLEFT, 5 );
74
75 m_buttonEdit = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
76 m_buttonEdit->SetToolTip( _("Edit the script file in the text editor") );
77
78 bGeneratorButtons->Add( m_buttonEdit, 0, wxRIGHT, 5 );
79
80
81 bGeneratorButtons->Add( 20, 0, 0, 0, 5 );
82
83 m_buttonDelGenerator = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
84 m_buttonDelGenerator->SetToolTip( _("Remove the current generator script from list") );
85
86 bGeneratorButtons->Add( m_buttonDelGenerator, 0, wxRIGHT, 5 );
87
88
89 bMainSizer->Add( bGeneratorButtons, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
90
91 wxBoxSizer* bbottomSizer;
92 bbottomSizer = new wxBoxSizer( wxVERTICAL );
93
94 m_staticTextCmd = new wxStaticText( this, wxID_ANY, _("Command line running the generator:"), wxDefaultPosition, wxDefaultSize, 0 );
95 m_staticTextCmd->Wrap( -1 );
96 bbottomSizer->Add( m_staticTextCmd, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
97
98 m_textCtrlCommand = new wxTextCtrl( this, ID_CMDLINE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
99 m_textCtrlCommand->SetMinSize( wxSize( 380,-1 ) );
100
101 bbottomSizer->Add( m_textCtrlCommand, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
102
103 m_checkBoxShowConsole = new wxCheckBox( this, wxID_ANY, _("Show console window"), wxDefaultPosition, wxDefaultSize, 0 );
104 m_checkBoxShowConsole->SetToolTip( _("By default, command line runs with hidden console window and output is redirected to the info display.\nSet this option to show the window of the running command.") );
105
106 bbottomSizer->Add( m_checkBoxShowConsole, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
107
108
109 bMainSizer->Add( bbottomSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
110
111 wxBoxSizer* bSizer8;
112 bSizer8 = new wxBoxSizer( wxHORIZONTAL );
113
114 m_buttonReset = new wxButton( this, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
115 m_buttonReset->SetToolTip( _("Reset the list of BOM generator scripts to the default settings") );
116
117 bSizer8->Add( m_buttonReset, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
118
119
120 bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
121
122 m_sdbSizer = new wxStdDialogButtonSizer();
123 m_sdbSizerOK = new wxButton( this, wxID_OK );
124 m_sdbSizer->AddButton( m_sdbSizerOK );
125 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
126 m_sdbSizer->AddButton( m_sdbSizerCancel );
127 m_sdbSizerHelp = new wxButton( this, wxID_HELP );
128 m_sdbSizer->AddButton( m_sdbSizerHelp );
129 m_sdbSizer->Realize();
130
131 bSizer8->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
132
133
134 bMainSizer->Add( bSizer8, 0, wxEXPAND|wxLEFT, 5 );
135
136
137 this->SetSizer( bMainSizer );
138 this->Layout();
139 bMainSizer->Fit( this );
140
141 this->Centre( wxBOTH );
142
143 // Connect Events
144 this->Connect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_BOM_BASE::OnIdle ) );
145 m_lbGenerators->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_BOM_BASE::OnGeneratorSelected ), NULL, this );
146 m_textCtrlName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_BOM_BASE::OnNameEdited ), NULL, this );
147 m_buttonAddGenerator->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnAddGenerator ), NULL, this );
148 m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnEditGenerator ), NULL, this );
149 m_buttonDelGenerator->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnRemoveGenerator ), NULL, this );
150 m_textCtrlCommand->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_BOM_BASE::OnCommandLineEdited ), NULL, this );
151 m_checkBoxShowConsole->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnShowConsoleChanged ), NULL, this );
152 m_sdbSizerHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnHelp ), NULL, this );
153 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnRunGenerator ), NULL, this );
154}
155
157{
158 // Disconnect Events
159 this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_BOM_BASE::OnIdle ) );
160 m_lbGenerators->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_BOM_BASE::OnGeneratorSelected ), NULL, this );
161 m_textCtrlName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_BOM_BASE::OnNameEdited ), NULL, this );
162 m_buttonAddGenerator->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnAddGenerator ), NULL, this );
163 m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnEditGenerator ), NULL, this );
164 m_buttonDelGenerator->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnRemoveGenerator ), NULL, this );
165 m_textCtrlCommand->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_BOM_BASE::OnCommandLineEdited ), NULL, this );
166 m_checkBoxShowConsole->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnShowConsoleChanged ), NULL, this );
167 m_sdbSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnHelp ), NULL, this );
168 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOM_BASE::OnRunGenerator ), NULL, this );
169
170}
wxButton * m_buttonReset
virtual void OnNameEdited(wxCommandEvent &event)
virtual void OnIdle(wxIdleEvent &event)
wxStaticText * m_staticTextCmd
wxStdDialogButtonSizer * m_sdbSizer
STD_BITMAP_BUTTON * m_buttonEdit
wxTextCtrl * m_textCtrlName
virtual void OnHelp(wxCommandEvent &event)
virtual void OnRemoveGenerator(wxCommandEvent &event)
wxStaticText * m_staticTextName
wxButton * m_sdbSizerCancel
STD_BITMAP_BUTTON * m_buttonAddGenerator
virtual void OnShowConsoleChanged(wxCommandEvent &event)
wxButton * m_sdbSizerHelp
virtual void OnRunGenerator(wxCommandEvent &event)
virtual void OnGeneratorSelected(wxCommandEvent &event)
virtual void OnAddGenerator(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_buttonDelGenerator
DIALOG_BOM_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Bill of Materials"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxTextCtrl * m_Messages
wxCheckBox * m_checkBoxShowConsole
virtual void OnCommandLineEdited(wxCommandEvent &event)
virtual void OnEditGenerator(wxCommandEvent &event)
wxStaticText * m_staticTextGeneratorTitle
wxTextCtrl * m_textCtrlCommand
wxListBox * m_lbGenerators
wxButton * m_sdbSizerOK
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)