KiCad PCB EDA Suite
Loading...
Searching...
No Matches
appearance_controls_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : WX_PANEL( parent, id, pos, size, style, name )
16{
17 this->SetMinSize( wxSize( 200,360 ) );
18
19 m_sizerOuter = new wxBoxSizer( wxVERTICAL );
20
21 m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
22 m_panelLayers = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
23 m_panelLayersSizer = new wxBoxSizer( wxVERTICAL );
24
25 m_windowLayers = new wxScrolledCanvas( m_panelLayers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
26 m_panelLayersSizer->Add( m_windowLayers, 1, wxEXPAND, 5 );
27
28
30 m_panelLayers->Layout();
32 m_notebook->AddPage( m_panelLayers, _("Layers"), true );
33 m_panelObjects = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
34 m_panelObjects->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
35
36 m_objectsPanelSizer = new wxBoxSizer( wxVERTICAL );
37
38 m_windowObjects = new wxScrolledCanvas( m_panelObjects, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
39 m_objectsPanelSizer->Add( m_windowObjects, 1, wxEXPAND, 5 );
40
41
43 m_panelObjects->Layout();
45 m_notebook->AddPage( m_panelObjects, _("Objects"), false );
46 m_panelNetsAndClasses = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
47 m_netsTabOuterSizer = new wxBoxSizer( wxVERTICAL );
48
49 m_netsTabSplitter = new wxSplitterWindow( m_panelNetsAndClasses, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE );
50 m_netsTabSplitter->SetSashGravity( 0.8 );
51 m_netsTabSplitter->Connect( wxEVT_IDLE, wxIdleEventHandler( APPEARANCE_CONTROLS_BASE::m_netsTabSplitterOnIdle ), NULL, this );
52 m_netsTabSplitter->SetMinimumPaneSize( 80 );
53
54 m_panelNets = new wxPanel( m_netsTabSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
55 wxBoxSizer* bSizer192;
56 bSizer192 = new wxBoxSizer( wxVERTICAL );
57
58 wxBoxSizer* bSizer17;
59 bSizer17 = new wxBoxSizer( wxHORIZONTAL );
60
61 m_staticTextNets = new wxStaticText( m_panelNets, wxID_ANY, _("Nets"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_staticTextNets->Wrap( -1 );
63 bSizer17->Add( m_staticTextNets, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
64
65 m_txtNetFilter = new wxTextCtrl( m_panelNets, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
66 m_txtNetFilter->Hide();
67
68 bSizer17->Add( m_txtNetFilter, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
69
70 m_btnNetInspector = new BITMAP_BUTTON( m_panelNets, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
71 m_btnNetInspector->SetToolTip( _("Show the Net Inspector") );
72
73 bSizer17->Add( m_btnNetInspector, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
74
75
76 bSizer192->Add( bSizer17, 0, wxEXPAND, 5 );
77
78 m_netsGrid = new WX_GRID( m_panelNets, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
79
80 // Grid
81 m_netsGrid->CreateGrid( 5, 3 );
82 m_netsGrid->EnableEditing( false );
83 m_netsGrid->EnableGridLines( false );
84 m_netsGrid->EnableDragGridSize( false );
85 m_netsGrid->SetMargins( 0, 0 );
86
87 // Columns
88 m_netsGrid->SetColSize( 0, 40 );
89 m_netsGrid->SetColSize( 1, 40 );
90 m_netsGrid->SetColSize( 2, 400 );
91 m_netsGrid->EnableDragColMove( false );
92 m_netsGrid->EnableDragColSize( false );
94 m_netsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
95
96 // Rows
97 m_netsGrid->EnableDragRowSize( false );
98 m_netsGrid->SetRowLabelSize( 0 );
99 m_netsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
100
101 // Label Appearance
102
103 // Cell Defaults
104 m_netsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
105 bSizer192->Add( m_netsGrid, 0, wxALL|wxEXPAND, 5 );
106
107
108 m_panelNets->SetSizer( bSizer192 );
109 m_panelNets->Layout();
110 bSizer192->Fit( m_panelNets );
111 m_panelNetclasses = new wxPanel( m_netsTabSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
112 wxBoxSizer* bSizerNetClasses;
113 bSizerNetClasses = new wxBoxSizer( wxVERTICAL );
114
115 wxBoxSizer* bSizer20;
116 bSizer20 = new wxBoxSizer( wxHORIZONTAL );
117
118 m_staticTextNetClasses = new wxStaticText( m_panelNetclasses, wxID_ANY, _("Net Classes"), wxDefaultPosition, wxDefaultSize, 0 );
119 m_staticTextNetClasses->Wrap( -1 );
120 bSizer20->Add( m_staticTextNetClasses, 1, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
121
122 m_btnConfigureNetClasses = new BITMAP_BUTTON( m_panelNetclasses, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
123 m_btnConfigureNetClasses->SetToolTip( _("Configure net classes") );
124
125 bSizer20->Add( m_btnConfigureNetClasses, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
126
127
128 bSizerNetClasses->Add( bSizer20, 0, wxEXPAND, 5 );
129
130 m_netclassScrolledWindow = new wxScrolledWindow( m_panelNetclasses, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
131 m_netclassScrolledWindow->SetScrollRate( 5, 5 );
132 m_netclassOuterSizer = new wxBoxSizer( wxVERTICAL );
133
134
136 m_netclassScrolledWindow->Layout();
138 bSizerNetClasses->Add( m_netclassScrolledWindow, 1, wxEXPAND | wxALL, 5 );
139
140
141 m_panelNetclasses->SetSizer( bSizerNetClasses );
142 m_panelNetclasses->Layout();
143 bSizerNetClasses->Fit( m_panelNetclasses );
144 m_netsTabSplitter->SplitHorizontally( m_panelNets, m_panelNetclasses, 300 );
145 m_netsTabOuterSizer->Add( m_netsTabSplitter, 1, wxEXPAND, 5 );
146
147
149 m_panelNetsAndClasses->Layout();
151 m_notebook->AddPage( m_panelNetsAndClasses, _("Nets"), false );
152
153 m_sizerOuter->Add( m_notebook, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
154
155 wxBoxSizer* bBottomMargin;
156 bBottomMargin = new wxBoxSizer( wxVERTICAL );
157
158 wxBoxSizer* bPresets;
159 bPresets = new wxBoxSizer( wxVERTICAL );
160
161 m_presetsLabel = new wxStaticText( this, wxID_ANY, _("Presets (Ctrl+Tab):"), wxDefaultPosition, wxDefaultSize, 0 );
162 m_presetsLabel->Wrap( -1 );
163 bPresets->Add( m_presetsLabel, 1, wxTOP|wxRIGHT|wxLEFT, 2 );
164
165 wxString m_cbLayerPresetsChoices[] = { _("All Layers"), _("(unsaved)") };
166 int m_cbLayerPresetsNChoices = sizeof( m_cbLayerPresetsChoices ) / sizeof( wxString );
167 m_cbLayerPresets = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cbLayerPresetsNChoices, m_cbLayerPresetsChoices, 0 );
168 m_cbLayerPresets->SetSelection( 1 );
169 bPresets->Add( m_cbLayerPresets, 0, wxALL|wxEXPAND, 2 );
170
171
172 bBottomMargin->Add( bPresets, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
173
174
175 bBottomMargin->Add( 0, 2, 0, wxEXPAND, 5 );
176
177 wxBoxSizer* bViewports;
178 bViewports = new wxBoxSizer( wxVERTICAL );
179
180 m_viewportsLabel = new wxStaticText( this, wxID_ANY, _("Viewports (Alt+Tab):"), wxDefaultPosition, wxDefaultSize, 0 );
181 m_viewportsLabel->Wrap( -1 );
182 bViewports->Add( m_viewportsLabel, 1, wxRIGHT|wxLEFT, 2 );
183
184 wxString m_cbViewportsChoices[] = { _("(unsaved)") };
185 int m_cbViewportsNChoices = sizeof( m_cbViewportsChoices ) / sizeof( wxString );
186 m_cbViewports = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cbViewportsNChoices, m_cbViewportsChoices, 0 );
187 m_cbViewports->SetSelection( 1 );
188 bViewports->Add( m_cbViewports, 0, wxALL|wxEXPAND, 2 );
189
190
191 bBottomMargin->Add( bViewports, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
192
193
194 m_sizerOuter->Add( bBottomMargin, 0, wxEXPAND|wxTOP|wxBOTTOM, 4 );
195
196
197 this->SetSizer( m_sizerOuter );
198 this->Layout();
199 m_sizerOuter->Fit( this );
200
201 // Connect Events
202 this->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ) );
203 this->Connect( wxEVT_SIZE, wxSizeEventHandler( APPEARANCE_CONTROLS_BASE::OnSize ) );
204 m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( APPEARANCE_CONTROLS_BASE::OnNotebookPageChanged ), NULL, this );
205 m_notebook->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
206 m_panelLayers->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
207 m_panelObjects->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
208 m_panelNetsAndClasses->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
209 m_panelNets->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
210 m_netsGrid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridClick ), NULL, this );
211 m_netsGrid->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridDoubleClick ), NULL, this );
212 m_netsGrid->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridRightClick ), NULL, this );
213 m_netsGrid->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
214 m_panelNetclasses->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
215 m_cbLayerPresets->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::onLayerPresetChanged ), NULL, this );
216 m_cbViewports->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::onViewportChanged ), NULL, this );
217}
218
220{
221 // Disconnect Events
222 this->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ) );
223 this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( APPEARANCE_CONTROLS_BASE::OnSize ) );
224 m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( APPEARANCE_CONTROLS_BASE::OnNotebookPageChanged ), NULL, this );
225 m_notebook->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
226 m_panelLayers->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
227 m_panelObjects->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
228 m_panelNetsAndClasses->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
229 m_panelNets->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
230 m_netsGrid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridClick ), NULL, this );
231 m_netsGrid->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridDoubleClick ), NULL, this );
232 m_netsGrid->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridRightClick ), NULL, this );
233 m_netsGrid->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
234 m_panelNetclasses->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
235 m_cbLayerPresets->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::onLayerPresetChanged ), NULL, this );
236 m_cbViewports->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::onViewportChanged ), NULL, this );
237
238}
const char * name
Definition: DXF_plotter.cpp:57
virtual void onLayerPresetChanged(wxCommandEvent &event)
virtual void OnNotebookPageChanged(wxNotebookEvent &event)
virtual void OnNetGridDoubleClick(wxGridEvent &event)
virtual void onViewportChanged(wxCommandEvent &event)
virtual void OnNetGridClick(wxGridEvent &event)
APPEARANCE_CONTROLS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnNetGridRightClick(wxGridEvent &event)
wxSplitterWindow * m_netsTabSplitter
virtual void OnSetFocus(wxFocusEvent &event)
void m_netsTabSplitterOnIdle(wxIdleEvent &)
wxScrolledWindow * m_netclassScrolledWindow
virtual void OnSize(wxSizeEvent &event)
A bitmap button widget that behaves like an AUI toolbar item's button when it is drawn.
Definition: bitmap_button.h:42
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:249
#define _(s)