KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_config_equfiles_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
15DIALOG_CONFIG_EQUFILES_BASE::DIALOG_CONFIG_EQUFILES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
16{
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18
19 wxBoxSizer* bMainSizer;
20 bMainSizer = new wxBoxSizer( wxVERTICAL );
21
22 wxBoxSizer* bUpperSizer;
23 bUpperSizer = new wxBoxSizer( wxVERTICAL );
24
25 wxStaticText* listLabel;
26 listLabel = new wxStaticText( this, wxID_ANY, _("Footprint association files:"), wxDefaultPosition, wxDefaultSize, 0 );
27 listLabel->Wrap( -1 );
28 bUpperSizer->Add( listLabel, 0, wxBOTTOM, 2 );
29
30 m_filesListBox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE );
31 m_filesListBox->SetMinSize( wxSize( 500,100 ) );
32
33 bUpperSizer->Add( m_filesListBox, 2, wxEXPAND|wxBOTTOM, 3 );
34
35 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
36
37 m_bpAdd = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
38 m_bpAdd->SetToolTip( _("Add association file") );
39
40 bButtonsSizer->Add( m_bpAdd, 0, wxRIGHT, 5 );
41
42 m_bpMoveUp = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
43 m_bpMoveUp->SetToolTip( _("Move up") );
44
45 bButtonsSizer->Add( m_bpMoveUp, 0, wxRIGHT, 5 );
46
47 m_bpMoveDown = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
48 m_bpMoveDown->SetToolTip( _("Move down") );
49
50 bButtonsSizer->Add( m_bpMoveDown, 0, wxRIGHT, 5 );
51
52 m_bpEdit = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
53 m_bpEdit->SetToolTip( _("Edit association file") );
54
55 bButtonsSizer->Add( m_bpEdit, 0, wxRIGHT, 5 );
56
57
58 bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
59
60 m_bpDelete = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
61 m_bpDelete->SetToolTip( _("Remove association file") );
62
63 bButtonsSizer->Add( m_bpDelete, 0, wxRIGHT|wxLEFT, 10 );
64
65
66 bUpperSizer->Add( bButtonsSizer, 0, wxEXPAND, 5 );
67
68
69 bUpperSizer->Add( 0, 25, 0, wxEXPAND, 5 );
70
71 wxStaticText* envVarsLabel;
72 envVarsLabel = new wxStaticText( this, wxID_ANY, _("Available path substitutions:"), wxDefaultPosition, wxDefaultSize, 0 );
73 envVarsLabel->Wrap( -1 );
74 bUpperSizer->Add( envVarsLabel, 0, wxBOTTOM, 2 );
75
76 m_gridEnvVars = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
77
78 // Grid
79 m_gridEnvVars->CreateGrid( 2, 2 );
80 m_gridEnvVars->EnableEditing( true );
81 m_gridEnvVars->EnableGridLines( true );
82 m_gridEnvVars->EnableDragGridSize( false );
83 m_gridEnvVars->SetMargins( 0, 0 );
84
85 // Columns
86 m_gridEnvVars->EnableDragColMove( false );
87 m_gridEnvVars->EnableDragColSize( true );
88 m_gridEnvVars->SetColLabelValue( 0, _("Name") );
89 m_gridEnvVars->SetColLabelValue( 1, _("Value") );
91 m_gridEnvVars->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
92
93 // Rows
94 m_gridEnvVars->AutoSizeRows();
95 m_gridEnvVars->EnableDragRowSize( true );
96 m_gridEnvVars->SetRowLabelSize( 0 );
97 m_gridEnvVars->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
98
99 // Label Appearance
100
101 // Cell Defaults
102 m_gridEnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
103 bUpperSizer->Add( m_gridEnvVars, 1, wxEXPAND, 5 );
104
105
106 bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
107
108 m_sdbSizer = new wxStdDialogButtonSizer();
109 m_sdbSizerOK = new wxButton( this, wxID_OK );
110 m_sdbSizer->AddButton( m_sdbSizerOK );
111 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
112 m_sdbSizer->AddButton( m_sdbSizerCancel );
113 m_sdbSizer->Realize();
114
115 bMainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
116
117
118 this->SetSizer( bMainSizer );
119 this->Layout();
120 bMainSizer->Fit( this );
121
122 this->Centre( wxBOTH );
123
124 // Connect Events
125 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnCloseWindow ) );
126 m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnAddFiles ), NULL, this );
127 m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveUp ), NULL, this );
128 m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveDown ), NULL, this );
129 m_bpEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnEditEquFile ), NULL, this );
130 m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnRemoveFiles ), NULL, this );
131 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnOkClick ), NULL, this );
132}
133
135{
136 // Disconnect Events
137 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnCloseWindow ) );
138 m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnAddFiles ), NULL, this );
139 m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveUp ), NULL, this );
140 m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnButtonMoveDown ), NULL, this );
141 m_bpEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnEditEquFile ), NULL, this );
142 m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnRemoveFiles ), NULL, this );
143 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIG_EQUFILES_BASE::OnOkClick ), NULL, this );
144
145}
virtual void OnOkClick(wxCommandEvent &event)
virtual void OnAddFiles(wxCommandEvent &event)
virtual void OnButtonMoveDown(wxCommandEvent &event)
virtual void OnCloseWindow(wxCloseEvent &event)
virtual void OnEditEquFile(wxCommandEvent &event)
virtual void OnRemoveFiles(wxCommandEvent &event)
DIALOG_CONFIG_EQUFILES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnButtonMoveUp(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
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:249
#define _(s)