KiCad PCB EDA Suite
panel_setup_text_and_graphics_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "widgets/wx_grid.h"
9 
11 
13 
14 PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
15 {
16  wxBoxSizer* mainSizer;
17  mainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  m_gridSizer = new wxBoxSizer( wxVERTICAL );
20 
21  m_staticText1 = new wxStaticText( this, wxID_ANY, _("Default properties for new graphic items:"), wxDefaultPosition, wxDefaultSize, 0 );
22  m_staticText1->Wrap( -1 );
23  m_gridSizer->Add( m_staticText1, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
24 
25  m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
26 
27  // Grid
28  m_grid->CreateGrid( 5, 6 );
29  m_grid->EnableEditing( true );
30  m_grid->EnableGridLines( true );
31  m_grid->EnableDragGridSize( false );
32  m_grid->SetMargins( 0, 0 );
33 
34  // Columns
35  m_grid->SetColSize( 0, 140 );
36  m_grid->SetColSize( 1, 140 );
37  m_grid->SetColSize( 2, 140 );
38  m_grid->SetColSize( 3, 140 );
39  m_grid->SetColSize( 4, 80 );
40  m_grid->SetColSize( 5, 120 );
41  m_grid->EnableDragColMove( false );
42  m_grid->EnableDragColSize( true );
43  m_grid->SetColLabelSize( 24 );
44  m_grid->SetColLabelValue( 0, _("Line Thickness") );
45  m_grid->SetColLabelValue( 1, _("Text Width") );
46  m_grid->SetColLabelValue( 2, _("Text Height") );
47  m_grid->SetColLabelValue( 3, _("Text Thickness") );
48  m_grid->SetColLabelValue( 4, _("Italic") );
49  m_grid->SetColLabelValue( 5, _("Keep Upright") );
50  m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
51 
52  // Rows
53  m_grid->EnableDragRowSize( false );
54  m_grid->SetRowLabelSize( 132 );
55  m_grid->SetRowLabelValue( 0, _("Silk Layers") );
56  m_grid->SetRowLabelValue( 1, _("Copper Layers") );
57  m_grid->SetRowLabelValue( 2, _("Edge Cuts") );
58  m_grid->SetRowLabelValue( 3, _("Courtyards") );
59  m_grid->SetRowLabelValue( 4, _("Other Layers") );
60  m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
61 
62  // Label Appearance
63 
64  // Cell Defaults
65  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
66  m_grid->SetToolTip( _("Net Class parameters") );
67 
68  m_gridSizer->Add( m_grid, 0, wxBOTTOM|wxLEFT, 20 );
69 
70 
71  m_gridSizer->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
72 
73  m_staticText2 = new wxStaticText( this, wxID_ANY, _("Default properties for new dimension objects:"), wxDefaultPosition, wxDefaultSize, 0 );
74  m_staticText2->Wrap( -1 );
75  m_gridSizer->Add( m_staticText2, 0, wxALL, 5 );
76 
77  wxFlexGridSizer* fgSizer1;
78  fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
79  fgSizer1->SetFlexibleDirection( wxBOTH );
80  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
81 
82  m_dimensionUnitsLabel = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
83  m_dimensionUnitsLabel->Wrap( -1 );
84  fgSizer1->Add( m_dimensionUnitsLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
85 
86  wxString m_dimensionUnitsChoices[] = { _("Inches"), _("Mils"), _("Millimeters") };
87  int m_dimensionUnitsNChoices = sizeof( m_dimensionUnitsChoices ) / sizeof( wxString );
88  m_dimensionUnits = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionUnitsNChoices, m_dimensionUnitsChoices, 0 );
89  m_dimensionUnits->SetSelection( 0 );
90  fgSizer1->Add( m_dimensionUnits, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
91 
92  m_dimensionPrecisionLabel = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
93  m_dimensionPrecisionLabel->Wrap( -1 );
94  fgSizer1->Add( m_dimensionPrecisionLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
95 
96  wxString m_dimensionPrecisionChoices[] = { _("0.01 mm / 1 mil"), _("0.001 mm / 0.1 mil"), _("0.0001mm / 0.01 mil") };
97  int m_dimensionPrecisionNChoices = sizeof( m_dimensionPrecisionChoices ) / sizeof( wxString );
98  m_dimensionPrecision = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionPrecisionNChoices, m_dimensionPrecisionChoices, 0 );
99  m_dimensionPrecision->SetSelection( 0 );
100  fgSizer1->Add( m_dimensionPrecision, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
101 
102 
103  m_gridSizer->Add( fgSizer1, 1, wxEXPAND|wxBOTTOM|wxLEFT, 20 );
104 
105 
106  mainSizer->Add( m_gridSizer, 0, wxRIGHT|wxLEFT, 5 );
107 
108 
109  this->SetSizer( mainSizer );
110  this->Layout();
111  mainSizer->Fit( this );
112 }
113 
115 {
116 }
PANEL_SETUP_TEXT_AND_GRAPHICS_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)
const char * name
Definition: DXF_plotter.cpp:60
#define _(s)
Definition: 3d_actions.cpp:31
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:47