Commit b01bcda0 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

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
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -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 )




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;
+118 −111
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// 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!
@@ -9,7 +9,7 @@


///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////


DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
DialogLabelEditor_Base::DialogLabelEditor_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 );
	
	
@@ -39,6 +39,7 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id,
	
	
	bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
	bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
	
	
	
	m_textControlSizer->Add( bSizeText, 1, wxEXPAND, 3 );
	m_textControlSizer->Add( bSizeText, 1, wxEXPAND, 3 );
	
	
	m_SizeTitle = new wxStaticText( this, wxID_ANY, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_SizeTitle = new wxStaticText( this, wxID_ANY, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -55,8 +56,10 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id,
	m_staticSizeUnits->Wrap( -1 );
	m_staticSizeUnits->Wrap( -1 );
	bSizeCtrlSizer->Add( m_staticSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
	bSizeCtrlSizer->Add( m_staticSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
	
	
	
	m_textControlSizer->Add( bSizeCtrlSizer, 1, wxEXPAND, 3 );
	m_textControlSizer->Add( bSizeCtrlSizer, 1, wxEXPAND, 3 );
	
	
	
	bMainSizer->Add( m_textControlSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
	bMainSizer->Add( m_textControlSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
	
	
	wxBoxSizer* m_OptionsSizer;
	wxBoxSizer* m_OptionsSizer;
@@ -80,6 +83,7 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id,
	m_TextShape->SetSelection( 0 );
	m_TextShape->SetSelection( 0 );
	m_OptionsSizer->Add( m_TextShape, 1, wxALL|wxLEFT|wxTOP, 3 );
	m_OptionsSizer->Add( m_TextShape, 1, wxALL|wxLEFT|wxTOP, 3 );
	
	
	
	bMainSizer->Add( m_OptionsSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
	bMainSizer->Add( m_OptionsSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
	
	
	m_sdbSizer1 = new wxStdDialogButtonSizer();
	m_sdbSizer1 = new wxStdDialogButtonSizer();
@@ -88,10 +92,13 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id,
	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
	m_sdbSizer1->Realize();
	m_sdbSizer1->Realize();
	
	bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 12 );
	bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 12 );
	
	
	
	this->SetSizer( bMainSizer );
	this->SetSizer( bMainSizer );
	this->Layout();
	this->Layout();
	bMainSizer->Fit( this );
	
	
	// Connect Events
	// Connect Events
	m_textLabelSingleLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogLabelEditor_Base::OnEnterKey ), NULL, this );
	m_textLabelSingleLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogLabelEditor_Base::OnEnterKey ), NULL, this );
+1012 −692

File changed.

Preview size limit exceeded, changes collapsed.

+71 −69
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// 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/artprov.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>
@@ -27,7 +29,7 @@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DialogLabelEditor_Base
/// Class DialogLabelEditor_Base
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
class DialogLabelEditor_Base : public wxDialog 
class DialogLabelEditor_Base : public DIALOG_SHIM
{
{
	private:
	private:
	
	
@@ -36,7 +38,7 @@ class DialogLabelEditor_Base : public wxDialog
		{
		{
			wxID_VALUESINGLE = 1000,
			wxID_VALUESINGLE = 1000,
			wxID_VALUEMULTI,
			wxID_VALUEMULTI,
			wxID_SIZE,
			wxID_SIZE
		};
		};
		
		
		wxFlexGridSizer* m_textControlSizer;
		wxFlexGridSizer* m_textControlSizer;
@@ -61,9 +63,9 @@ class DialogLabelEditor_Base : public wxDialog
	
	
	public:
	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 );
		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();
		~DialogLabelEditor_Base();
	
	
};
};


#endif //__dialog_edit_label_base__
#endif //__DIALOG_EDIT_LABEL_BASE_H__
+2 −3
Original line number Original line Diff line number Diff line
@@ -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[] = {
 * 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:




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;
Loading