15DIALOG_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 )
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19 wxBoxSizer* bMainSizer;
20 bMainSizer =
new wxBoxSizer( wxVERTICAL );
23 bMargins =
new wxBoxSizer( wxVERTICAL );
25 wxStaticBoxSizer* sbFields;
26 sbFields =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY, wxT(
"Default Fields") ), wxVERTICAL );
28 m_fieldsGrid =
new WX_GRID( sbFields->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
45 m_fieldsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
50 m_fieldsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
55 m_fieldsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
58 sbFields->Add(
m_fieldsGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
60 wxBoxSizer* bButtonSizer;
61 bButtonSizer =
new wxBoxSizer( wxHORIZONTAL );
63 m_bpAdd =
new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
64 bButtonSizer->Add(
m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
66 m_bpMoveUp =
new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
67 bButtonSizer->Add(
m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
70 bButtonSizer->Add(
m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
73 bButtonSizer->Add( 20, 0, 0, wxEXPAND, 10 );
75 m_bpDelete =
new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
76 bButtonSizer->Add(
m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
79 bButtonSizer->Add( 0, 0, 1, wxEXPAND, 5 );
82 sbFields->Add( bButtonSizer, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
85 bMargins->Add( sbFields, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
88 bMainSizer->Add( bMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
90 wxFlexGridSizer* fgProperties;
91 fgProperties =
new wxFlexGridSizer( 0, 2, 5, 0 );
92 fgProperties->AddGrowableCol( 1 );
93 fgProperties->AddGrowableRow( 2 );
94 fgProperties->SetFlexibleDirection( wxBOTH );
95 fgProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
97 m_staticTextName =
new wxStaticText(
this, wxID_ANY, wxT(
"Name:"), wxDefaultPosition, wxDefaultSize, 0 );
99 fgProperties->Add(
m_staticTextName, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
101 m_textName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
102 fgProperties->Add(
m_textName, 0, wxEXPAND, 5 );
104 m_staticTextKeywords =
new wxStaticText(
this, wxID_ANY, wxT(
"Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
108 m_textKeywords =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
111 m_staticTextDescription =
new wxStaticText(
this, wxID_ANY, wxT(
"Description:"), wxDefaultPosition, wxDefaultSize, 0 );
115 m_textDescription =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
119 bMainSizer->Add( fgProperties, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
131 this->SetSizer( bMainSizer );
133 bMainSizer->Fit(
this );
135 this->Centre( wxBOTH );
STD_BITMAP_BUTTON * m_bpMoveUp
wxButton * m_stdButtonsCancel
wxStdDialogButtonSizer * m_stdButtons
STD_BITMAP_BUTTON * m_bpMoveDown
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
STD_BITMAP_BUTTON * m_bpDelete
STD_BITMAP_BUTTON * m_bpAdd
wxTextCtrl * m_textKeywords
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(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnAddField(wxCommandEvent &event)
virtual void OnCancelButtonClick(wxCommandEvent &event)
virtual void OnMoveFieldDown(wxCommandEvent &event)
virtual void OnSizeGrid(wxSizeEvent &event)
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...