Use STD_BITMAP_BUTTON for correct sizing.
Also provide button names for screen readers. Also layout dialog to match Symbol Properties.
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "widgets/std_bitmap_button.h"
|
||||
#include "widgets/wx_grid.h"
|
||||
|
||||
#include "dialog_design_block_properties_base.h"
|
||||
@@ -18,51 +19,8 @@ DIALOG_DESIGN_BLOCK_PROPERTIES_BASE::DIALOG_DESIGN_BLOCK_PROPERTIES_BASE( wxWind
|
||||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerGeneral;
|
||||
sbSizerGeneral = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("General") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgProperties;
|
||||
fgProperties = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
fgProperties->AddGrowableCol( 1 );
|
||||
fgProperties->AddGrowableRow( 2 );
|
||||
fgProperties->SetFlexibleDirection( wxBOTH );
|
||||
fgProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticTextName = new wxStaticText( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextName->Wrap( -1 );
|
||||
fgProperties->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||
|
||||
m_textName = new wxTextCtrl( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgProperties->Add( m_textName, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_staticTextKeywords = new wxStaticText( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxT("Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextKeywords->Wrap( -1 );
|
||||
fgProperties->Add( m_staticTextKeywords, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||
|
||||
m_textKeywords = new wxTextCtrl( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgProperties->Add( m_textKeywords, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer3;
|
||||
bSizer3 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextDescription = new wxStaticText( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxT("Description:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDescription->Wrap( -1 );
|
||||
bSizer3->Add( m_staticTextDescription, 1, wxALIGN_RIGHT|wxALL, 5 );
|
||||
|
||||
|
||||
bSizer3->Add( 0, 0, 3, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgProperties->Add( bSizer3, 1, wxEXPAND, 5 );
|
||||
|
||||
m_textDescription = new wxTextCtrl( sbSizerGeneral->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
fgProperties->Add( m_textDescription, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
sbSizerGeneral->Add( fgProperties, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( sbSizerGeneral, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
wxBoxSizer* bMargins;
|
||||
bMargins = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbFields;
|
||||
sbFields = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Default Fields") ), wxVERTICAL );
|
||||
@@ -97,34 +55,68 @@ DIALOG_DESIGN_BLOCK_PROPERTIES_BASE::DIALOG_DESIGN_BLOCK_PROPERTIES_BASE( wxWind
|
||||
m_fieldsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
||||
m_fieldsGrid->SetMinSize( wxSize( -1,180 ) );
|
||||
|
||||
sbFields->Add( m_fieldsGrid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
sbFields->Add( m_fieldsGrid, 1, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
wxBoxSizer* bButtonSizer;
|
||||
bButtonSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_bpAdd = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_bpAdd = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bButtonSizer->Add( m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_bpMoveUp = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_bpMoveUp = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bButtonSizer->Add( m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
m_bpMoveDown = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_bpMoveDown = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bButtonSizer->Add( m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bButtonSizer->Add( 20, 0, 0, wxEXPAND, 10 );
|
||||
|
||||
m_bpDelete = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_bpDelete = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bButtonSizer->Add( m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bButtonSizer->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
sbFields->Add( bButtonSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
sbFields->Add( bButtonSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( sbFields, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
bMargins->Add( sbFields, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxFlexGridSizer* fgProperties;
|
||||
fgProperties = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
fgProperties->AddGrowableCol( 1 );
|
||||
fgProperties->AddGrowableRow( 2 );
|
||||
fgProperties->SetFlexibleDirection( wxBOTH );
|
||||
fgProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticTextName = new wxStaticText( this, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextName->Wrap( -1 );
|
||||
fgProperties->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_textName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgProperties->Add( m_textName, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
m_staticTextKeywords = new wxStaticText( this, wxID_ANY, wxT("Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextKeywords->Wrap( -1 );
|
||||
fgProperties->Add( m_staticTextKeywords, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_textKeywords = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgProperties->Add( m_textKeywords, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
m_staticTextDescription = new wxStaticText( this, wxID_ANY, wxT("Description:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDescription->Wrap( -1 );
|
||||
fgProperties->Add( m_staticTextDescription, 1, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_textDescription = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
fgProperties->Add( m_textDescription, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( fgProperties, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_stdButtons = new wxStdDialogButtonSizer();
|
||||
m_stdButtonsOK = new wxButton( this, wxID_OK );
|
||||
@@ -138,6 +130,7 @@ DIALOG_DESIGN_BLOCK_PROPERTIES_BASE::DIALOG_DESIGN_BLOCK_PROPERTIES_BASE( wxWind
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
this->Layout();
|
||||
bMainSizer->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -9,24 +9,25 @@
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
class STD_BITMAP_BUTTON;
|
||||
class WX_GRID;
|
||||
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/grid.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -40,17 +41,17 @@ class DIALOG_DESIGN_BLOCK_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
private:
|
||||
|
||||
protected:
|
||||
WX_GRID* m_fieldsGrid;
|
||||
STD_BITMAP_BUTTON* m_bpAdd;
|
||||
STD_BITMAP_BUTTON* m_bpMoveUp;
|
||||
STD_BITMAP_BUTTON* m_bpMoveDown;
|
||||
STD_BITMAP_BUTTON* m_bpDelete;
|
||||
wxStaticText* m_staticTextName;
|
||||
wxTextCtrl* m_textName;
|
||||
wxStaticText* m_staticTextKeywords;
|
||||
wxTextCtrl* m_textKeywords;
|
||||
wxStaticText* m_staticTextDescription;
|
||||
wxTextCtrl* m_textDescription;
|
||||
WX_GRID* m_fieldsGrid;
|
||||
wxBitmapButton* m_bpAdd;
|
||||
wxBitmapButton* m_bpMoveUp;
|
||||
wxBitmapButton* m_bpMoveDown;
|
||||
wxBitmapButton* m_bpDelete;
|
||||
wxStdDialogButtonSizer* m_stdButtons;
|
||||
wxButton* m_stdButtonsOK;
|
||||
wxButton* m_stdButtonsCancel;
|
||||
@@ -66,7 +67,7 @@ class DIALOG_DESIGN_BLOCK_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
|
||||
public:
|
||||
|
||||
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 );
|
||||
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 );
|
||||
|
||||
~DIALOG_DESIGN_BLOCK_PROPERTIES_BASE();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user