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