14DIALOG_DESIGN_BLOCK_PROPERTIES_BASE::DIALOG_DESIGN_BLOCK_PROPERTIES_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* bMainSizer;
19 bMainSizer =
new wxBoxSizer( wxVERTICAL );
21 wxStaticBoxSizer* sbSizerGeneral;
22 sbSizerGeneral =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY, wxT(
"General") ), wxVERTICAL );
24 wxFlexGridSizer* fgProperties;
25 fgProperties =
new wxFlexGridSizer( 0, 2, 0, 0 );
26 fgProperties->AddGrowableCol( 1 );
27 fgProperties->AddGrowableRow( 2 );
28 fgProperties->SetFlexibleDirection( wxBOTH );
29 fgProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31 m_staticTextName =
new wxStaticText( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxT(
"Name:"), wxDefaultPosition, wxDefaultSize, 0 );
33 fgProperties->Add(
m_staticTextName, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
35 m_textName =
new wxTextCtrl( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
36 fgProperties->Add(
m_textName, 0, wxALL|wxEXPAND, 5 );
38 m_staticTextKeywords =
new wxStaticText( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxT(
"Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
42 m_textKeywords =
new wxTextCtrl( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
46 bSizer3 =
new wxBoxSizer( wxVERTICAL );
48 m_staticTextDescription =
new wxStaticText( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxT(
"Description:"), wxDefaultPosition, wxDefaultSize, 0 );
53 bSizer3->Add( 0, 0, 3, wxEXPAND, 5 );
56 fgProperties->Add( bSizer3, 1, wxEXPAND, 5 );
58 m_textDescription =
new wxTextCtrl( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
62 sbSizerGeneral->Add( fgProperties, 1, wxEXPAND, 5 );
65 bMainSizer->Add( sbSizerGeneral, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
67 wxStaticBoxSizer* sbFields;
68 sbFields =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY, wxT(
"Default Fields") ), wxVERTICAL );
70 m_fieldsGrid =
new WX_GRID( sbFields->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
87 m_fieldsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
92 m_fieldsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
97 m_fieldsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
100 sbFields->Add(
m_fieldsGrid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
102 wxBoxSizer* bButtonSizer;
103 bButtonSizer =
new wxBoxSizer( wxHORIZONTAL );
105 m_bpAdd =
new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
106 bButtonSizer->Add(
m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
108 m_bpMoveUp =
new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
109 bButtonSizer->Add(
m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
111 m_bpMoveDown =
new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
112 bButtonSizer->Add(
m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
115 bButtonSizer->Add( 20, 0, 0, wxEXPAND, 10 );
117 m_bpDelete =
new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
118 bButtonSizer->Add(
m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
121 bButtonSizer->Add( 0, 0, 1, wxEXPAND, 5 );
124 sbFields->Add( bButtonSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
127 bMainSizer->Add( sbFields, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
139 this->SetSizer( bMainSizer );
142 this->Centre( wxBOTH );
wxButton * m_stdButtonsCancel
wxStdDialogButtonSizer * m_stdButtons
virtual void OnDeleteField(wxCommandEvent &event)
wxStaticText * m_staticTextName
wxStaticText * m_staticTextDescription
wxButton * m_stdButtonsOK
virtual void OnMoveFieldUp(wxCommandEvent &event)
~DIALOG_DESIGN_BLOCK_PROPERTIES_BASE()
wxStaticText * m_staticTextKeywords
wxTextCtrl * m_textKeywords
wxBitmapButton * m_bpDelete
wxTextCtrl * m_textDescription
DIALOG_DESIGN_BLOCK_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxT("Design Block Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(551, 637), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnAddField(wxCommandEvent &event)
virtual void OnCancelButtonClick(wxCommandEvent &event)
virtual void OnMoveFieldDown(wxCommandEvent &event)
wxBitmapButton * m_bpMoveUp
virtual void OnSizeGrid(wxSizeEvent &event)
wxBitmapButton * m_bpMoveDown
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...