KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_fp_editor_defaults_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#include "widgets/wx_grid.h"
10
12
14
15PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bSizerMain;
18 bSizerMain = new wxBoxSizer( wxVERTICAL );
19
20 wxBoxSizer* bSizerMargins;
21 bSizerMargins = new wxBoxSizer( wxVERTICAL );
22
23 defaultTextItemsLabel = new wxStaticText( this, wxID_ANY, _("Default text items for new footprints:"), wxDefaultPosition, wxDefaultSize, 0 );
24 defaultTextItemsLabel->Wrap( -1 );
25 bSizerMargins->Add( defaultTextItemsLabel, 0, wxTOP|wxLEFT|wxEXPAND, 8 );
26
27
28 bSizerMargins->Add( 0, 3, 0, wxEXPAND, 5 );
29
30 wxBoxSizer* defaultTextItemsSizer;
31 defaultTextItemsSizer = new wxBoxSizer( wxVERTICAL );
32
33 m_textItemsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
34
35 // Grid
36 m_textItemsGrid->CreateGrid( 2, 3 );
37 m_textItemsGrid->EnableEditing( true );
38 m_textItemsGrid->EnableGridLines( true );
39 m_textItemsGrid->EnableDragGridSize( false );
40 m_textItemsGrid->SetMargins( 0, 0 );
41
42 // Columns
43 m_textItemsGrid->SetColSize( 0, 268 );
44 m_textItemsGrid->SetColSize( 1, 60 );
45 m_textItemsGrid->SetColSize( 2, 120 );
46 m_textItemsGrid->EnableDragColMove( false );
47 m_textItemsGrid->EnableDragColSize( true );
48 m_textItemsGrid->SetColLabelValue( 0, _("Text Items") );
49 m_textItemsGrid->SetColLabelValue( 1, _("Show") );
50 m_textItemsGrid->SetColLabelValue( 2, _("Layer") );
51 m_textItemsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
52 m_textItemsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
53
54 // Rows
55 m_textItemsGrid->EnableDragRowSize( false );
56 m_textItemsGrid->SetRowLabelValue( 0, _("Reference designator") );
57 m_textItemsGrid->SetRowLabelValue( 1, _("Value") );
58 m_textItemsGrid->SetRowLabelSize( 160 );
59 m_textItemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
60
61 // Label Appearance
62
63 // Cell Defaults
64 m_textItemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
65 m_textItemsGrid->SetMinSize( wxSize( -1,140 ) );
66
67 defaultTextItemsSizer->Add( m_textItemsGrid, 1, wxEXPAND|wxBOTTOM, 5 );
68
69 wxBoxSizer* bButtonSize;
70 bButtonSize = new wxBoxSizer( wxHORIZONTAL );
71
72 m_bpAdd = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
73 m_bpAdd->SetMinSize( wxSize( 30,29 ) );
74
75 bButtonSize->Add( m_bpAdd, 0, wxBOTTOM|wxLEFT, 5 );
76
77
78 bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 );
79
80 m_bpDelete = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
81 m_bpDelete->SetMinSize( wxSize( 30,29 ) );
82
83 bButtonSize->Add( m_bpDelete, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
84
85
86 bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
87
88 m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Note: a blank reference designator or value will use the footprint name."), wxDefaultPosition, wxDefaultSize, 0 );
89 m_staticTextInfo->Wrap( -1 );
90 bButtonSize->Add( m_staticTextInfo, 0, wxBOTTOM|wxRIGHT|wxLEFT, 15 );
91
92
93 defaultTextItemsSizer->Add( bButtonSize, 0, wxEXPAND, 5 );
94
95
96 bSizerMargins->Add( defaultTextItemsSizer, 1, wxEXPAND, 20 );
97
98
99 bSizerMargins->Add( 0, 15, 0, wxEXPAND, 5 );
100
101 wxBoxSizer* defaultPropertiesSizer;
102 defaultPropertiesSizer = new wxBoxSizer( wxVERTICAL );
103
104 wxStaticText* defaultPropertiesLabel;
105 defaultPropertiesLabel = new wxStaticText( this, wxID_ANY, _("Default properties for new graphic items:"), wxDefaultPosition, wxDefaultSize, 0 );
106 defaultPropertiesLabel->Wrap( -1 );
107 defaultPropertiesSizer->Add( defaultPropertiesLabel, 0, wxEXPAND|wxRIGHT|wxLEFT, 8 );
108
109
110 defaultPropertiesSizer->Add( 0, 3, 0, wxEXPAND, 5 );
111
112 m_graphicsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
113
114 // Grid
115 m_graphicsGrid->CreateGrid( 6, 5 );
116 m_graphicsGrid->EnableEditing( true );
117 m_graphicsGrid->EnableGridLines( true );
118 m_graphicsGrid->EnableDragGridSize( false );
119 m_graphicsGrid->SetMargins( 0, 0 );
120
121 // Columns
122 m_graphicsGrid->SetColSize( 0, 110 );
123 m_graphicsGrid->SetColSize( 1, 100 );
124 m_graphicsGrid->SetColSize( 2, 100 );
125 m_graphicsGrid->SetColSize( 3, 100 );
126 m_graphicsGrid->SetColSize( 4, 60 );
127 m_graphicsGrid->EnableDragColMove( false );
128 m_graphicsGrid->EnableDragColSize( true );
129 m_graphicsGrid->SetColLabelValue( 0, _("Line Thickness") );
130 m_graphicsGrid->SetColLabelValue( 1, _("Text Width") );
131 m_graphicsGrid->SetColLabelValue( 2, _("Text Height") );
132 m_graphicsGrid->SetColLabelValue( 3, _("Text Thickness") );
133 m_graphicsGrid->SetColLabelValue( 4, _("Italic") );
134 m_graphicsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
135 m_graphicsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
136
137 // Rows
138 m_graphicsGrid->EnableDragRowSize( false );
139 m_graphicsGrid->SetRowLabelValue( 0, _("Silk Layers") );
140 m_graphicsGrid->SetRowLabelValue( 1, _("Copper Layers") );
141 m_graphicsGrid->SetRowLabelValue( 2, _("Edge Cuts") );
142 m_graphicsGrid->SetRowLabelValue( 3, _("Courtyards") );
143 m_graphicsGrid->SetRowLabelValue( 4, _("Fab Layers") );
144 m_graphicsGrid->SetRowLabelValue( 5, _("Other Layers") );
145 m_graphicsGrid->SetRowLabelSize( 125 );
146 m_graphicsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
147
148 // Label Appearance
149
150 // Cell Defaults
151 m_graphicsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
152 defaultPropertiesSizer->Add( m_graphicsGrid, 1, wxEXPAND|wxBOTTOM, 1 );
153
154
155 bSizerMargins->Add( defaultPropertiesSizer, 0, wxEXPAND|wxTOP, 5 );
156
157
158 bSizerMain->Add( bSizerMargins, 1, wxEXPAND, 5 );
159
160
161 this->SetSizer( bSizerMain );
162 this->Layout();
163 bSizerMain->Fit( this );
164
165 // Connect Events
166 m_textItemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
167 m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnAddTextItem ), NULL, this );
168 m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnDeleteTextItem ), NULL, this );
169}
170
172{
173 // Disconnect Events
174 m_textItemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
175 m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnAddTextItem ), NULL, this );
176 m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnDeleteTextItem ), NULL, this );
177
178}
const char * name
Definition: DXF_plotter.cpp:57
PANEL_FP_EDITOR_DEFAULTS_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 OnGridSize(wxSizeEvent &event)
virtual void OnAddTextItem(wxCommandEvent &event)
virtual void OnDeleteTextItem(wxCommandEvent &event)
A wxPanel that is designed to be reset in a standard manner.
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:137
#define _(s)