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;
......@@ -64,18 +64,17 @@ void DIALOG_EDIT_ONE_FIELD::initDlg_base( )
switch ( m_textHjustify )
{
case GR_TEXT_HJUSTIFY_LEFT:
m_TextHJustificationOpt->SetSelection( 0 );
break;
case GR_TEXT_HJUSTIFY_CENTER:
m_TextHJustificationOpt->SetSelection( 1 );
break;
case GR_TEXT_HJUSTIFY_LEFT:
m_TextHJustificationOpt->SetSelection( 0 );
break;
case GR_TEXT_HJUSTIFY_RIGHT:
m_TextHJustificationOpt->SetSelection( 2 );
break;
case GR_TEXT_HJUSTIFY_CENTER:
m_TextHJustificationOpt->SetSelection( 1 );
break;
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)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_LIB_EDIT_PIN_BASE_H__
#define __DIALOG_LIB_EDIT_PIN_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include "wx/bmpcbox.h"
#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/combobox.h>
#include <wx/sizer.h>
#include <wx/checkbox.h>
#include <wx/statbox.h>
#include <wx/panel.h>
#include <wx/statline.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LIB_EDIT_PIN_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_LIB_EDIT_PIN_BASE : public DIALOG_SHIM
{
private:
protected:
enum
{
ID_M_TEXTPINNAME = 1000,
ID_M_STATICTEXTPADNAME,
ID_M_TEXTPADNAME,
ID_M_STATICTEXTNAMESIZE,
ID_M_TEXTPINNAMETEXTSIZE,
ID_M_STATICNAMETEXTSIZEUNITS,
ID_M_STATICTEXTPADNAMESIZE,
ID_M_TEXTPADNAMETEXTSIZE,
ID_M_STATICNUMBERTEXTSIZEUNITS,
ID_M_STATICTEXTPINLEN,
ID_M_TEXTLENGTH,
ID_M_STATICLENGTHUNITS
};
wxStaticText* m_staticTextPinName;
wxTextCtrl* m_textPinName;
wxStaticText* m_staticTextPadName;
wxTextCtrl* m_textPadName;
wxStaticText* m_staticTextOrient;
wxBitmapComboBox* m_choiceOrientation;
wxStaticText* m_staticTextEType;
wxBitmapComboBox* m_choiceElectricalType;
wxStaticText* m_staticTextGstyle;
wxBitmapComboBox* m_choiceStyle;
wxCheckBox* m_checkApplyToAllParts;
wxCheckBox* m_checkApplyToAllConversions;
wxCheckBox* m_checkShow;
wxStaticText* m_staticTextNameSize;
wxTextCtrl* m_textPinNameTextSize;
wxStaticText* m_staticNameTextSizeUnits;
wxStaticText* m_staticTextPadNameSize;
wxTextCtrl* m_textPadNameTextSize;
wxStaticText* m_staticNumberTextSizeUnits;
wxStaticText* m_staticTextPinLen;
wxTextCtrl* m_textLength;
wxStaticText* m_staticLengthUnits;
wxPanel* m_panelShowPin;
wxStaticLine* m_staticline1;
wxStdDialogButtonSizer* m_sdbSizerButtons;
wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); }
virtual void OnPropertiesChange( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LIB_EDIT_PIN_BASE();
};
#endif //__DIALOG_LIB_EDIT_PIN_BASE_H__
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 11 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_LIB_EDIT_PIN_BASE_H__
#define __DIALOG_LIB_EDIT_PIN_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include "wx/bmpcbox.h"
#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/combobox.h>
#include <wx/sizer.h>
#include <wx/checkbox.h>
#include <wx/statbox.h>
#include <wx/panel.h>
#include <wx/statline.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LIB_EDIT_PIN_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_LIB_EDIT_PIN_BASE : public DIALOG_SHIM
{
private:
protected:
enum
{
ID_M_TEXTPINNAME = 1000,
ID_M_STATICTEXTPADNAME,
ID_M_TEXTPADNAME,
ID_M_STATICTEXTNAMESIZE,
ID_M_TEXTPINNAMETEXTSIZE,
ID_M_STATICNAMETEXTSIZEUNITS,
ID_M_STATICTEXTPADNAMESIZE,
ID_M_TEXTPADNAMETEXTSIZE,
ID_M_STATICNUMBERTEXTSIZEUNITS,
ID_M_STATICTEXTPINLEN,
ID_M_TEXTLENGTH,
ID_M_STATICLENGTHUNITS
};
wxStaticText* m_staticTextPinName;
wxTextCtrl* m_textPinName;
wxStaticText* m_staticTextPadName;
wxTextCtrl* m_textPadName;
wxStaticText* m_staticTextOrient;
wxBitmapComboBox* m_choiceOrientation;
wxStaticText* m_staticTextEType;
wxBitmapComboBox* m_choiceElectricalType;
wxStaticText* m_staticTextGstyle;
wxBitmapComboBox* m_choiceStyle;
wxCheckBox* m_checkApplyToAllParts;
wxCheckBox* m_checkApplyToAllConversions;
wxCheckBox* m_checkShow;
wxStaticText* m_staticTextNameSize;
wxTextCtrl* m_textPinNameTextSize;
wxStaticText* m_staticNameTextSizeUnits;
wxStaticText* m_staticTextPadNameSize;
wxTextCtrl* m_textPadNameTextSize;
wxStaticText* m_staticNumberTextSizeUnits;
wxStaticText* m_staticTextPinLen;
wxTextCtrl* m_textLength;
wxStaticText* m_staticLengthUnits;
wxPanel* m_panelShowPin;
wxStaticLine* m_staticline1;
wxStdDialogButtonSizer* m_sdbSizerButtons;
wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); }
virtual void OnPropertiesChange( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LIB_EDIT_PIN_BASE();
};
#endif //__DIALOG_LIB_EDIT_PIN_BASE_H__
This source diff could not be displayed because it is too large. You can view the blob instead.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_LIB_EDIT_TEXT_BASE_H__
#define __DIALOG_LIB_EDIT_TEXT_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.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/checkbox.h>
#include <wx/statline.h>
#include <wx/statbox.h>
#include <wx/radiobox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LIB_EDIT_TEXT_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_LIB_EDIT_TEXT_BASE : public wxDialog
{
private:
protected:
wxStaticText* m_staticText1;
wxTextCtrl* m_TextValue;
wxStaticText* m_TextSizeText;
wxTextCtrl* m_TextSize;
wxCheckBox* m_Orient;
wxStaticLine* m_staticline1;
wxCheckBox* m_CommonUnit;
wxCheckBox* m_CommonConvert;
wxCheckBox* m_Invisible;
wxRadioBox* m_TextShapeOpt;
wxRadioBox* m_TextHJustificationOpt;
wxRadioBox* m_TextVJustificationOpt;
wxStdDialogButtonSizer* m_sdbSizerButtons;
wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Text Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LIB_EDIT_TEXT_BASE();
};
#endif //__DIALOG_LIB_EDIT_TEXT_BASE_H__
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 11 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_LIB_EDIT_TEXT_BASE_H__
#define __DIALOG_LIB_EDIT_TEXT_BASE_H__
#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>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/sizer.h>
#include <wx/checkbox.h>
#include <wx/statline.h>
#include <wx/statbox.h>
#include <wx/radiobox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LIB_EDIT_TEXT_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_LIB_EDIT_TEXT_BASE : public DIALOG_SHIM
{
private:
protected:
wxStaticText* m_staticText1;
wxTextCtrl* m_TextValue;
wxStaticText* m_TextSizeText;
wxTextCtrl* m_TextSize;
wxCheckBox* m_Orient;
wxStaticLine* m_staticline1;
wxCheckBox* m_CommonUnit;
wxCheckBox* m_CommonConvert;
wxCheckBox* m_Invisible;
wxRadioBox* m_TextShapeOpt;
wxRadioBox* m_TextHJustificationOpt;
wxRadioBox* m_TextVJustificationOpt;
wxStdDialogButtonSizer* m_sdbSizerButtons;
wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Text Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LIB_EDIT_TEXT_BASE();
};
#endif //__DIALOG_LIB_EDIT_TEXT_BASE_H__
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