KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_design_block_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_DESIGN_BLOCK_LIB_TABLE_BASE::PANEL_DESIGN_BLOCK_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_migrate_libs_button = new wxButton( this, wxID_ANY, _("Migrate Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
59 bButtonsSizer->Add( m_migrate_libs_button, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
60
61
62 bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxALL, 8 );
63
64 wxStaticText* stPathsLabel;
65 stPathsLabel = new wxStaticText( this, wxID_ANY, _("Available path substitutions:"), wxDefaultPosition, wxDefaultSize, 0 );
66 stPathsLabel->Wrap( -1 );
67 bMainSizer->Add( stPathsLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 8 );
68
69
70 bMainSizer->Add( 0, 2, 0, wxEXPAND, 5 );
71
72 m_path_subs_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
73
74 // Grid
75 m_path_subs_grid->CreateGrid( 1, 2 );
76 m_path_subs_grid->EnableEditing( false );
77 m_path_subs_grid->EnableGridLines( true );
78 m_path_subs_grid->EnableDragGridSize( false );
79 m_path_subs_grid->SetMargins( 0, 0 );
80
81 // Columns
82 m_path_subs_grid->SetColSize( 0, 150 );
83 m_path_subs_grid->SetColSize( 1, 500 );
84 m_path_subs_grid->AutoSizeColumns();
85 m_path_subs_grid->EnableDragColMove( false );
86 m_path_subs_grid->EnableDragColSize( true );
87 m_path_subs_grid->SetColLabelSize( 0 );
88 m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
89
90 // Rows
91 m_path_subs_grid->EnableDragRowSize( true );
92 m_path_subs_grid->SetRowLabelSize( 0 );
93 m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
94
95 // Label Appearance
96
97 // Cell Defaults
98 m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
99 m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
100
101 bMainSizer->Add( m_path_subs_grid, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
102
103
104 this->SetSizer( bMainSizer );
105 this->Layout();
106 bMainSizer->Fit( this );
107
108 // Connect Events
109 m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
110 m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
111 m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
112 m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
113 m_migrate_libs_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
114 m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
115}
116
118{
119 // Disconnect Events
120 m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
121 m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
122 m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
123 m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
124 m_migrate_libs_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
125 m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
126
127}
const char * name
virtual void moveDownHandler(wxCommandEvent &event)
virtual void deleteRowHandler(wxCommandEvent &event)
virtual void onMigrateLibraries(wxCommandEvent &event)
virtual void appendRowHandler(wxCommandEvent &event)
PANEL_DESIGN_BLOCK_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 moveUpHandler(wxCommandEvent &event)
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)