KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_plugin_options_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15DIALOG_PLUGIN_OPTIONS_BASE::DIALOG_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 )
16{
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18
19 wxBoxSizer* bMainSizer;
20 bMainSizer = new wxBoxSizer( wxVERTICAL );
21
22 wxBoxSizer* m_horizontal_sizer;
23 m_horizontal_sizer = new wxBoxSizer( wxHORIZONTAL );
24
25 wxStaticBoxSizer* m_grid_sizer;
26 m_grid_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Plugin Options") ), wxVERTICAL );
27
28 m_grid_sizer->SetMinSize( wxSize( 400,300 ) );
29 m_grid = new WX_GRID( m_grid_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxVSCROLL );
30
31 // Grid
32 m_grid->CreateGrid( 1, 2 );
33 m_grid->EnableEditing( true );
34 m_grid->EnableGridLines( true );
35 m_grid->EnableDragGridSize( false );
36 m_grid->SetMargins( 0, 0 );
37
38 // Columns
39 m_grid->SetColSize( 0, 120 );
40 m_grid->SetColSize( 1, 240 );
41 m_grid->EnableDragColMove( false );
42 m_grid->EnableDragColSize( true );
43 m_grid->SetColLabelValue( 0, _("Option") );
44 m_grid->SetColLabelValue( 1, _("Value") );
46 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
47
48 // Rows
49 m_grid->EnableDragRowSize( false );
50 m_grid->SetRowLabelSize( 0 );
51 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
52
53 // Label Appearance
54
55 // Cell Defaults
56 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
57 m_grid_sizer->Add( m_grid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
58
59 wxBoxSizer* bButtonsSizer;
60 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
61
62 m_append_button = new STD_BITMAP_BUTTON( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
63 bButtonsSizer->Add( m_append_button, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
64
65
66 bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
67
68 m_delete_button = new STD_BITMAP_BUTTON( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
69 bButtonsSizer->Add( m_delete_button, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
70
71
72 m_grid_sizer->Add( bButtonsSizer, 0, wxEXPAND|wxTOP, 5 );
73
74
75 m_horizontal_sizer->Add( m_grid_sizer, 3, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
76
77 wxStaticBoxSizer* m_options_sizer;
78 m_options_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Option Choices") ), wxVERTICAL );
79
80 m_listbox = new wxListBox( m_options_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_ALWAYS_SB|wxLB_SINGLE );
81 m_listbox->SetToolTip( _("Options supported by current plugin") );
82
83 m_options_sizer->Add( m_listbox, 3, wxALL|wxEXPAND, 5 );
84
85 m_append_choice_button = new wxButton( m_options_sizer->GetStaticBox(), wxID_ANY, _("<< Append Selected Option"), wxDefaultPosition, wxDefaultSize, 0 );
86 m_options_sizer->Add( m_append_choice_button, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
87
88
89 m_options_sizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
90
91 m_html = new HTML_WINDOW( m_options_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxBORDER_SIMPLE|wxVSCROLL );
92 m_html->SetMinSize( wxSize( 280,100 ) );
93
94 m_options_sizer->Add( m_html, 2, wxALL|wxEXPAND, 5 );
95
96
97 m_horizontal_sizer->Add( m_options_sizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
98
99
100 bMainSizer->Add( m_horizontal_sizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
101
102 m_sdbSizer1 = new wxStdDialogButtonSizer();
103 m_sdbSizer1OK = new wxButton( this, wxID_OK );
104 m_sdbSizer1->AddButton( m_sdbSizer1OK );
105 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
106 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
107 m_sdbSizer1->Realize();
108
109 bMainSizer->Add( m_sdbSizer1, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
110
111
112 this->SetSizer( bMainSizer );
113 this->Layout();
114 bMainSizer->Fit( this );
115
116 this->Centre( wxBOTH );
117
118 // Connect Events
119 m_grid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onGridCellChange ), NULL, this );
120 m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onSize ), NULL, this );
121 m_grid->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onUpdateUI ), NULL, this );
122 m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
123 m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
124 m_listbox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
125 m_listbox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
126 m_append_choice_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
127}
128
130{
131 // Disconnect Events
132 m_grid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onGridCellChange ), NULL, this );
133 m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onSize ), NULL, this );
134 m_grid->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onUpdateUI ), NULL, this );
135 m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
136 m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
137 m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
138 m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
139 m_append_choice_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
140
141}
virtual void onGridCellChange(wxGridEvent &event)=0
DIALOG_PLUGIN_OPTIONS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER)
virtual void onUpdateUI(wxUpdateUIEvent &event)=0
virtual void onDeleteRow(wxCommandEvent &event)=0
virtual void onSize(wxSizeEvent &event)=0
virtual void onAppendRow(wxCommandEvent &event)=0
virtual void onListBoxItemSelected(wxCommandEvent &event)=0
virtual void onAppendOption(wxCommandEvent &event)=0
virtual void onListBoxItemDoubleClicked(wxCommandEvent &event)=0
wxStdDialogButtonSizer * m_sdbSizer1
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:84
Add dark theme support to wxHtmlWindow.
Definition: html_window.h:34
A bitmap button widget that behaves like a standard dialog button except with an icon.
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:211
#define _(s)