Commit 5aec4604 authored by Dick Hollenbeck's avatar Dick Hollenbeck

apply DIALOG_SHIM to dialog_lib_edit_text_base and make...

apply DIALOG_SHIM to dialog_lib_edit_text_base and make dialog_lib_edit_pin_base apportion more width for pin name
parent 7d154606
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include <dialog_edit_one_field.h> #include <dialog_edit_one_field.h>
void DIALOG_EDIT_ONE_FIELD::initDlg_base( ) void DIALOG_EDIT_ONE_FIELD::initDlg_base()
{ {
wxString msg; wxString msg;
...@@ -75,7 +75,6 @@ void DIALOG_EDIT_ONE_FIELD::initDlg_base( ) ...@@ -75,7 +75,6 @@ void DIALOG_EDIT_ONE_FIELD::initDlg_base( )
case GR_TEXT_HJUSTIFY_RIGHT: case GR_TEXT_HJUSTIFY_RIGHT:
m_TextHJustificationOpt->SetSelection( 2 ); m_TextHJustificationOpt->SetSelection( 2 );
break; break;
} }
switch ( m_textVjustify ) switch ( m_textVjustify )
...@@ -100,7 +99,7 @@ void DIALOG_EDIT_ONE_FIELD::initDlg_base( ) ...@@ -100,7 +99,7 @@ void DIALOG_EDIT_ONE_FIELD::initDlg_base( )
} }
void DIALOG_LIB_EDIT_ONE_FIELD::initDlg( ) void DIALOG_LIB_EDIT_ONE_FIELD::initDlg()
{ {
m_textsize = m_field->m_Size.x; m_textsize = m_field->m_Size.x;
m_TextValue->SetValue( m_field->m_Text ); m_TextValue->SetValue( m_field->m_Text );
...@@ -118,7 +117,7 @@ void DIALOG_LIB_EDIT_ONE_FIELD::initDlg( ) ...@@ -118,7 +117,7 @@ void DIALOG_LIB_EDIT_ONE_FIELD::initDlg( )
m_textHjustify = m_field->m_HJustify; m_textHjustify = m_field->m_HJustify;
m_textVjustify = m_field->m_VJustify; m_textVjustify = m_field->m_VJustify;
initDlg_base( ); initDlg_base();
} }
wxString DIALOG_LIB_EDIT_ONE_FIELD::GetTextField() wxString DIALOG_LIB_EDIT_ONE_FIELD::GetTextField()
...@@ -195,7 +194,7 @@ void DIALOG_LIB_EDIT_ONE_FIELD::TransfertDataToField() ...@@ -195,7 +194,7 @@ void DIALOG_LIB_EDIT_ONE_FIELD::TransfertDataToField()
} }
void DIALOG_SCH_EDIT_ONE_FIELD::initDlg( ) void DIALOG_SCH_EDIT_ONE_FIELD::initDlg()
{ {
m_textsize = m_field->m_Size.x; m_textsize = m_field->m_Size.x;
m_TextValue->SetValue( m_field->m_Text ); m_TextValue->SetValue( m_field->m_Text );
...@@ -211,7 +210,7 @@ void DIALOG_SCH_EDIT_ONE_FIELD::initDlg( ) ...@@ -211,7 +210,7 @@ void DIALOG_SCH_EDIT_ONE_FIELD::initDlg( )
m_textHjustify = m_field->m_HJustify; m_textHjustify = m_field->m_HJustify;
m_textVjustify = m_field->m_VJustify; m_textVjustify = m_field->m_VJustify;
initDlg_base( ); initDlg_base();
} }
......
#ifndef _DIALOG_EDIT_ONE_FIELD_H_ #ifndef DIALOG_EDIT_ONE_FIELD_H_
#define _DIALOG_EDIT_ONE_FIELD_H_ #define DIALOG_EDIT_ONE_FIELD_H_
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
...@@ -53,7 +53,8 @@ public: ...@@ -53,7 +53,8 @@ public:
SetTitle( aTitle ); SetTitle( aTitle );
} }
~DIALOG_EDIT_ONE_FIELD() {}; // ~DIALOG_EDIT_ONE_FIELD() {};
virtual void TransfertDataToField(); virtual void TransfertDataToField();
void SetTextField( const wxString& aText ) void SetTextField( const wxString& aText )
...@@ -101,6 +102,7 @@ private: ...@@ -101,6 +102,7 @@ private:
void initDlg( ); void initDlg( );
}; };
// Class to edit a schematic component field // Class to edit a schematic component field
class DIALOG_SCH_EDIT_ONE_FIELD : public DIALOG_EDIT_ONE_FIELD class DIALOG_SCH_EDIT_ONE_FIELD : public DIALOG_EDIT_ONE_FIELD
{ {
...@@ -117,7 +119,8 @@ public: ...@@ -117,7 +119,8 @@ public:
GetSizer()->SetSizeHints(this); GetSizer()->SetSizeHints(this);
Centre(); Centre();
} }
~DIALOG_SCH_EDIT_ONE_FIELD() {};
// ~DIALOG_SCH_EDIT_ONE_FIELD() {};
void TransfertDataToField(); void TransfertDataToField();
wxString GetTextField(); wxString GetTextField();
...@@ -126,5 +129,4 @@ private: ...@@ -126,5 +129,4 @@ private:
void initDlg( ); void initDlg( );
}; };
#endif // DIALOG_EDIT_ONE_FIELD_H_
#endif // _DIALOG_EDIT_ONE_FIELD_H_
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar 17 2012) // C++ code generated with wxFormBuilder (version Apr 11 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -99,7 +99,7 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID ...@@ -99,7 +99,7 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
bLeftSizer->Add( boarderSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 12 ); bLeftSizer->Add( boarderSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 12 );
bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); bUpperSizer->Add( bLeftSizer, 2, wxEXPAND, 5 );
wxBoxSizer* bRightSizer; wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL ); bRightSizer = new wxBoxSizer( wxVERTICAL );
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar 17 2012) // C++ code generated with wxFormBuilder (version Apr 11 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Apr 11 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
...@@ -34,6 +34,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow ...@@ -34,6 +34,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
bTextValueBoxSizer->Add( m_TextValue, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bTextValueBoxSizer->Add( m_TextValue, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bUpperBoxSizer->Add( bTextValueBoxSizer, 1, wxEXPAND, 5 ); bUpperBoxSizer->Add( bTextValueBoxSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bTextSizeSizer; wxBoxSizer* bTextSizeSizer;
...@@ -46,8 +47,10 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow ...@@ -46,8 +47,10 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
m_TextSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TextSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bTextSizeSizer->Add( m_TextSize, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bTextSizeSizer->Add( m_TextSize, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bUpperBoxSizer->Add( bTextSizeSizer, 0, 0, 5 ); bUpperBoxSizer->Add( bTextSizeSizer, 0, 0, 5 );
bPropertiesSizer->Add( bUpperBoxSizer, 0, wxEXPAND, 5 ); bPropertiesSizer->Add( bUpperBoxSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bBottomtBoxSizer; wxBoxSizer* bBottomtBoxSizer;
...@@ -71,6 +74,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow ...@@ -71,6 +74,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
m_Invisible = new wxCheckBox( this, wxID_ANY, _("Invisible"), wxDefaultPosition, wxDefaultSize, 0 ); m_Invisible = new wxCheckBox( this, wxID_ANY, _("Invisible"), wxDefaultPosition, wxDefaultSize, 0 );
sOptionsSizer->Add( m_Invisible, 0, wxALL, 5 ); sOptionsSizer->Add( m_Invisible, 0, wxALL, 5 );
bBottomtBoxSizer->Add( sOptionsSizer, 0, wxALL|wxEXPAND, 5 ); bBottomtBoxSizer->Add( sOptionsSizer, 0, wxALL|wxEXPAND, 5 );
wxString m_TextShapeOptChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") }; wxString m_TextShapeOptChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
...@@ -91,13 +95,16 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow ...@@ -91,13 +95,16 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
m_TextVJustificationOpt->SetSelection( 1 ); m_TextVJustificationOpt->SetSelection( 1 );
bBottomtBoxSizer->Add( m_TextVJustificationOpt, 0, wxALL|wxEXPAND, 5 ); bBottomtBoxSizer->Add( m_TextVJustificationOpt, 0, wxALL|wxEXPAND, 5 );
bPropertiesSizer->Add( bBottomtBoxSizer, 1, wxEXPAND, 5 ); bPropertiesSizer->Add( bBottomtBoxSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bRightSizer; wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL ); bRightSizer = new wxBoxSizer( wxVERTICAL );
bPropertiesSizer->Add( bRightSizer, 0, wxEXPAND, 5 ); bPropertiesSizer->Add( bRightSizer, 0, wxEXPAND, 5 );
bMainSizer->Add( bPropertiesSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 6 ); bMainSizer->Add( bPropertiesSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 6 );
m_sdbSizerButtons = new wxStdDialogButtonSizer(); m_sdbSizerButtons = new wxStdDialogButtonSizer();
...@@ -106,8 +113,10 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow ...@@ -106,8 +113,10 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL ); m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel ); m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
m_sdbSizerButtons->Realize(); m_sdbSizerButtons->Realize();
bMainSizer->Add( m_sdbSizerButtons, 0, wxALL|wxEXPAND, 12 ); bMainSizer->Add( m_sdbSizerButtons, 0, wxALL|wxEXPAND, 12 );
this->SetSizer( bMainSizer ); this->SetSizer( bMainSizer );
this->Layout(); this->Layout();
bMainSizer->Fit( this ); bMainSizer->Fit( this );
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Apr 11 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
#include "dialog_shim.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
...@@ -31,7 +32,7 @@ ...@@ -31,7 +32,7 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LIB_EDIT_TEXT_BASE /// Class DIALOG_LIB_EDIT_TEXT_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_LIB_EDIT_TEXT_BASE : public wxDialog class DIALOG_LIB_EDIT_TEXT_BASE : public DIALOG_SHIM
{ {
private: private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment