KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_fp_lib_table_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bMainSizer;
18 bMainSizer = new wxBoxSizer( wxVERTICAL );
19
20 m_notebook = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_CLOSE_ON_ALL_TABS|wxAUI_NB_DEFAULT_STYLE );
21
22 bMainSizer->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
23
24 wxBoxSizer* bButtonsSizer;
25 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
26
27 m_append_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
28 m_append_button->SetToolTip( _("Add empty row to table") );
29
30 bButtonsSizer->Add( m_append_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
31
32 m_browseButton = new SPLIT_BUTTON( this, wxID_ANY, _( "Add Existing" ), wxDefaultPosition );
33 m_browseButton->SetToolTip( _("Add Existing") );
34
35 bButtonsSizer->Add( m_browseButton, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
36
37 m_move_up_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
38 m_move_up_button->SetToolTip( _("Move up") );
39
40 bButtonsSizer->Add( m_move_up_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
41
42 m_move_down_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
43 m_move_down_button->SetToolTip( _("Move down") );
44
45 bButtonsSizer->Add( m_move_down_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
46
47
48 bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
49
50 m_delete_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
51 m_delete_button->SetToolTip( _("Remove library from table") );
52
53 bButtonsSizer->Add( m_delete_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
54
55
56 bButtonsSizer->Add( 20, 0, 1, wxEXPAND, 5 );
57
58 m_resetGlobal = new wxButton( this, wxID_ANY, _("Reset Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
59 bButtonsSizer->Add( m_resetGlobal, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
60
61
62 bButtonsSizer->Add( 0, 0, 0, wxEXPAND, 5 );
63
64 m_migrate_libs_button = new wxButton( this, wxID_ANY, _("Migrate Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
65 bButtonsSizer->Add( m_migrate_libs_button, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
66
67
68 bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxALL, 8 );
69
70 wxStaticText* stPathsLabel;
71 stPathsLabel = new wxStaticText( this, wxID_ANY, _("Available path substitutions:"), wxDefaultPosition, wxDefaultSize, 0 );
72 stPathsLabel->Wrap( -1 );
73 bMainSizer->Add( stPathsLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 8 );
74
75
76 bMainSizer->Add( 0, 2, 0, wxEXPAND, 5 );
77
78 m_path_subs_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
79
80 // Grid
81 m_path_subs_grid->CreateGrid( 1, 2 );
82 m_path_subs_grid->EnableEditing( false );
83 m_path_subs_grid->EnableGridLines( true );
84 m_path_subs_grid->EnableDragGridSize( false );
85 m_path_subs_grid->SetMargins( 0, 0 );
86
87 // Columns
88 m_path_subs_grid->SetColSize( 0, 150 );
89 m_path_subs_grid->SetColSize( 1, 500 );
90 m_path_subs_grid->AutoSizeColumns();
91 m_path_subs_grid->EnableDragColMove( false );
92 m_path_subs_grid->EnableDragColSize( true );
93 m_path_subs_grid->SetColLabelSize( 0 );
94 m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
95
96 // Rows
97 m_path_subs_grid->EnableDragRowSize( true );
98 m_path_subs_grid->SetRowLabelSize( 0 );
99 m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
100
101 // Label Appearance
102
103 // Cell Defaults
104 m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
105 m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
106
107 bMainSizer->Add( m_path_subs_grid, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
108
109
110 this->SetSizer( bMainSizer );
111 this->Layout();
112 bMainSizer->Fit( this );
113
114 // Connect Events
115 m_notebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( PANEL_FP_LIB_TABLE_BASE::onPageChange ), NULL, this );
116 m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
117 m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
118 m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
119 m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
120 m_resetGlobal->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onReset ), NULL, this );
121 m_migrate_libs_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
122 m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
123}
124
126{
127 // Disconnect Events
128 m_notebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( PANEL_FP_LIB_TABLE_BASE::onPageChange ), NULL, this );
129 m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
130 m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
131 m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
132 m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
133 m_resetGlobal->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onReset ), NULL, this );
134 m_migrate_libs_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
135 m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
136
137}
const char * name
STD_BITMAP_BUTTON * m_move_up_button
virtual void deleteRowHandler(wxCommandEvent &event)
virtual void appendRowHandler(wxCommandEvent &event)
virtual void onSizeGrid(wxSizeEvent &event)
virtual void onPageChange(wxAuiNotebookEvent &event)
STD_BITMAP_BUTTON * m_append_button
STD_BITMAP_BUTTON * m_move_down_button
STD_BITMAP_BUTTON * m_delete_button
virtual void moveUpHandler(wxCommandEvent &event)
virtual void onMigrateLibraries(wxCommandEvent &event)
PANEL_FP_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)
virtual void onReset(wxCommandEvent &event)
virtual void moveDownHandler(wxCommandEvent &event)
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)