KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_symbol_pin_map_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_SYMBOL_PIN_MAP_BASE::PANEL_SYMBOL_PIN_MAP_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* bPanelSizer;
18 bPanelSizer = new wxBoxSizer( wxVERTICAL );
19
20 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
21
22 // Grid
23 m_grid->CreateGrid( 0, 3 );
24 m_grid->EnableEditing( true );
25 m_grid->EnableGridLines( true );
26 m_grid->EnableDragGridSize( false );
27 m_grid->SetMargins( 0, 0 );
28
29 // Columns
30 m_grid->EnableDragColMove( false );
31 m_grid->EnableDragColSize( true );
32 m_grid->SetColLabelSize( wxGRID_AUTOSIZE );
33 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
34
35 // Rows
36 m_grid->EnableDragRowSize( true );
37 m_grid->SetRowLabelSize( 0 );
38 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
39
40 // Label Appearance
41
42 // Cell Defaults
43 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
44 m_grid->SetMinSize( wxSize( -1,180 ) );
45
46 bPanelSizer->Add( m_grid, 1, wxEXPAND|wxALL, 5 );
47
48 wxBoxSizer* bButtonSizer;
49 bButtonSizer = new wxBoxSizer( wxHORIZONTAL );
50
51 m_addMapButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
52 m_addMapButton->SetToolTip( _("Add pin map") );
53
54 bButtonSizer->Add( m_addMapButton, 0, wxALL, 5 );
55
56 m_removeMapButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
57 m_removeMapButton->SetToolTip( _("Remove pin map") );
58
59 bButtonSizer->Add( m_removeMapButton, 0, wxALL, 5 );
60
61
62 bPanelSizer->Add( bButtonSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
63
64
65 this->SetSizer( bPanelSizer );
66 this->Layout();
67 bPanelSizer->Fit( this );
68
69 // Connect Events
70 m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SYMBOL_PIN_MAP_BASE::OnSizeGrid ), NULL, this );
71 m_addMapButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYMBOL_PIN_MAP_BASE::OnAddMap ), NULL, this );
72 m_removeMapButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYMBOL_PIN_MAP_BASE::OnRemoveMap ), NULL, this );
73}
74
76{
77 // Disconnect Events
78 m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SYMBOL_PIN_MAP_BASE::OnSizeGrid ), NULL, this );
79 m_addMapButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYMBOL_PIN_MAP_BASE::OnAddMap ), NULL, this );
80 m_removeMapButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYMBOL_PIN_MAP_BASE::OnRemoveMap ), NULL, this );
81
82}
const char * name
virtual void OnRemoveMap(wxCommandEvent &event)
virtual void OnSizeGrid(wxSizeEvent &event)
virtual void OnAddMap(wxCommandEvent &event)
PANEL_SYMBOL_PIN_MAP_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)
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)