KiCad PCB EDA Suite
PANEL_SYM_LIB_TABLE_BASE Class Reference

Class PANEL_SYM_LIB_TABLE_BASE. More...

#include <panel_sym_lib_table_base.h>

Inheritance diagram for PANEL_SYM_LIB_TABLE_BASE:
PANEL_SYM_LIB_TABLE

Public Member Functions

 PANEL_SYM_LIB_TABLE_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)
 
 ~PANEL_SYM_LIB_TABLE_BASE ()
 

Protected Member Functions

virtual void OnUpdateUI (wxUpdateUIEvent &event)
 
virtual void appendRowHandler (wxCommandEvent &event)
 
virtual void browseLibrariesHandler (wxCommandEvent &event)
 
virtual void moveUpHandler (wxCommandEvent &event)
 
virtual void moveDownHandler (wxCommandEvent &event)
 
virtual void deleteRowHandler (wxCommandEvent &event)
 
virtual void onConvertLegacyLibraries (wxCommandEvent &event)
 
virtual void onSizeGrid (wxSizeEvent &event)
 

Protected Attributes

wxNotebook * m_notebook
 
wxPanel * m_global_panel
 
WX_GRIDm_global_grid
 
wxPanel * m_project_panel
 
WX_GRIDm_project_grid
 
wxBitmapButton * m_append_button
 
wxBitmapButton * m_browse_button
 
wxBitmapButton * m_move_up_button
 
wxBitmapButton * m_move_down_button
 
wxBitmapButton * m_delete_button
 
wxButton * m_convertLegacy
 
WX_GRIDm_path_subs_grid
 

Detailed Description

Class PANEL_SYM_LIB_TABLE_BASE.

Definition at line 37 of file panel_sym_lib_table_base.h.

Constructor & Destructor Documentation

◆ PANEL_SYM_LIB_TABLE_BASE()

PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_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 
)

Definition at line 14 of file panel_sym_lib_table_base.cpp.

14 : wxPanel( parent, id, pos, size, style, name )
15{
16 wxBoxSizer* bSizer1;
17 bSizer1 = new wxBoxSizer( wxVERTICAL );
18
19 wxStaticBoxSizer* m_top_sizer;
20 m_top_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Libraries by Scope") ), wxVERTICAL );
21
22 m_notebook = new wxNotebook( m_top_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
23 m_notebook->SetMinSize( wxSize( 400,-1 ) );
24
25 m_global_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
26 wxBoxSizer* m_global_sizer;
27 m_global_sizer = new wxBoxSizer( wxVERTICAL );
28
29 m_global_grid = new WX_GRID( m_global_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
30
31 // Grid
32 m_global_grid->CreateGrid( 1, 5 );
33 m_global_grid->EnableEditing( true );
34 m_global_grid->EnableGridLines( true );
35 m_global_grid->EnableDragGridSize( false );
36 m_global_grid->SetMargins( 0, 0 );
37
38 // Columns
39 m_global_grid->AutoSizeColumns();
40 m_global_grid->EnableDragColMove( false );
41 m_global_grid->EnableDragColSize( true );
43 m_global_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
44
45 // Rows
46 m_global_grid->AutoSizeRows();
47 m_global_grid->EnableDragRowSize( false );
48 m_global_grid->SetRowLabelSize( 0 );
49 m_global_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
50
51 // Label Appearance
52
53 // Cell Defaults
54 m_global_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
55 m_global_sizer->Add( m_global_grid, 5, wxALL|wxEXPAND, 5 );
56
57
58 m_global_panel->SetSizer( m_global_sizer );
59 m_global_panel->Layout();
60 m_global_sizer->Fit( m_global_panel );
61 m_notebook->AddPage( m_global_panel, _("Global Libraries"), true );
62 m_project_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
63 wxBoxSizer* m_project_sizer;
64 m_project_sizer = new wxBoxSizer( wxVERTICAL );
65
66 m_project_grid = new WX_GRID( m_project_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
67
68 // Grid
69 m_project_grid->CreateGrid( 1, 5 );
70 m_project_grid->EnableEditing( true );
71 m_project_grid->EnableGridLines( true );
72 m_project_grid->EnableDragGridSize( false );
73 m_project_grid->SetMargins( 0, 0 );
74
75 // Columns
76 m_project_grid->AutoSizeColumns();
77 m_project_grid->EnableDragColMove( false );
78 m_project_grid->EnableDragColSize( true );
80 m_project_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
81
82 // Rows
83 m_project_grid->EnableDragRowSize( false );
84 m_project_grid->SetRowLabelSize( 0 );
85 m_project_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
86
87 // Label Appearance
88
89 // Cell Defaults
90 m_project_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
91 m_project_sizer->Add( m_project_grid, 2, wxALL|wxEXPAND, 5 );
92
93
94 m_project_panel->SetSizer( m_project_sizer );
95 m_project_panel->Layout();
96 m_project_sizer->Fit( m_project_panel );
97 m_notebook->AddPage( m_project_panel, _("Project Specific Libraries"), false );
98
99 m_top_sizer->Add( m_notebook, 1, wxEXPAND|wxBOTTOM, 5 );
100
101 wxBoxSizer* bSizer51;
102 bSizer51 = new wxBoxSizer( wxHORIZONTAL );
103
104 m_append_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
105 m_append_button->SetToolTip( _("Add empty row to table") );
106
107 bSizer51->Add( m_append_button, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
108
109 m_browse_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
110 m_browse_button->SetToolTip( _("Add existing library to table") );
111
112 bSizer51->Add( m_browse_button, 0, wxBOTTOM|wxRIGHT, 5 );
113
114 m_move_up_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
115 m_move_up_button->SetToolTip( _("Move up") );
116
117 bSizer51->Add( m_move_up_button, 0, wxBOTTOM|wxRIGHT, 5 );
118
119 m_move_down_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
120 m_move_down_button->SetToolTip( _("Move down") );
121
122 bSizer51->Add( m_move_down_button, 0, wxBOTTOM|wxRIGHT, 5 );
123
124
125 bSizer51->Add( 20, 0, 0, wxEXPAND, 5 );
126
127 m_delete_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
128 m_delete_button->SetToolTip( _("Remove library from table") );
129
130 bSizer51->Add( m_delete_button, 0, wxBOTTOM|wxRIGHT, 5 );
131
132
133 bSizer51->Add( 0, 0, 1, wxEXPAND, 5 );
134
135 m_convertLegacy = new wxButton( m_top_sizer->GetStaticBox(), wxID_ANY, _("Migrate Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
136 bSizer51->Add( m_convertLegacy, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
137
138
139 m_top_sizer->Add( bSizer51, 0, wxEXPAND, 8 );
140
141
142 bSizer1->Add( m_top_sizer, 1, wxALL|wxEXPAND, 5 );
143
144 wxStaticBoxSizer* sbSizer1;
145 sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Path Substitutions:") ), wxVERTICAL );
146
147 m_path_subs_grid = new WX_GRID( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
148
149 // Grid
150 m_path_subs_grid->CreateGrid( 1, 2 );
151 m_path_subs_grid->EnableEditing( false );
152 m_path_subs_grid->EnableGridLines( true );
153 m_path_subs_grid->EnableDragGridSize( false );
154 m_path_subs_grid->SetMargins( 0, 0 );
155
156 // Columns
157 m_path_subs_grid->SetColSize( 0, 150 );
158 m_path_subs_grid->SetColSize( 1, 500 );
159 m_path_subs_grid->AutoSizeColumns();
160 m_path_subs_grid->EnableDragColMove( false );
161 m_path_subs_grid->EnableDragColSize( true );
163 m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
164
165 // Rows
166 m_path_subs_grid->EnableDragRowSize( true );
167 m_path_subs_grid->SetRowLabelSize( 0 );
168 m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
169
170 // Label Appearance
171
172 // Cell Defaults
173 m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
174 m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
175
176 sbSizer1->Add( m_path_subs_grid, 1, wxALL|wxEXPAND, 5 );
177
178
179 bSizer1->Add( sbSizer1, 0, wxALL|wxEXPAND, 5 );
180
181
182 this->SetSizer( bSizer1 );
183 this->Layout();
184 bSizer1->Fit( this );
185
186 // Connect Events
187 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SYM_LIB_TABLE_BASE::OnUpdateUI ) );
188 m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
189 m_browse_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ), NULL, this );
190 m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
191 m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
192 m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
193 m_convertLegacy->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::onConvertLegacyLibraries ), NULL, this );
194 m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SYM_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
195}
const char * name
Definition: DXF_plotter.cpp:56
virtual void onSizeGrid(wxSizeEvent &event)
virtual void appendRowHandler(wxCommandEvent &event)
virtual void browseLibrariesHandler(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void moveUpHandler(wxCommandEvent &event)
virtual void moveDownHandler(wxCommandEvent &event)
virtual void onConvertLegacyLibraries(wxCommandEvent &event)
virtual void deleteRowHandler(wxCommandEvent &event)
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:74
#define _(s)

References _, appendRowHandler(), browseLibrariesHandler(), deleteRowHandler(), m_append_button, m_browse_button, m_convertLegacy, m_delete_button, m_global_grid, m_global_panel, m_move_down_button, m_move_up_button, m_notebook, m_path_subs_grid, m_project_grid, m_project_panel, moveDownHandler(), moveUpHandler(), onConvertLegacyLibraries(), onSizeGrid(), OnUpdateUI(), and WX_GRID::SetColLabelSize().

◆ ~PANEL_SYM_LIB_TABLE_BASE()

PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE ( )

Definition at line 197 of file panel_sym_lib_table_base.cpp.

198{
199 // Disconnect Events
200 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SYM_LIB_TABLE_BASE::OnUpdateUI ) );
201 m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
202 m_browse_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ), NULL, this );
203 m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
204 m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
205 m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
206 m_convertLegacy->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::onConvertLegacyLibraries ), NULL, this );
207 m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SYM_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
208
209}

References appendRowHandler(), browseLibrariesHandler(), deleteRowHandler(), m_append_button, m_browse_button, m_convertLegacy, m_delete_button, m_move_down_button, m_move_up_button, m_path_subs_grid, moveDownHandler(), moveUpHandler(), onConvertLegacyLibraries(), onSizeGrid(), and OnUpdateUI().

Member Function Documentation

◆ appendRowHandler()

virtual void PANEL_SYM_LIB_TABLE_BASE::appendRowHandler ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 57 of file panel_sym_lib_table_base.h.

57{ event.Skip(); }

Referenced by PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE_BASE().

◆ browseLibrariesHandler()

virtual void PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 58 of file panel_sym_lib_table_base.h.

58{ event.Skip(); }

Referenced by PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE_BASE().

◆ deleteRowHandler()

virtual void PANEL_SYM_LIB_TABLE_BASE::deleteRowHandler ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 61 of file panel_sym_lib_table_base.h.

61{ event.Skip(); }

Referenced by PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE_BASE().

◆ moveDownHandler()

virtual void PANEL_SYM_LIB_TABLE_BASE::moveDownHandler ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 60 of file panel_sym_lib_table_base.h.

60{ event.Skip(); }

Referenced by PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE_BASE().

◆ moveUpHandler()

virtual void PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 59 of file panel_sym_lib_table_base.h.

59{ event.Skip(); }

Referenced by PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE_BASE().

◆ onConvertLegacyLibraries()

virtual void PANEL_SYM_LIB_TABLE_BASE::onConvertLegacyLibraries ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 62 of file panel_sym_lib_table_base.h.

62{ event.Skip(); }

Referenced by PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE_BASE().

◆ onSizeGrid()

virtual void PANEL_SYM_LIB_TABLE_BASE::onSizeGrid ( wxSizeEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 63 of file panel_sym_lib_table_base.h.

63{ event.Skip(); }

Referenced by PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE_BASE().

◆ OnUpdateUI()

virtual void PANEL_SYM_LIB_TABLE_BASE::OnUpdateUI ( wxUpdateUIEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 56 of file panel_sym_lib_table_base.h.

56{ event.Skip(); }

Referenced by PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE_BASE().

Member Data Documentation

◆ m_append_button

wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_append_button
protected

◆ m_browse_button

wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_browse_button
protected

◆ m_convertLegacy

wxButton* PANEL_SYM_LIB_TABLE_BASE::m_convertLegacy
protected

◆ m_delete_button

wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_delete_button
protected

◆ m_global_grid

◆ m_global_panel

wxPanel* PANEL_SYM_LIB_TABLE_BASE::m_global_panel
protected

Definition at line 43 of file panel_sym_lib_table_base.h.

Referenced by PANEL_SYM_LIB_TABLE_BASE().

◆ m_move_down_button

wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_move_down_button
protected

◆ m_move_up_button

wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_move_up_button
protected

◆ m_notebook

wxNotebook* PANEL_SYM_LIB_TABLE_BASE::m_notebook
protected

◆ m_path_subs_grid

◆ m_project_grid

◆ m_project_panel

wxPanel* PANEL_SYM_LIB_TABLE_BASE::m_project_panel
protected

Definition at line 45 of file panel_sym_lib_table_base.h.

Referenced by PANEL_SYM_LIB_TABLE_BASE().


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