KiCad PCB EDA Suite
dialog_fp_plugin_options_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Mar 9 2015)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_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* bSizer4;
17  bSizer4 = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* m_horizontal_sizer;
20  m_horizontal_sizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxStaticBoxSizer* m_grid_sizer;
23  m_grid_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Plugin Options:") ), wxVERTICAL );
24 
25  m_grid_sizer->SetMinSize( wxSize( -1,300 ) );
26  m_grid = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
27 
28  // Grid
29  m_grid->CreateGrid( 1, 2 );
30  m_grid->EnableEditing( true );
31  m_grid->EnableGridLines( true );
32  m_grid->EnableDragGridSize( false );
33  m_grid->SetMargins( 0, 0 );
34 
35  // Columns
36  m_grid->EnableDragColMove( false );
37  m_grid->EnableDragColSize( true );
38  m_grid->SetColLabelSize( 30 );
39  m_grid->SetColLabelValue( 0, _("Option") );
40  m_grid->SetColLabelValue( 1, _("Value") );
41  m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
42 
43  // Rows
44  m_grid->EnableDragRowSize( false );
45  m_grid->SetRowLabelSize( 40 );
46  m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
47 
48  // Label Appearance
49 
50  // Cell Defaults
51  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
52  m_grid_sizer->Add( m_grid, 1, wxEXPAND|wxTOP, 5 );
53 
54  wxBoxSizer* m_button_sizer;
55  m_button_sizer = new wxBoxSizer( wxHORIZONTAL );
56 
57  m_add_row = new wxButton( this, wxID_ANY, _("Append"), wxDefaultPosition, wxDefaultSize, 0 );
58  m_add_row->SetToolTip( _("Append a blank row") );
59 
60  m_button_sizer->Add( m_add_row, 0, wxALL, 5 );
61 
62  m_delete_row = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
63  m_delete_row->SetToolTip( _("Delete the selected row") );
64 
65  m_button_sizer->Add( m_delete_row, 0, wxALL, 5 );
66 
67  m_move_up = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
68  m_move_up->SetToolTip( _("Move the selected row up one position") );
69 
70  m_button_sizer->Add( m_move_up, 0, wxALL, 5 );
71 
72  m_move_down = new wxButton( this, wxID_ANY, _("Move Down"), wxDefaultPosition, wxDefaultSize, 0 );
73  m_move_down->SetToolTip( _("Move the selected row down one position") );
74 
75  m_button_sizer->Add( m_move_down, 0, wxALL, 5 );
76 
77 
78  m_grid_sizer->Add( m_button_sizer, 0, wxALIGN_CENTER, 5 );
79 
80 
81  m_horizontal_sizer->Add( m_grid_sizer, 3, wxEXPAND, 5 );
82 
83  wxGridSizer* m_choose_size;
84  m_choose_size = new wxGridSizer( 1, 1, 0, 0 );
85 
86 
87  m_horizontal_sizer->Add( m_choose_size, 0, wxEXPAND, 5 );
88 
89  wxStaticBoxSizer* m_options_sizer;
90  m_options_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Option Choices:") ), wxVERTICAL );
91 
92  m_options_sizer->SetMinSize( wxSize( 200,-1 ) );
93  m_listbox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_ALWAYS_SB|wxLB_SINGLE );
94  m_listbox->SetToolTip( _("Options supported by current plugin") );
95 
96  m_options_sizer->Add( m_listbox, 2, wxALL|wxEXPAND, 5 );
97 
98  m_append_choice_button = new wxButton( this, wxID_ANY, _("<< Append Selected Option"), wxDefaultPosition, wxDefaultSize, 0 );
99  m_options_sizer->Add( m_append_choice_button, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
100 
101  m_staticText1 = new wxStaticText( this, wxID_ANY, _("Option Specific Help:"), wxDefaultPosition, wxDefaultSize, 0 );
102  m_staticText1->Wrap( -1 );
103  m_options_sizer->Add( m_staticText1, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
104 
105  m_html = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxVSCROLL );
106  m_html->SetMinSize( wxSize( 300,300 ) );
107 
108  m_options_sizer->Add( m_html, 3, wxALL|wxEXPAND, 5 );
109 
110 
111  m_horizontal_sizer->Add( m_options_sizer, 2, wxEXPAND, 5 );
112 
113 
114  bSizer4->Add( m_horizontal_sizer, 1, wxALL|wxEXPAND, 5 );
115 
116  m_sdbSizer1 = new wxStdDialogButtonSizer();
117  m_sdbSizer1OK = new wxButton( this, wxID_OK );
118  m_sdbSizer1->AddButton( m_sdbSizer1OK );
119  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
120  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
121  m_sdbSizer1->Realize();
122 
123  bSizer4->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
124 
125 
126  this->SetSizer( bSizer4 );
127  this->Layout();
128 
129  this->Centre( wxBOTH );
130 
131  // Connect Events
132  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onCancelCaptionButtonClick ) );
133  m_add_row->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
134  m_delete_row->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
135  m_move_up->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onMoveUp ), NULL, this );
136  m_move_down->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onMoveDown ), NULL, this );
137  m_listbox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
138  m_listbox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
139  m_append_choice_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
140  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onCancelButtonClick ), NULL, this );
141  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onOKButtonClick ), NULL, this );
142 }
143 
145 {
146  // Disconnect Events
147  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onCancelCaptionButtonClick ) );
148  m_add_row->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
149  m_delete_row->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
150  m_move_up->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onMoveUp ), NULL, this );
151  m_move_down->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onMoveDown ), NULL, this );
152  m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
153  m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
154  m_append_choice_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
155  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onCancelButtonClick ), NULL, this );
156  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onOKButtonClick ), NULL, this );
157 
158 }
virtual void onMoveUp(wxMouseEvent &event)=0
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
virtual void onMoveDown(wxMouseEvent &event)=0
virtual void onListBoxItemDoubleClicked(wxCommandEvent &event)=0
DIALOG_FP_PLUGIN_OPTIONS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(678, 342), long style=wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER)
virtual void onCancelCaptionButtonClick(wxCloseEvent &event)=0
virtual void onDeleteRow(wxMouseEvent &event)=0
virtual void onAppendOption(wxCommandEvent &event)=0
virtual void onListBoxItemSelected(wxCommandEvent &event)=0
virtual void onCancelButtonClick(wxCommandEvent &event)=0
virtual void onAppendRow(wxMouseEvent &event)=0
virtual void onOKButtonClick(wxCommandEvent &event)=0