KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_embedded_files_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_EMBEDDED_FILES_BASE::PANEL_EMBEDDED_FILES_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 wxBoxSizer* m_global_sizer;
21 m_global_sizer = new wxBoxSizer( wxVERTICAL );
22
23 m_files_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
24
25 // Grid
26 m_files_grid->CreateGrid( 1, 2 );
27 m_files_grid->EnableEditing( false );
28 m_files_grid->EnableGridLines( true );
29 m_files_grid->EnableDragGridSize( false );
30 m_files_grid->SetMargins( 0, 0 );
31
32 // Columns
33 m_files_grid->SetColSize( 0, 440 );
34 m_files_grid->SetColSize( 1, 180 );
35 m_files_grid->EnableDragColMove( false );
36 m_files_grid->EnableDragColSize( true );
37 m_files_grid->SetColLabelValue( 0, _("Filename") );
38 m_files_grid->SetColLabelValue( 1, _("Internal Reference") );
40 m_files_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
41
42 // Rows
43 m_files_grid->AutoSizeRows();
44 m_files_grid->EnableDragRowSize( false );
45 m_files_grid->SetRowLabelSize( 0 );
46 m_files_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
47
48 // Label Appearance
49
50 // Cell Defaults
51 m_files_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
52 m_global_sizer->Add( m_files_grid, 5, wxALL|wxEXPAND, 5 );
53
54
55 bMainSizer->Add( m_global_sizer, 1, wxEXPAND, 5 );
56
57 wxBoxSizer* bButtonsSizer;
58 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
59
60 m_browse_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
61 m_browse_button->SetToolTip( _("Add embedded file") );
62
63 bButtonsSizer->Add( m_browse_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
64
65
66 bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
67
68 m_delete_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
69 m_delete_button->SetToolTip( _("Remove embedded file") );
70
71 bButtonsSizer->Add( m_delete_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
72
73
74 bButtonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
75
76 m_export = new wxButton( this, wxID_ANY, _("&Export"), wxDefaultPosition, wxDefaultSize, 0 );
77 bButtonsSizer->Add( m_export, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
78
79
80 bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxALL, 3 );
81
82 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
83 bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
84
85 wxBoxSizer* bSizer4;
86 bSizer4 = new wxBoxSizer( wxVERTICAL );
87
88 m_cbEmbedFonts = new wxCheckBox( this, wxID_ANY, _("Embed Fonts"), wxDefaultPosition, wxDefaultSize, 0 );
89 m_cbEmbedFonts->SetToolTip( _("Store a copy of all fonts used") );
90
91 bSizer4->Add( m_cbEmbedFonts, 0, wxALL, 5 );
92
93
94 bMainSizer->Add( bSizer4, 0, wxEXPAND, 5 );
95
96
97 this->SetSizer( bMainSizer );
98 this->Layout();
99 bMainSizer->Fit( this );
100
101 // Connect Events
102 this->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_EMBEDDED_FILES_BASE::onSize ) );
103 m_files_grid->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( PANEL_EMBEDDED_FILES_BASE::onGridRightClick ), NULL, this );
104 m_browse_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onAddEmbeddedFile ), NULL, this );
105 m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onDeleteEmbeddedFile ), NULL, this );
106 m_export->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onExportFiles ), NULL, this );
107}
108
110{
111 // Disconnect Events
112 this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_EMBEDDED_FILES_BASE::onSize ) );
113 m_files_grid->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( PANEL_EMBEDDED_FILES_BASE::onGridRightClick ), NULL, this );
114 m_browse_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onAddEmbeddedFile ), NULL, this );
115 m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onDeleteEmbeddedFile ), NULL, this );
116 m_export->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onExportFiles ), NULL, this );
117
118}
const char * name
Definition: DXF_plotter.cpp:57
virtual void onAddEmbeddedFile(wxCommandEvent &event)
virtual void onExportFiles(wxCommandEvent &event)
PANEL_EMBEDDED_FILES_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 onDeleteEmbeddedFile(wxCommandEvent &event)
virtual void onSize(wxSizeEvent &event)
virtual void onGridRightClick(wxGridEvent &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:249
#define _(s)