16DIALOG_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 )
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
20 wxBoxSizer* top_sizer;
21 top_sizer =
new wxBoxSizer( wxVERTICAL );
23 wxBoxSizer* bSummarySizer;
24 bSummarySizer =
new wxBoxSizer( wxHORIZONTAL );
26 m_staticTextPinNumbers =
new wxStaticText(
this, wxID_ANY,
_(
"Pin numbers:"), wxDefaultPosition, wxDefaultSize, 0 );
35 bSummarySizer->Add( 0, 0, 1, wxEXPAND, 5 );
37 m_staticTextPinCount =
new wxStaticText(
this, wxID_ANY,
_(
"Pin count:"), wxDefaultPosition, wxDefaultSize, 0 );
41 m_pin_count =
new wxStaticText(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
43 bSummarySizer->Add(
m_pin_count, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
46 bSummarySizer->Add( 0, 0, 1, wxEXPAND, 5 );
52 m_duplicate_pins =
new wxStaticText(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
54 bSummarySizer->Add(
m_duplicate_pins, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
57 top_sizer->Add( bSummarySizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
59 wxBoxSizer* bGridMarginsSizer;
60 bGridMarginsSizer =
new wxBoxSizer( wxVERTICAL );
62 m_grid =
new WX_GRID(
this, wxID_ANY, wxDefaultPosition, wxSize( 800,400 ), 0 );
65 m_grid->CreateGrid( 5, 14 );
66 m_grid->EnableEditing(
true );
67 m_grid->EnableGridLines(
true );
68 m_grid->EnableDragGridSize(
false );
69 m_grid->SetMargins( 0, 0 );
72 m_grid->SetColSize( 0, 60 );
73 m_grid->SetColSize( 1, 66 );
74 m_grid->SetColSize( 2, 84 );
75 m_grid->SetColSize( 3, 140 );
76 m_grid->SetColSize( 4, 140 );
77 m_grid->SetColSize( 5, 100 );
78 m_grid->SetColSize( 6, 110 );
79 m_grid->SetColSize( 7, 110 );
80 m_grid->SetColSize( 8, 84 );
81 m_grid->SetColSize( 9, 84 );
82 m_grid->SetColSize( 10, 84 );
83 m_grid->SetColSize( 11, 84 );
84 m_grid->SetColSize( 12, 66 );
85 m_grid->EnableDragColMove(
false );
86 m_grid->EnableDragColSize(
true );
87 m_grid->SetColLabelValue( 0,
_(
"Count") );
88 m_grid->SetColLabelValue( 1,
_(
"Number") );
89 m_grid->SetColLabelValue( 2,
_(
"Name") );
90 m_grid->SetColLabelValue( 3,
_(
"Electrical Type") );
91 m_grid->SetColLabelValue( 4,
_(
"Graphic Style") );
92 m_grid->SetColLabelValue( 5,
_(
"Orientation") );
93 m_grid->SetColLabelValue( 6,
_(
"Number Text Size") );
94 m_grid->SetColLabelValue( 7,
_(
"Name Text Size") );
95 m_grid->SetColLabelValue( 8,
_(
"Length") );
96 m_grid->SetColLabelValue( 9,
_(
"X Position") );
97 m_grid->SetColLabelValue( 10,
_(
"Y Position") );
98 m_grid->SetColLabelValue( 11,
_(
"Visible") );
99 m_grid->SetColLabelValue( 12,
_(
"Unit") );
100 m_grid->SetColLabelValue( 13,
_(
"De Morgan") );
102 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
105 m_grid->EnableDragRowSize(
false );
106 m_grid->SetRowLabelSize( 0 );
107 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
112 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
113 m_grid->SetMinSize( wxSize( 690,200 ) );
115 bGridMarginsSizer->Add(
m_grid, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
118 top_sizer->Add( bGridMarginsSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
120 wxBoxSizer* bBottomSizer;
121 bBottomSizer =
new wxBoxSizer( wxHORIZONTAL );
124 bSizer5 =
new wxBoxSizer( wxHORIZONTAL );
127 bSizer5->Add(
m_addButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
130 bSizer5->Add(
m_deleteButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
132 m_divider1 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
135 bSizer5->Add(
m_divider1, 0, wxEXPAND|wxALL, 4 );
137 m_cbGroup =
new wxCheckBox(
this, wxID_ANY,
_(
"Group by name"), wxDefaultPosition, wxDefaultSize, 0 );
138 bSizer5->Add(
m_cbGroup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
140 m_groupSelected =
new wxButton(
this, wxID_ANY,
_(
"Group Selected"), wxDefaultPosition, wxDefaultSize, 0 );
144 bSizer5->Add(
m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
146 m_divider2 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
149 bSizer5->Add(
m_divider2, 0, wxEXPAND|wxALL, 4 );
151 m_cbFilterByUnit =
new wxCheckBox(
this, wxID_ANY,
_(
"Filter by unit:"), wxDefaultPosition, wxDefaultSize, 0 );
152 bSizer5->Add(
m_cbFilterByUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
154 wxArrayString m_unitFilterChoices;
155 m_unitFilter =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitFilterChoices, 0 );
157 bSizer5->Add(
m_unitFilter, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
160 bBottomSizer->Add( bSizer5, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
163 bBottomSizer->Add( 30, 0, 1, wxEXPAND, 5 );
165 m_Buttons =
new wxStdDialogButtonSizer();
172 bBottomSizer->Add(
m_Buttons, 0, wxEXPAND|wxALL, 5 );
175 top_sizer->Add( bBottomSizer, 0, wxLEFT|wxEXPAND, 10 );
178 this->SetSizer( top_sizer );
180 top_sizer->Fit(
this );
182 this->Centre( wxBOTH );
virtual void OnUpdateUI(wxUpdateUIEvent &event)=0
STD_BITMAP_BUTTON * m_refreshButton
wxStaticText * m_pin_numbers_summary
virtual void OnAddRow(wxCommandEvent &event)=0
virtual void OnClose(wxCloseEvent &event)=0
virtual void OnCellSelected(wxGridEvent &event)=0
virtual void OnDeleteRow(wxCommandEvent &event)=0
BITMAP_BUTTON * m_divider1
wxButton * m_ButtonsCancel
wxStdDialogButtonSizer * m_Buttons
virtual void OnGroupSelected(wxCommandEvent &event)=0
virtual void OnFilterCheckBox(wxCommandEvent &event)=0
STD_BITMAP_BUTTON * m_addButton
wxStaticText * m_staticTextDuplicatePins
wxStaticText * m_pin_count
virtual void OnCellEdited(wxGridEvent &event)=0
wxStaticText * m_duplicate_pins
~DIALOG_LIB_EDIT_PIN_TABLE_BASE()
virtual void OnSize(wxSizeEvent &event)=0
virtual void OnRebuildRows(wxCommandEvent &event)=0
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)
wxCheckBox * m_cbFilterByUnit
virtual void OnCancel(wxCommandEvent &event)=0
STD_BITMAP_BUTTON * m_deleteButton
BITMAP_BUTTON * m_divider2
wxButton * m_groupSelected
virtual void OnFilterChoice(wxCommandEvent &event)=0
wxStaticText * m_staticTextPinNumbers
wxStaticText * m_staticTextPinCount
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...