KiCad PCB EDA Suite
PANEL_MODEDIT_DEFAULTS_BASE Class Reference

Class PANEL_MODEDIT_DEFAULTS_BASE. More...

#include <panel_modedit_defaults_base.h>

Inheritance diagram for PANEL_MODEDIT_DEFAULTS_BASE:
PANEL_MODEDIT_DEFAULTS

Public Member Functions

 PANEL_MODEDIT_DEFAULTS_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL)
 
 ~PANEL_MODEDIT_DEFAULTS_BASE ()
 

Protected Attributes

wxStaticText * m_staticText13
 
wxStaticText * m_staticTextRef
 
wxTextCtrl * m_textCtrlRefText
 
wxChoice * m_choiceLayerReference
 
wxChoice * m_choiceVisibleReference
 
wxStaticText * m_staticTextValue
 
wxTextCtrl * m_textCtrlValueText
 
wxChoice * m_choiceLayerValue
 
wxChoice * m_choiceVisibleValue
 
wxStaticText * m_staticTextInfo
 
wxStaticText * m_staticText1
 
WX_GRIDm_grid
 

Detailed Description

Constructor & Destructor Documentation

PANEL_MODEDIT_DEFAULTS_BASE::PANEL_MODEDIT_DEFAULTS_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint pos = wxDefaultPosition,
const wxSize &  size = wxSize( -1,-1 ),
long  style = wxTAB_TRAVERSAL 
)

Definition at line 14 of file panel_modedit_defaults_base.cpp.

References m_choiceLayerReference, m_choiceLayerValue, m_choiceVisibleReference, m_choiceVisibleValue, m_grid, m_staticText1, m_staticText13, m_staticTextInfo, m_staticTextRef, m_staticTextValue, m_textCtrlRefText, and m_textCtrlValueText.

14  : wxPanel( parent, id, pos, size, style )
15 {
16  wxBoxSizer* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bSizerMargins;
20  bSizerMargins = new wxBoxSizer( wxVERTICAL );
21 
22  m_staticText13 = new wxStaticText( this, wxID_ANY, _("Default values for new footprints:"), wxDefaultPosition, wxDefaultSize, 0 );
23  m_staticText13->Wrap( -1 );
24  bSizerMargins->Add( m_staticText13, 0, wxTOP|wxLEFT, 5 );
25 
26  wxFlexGridSizer* defaultValuesSizer;
27  defaultValuesSizer = new wxFlexGridSizer( 0, 4, 5, 5 );
28  defaultValuesSizer->AddGrowableCol( 1 );
29  defaultValuesSizer->SetFlexibleDirection( wxBOTH );
30  defaultValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31 
32  m_staticTextRef = new wxStaticText( this, wxID_ANY, _("&Reference:"), wxDefaultPosition, wxDefaultSize, 0 );
33  m_staticTextRef->Wrap( -1 );
34  defaultValuesSizer->Add( m_staticTextRef, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
35 
36  m_textCtrlRefText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
37  m_textCtrlRefText->SetToolTip( _("Default text for reference\nLeave blank to use the footprint name") );
38 
39  defaultValuesSizer->Add( m_textCtrlRefText, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT, 5 );
40 
41  wxString m_choiceLayerReferenceChoices[] = { _("SilkScreen"), _("Fab. Layer") };
42  int m_choiceLayerReferenceNChoices = sizeof( m_choiceLayerReferenceChoices ) / sizeof( wxString );
43  m_choiceLayerReference = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceLayerReferenceNChoices, m_choiceLayerReferenceChoices, 0 );
44  m_choiceLayerReference->SetSelection( 0 );
45  defaultValuesSizer->Add( m_choiceLayerReference, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
46 
47  wxString m_choiceVisibleReferenceChoices[] = { _("Visible"), _("Invisible") };
48  int m_choiceVisibleReferenceNChoices = sizeof( m_choiceVisibleReferenceChoices ) / sizeof( wxString );
49  m_choiceVisibleReference = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVisibleReferenceNChoices, m_choiceVisibleReferenceChoices, 0 );
50  m_choiceVisibleReference->SetSelection( 0 );
51  defaultValuesSizer->Add( m_choiceVisibleReference, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
52 
53  m_staticTextValue = new wxStaticText( this, wxID_ANY, _("V&alue:"), wxDefaultPosition, wxDefaultSize, 0 );
54  m_staticTextValue->Wrap( -1 );
55  defaultValuesSizer->Add( m_staticTextValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
56 
57  m_textCtrlValueText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
58  m_textCtrlValueText->SetToolTip( _("Default text for value\nLeave blank to use the footprint name") );
59  m_textCtrlValueText->SetMinSize( wxSize( 160,-1 ) );
60 
61  defaultValuesSizer->Add( m_textCtrlValueText, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
62 
63  wxString m_choiceLayerValueChoices[] = { _("SilkScreen"), _("Fab. Layer") };
64  int m_choiceLayerValueNChoices = sizeof( m_choiceLayerValueChoices ) / sizeof( wxString );
65  m_choiceLayerValue = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceLayerValueNChoices, m_choiceLayerValueChoices, 0 );
66  m_choiceLayerValue->SetSelection( 1 );
67  defaultValuesSizer->Add( m_choiceLayerValue, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
68 
69  wxString m_choiceVisibleValueChoices[] = { _("Visible"), _("Invisible") };
70  int m_choiceVisibleValueNChoices = sizeof( m_choiceVisibleValueChoices ) / sizeof( wxString );
71  m_choiceVisibleValue = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVisibleValueNChoices, m_choiceVisibleValueChoices, 0 );
72  m_choiceVisibleValue->SetSelection( 0 );
73  defaultValuesSizer->Add( m_choiceVisibleValue, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
74 
75 
76  bSizerMargins->Add( defaultValuesSizer, 0, wxEXPAND|wxLEFT, 25 );
77 
78 
79  bSizerMargins->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
80 
81  m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Leave reference and/or value blank to use footprint name."), wxDefaultPosition, wxDefaultSize, 0 );
82  m_staticTextInfo->Wrap( -1 );
83  m_staticTextInfo->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
84 
85  bSizerMargins->Add( m_staticTextInfo, 0, wxBOTTOM|wxLEFT, 25 );
86 
87 
88  bSizerMargins->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
89 
90  wxBoxSizer* defaultSizesSizer1;
91  defaultSizesSizer1 = new wxBoxSizer( wxVERTICAL );
92 
93  m_staticText1 = new wxStaticText( this, wxID_ANY, _("Default properties for new graphic items:"), wxDefaultPosition, wxDefaultSize, 0 );
94  m_staticText1->Wrap( -1 );
95  defaultSizesSizer1->Add( m_staticText1, 0, wxBOTTOM|wxRIGHT, 5 );
96 
97  m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
98 
99  // Grid
100  m_grid->CreateGrid( 5, 5 );
101  m_grid->EnableEditing( true );
102  m_grid->EnableGridLines( true );
103  m_grid->EnableDragGridSize( false );
104  m_grid->SetMargins( 0, 0 );
105 
106  // Columns
107  m_grid->SetColSize( 0, 110 );
108  m_grid->SetColSize( 1, 100 );
109  m_grid->SetColSize( 2, 100 );
110  m_grid->SetColSize( 3, 100 );
111  m_grid->SetColSize( 4, 60 );
112  m_grid->EnableDragColMove( false );
113  m_grid->EnableDragColSize( true );
114  m_grid->SetColLabelSize( 22 );
115  m_grid->SetColLabelValue( 0, _("Line Thickness") );
116  m_grid->SetColLabelValue( 1, _("Text Width") );
117  m_grid->SetColLabelValue( 2, _("Text Height") );
118  m_grid->SetColLabelValue( 3, _("Text Thickness") );
119  m_grid->SetColLabelValue( 4, _("Italic") );
120  m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
121 
122  // Rows
123  m_grid->EnableDragRowSize( false );
124  m_grid->SetRowLabelSize( 125 );
125  m_grid->SetRowLabelValue( 0, _("Silk Layers") );
126  m_grid->SetRowLabelValue( 1, _("Copper Layers") );
127  m_grid->SetRowLabelValue( 2, _("Edge Cuts") );
128  m_grid->SetRowLabelValue( 3, _("Courtyards") );
129  m_grid->SetRowLabelValue( 4, _("Other Layers") );
130  m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
131 
132  // Label Appearance
133 
134  // Cell Defaults
135  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
136  m_grid->SetToolTip( _("Net Class parameters") );
137 
138  defaultSizesSizer1->Add( m_grid, 1, wxBOTTOM|wxLEFT, 20 );
139 
140 
141  bSizerMargins->Add( defaultSizesSizer1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
142 
143 
144  bSizerMain->Add( bSizerMargins, 1, wxRIGHT|wxLEFT, 5 );
145 
146 
147  this->SetSizer( bSizerMain );
148  this->Layout();
149  bSizerMain->Fit( this );
150 }
PANEL_MODEDIT_DEFAULTS_BASE::~PANEL_MODEDIT_DEFAULTS_BASE ( )

Definition at line 152 of file panel_modedit_defaults_base.cpp.

153 {
154 }

Member Data Documentation

wxChoice* PANEL_MODEDIT_DEFAULTS_BASE::m_choiceLayerReference
protected
wxChoice* PANEL_MODEDIT_DEFAULTS_BASE::m_choiceLayerValue
protected
wxChoice* PANEL_MODEDIT_DEFAULTS_BASE::m_choiceVisibleReference
protected
wxChoice* PANEL_MODEDIT_DEFAULTS_BASE::m_choiceVisibleValue
protected
wxStaticText* PANEL_MODEDIT_DEFAULTS_BASE::m_staticText1
protected

Definition at line 49 of file panel_modedit_defaults_base.h.

Referenced by PANEL_MODEDIT_DEFAULTS_BASE().

wxStaticText* PANEL_MODEDIT_DEFAULTS_BASE::m_staticText13
protected

Definition at line 39 of file panel_modedit_defaults_base.h.

Referenced by PANEL_MODEDIT_DEFAULTS_BASE().

wxStaticText* PANEL_MODEDIT_DEFAULTS_BASE::m_staticTextInfo
protected
wxStaticText* PANEL_MODEDIT_DEFAULTS_BASE::m_staticTextRef
protected

Definition at line 40 of file panel_modedit_defaults_base.h.

Referenced by PANEL_MODEDIT_DEFAULTS_BASE().

wxStaticText* PANEL_MODEDIT_DEFAULTS_BASE::m_staticTextValue
protected

Definition at line 44 of file panel_modedit_defaults_base.h.

Referenced by PANEL_MODEDIT_DEFAULTS_BASE().

wxTextCtrl* PANEL_MODEDIT_DEFAULTS_BASE::m_textCtrlRefText
protected
wxTextCtrl* PANEL_MODEDIT_DEFAULTS_BASE::m_textCtrlValueText
protected

The documentation for this class was generated from the following files: