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(500, 300), long style=wxTAB_TRAVERSAL)
 
 ~PANEL_SYM_LIB_TABLE_BASE ()
 

Protected Member Functions

virtual void pageChangedHandler (wxAuiNotebookEvent &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 onSizeGrid (wxSizeEvent &event)
 

Protected Attributes

wxAuiNotebook * m_auinotebook
 
wxPanel * m_global_panel
 
wxStaticText * m_staticText3
 
wxStaticText * m_GblTableFilename
 
WX_GRIDm_global_grid
 
wxPanel * m_project_panel
 
wxStaticText * m_staticText4
 
wxStaticText * m_PrjTableFilename
 
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
 
WX_GRIDm_path_subs_grid
 

Detailed Description

Class PANEL_SYM_LIB_TABLE_BASE.

Definition at line 39 of file panel_sym_lib_table_base.h.

Constructor & Destructor Documentation

PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint pos = wxDefaultPosition,
const wxSize &  size = wxSize( 500,300 ),
long  style = wxTAB_TRAVERSAL 
)

Definition at line 14 of file panel_sym_lib_table_base.cpp.

References appendRowHandler(), browseLibrariesHandler(), deleteRowHandler(), m_append_button, m_auinotebook, m_browse_button, m_delete_button, m_GblTableFilename, m_global_grid, m_global_panel, m_move_down_button, m_move_up_button, m_path_subs_grid, m_PrjTableFilename, m_project_grid, m_project_panel, m_staticText3, m_staticText4, moveDownHandler(), moveUpHandler(), onSizeGrid(), and pageChangedHandler().

Referenced by onSizeGrid().

14  : wxPanel( parent, id, pos, size, style )
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_auinotebook = new wxAuiNotebook( m_top_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
23  m_auinotebook->SetMinSize( wxSize( 720,460 ) );
24 
25  m_global_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
26  wxBoxSizer* m_global_sizer;
27  m_global_sizer = new wxBoxSizer( wxVERTICAL );
28 
29  wxFlexGridSizer* fgSizer1;
30  fgSizer1 = new wxFlexGridSizer( 1, 2, 0, 0 );
31  fgSizer1->SetFlexibleDirection( wxBOTH );
32  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
33 
34  m_staticText3 = new wxStaticText( m_global_panel, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
35  m_staticText3->Wrap( -1 );
36  fgSizer1->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
37 
38  m_GblTableFilename = new wxStaticText( m_global_panel, wxID_ANY, _("Table Name"), wxDefaultPosition, wxDefaultSize, 0 );
39  m_GblTableFilename->Wrap( -1 );
40  fgSizer1->Add( m_GblTableFilename, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
41 
42 
43  m_global_sizer->Add( fgSizer1, 0, wxEXPAND, 2 );
44 
45  m_global_grid = new WX_GRID( m_global_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
46 
47  // Grid
48  m_global_grid->CreateGrid( 1, 5 );
49  m_global_grid->EnableEditing( true );
50  m_global_grid->EnableGridLines( true );
51  m_global_grid->EnableDragGridSize( false );
52  m_global_grid->SetMargins( 0, 0 );
53 
54  // Columns
55  m_global_grid->AutoSizeColumns();
56  m_global_grid->EnableDragColMove( false );
57  m_global_grid->EnableDragColSize( true );
58  m_global_grid->SetColLabelSize( 22 );
59  m_global_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
60 
61  // Rows
62  m_global_grid->AutoSizeRows();
63  m_global_grid->EnableDragRowSize( false );
64  m_global_grid->SetRowLabelSize( 0 );
65  m_global_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
66 
67  // Label Appearance
68 
69  // Cell Defaults
70  m_global_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
71  m_global_sizer->Add( m_global_grid, 5, wxALL|wxEXPAND, 5 );
72 
73 
74  m_global_panel->SetSizer( m_global_sizer );
75  m_global_panel->Layout();
76  m_global_sizer->Fit( m_global_panel );
77  m_auinotebook->AddPage( m_global_panel, _("Global Libraries"), true, wxNullBitmap );
78  m_project_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
79  wxBoxSizer* m_project_sizer;
80  m_project_sizer = new wxBoxSizer( wxVERTICAL );
81 
82  wxFlexGridSizer* fgSizer2;
83  fgSizer2 = new wxFlexGridSizer( 1, 2, 0, 0 );
84  fgSizer2->SetFlexibleDirection( wxBOTH );
85  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
86 
87  m_staticText4 = new wxStaticText( m_project_panel, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
88  m_staticText4->Wrap( -1 );
89  fgSizer2->Add( m_staticText4, 0, wxLEFT|wxRIGHT|wxTOP, 4 );
90 
91  m_PrjTableFilename = new wxStaticText( m_project_panel, wxID_ANY, _("Table Name"), wxDefaultPosition, wxDefaultSize, 0 );
92  m_PrjTableFilename->Wrap( -1 );
93  fgSizer2->Add( m_PrjTableFilename, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
94 
95 
96  m_project_sizer->Add( fgSizer2, 0, wxEXPAND, 5 );
97 
98  m_project_grid = new WX_GRID( m_project_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
99 
100  // Grid
101  m_project_grid->CreateGrid( 1, 5 );
102  m_project_grid->EnableEditing( true );
103  m_project_grid->EnableGridLines( true );
104  m_project_grid->EnableDragGridSize( false );
105  m_project_grid->SetMargins( 0, 0 );
106 
107  // Columns
108  m_project_grid->AutoSizeColumns();
109  m_project_grid->EnableDragColMove( false );
110  m_project_grid->EnableDragColSize( true );
111  m_project_grid->SetColLabelSize( 22 );
112  m_project_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
113 
114  // Rows
115  m_project_grid->EnableDragRowSize( false );
116  m_project_grid->SetRowLabelSize( 0 );
117  m_project_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
118 
119  // Label Appearance
120 
121  // Cell Defaults
122  m_project_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
123  m_project_sizer->Add( m_project_grid, 2, wxALL|wxEXPAND, 5 );
124 
125 
126  m_project_panel->SetSizer( m_project_sizer );
127  m_project_panel->Layout();
128  m_project_sizer->Fit( m_project_panel );
129  m_auinotebook->AddPage( m_project_panel, _("Project Specific Libraries"), false, wxNullBitmap );
130 
131  m_top_sizer->Add( m_auinotebook, 1, wxEXPAND | wxALL, 5 );
132 
133  wxBoxSizer* bSizer51;
134  bSizer51 = new wxBoxSizer( wxHORIZONTAL );
135 
136  m_append_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
137  bSizer51->Add( m_append_button, 0, wxRIGHT|wxLEFT, 5 );
138 
139  m_browse_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
140  bSizer51->Add( m_browse_button, 0, wxRIGHT, 5 );
141 
142  m_move_up_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
143  bSizer51->Add( m_move_up_button, 0, wxRIGHT, 5 );
144 
145  m_move_down_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
146  bSizer51->Add( m_move_down_button, 0, wxRIGHT, 5 );
147 
148 
149  bSizer51->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
150 
151  m_delete_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
152  bSizer51->Add( m_delete_button, 0, wxRIGHT|wxLEFT, 5 );
153 
154 
155  m_top_sizer->Add( bSizer51, 0, 0, 8 );
156 
157 
158  bSizer1->Add( m_top_sizer, 1, wxALL|wxEXPAND, 5 );
159 
160  wxStaticBoxSizer* sbSizer1;
161  sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Path Substitutions:") ), wxVERTICAL );
162 
163  m_path_subs_grid = new WX_GRID( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
164 
165  // Grid
166  m_path_subs_grid->CreateGrid( 1, 2 );
167  m_path_subs_grid->EnableEditing( true );
168  m_path_subs_grid->EnableGridLines( true );
169  m_path_subs_grid->EnableDragGridSize( false );
170  m_path_subs_grid->SetMargins( 0, 0 );
171 
172  // Columns
173  m_path_subs_grid->SetColSize( 0, 150 );
174  m_path_subs_grid->SetColSize( 1, 500 );
175  m_path_subs_grid->AutoSizeColumns();
176  m_path_subs_grid->EnableDragColMove( false );
177  m_path_subs_grid->EnableDragColSize( true );
178  m_path_subs_grid->SetColLabelSize( 0 );
179  m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
180 
181  // Rows
182  m_path_subs_grid->EnableDragRowSize( true );
183  m_path_subs_grid->SetRowLabelSize( 0 );
184  m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
185 
186  // Label Appearance
187 
188  // Cell Defaults
189  m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
190  m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
191 
192  sbSizer1->Add( m_path_subs_grid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
193 
194 
195  bSizer1->Add( sbSizer1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
196 
197 
198  this->SetSizer( bSizer1 );
199  this->Layout();
200 
201  // Connect Events
202  m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( PANEL_SYM_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
203  m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
204  m_browse_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ), NULL, this );
205  m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
206  m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
207  m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
208  m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SYM_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
209 }
virtual void appendRowHandler(wxCommandEvent &event)
virtual void onSizeGrid(wxSizeEvent &event)
virtual void moveDownHandler(wxCommandEvent &event)
virtual void moveUpHandler(wxCommandEvent &event)
virtual void deleteRowHandler(wxCommandEvent &event)
virtual void browseLibrariesHandler(wxCommandEvent &event)
virtual void pageChangedHandler(wxAuiNotebookEvent &event)
PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE ( )

Definition at line 211 of file panel_sym_lib_table_base.cpp.

References appendRowHandler(), browseLibrariesHandler(), deleteRowHandler(), m_append_button, m_auinotebook, m_browse_button, m_delete_button, m_move_down_button, m_move_up_button, m_path_subs_grid, moveDownHandler(), moveUpHandler(), onSizeGrid(), and pageChangedHandler().

Referenced by onSizeGrid().

212 {
213  // Disconnect Events
214  m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( PANEL_SYM_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
215  m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
216  m_browse_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ), NULL, this );
217  m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
218  m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
219  m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
220  m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SYM_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
221 
222 }
virtual void appendRowHandler(wxCommandEvent &event)
virtual void onSizeGrid(wxSizeEvent &event)
virtual void moveDownHandler(wxCommandEvent &event)
virtual void moveUpHandler(wxCommandEvent &event)
virtual void deleteRowHandler(wxCommandEvent &event)
virtual void browseLibrariesHandler(wxCommandEvent &event)
virtual void pageChangedHandler(wxAuiNotebookEvent &event)

Member Function Documentation

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

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 62 of file panel_sym_lib_table_base.h.

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

62 { event.Skip(); }
virtual void PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 63 of file panel_sym_lib_table_base.h.

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

63 { event.Skip(); }
virtual void PANEL_SYM_LIB_TABLE_BASE::deleteRowHandler ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 66 of file panel_sym_lib_table_base.h.

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

66 { event.Skip(); }
virtual void PANEL_SYM_LIB_TABLE_BASE::moveDownHandler ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 65 of file panel_sym_lib_table_base.h.

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

65 { event.Skip(); }
virtual void PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 64 of file panel_sym_lib_table_base.h.

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

64 { event.Skip(); }
virtual void PANEL_SYM_LIB_TABLE_BASE::onSizeGrid ( wxSizeEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 67 of file panel_sym_lib_table_base.h.

References PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE_BASE().

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

67 { event.Skip(); }
virtual void PANEL_SYM_LIB_TABLE_BASE::pageChangedHandler ( wxAuiNotebookEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SYM_LIB_TABLE.

Definition at line 61 of file panel_sym_lib_table_base.h.

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

61 { event.Skip(); }

Member Data Documentation

wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_append_button
protected
wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_browse_button
protected
wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_delete_button
protected
wxStaticText* PANEL_SYM_LIB_TABLE_BASE::m_GblTableFilename
protected
wxPanel* PANEL_SYM_LIB_TABLE_BASE::m_global_panel
protected

Definition at line 45 of file panel_sym_lib_table_base.h.

Referenced by PANEL_SYM_LIB_TABLE_BASE().

wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_move_down_button
protected
wxBitmapButton* PANEL_SYM_LIB_TABLE_BASE::m_move_up_button
protected
wxStaticText* PANEL_SYM_LIB_TABLE_BASE::m_PrjTableFilename
protected
wxPanel* PANEL_SYM_LIB_TABLE_BASE::m_project_panel
protected

Definition at line 49 of file panel_sym_lib_table_base.h.

Referenced by PANEL_SYM_LIB_TABLE_BASE().

wxStaticText* PANEL_SYM_LIB_TABLE_BASE::m_staticText3
protected

Definition at line 46 of file panel_sym_lib_table_base.h.

Referenced by PANEL_SYM_LIB_TABLE_BASE().

wxStaticText* PANEL_SYM_LIB_TABLE_BASE::m_staticText4
protected

Definition at line 50 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: