Commit b01bcda0 authored by Dick Hollenbeck's avatar Dick Hollenbeck

Backout my usage of DIALOG_EXTEND_WITH_SHIM in favor of wxFormbuilder's

subclass DIALOG_SHIM support.
Tried dialog_drc but it has nesting problems due to use of DRCLISTBOX, which
needs to be put into its own header file to untangle.
parent 31a84b84
...@@ -39,13 +39,12 @@ ...@@ -39,13 +39,12 @@
#include <sch_text.h> #include <sch_text.h>
#include <dialog_edit_label_base.h> #include <dialog_edit_label_base.h>
#include <dialog_helpers.h>
class SCH_EDIT_FRAME; class SCH_EDIT_FRAME;
class SCH_TEXT; class SCH_TEXT;
DIALOG_EXTEND_WITH_SHIM( DialogLabelEditor, DialogLabelEditor_Base ) class DialogLabelEditor : public DialogLabelEditor_Base
{ {
public: public:
DialogLabelEditor( SCH_EDIT_FRAME* parent, SCH_TEXT* aTextItem ); DialogLabelEditor( SCH_EDIT_FRAME* parent, SCH_TEXT* aTextItem );
...@@ -79,7 +78,7 @@ void SCH_EDIT_FRAME::EditSchematicText( SCH_TEXT* aTextItem ) ...@@ -79,7 +78,7 @@ void SCH_EDIT_FRAME::EditSchematicText( SCH_TEXT* aTextItem )
DialogLabelEditor::DialogLabelEditor( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTextItem ) : DialogLabelEditor::DialogLabelEditor( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTextItem ) :
DialogLabelEditor_Base_SHIM( aParent ) DialogLabelEditor_Base( aParent )
{ {
m_Parent = aParent; m_Parent = aParent;
m_CurrentText = aTextItem; m_CurrentText = aTextItem;
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2010) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_edit_label_base__ #ifndef __DIALOG_EDIT_LABEL_BASE_H__
#define __dialog_edit_label_base__ #define __DIALOG_EDIT_LABEL_BASE_H__
#include <wx/intl.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/string.h> #include <wx/intl.h>
#include <wx/stattext.h> #include "dialog_shim.h"
#include <wx/gdicmn.h> #include <wx/string.h>
#include <wx/font.h> #include <wx/stattext.h>
#include <wx/colour.h> #include <wx/gdicmn.h>
#include <wx/settings.h> #include <wx/font.h>
#include <wx/textctrl.h> #include <wx/colour.h>
#include <wx/sizer.h> #include <wx/settings.h>
#include <wx/radiobox.h> #include <wx/textctrl.h>
#include <wx/button.h> #include <wx/sizer.h>
#include <wx/dialog.h> #include <wx/radiobox.h>
#include <wx/button.h>
/////////////////////////////////////////////////////////////////////////// #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/// Class DialogLabelEditor_Base
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DialogLabelEditor_Base : public wxDialog /// Class DialogLabelEditor_Base
{ ///////////////////////////////////////////////////////////////////////////////
private: class DialogLabelEditor_Base : public DIALOG_SHIM
{
protected: private:
enum
{ protected:
wxID_VALUESINGLE = 1000, enum
wxID_VALUEMULTI, {
wxID_SIZE, wxID_VALUESINGLE = 1000,
}; wxID_VALUEMULTI,
wxID_SIZE
wxFlexGridSizer* m_textControlSizer; };
wxStaticText* m_staticText1;
wxTextCtrl* m_textLabelSingleLine; wxFlexGridSizer* m_textControlSizer;
wxTextCtrl* m_textLabelMultiLine; wxStaticText* m_staticText1;
wxStaticText* m_SizeTitle; wxTextCtrl* m_textLabelSingleLine;
wxTextCtrl* m_TextSize; wxTextCtrl* m_textLabelMultiLine;
wxStaticText* m_staticSizeUnits; wxStaticText* m_SizeTitle;
wxRadioBox* m_TextOrient; wxTextCtrl* m_TextSize;
wxRadioBox* m_TextStyle; wxStaticText* m_staticSizeUnits;
wxRadioBox* m_TextShape; wxRadioBox* m_TextOrient;
wxStdDialogButtonSizer* m_sdbSizer1; wxRadioBox* m_TextStyle;
wxButton* m_sdbSizer1OK; wxRadioBox* m_TextShape;
wxButton* m_sdbSizer1Cancel; wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
// Virtual event handlers, overide them in your derived class wxButton* m_sdbSizer1Cancel;
virtual void OnEnterKey( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnEnterKey( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
DialogLabelEditor_Base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 359,347 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); public:
~DialogLabelEditor_Base();
DialogLabelEditor_Base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
}; ~DialogLabelEditor_Base();
#endif //__dialog_edit_label_base__ };
#endif //__DIALOG_EDIT_LABEL_BASE_H__
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include <class_board.h> #include <class_board.h>
#include <class_module.h> #include <class_module.h>
#include <dialog_helpers.h>
#include <dialog_pad_properties_base.h> #include <dialog_pad_properties_base.h>
#include <html_messagebox.h> #include <html_messagebox.h>
...@@ -83,7 +82,7 @@ static long Std_Pad_Layers[] = { ...@@ -83,7 +82,7 @@ static long Std_Pad_Layers[] = {
* class DIALOG_PAD_PROPERTIES, derived from DIALOG_PAD_PROPERTIES_BASE, * class DIALOG_PAD_PROPERTIES, derived from DIALOG_PAD_PROPERTIES_BASE,
* created by wxFormBuilder * created by wxFormBuilder
*/ */
DIALOG_EXTEND_WITH_SHIM( DIALOG_PAD_PROPERTIES, DIALOG_PAD_PROPERTIES_BASE ) class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
{ {
public: public:
DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ); DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad );
...@@ -133,7 +132,7 @@ private: ...@@ -133,7 +132,7 @@ private:
DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ) : DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ) :
DIALOG_PAD_PROPERTIES_BASE_SHIM( aParent ), DIALOG_PAD_PROPERTIES_BASE( aParent ),
m_Pad_Master( aParent->GetBoard()->GetDesignSettings().m_Pad_Master ) m_Pad_Master( aParent->GetBoard()->GetDesignSettings().m_Pad_Master )
{ {
m_canUpdate = false; m_canUpdate = false;
......
This diff is collapsed.
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <wxPcbStruct.h> #include <wxPcbStruct.h>
#include <drawtxt.h> #include <drawtxt.h>
#include <confirm.h> #include <confirm.h>
#include <dialog_helpers.h>
#include <class_board.h> #include <class_board.h>
#include <class_pcb_text.h> #include <class_pcb_text.h>
...@@ -47,9 +46,7 @@ class PCB_EDIT_FRAME; ...@@ -47,9 +46,7 @@ class PCB_EDIT_FRAME;
class TEXTE_PCB; class TEXTE_PCB;
/// Implement DIALOG_PCB_TEXT_PROPERTIES_BASE with interposing class DIALOG_PCB_TEXT_PROPERTIES : public DIALOG_PCB_TEXT_PROPERTIES_BASE
/// DIALOG_PCB_TEXT_PROPERTIES_BASE_SHIM class
DIALOG_EXTEND_WITH_SHIM( DIALOG_PCB_TEXT_PROPERTIES, DIALOG_PCB_TEXT_PROPERTIES_BASE )
{ {
public: public:
DIALOG_PCB_TEXT_PROPERTIES( PCB_EDIT_FRAME* parent, TEXTE_PCB* passedTextPCB, wxDC* DC ); DIALOG_PCB_TEXT_PROPERTIES( PCB_EDIT_FRAME* parent, TEXTE_PCB* passedTextPCB, wxDC* DC );
...@@ -78,7 +75,7 @@ private: ...@@ -78,7 +75,7 @@ private:
DIALOG_PCB_TEXT_PROPERTIES::DIALOG_PCB_TEXT_PROPERTIES( PCB_EDIT_FRAME* parent, DIALOG_PCB_TEXT_PROPERTIES::DIALOG_PCB_TEXT_PROPERTIES( PCB_EDIT_FRAME* parent,
TEXTE_PCB* passedTextPCB, wxDC* DC ) TEXTE_PCB* passedTextPCB, wxDC* DC )
: DIALOG_PCB_TEXT_PROPERTIES_BASE_SHIM( parent ) : DIALOG_PCB_TEXT_PROPERTIES_BASE( parent )
{ {
m_Parent = parent; m_Parent = parent;
m_DC = DC; m_DC = DC;
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011) // C++ code generated with wxFormBuilder (version Mar 19 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_PCB_TEXT_PROPERTIES_BASE_H__ #ifndef __DIALOG_PCB_TEXT_PROPERTIES_BASE_H__
#define __DIALOG_PCB_TEXT_PROPERTIES_BASE_H__ #define __DIALOG_PCB_TEXT_PROPERTIES_BASE_H__
#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 <wx/string.h> #include "dialog_shim.h"
#include <wx/stattext.h> #include <wx/string.h>
#include <wx/gdicmn.h> #include <wx/stattext.h>
#include <wx/font.h> #include <wx/gdicmn.h>
#include <wx/colour.h> #include <wx/font.h>
#include <wx/settings.h> #include <wx/colour.h>
#include <wx/textctrl.h> #include <wx/settings.h>
#include <wx/sizer.h> #include <wx/textctrl.h>
#include <wx/choice.h> #include <wx/sizer.h>
#include <wx/button.h> #include <wx/choice.h>
#include <wx/dialog.h> #include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PCB_TEXT_PROPERTIES_BASE ///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_PCB_TEXT_PROPERTIES_BASE
class DIALOG_PCB_TEXT_PROPERTIES_BASE : public wxDialog ///////////////////////////////////////////////////////////////////////////////
{ class DIALOG_PCB_TEXT_PROPERTIES_BASE : public DIALOG_SHIM
private: {
private:
protected:
wxStaticText* m_TextLabel; protected:
wxTextCtrl* m_TextContentCtrl; wxStaticText* m_TextLabel;
wxStaticText* m_SizeXLabel; wxTextCtrl* m_TextContentCtrl;
wxTextCtrl* m_SizeXCtrl; wxStaticText* m_SizeXLabel;
wxStaticText* m_SizeYLabel; wxTextCtrl* m_SizeXCtrl;
wxTextCtrl* m_SizeYCtrl; wxStaticText* m_SizeYLabel;
wxStaticText* m_ThicknessLabel; wxTextCtrl* m_SizeYCtrl;
wxTextCtrl* m_ThicknessCtrl; wxStaticText* m_ThicknessLabel;
wxStaticText* m_PositionXLabel; wxTextCtrl* m_ThicknessCtrl;
wxTextCtrl* m_PositionXCtrl; wxStaticText* m_PositionXLabel;
wxStaticText* m_PositionYLabel; wxTextCtrl* m_PositionXCtrl;
wxTextCtrl* m_PositionYCtrl; wxStaticText* m_PositionYLabel;
wxStaticText* m_LayerLabel; wxTextCtrl* m_PositionYCtrl;
wxChoice* m_LayerSelectionCtrl; wxStaticText* m_LayerLabel;
wxStaticText* m_staticText8; wxChoice* m_LayerSelectionCtrl;
wxChoice* m_OrientationCtrl; wxStaticText* m_staticText8;
wxStaticText* m_staticText9; wxChoice* m_OrientationCtrl;
wxChoice* m_StyleCtrl; wxStaticText* m_staticText9;
wxStaticText* m_staticText10; wxChoice* m_StyleCtrl;
wxChoice* m_DisplayCtrl; wxStaticText* m_staticText10;
wxStaticText* m_staticText11; wxChoice* m_DisplayCtrl;
wxChoice* m_justifyChoice; wxStaticText* m_staticText11;
wxStdDialogButtonSizer* m_StandardSizer; wxChoice* m_justifyChoice;
wxButton* m_StandardSizerOK; wxStdDialogButtonSizer* m_StandardSizer;
wxButton* m_StandardSizerCancel; wxButton* m_StandardSizerOK;
wxButton* m_StandardSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
public:
DIALOG_PCB_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 433,465 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_PCB_TEXT_PROPERTIES_BASE(); DIALOG_PCB_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 433,465 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_PCB_TEXT_PROPERTIES_BASE();
};
};
#endif //__DIALOG_PCB_TEXT_PROPERTIES_BASE_H__
#endif //__DIALOG_PCB_TEXT_PROPERTIES_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