Loading eeschema/dialog_edit_label.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,24 @@ #include "general.h" #include "dialog_edit_label.h" int DialogLabelEditor::ShowModally( WinEDA_SchematicFrame* parent, SCH_TEXT * CurrentText ) { int ret; DialogLabelEditor* dialog = new DialogLabelEditor( parent, CurrentText ); // doing any post construction resizing is better done here than in // OnInitDialog() since it tends to flash/redraw the dialog less. dialog->init(); ret = dialog->ShowModal(); dialog->Destroy(); return ret; } DialogLabelEditor::DialogLabelEditor( WinEDA_SchematicFrame* parent, SCH_TEXT* CurrentText ) : DialogLabelEditor_Base( parent ) { Loading @@ -25,7 +43,7 @@ DialogLabelEditor::DialogLabelEditor( WinEDA_SchematicFrame* parent, SCH_TEXT* C } void DialogLabelEditor::OnInitDialog( wxInitDialogEvent& event ) void DialogLabelEditor::init() { wxString msg; Loading eeschema/dialog_edit_label.h +20 −4 Original line number Diff line number Diff line Loading @@ -16,9 +16,25 @@ private: WinEDA_SchematicFrame * m_Parent; SCH_TEXT * m_CurrentText; public: void init(); protected: // these are protected so that the static ShowModally() gets used. DialogLabelEditor( WinEDA_SchematicFrame* parent, SCH_TEXT * CurrentText); ~DialogLabelEditor(){}; public: /** * Function ShowModally * is a static function that constructs and then displays one of these dialogs. * @param parent * @param CurrentText is one of several classes derived from SCH_TEXT * @return int - the result Dialog::ShowModal() */ static int ShowModally( WinEDA_SchematicFrame* parent, SCH_TEXT * CurrentText ); private: void OnInitDialog( wxInitDialogEvent& event ); void OnButtonOKClick( wxCommandEvent& event ); Loading eeschema/dialog_edit_label_base.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,6 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id, this->Layout(); // Connect Events this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogLabelEditor_Base::OnInitDialog ) ); m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnButtonOKClick ), NULL, this ); m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnButtonCANCEL_Click ), NULL, this ); } Loading @@ -90,7 +89,6 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id, DialogLabelEditor_Base::~DialogLabelEditor_Base() { // Disconnect Events this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogLabelEditor_Base::OnInitDialog ) ); m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnButtonOKClick ), NULL, this ); m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnButtonCANCEL_Click ), NULL, this ); } eeschema/dialog_edit_label_base.fbp +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ <event name="OnHibernate"></event> <event name="OnIconize"></event> <event name="OnIdle"></event> <event name="OnInitDialog">OnInitDialog</event> <event name="OnInitDialog"></event> <event name="OnKeyDown"></event> <event name="OnKeyUp"></event> <event name="OnKillFocus"></event> Loading eeschema/dialog_edit_label_base.h +0 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ class DialogLabelEditor_Base : public wxDialog wxButton* m_buttonCANCEL; // Virtual event handlers, overide them in your derived class virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } virtual void OnButtonOKClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnButtonCANCEL_Click( wxCommandEvent& event ){ event.Skip(); } Loading Loading
eeschema/dialog_edit_label.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,24 @@ #include "general.h" #include "dialog_edit_label.h" int DialogLabelEditor::ShowModally( WinEDA_SchematicFrame* parent, SCH_TEXT * CurrentText ) { int ret; DialogLabelEditor* dialog = new DialogLabelEditor( parent, CurrentText ); // doing any post construction resizing is better done here than in // OnInitDialog() since it tends to flash/redraw the dialog less. dialog->init(); ret = dialog->ShowModal(); dialog->Destroy(); return ret; } DialogLabelEditor::DialogLabelEditor( WinEDA_SchematicFrame* parent, SCH_TEXT* CurrentText ) : DialogLabelEditor_Base( parent ) { Loading @@ -25,7 +43,7 @@ DialogLabelEditor::DialogLabelEditor( WinEDA_SchematicFrame* parent, SCH_TEXT* C } void DialogLabelEditor::OnInitDialog( wxInitDialogEvent& event ) void DialogLabelEditor::init() { wxString msg; Loading
eeschema/dialog_edit_label.h +20 −4 Original line number Diff line number Diff line Loading @@ -16,9 +16,25 @@ private: WinEDA_SchematicFrame * m_Parent; SCH_TEXT * m_CurrentText; public: void init(); protected: // these are protected so that the static ShowModally() gets used. DialogLabelEditor( WinEDA_SchematicFrame* parent, SCH_TEXT * CurrentText); ~DialogLabelEditor(){}; public: /** * Function ShowModally * is a static function that constructs and then displays one of these dialogs. * @param parent * @param CurrentText is one of several classes derived from SCH_TEXT * @return int - the result Dialog::ShowModal() */ static int ShowModally( WinEDA_SchematicFrame* parent, SCH_TEXT * CurrentText ); private: void OnInitDialog( wxInitDialogEvent& event ); void OnButtonOKClick( wxCommandEvent& event ); Loading
eeschema/dialog_edit_label_base.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,6 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id, this->Layout(); // Connect Events this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogLabelEditor_Base::OnInitDialog ) ); m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnButtonOKClick ), NULL, this ); m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnButtonCANCEL_Click ), NULL, this ); } Loading @@ -90,7 +89,6 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id, DialogLabelEditor_Base::~DialogLabelEditor_Base() { // Disconnect Events this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogLabelEditor_Base::OnInitDialog ) ); m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnButtonOKClick ), NULL, this ); m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnButtonCANCEL_Click ), NULL, this ); }
eeschema/dialog_edit_label_base.fbp +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ <event name="OnHibernate"></event> <event name="OnIconize"></event> <event name="OnIdle"></event> <event name="OnInitDialog">OnInitDialog</event> <event name="OnInitDialog"></event> <event name="OnKeyDown"></event> <event name="OnKeyUp"></event> <event name="OnKillFocus"></event> Loading
eeschema/dialog_edit_label_base.h +0 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ class DialogLabelEditor_Base : public wxDialog wxButton* m_buttonCANCEL; // Virtual event handlers, overide them in your derived class virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } virtual void OnButtonOKClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnButtonCANCEL_Click( wxCommandEvent& event ){ event.Skip(); } Loading