14 DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
DIALOG_SHIM( parent, id, title, pos, size, style )
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18 wxBoxSizer* top_sizer;
19 top_sizer =
new wxBoxSizer( wxVERTICAL );
21 m_grid =
new WX_GRID(
this, wxID_ANY, wxDefaultPosition, wxSize( 800,400 ), 0 );
24 m_grid->CreateGrid( 5, 11 );
25 m_grid->EnableEditing(
true );
26 m_grid->EnableGridLines(
true );
27 m_grid->EnableDragGridSize(
false );
28 m_grid->SetMargins( 0, 0 );
31 m_grid->SetColSize( 0, 66 );
32 m_grid->SetColSize( 1, 84 );
33 m_grid->SetColSize( 2, 140 );
34 m_grid->SetColSize( 3, 140 );
35 m_grid->SetColSize( 4, 100 );
36 m_grid->SetColSize( 5, 110 );
37 m_grid->SetColSize( 6, 110 );
38 m_grid->SetColSize( 7, 84 );
39 m_grid->SetColSize( 8, 84 );
40 m_grid->SetColSize( 9, 84 );
41 m_grid->SetColSize( 10, 84 );
42 m_grid->EnableDragColMove(
false );
43 m_grid->EnableDragColSize(
true );
45 m_grid->SetColLabelValue( 0,
_(
"Number") );
46 m_grid->SetColLabelValue( 1,
_(
"Name") );
47 m_grid->SetColLabelValue( 2,
_(
"Electrical Type") );
48 m_grid->SetColLabelValue( 3,
_(
"Graphic Style") );
49 m_grid->SetColLabelValue( 4,
_(
"Orientation") );
50 m_grid->SetColLabelValue( 5,
_(
"Number Text Size") );
51 m_grid->SetColLabelValue( 6,
_(
"Name Text Size") );
52 m_grid->SetColLabelValue( 7,
_(
"Length") );
53 m_grid->SetColLabelValue( 8,
_(
"X Position") );
54 m_grid->SetColLabelValue( 9,
_(
"Y Position") );
55 m_grid->SetColLabelValue( 10,
_(
"Visible") );
56 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
59 m_grid->EnableDragRowSize(
false );
60 m_grid->SetRowLabelSize( 0 );
61 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
66 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
67 m_grid->SetMinSize( wxSize( 690,200 ) );
69 top_sizer->Add(
m_grid, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 15 );
72 bSizer2 =
new wxBoxSizer( wxHORIZONTAL );
74 m_addButton =
new wxBitmapButton(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
75 bSizer2->Add(
m_addButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
78 bSizer2->Add( 20, 0, 0, wxEXPAND, 5 );
80 m_deleteButton =
new wxBitmapButton(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
81 bSizer2->Add(
m_deleteButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
83 m_staticline1 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
84 bSizer2->Add(
m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
86 m_cbGroup =
new wxCheckBox(
this, wxID_ANY,
_(
"Group by name"), wxDefaultPosition, wxDefaultSize, 0 );
87 bSizer2->Add(
m_cbGroup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
89 m_refreshButton =
new wxBitmapButton(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
90 bSizer2->Add(
m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 10 );
92 m_staticline2 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
93 bSizer2->Add(
m_staticline2, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 10 );
95 m_staticText1 =
new wxStaticText(
this, wxID_ANY,
_(
"Pin numbers:"), wxDefaultPosition, wxDefaultSize, 0 );
97 bSizer2->Add(
m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
99 m_summary =
new wxStaticText(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
101 bSizer2->Add(
m_summary, 1, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
104 bSizer2->Add( 10, 0, 0, wxEXPAND, 5 );
106 m_Buttons =
new wxStdDialogButtonSizer();
113 bSizer2->Add(
m_Buttons, 0, wxEXPAND|wxALL, 5 );
116 top_sizer->Add( bSizer2, 0, wxLEFT|wxEXPAND, 5 );
119 this->SetSizer( top_sizer );
121 top_sizer->Fit(
this );
123 this->Centre( wxBOTH );
wxStdDialogButtonSizer * m_Buttons
DIALOG_LIB_EDIT_PIN_TABLE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Pin Table"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnRebuildRows(wxCommandEvent &event)=0
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
~DIALOG_LIB_EDIT_PIN_TABLE_BASE()
virtual void OnDeleteRow(wxCommandEvent &event)=0
wxStaticText * m_staticText1
virtual void OnUpdateUI(wxUpdateUIEvent &event)=0
wxBitmapButton * m_refreshButton
wxButton * m_ButtonsCancel
virtual void OnAddRow(wxCommandEvent &event)=0
virtual void OnCancel(wxCommandEvent &event)=0
wxBitmapButton * m_deleteButton
virtual void OnClose(wxCloseEvent &event)=0
wxBitmapButton * m_addButton
wxStaticLine * m_staticline2
virtual void OnSize(wxSizeEvent &event)=0
virtual void OnCellEdited(wxGridEvent &event)=0
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
wxStaticLine * m_staticline1