Skip to content

Commit

Permalink
New Class Dialog: minor UI updates to the 'Inheritance Dialog'
Browse files Browse the repository at this point in the history
  • Loading branch information
eranif committed Feb 26, 2014
1 parent bcf92d2 commit a0c691b
Show file tree
Hide file tree
Showing 8 changed files with 795 additions and 149 deletions.
2 changes: 0 additions & 2 deletions Gizmos/Gizmos.project
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
<File Name="newclassbasedlg.h"/>
<File Name="newclassdlg.cpp"/>
<File Name="newinheritancedlg.h"/>
<File Name="newinheritancebasedlg.cpp"/>
<File Name="newinheritancebasedlg.h"/>
<File Name="newinheritancedlg.cpp"/>
<File Name="newclasswizard.wxcp"/>
</VirtualDirectory>
Expand Down
72 changes: 72 additions & 0 deletions Gizmos/newclassbasedlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,75 @@ NewClassBaseDlg::~NewClassBaseDlg()
m_buttonOK->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewClassBaseDlg::OnOkUpdateUI), NULL, this);

}

NewIneritanceBaseDlg::NewIneritanceBaseDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxDialog(parent, id, title, pos, size, style)
{
if ( !bBitmapLoaded ) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxC3999InitBitmapResources();
bBitmapLoaded = true;
}

wxBoxSizer* boxSizer10 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(boxSizer10);

wxFlexGridSizer* flexGridSizer12 = new wxFlexGridSizer(0, 3, 0, 0);
flexGridSizer12->SetFlexibleDirection( wxBOTH );
flexGridSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
flexGridSizer12->AddGrowableCol(1);

boxSizer10->Add(flexGridSizer12, 1, wxALL|wxEXPAND, 5);

m_staticText20 = new wxStaticText(this, wxID_ANY, _("Select Parent Class:"), wxDefaultPosition, wxSize(-1,-1), 0);

flexGridSizer12->Add(m_staticText20, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);

m_textCtrlInhertiance = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
m_textCtrlInhertiance->SetToolTip(_("Type the name of the parent class"));
m_textCtrlInhertiance->SetFocus();

flexGridSizer12->Add(m_textCtrlInhertiance, 0, wxALL|wxEXPAND, 5);

m_button24 = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), 0);
m_button24->SetToolTip(_("Click here to open the open resource dialog"));

flexGridSizer12->Add(m_button24, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);

m_staticText26 = new wxStaticText(this, wxID_ANY, _("Inhertiance Access:"), wxDefaultPosition, wxSize(-1,-1), 0);

flexGridSizer12->Add(m_staticText26, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);

wxArrayString m_choiceAccessArr;
m_choiceAccess = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceAccessArr, 0);

flexGridSizer12->Add(m_choiceAccess, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);

m_stdBtnSizer14 = new wxStdDialogButtonSizer();

boxSizer10->Add(m_stdBtnSizer14, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);

m_button16 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_button16->SetDefault();
m_stdBtnSizer14->AddButton(m_button16);

m_button18 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
m_stdBtnSizer14->AddButton(m_button18);
m_stdBtnSizer14->Realize();

SetSizeHints(-1,-1);
if ( GetSizer() ) {
GetSizer()->Fit(this);
}
Centre(wxBOTH);
// Connect events
m_button24->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewIneritanceBaseDlg::OnButtonMore), NULL, this);

}

NewIneritanceBaseDlg::~NewIneritanceBaseDlg()
{
m_button24->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewIneritanceBaseDlg::OnButtonMore), NULL, this);

}
23 changes: 23 additions & 0 deletions Gizmos/newclassbasedlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <wx/checkbox.h>
#include <wx/collpane.h>
#include <wx/listctrl.h>
#include <wx/choice.h>
#include <wx/arrstr.h>

class NewClassBaseDlg : public wxDialog
{
Expand Down Expand Up @@ -76,4 +78,25 @@ class NewClassBaseDlg : public wxDialog
virtual ~NewClassBaseDlg();
};


class NewIneritanceBaseDlg : public wxDialog
{
protected:
wxStaticText* m_staticText20;
wxTextCtrl* m_textCtrlInhertiance;
wxButton* m_button24;
wxStaticText* m_staticText26;
wxChoice* m_choiceAccess;
wxStdDialogButtonSizer* m_stdBtnSizer14;
wxButton* m_button16;
wxButton* m_button18;

protected:
virtual void OnButtonMore(wxCommandEvent& event) { event.Skip(); }

public:
NewIneritanceBaseDlg(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("NewIneritanceDlgBase"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
virtual ~NewIneritanceBaseDlg();
};

#endif
Loading

0 comments on commit a0c691b

Please sign in to comment.