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 @@
#include <dialog_edit_one_field.h>
void DIALOG_EDIT_ONE_FIELD::initDlg_base( )
void DIALOG_EDIT_ONE_FIELD::initDlg_base()
{
wxString msg;
......@@ -75,7 +75,6 @@ void DIALOG_EDIT_ONE_FIELD::initDlg_base( )
case GR_TEXT_HJUSTIFY_RIGHT:
m_TextHJustificationOpt->SetSelection( 2 );
break;
}
switch ( m_textVjustify )
......@@ -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_TextValue->SetValue( m_field->m_Text );
......@@ -118,7 +117,7 @@ void DIALOG_LIB_EDIT_ONE_FIELD::initDlg( )
m_textHjustify = m_field->m_HJustify;
m_textVjustify = m_field->m_VJustify;
initDlg_base( );
initDlg_base();
}
wxString DIALOG_LIB_EDIT_ONE_FIELD::GetTextField()
......@@ -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_TextValue->SetValue( m_field->m_Text );
......@@ -211,7 +210,7 @@ void DIALOG_SCH_EDIT_ONE_FIELD::initDlg( )
m_textHjustify = m_field->m_HJustify;
m_textVjustify = m_field->m_VJustify;
initDlg_base( );
initDlg_base();
}
......
#ifndef _DIALOG_EDIT_ONE_FIELD_H_
#define _DIALOG_EDIT_ONE_FIELD_H_
#ifndef 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.
......@@ -53,7 +53,8 @@ public:
SetTitle( aTitle );
}
~DIALOG_EDIT_ONE_FIELD() {};
// ~DIALOG_EDIT_ONE_FIELD() {};
virtual void TransfertDataToField();
void SetTextField( const wxString& aText )
......@@ -101,6 +102,7 @@ private:
void initDlg( );
};
// Class to edit a schematic component field
class DIALOG_SCH_EDIT_ONE_FIELD : public DIALOG_EDIT_ONE_FIELD
{
......@@ -117,7 +119,8 @@ public:
GetSizer()->SetSizeHints(this);
Centre();
}
~DIALOG_SCH_EDIT_ONE_FIELD() {};
// ~DIALOG_SCH_EDIT_ONE_FIELD() {};
void TransfertDataToField();
wxString GetTextField();
......@@ -126,5 +129,4 @@ private:
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/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -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 );
bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
bUpperSizer->Add( bLeftSizer, 2, wxEXPAND, 5 );
wxBoxSizer* bRightSizer;
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/
//
// 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/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -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 );
......@@ -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 );
bUpperBoxSizer->Add( bTextValueBoxSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bTextSizeSizer;
......@@ -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 );
bTextSizeSizer->Add( m_TextSize, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bUpperBoxSizer->Add( bTextSizeSizer, 0, 0, 5 );
bPropertiesSizer->Add( bUpperBoxSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bBottomtBoxSizer;
......@@ -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 );
sOptionsSizer->Add( m_Invisible, 0, wxALL, 5 );
bBottomtBoxSizer->Add( sOptionsSizer, 0, wxALL|wxEXPAND, 5 );
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
m_TextVJustificationOpt->SetSelection( 1 );
bBottomtBoxSizer->Add( m_TextVJustificationOpt, 0, wxALL|wxEXPAND, 5 );
bPropertiesSizer->Add( bBottomtBoxSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL );
bPropertiesSizer->Add( bRightSizer, 0, wxEXPAND, 5 );
bMainSizer->Add( bPropertiesSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 6 );
m_sdbSizerButtons = new wxStdDialogButtonSizer();
......@@ -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_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
m_sdbSizerButtons->Realize();
bMainSizer->Add( m_sdbSizerButtons, 0, wxALL|wxEXPAND, 12 );
this->SetSizer( bMainSizer );
this->Layout();
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/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -11,6 +11,7 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
......@@ -31,7 +32,7 @@
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LIB_EDIT_TEXT_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_LIB_EDIT_TEXT_BASE : public wxDialog
class DIALOG_LIB_EDIT_TEXT_BASE : public DIALOG_SHIM
{
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