KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_bom_presets_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_BOM_PRESETS_BASE::PANEL_BOM_PRESETS_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_bomTitle = new wxStaticText( this, wxID_ANY, _("Bill of Materials Presets:"), wxDefaultPosition, wxDefaultSize, 0 );
21 m_bomTitle->Wrap( -1 );
22 bPanelSizer->Add( m_bomTitle, 0, wxTOP|wxLEFT|wxEXPAND, 8 );
23
24
25 bPanelSizer->Add( 0, 3, 0, wxEXPAND, 5 );
26
27 m_bomPresetsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
28
29 // Grid
30 m_bomPresetsGrid->CreateGrid( 0, 1 );
31 m_bomPresetsGrid->EnableEditing( false );
32 m_bomPresetsGrid->EnableGridLines( true );
33 m_bomPresetsGrid->EnableDragGridSize( false );
34 m_bomPresetsGrid->SetMargins( 0, 0 );
35
36 // Columns
37 m_bomPresetsGrid->SetColSize( 0, 420 );
38 m_bomPresetsGrid->EnableDragColMove( false );
39 m_bomPresetsGrid->EnableDragColSize( true );
40 m_bomPresetsGrid->SetColLabelValue( 0, _("Name") );
41 m_bomPresetsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
42 m_bomPresetsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
43
44 // Rows
45 m_bomPresetsGrid->EnableDragRowSize( true );
46 m_bomPresetsGrid->SetRowLabelSize( 0 );
47 m_bomPresetsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
48
49 // Label Appearance
50
51 // Cell Defaults
52 m_bomPresetsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
53 m_bomPresetsGrid->SetMinSize( wxSize( -1,180 ) );
54
55 bPanelSizer->Add( m_bomPresetsGrid, 1, wxEXPAND|wxRIGHT, 5 );
56
57 m_btnDeleteBomPreset = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
58 bPanelSizer->Add( m_btnDeleteBomPreset, 0, wxALL, 5 );
59
60 m_bomFmtTitle = new wxStaticText( this, wxID_ANY, _("Bill of Materials Formatting Presets:"), wxDefaultPosition, wxDefaultSize, 0 );
61 m_bomFmtTitle->Wrap( -1 );
62 bPanelSizer->Add( m_bomFmtTitle, 0, wxEXPAND|wxLEFT|wxTOP, 8 );
63
64
65 bPanelSizer->Add( 0, 3, 0, wxEXPAND, 5 );
66
67 m_bomFmtPresetsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
68
69 // Grid
70 m_bomFmtPresetsGrid->CreateGrid( 0, 1 );
71 m_bomFmtPresetsGrid->EnableEditing( false );
72 m_bomFmtPresetsGrid->EnableGridLines( true );
73 m_bomFmtPresetsGrid->EnableDragGridSize( false );
74 m_bomFmtPresetsGrid->SetMargins( 0, 0 );
75
76 // Columns
77 m_bomFmtPresetsGrid->SetColSize( 0, 420 );
78 m_bomFmtPresetsGrid->EnableDragColMove( false );
79 m_bomFmtPresetsGrid->EnableDragColSize( true );
80 m_bomFmtPresetsGrid->SetColLabelValue( 0, _("Name") );
81 m_bomFmtPresetsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
82 m_bomFmtPresetsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
83
84 // Rows
85 m_bomFmtPresetsGrid->EnableDragRowSize( true );
86 m_bomFmtPresetsGrid->SetRowLabelSize( 0 );
87 m_bomFmtPresetsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
88
89 // Label Appearance
90
91 // Cell Defaults
92 m_bomFmtPresetsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
93 m_bomFmtPresetsGrid->SetMinSize( wxSize( -1,180 ) );
94
95 bPanelSizer->Add( m_bomFmtPresetsGrid, 1, wxEXPAND|wxRIGHT, 5 );
96
97 m_btnDeleteBomFmtPreset = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
98 bPanelSizer->Add( m_btnDeleteBomFmtPreset, 0, wxALL, 5 );
99
100
101 this->SetSizer( bPanelSizer );
102 this->Layout();
103 bPanelSizer->Fit( this );
104
105 // Connect Events
106 m_bomPresetsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_BOM_PRESETS_BASE::OnSizeGrid ), NULL, this );
107 m_btnDeleteBomPreset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_BOM_PRESETS_BASE::OnDeleteBomPreset ), NULL, this );
108 m_bomFmtPresetsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_BOM_PRESETS_BASE::OnSizeGrid ), NULL, this );
109 m_btnDeleteBomFmtPreset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_BOM_PRESETS_BASE::OnDeleteBomFmtPreset ), NULL, this );
110}
111
113{
114 // Disconnect Events
115 m_bomPresetsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_BOM_PRESETS_BASE::OnSizeGrid ), NULL, this );
116 m_btnDeleteBomPreset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_BOM_PRESETS_BASE::OnDeleteBomPreset ), NULL, this );
117 m_bomFmtPresetsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_BOM_PRESETS_BASE::OnSizeGrid ), NULL, this );
118 m_btnDeleteBomFmtPreset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_BOM_PRESETS_BASE::OnDeleteBomFmtPreset ), NULL, this );
119
120}
const char * name
Definition: DXF_plotter.cpp:57
PANEL_BOM_PRESETS_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 OnDeleteBomFmtPreset(wxCommandEvent &event)
virtual void OnDeleteBomPreset(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_btnDeleteBomPreset
STD_BITMAP_BUTTON * m_btnDeleteBomFmtPreset
virtual void OnSizeGrid(wxSizeEvent &event)
A bitmap button widget that behaves like a standard dialog button except with an icon.
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:194
#define _(s)