KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_user_defined_signals_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#include "widgets/wx_infobar.h"
11
13
15
16DIALOG_USER_DEFINED_SIGNALS_BASE::DIALOG_USER_DEFINED_SIGNALS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
17{
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19
20 wxBoxSizer* bMainSizer;
21 bMainSizer = new wxBoxSizer( wxVERTICAL );
22
23 m_infoBar = new WX_INFOBAR( this );
24 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
25 m_infoBar->SetEffectDuration( 500 );
26 m_infoBar->Hide();
27
28 bMainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
29
30 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
31
32 // Grid
33 m_grid->CreateGrid( 0, 2 );
34 m_grid->EnableEditing( true );
35 m_grid->EnableGridLines( true );
36 m_grid->EnableDragGridSize( false );
37 m_grid->SetMargins( 0, 0 );
38
39 // Columns
40 m_grid->SetColSize( 0, 400 );
41 m_grid->SetColSize( 1, 0 );
42 m_grid->EnableDragColMove( false );
43 m_grid->EnableDragColSize( true );
45 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
46
47 // Rows
48 m_grid->EnableDragRowSize( false );
49 m_grid->SetRowLabelSize( 0 );
50 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
51
52 // Label Appearance
53
54 // Cell Defaults
55 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
56 m_grid->SetMinSize( wxSize( -1,120 ) );
57
58 bMainSizer->Add( m_grid, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
59
60 bButtonSize = new wxBoxSizer( wxHORIZONTAL );
61
62 m_addButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
63 m_addButton->SetToolTip( _("Add field") );
64
65 bButtonSize->Add( m_addButton, 0, wxTOP|wxRIGHT, 5 );
66
67
68 bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 );
69
70 m_deleteButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
71 m_deleteButton->SetToolTip( _("Delete field") );
72
73 bButtonSize->Add( m_deleteButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
74
75
76 bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
77
78 m_syntaxHelp = new wxHyperlinkCtrl( this, wxID_ANY, _("Syntax help"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
79 m_syntaxHelp->SetToolTip( _("Show syntax help window") );
80
81 bButtonSize->Add( m_syntaxHelp, 0, wxTOP|wxRIGHT, 4 );
82
83
84 bMainSizer->Add( bButtonSize, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
85
86 m_sdbSizer1 = new wxStdDialogButtonSizer();
87 m_sdbSizer1OK = new wxButton( this, wxID_OK );
88 m_sdbSizer1->AddButton( m_sdbSizer1OK );
89 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
90 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
91 m_sdbSizer1->Realize();
92
93 bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
94
95
96 this->SetSizer( bMainSizer );
97 this->Layout();
98 bMainSizer->Fit( this );
99
100 // Connect Events
101 m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_USER_DEFINED_SIGNALS_BASE::onGridCellClick ), NULL, this );
102 m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_USER_DEFINED_SIGNALS_BASE::onAddSignal ), NULL, this );
103 m_deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_USER_DEFINED_SIGNALS_BASE::onDeleteSignal ), NULL, this );
104 m_syntaxHelp->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_USER_DEFINED_SIGNALS_BASE::OnFormattingHelp ), NULL, this );
105}
106
108{
109 // Disconnect Events
110 m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_USER_DEFINED_SIGNALS_BASE::onGridCellClick ), NULL, this );
111 m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_USER_DEFINED_SIGNALS_BASE::onAddSignal ), NULL, this );
112 m_deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_USER_DEFINED_SIGNALS_BASE::onDeleteSignal ), NULL, this );
113 m_syntaxHelp->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_USER_DEFINED_SIGNALS_BASE::OnFormattingHelp ), NULL, this );
114
115}
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
virtual void OnFormattingHelp(wxHyperlinkEvent &event)
DIALOG_USER_DEFINED_SIGNALS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("User-defined Signals"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onGridCellClick(wxGridEvent &event)
virtual void onDeleteSignal(wxCommandEvent &event)
virtual void onAddSignal(wxCommandEvent &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:243
A modified version of the wxInfoBar class that allows us to:
Definition: wx_infobar.h:75
#define _(s)