diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-06-28 15:25:39 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-06-28 15:25:39 +0000 |
| commit | 9102febc37475af113681eaaee02ecc2ea04b4da (patch) | |
| tree | ad08b65668913258d28022f79b202ceaeddfb7c8 /pokemodr/gui/menuEntry.cpp | |
| parent | 5c3ca621f75587173bab3d946aee81dd2d36f495 (diff) | |
| download | sigen-9102febc37475af113681eaaee02ecc2ea04b4da.tar.gz sigen-9102febc37475af113681eaaee02ecc2ea04b4da.tar.xz sigen-9102febc37475af113681eaaee02ecc2ea04b4da.zip | |
Minor various fixes, Dialog validation started, GUI fixes, String methods added
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@21 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/gui/menuEntry.cpp')
| -rw-r--r-- | pokemodr/gui/menuEntry.cpp | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/pokemodr/gui/menuEntry.cpp b/pokemodr/gui/menuEntry.cpp index 9ac8940a..7256bd7a 100644 --- a/pokemodr/gui/menuEntry.cpp +++ b/pokemodr/gui/menuEntry.cpp @@ -58,13 +58,13 @@ IMPLEMENT_DYNAMIC_CLASS( MenuItemPanel, wxPanel ) BEGIN_EVENT_TABLE( MenuItemPanel, wxPanel ) ////@begin MenuItemPanel event table entries - EVT_INIT_DIALOG( MenuItemPanel::OnInitDialog ) + EVT_INIT_DIALOG( MenuItemPanel::OnInitDialog ) - EVT_BUTTON( ID_DELETE, MenuItemPanel::OnDeleteClick ) + EVT_BUTTON( ID_DELETE, MenuItemPanel::OnDeleteClick ) - EVT_BUTTON( ID_MOVE_UP, MenuItemPanel::OnMoveUpClick ) + EVT_BUTTON( ID_MOVE_UP, MenuItemPanel::OnMoveUpClick ) - EVT_BUTTON( ID_MOVE_DOWN, MenuItemPanel::OnMoveDownClick ) + EVT_BUTTON( ID_MOVE_DOWN, MenuItemPanel::OnMoveDownClick ) ////@end MenuItemPanel event table entries @@ -92,13 +92,13 @@ MenuItemPanel::MenuItemPanel( wxWindow* parent, wxWindowID id, const wxPoint& po bool MenuItemPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) { ////@begin MenuItemPanel creation - wxPanel::Create( parent, id, pos, size, style ); + wxPanel::Create( parent, id, pos, size, style ); - CreateControls(); - if (GetSizer()) - { - GetSizer()->SetSizeHints(this); - } + CreateControls(); + if (GetSizer()) + { + GetSizer()->SetSizeHints(this); + } ////@end MenuItemPanel creation return true; } @@ -120,8 +120,8 @@ MenuItemPanel::~MenuItemPanel() void MenuItemPanel::Init() { ////@begin MenuItemPanel member initialisation - m_Option = NULL; - m_Dialog = NULL; + m_Option = NULL; + m_Dialog = NULL; ////@end MenuItemPanel member initialisation } /*! @@ -131,59 +131,59 @@ void MenuItemPanel::Init() void MenuItemPanel::CreateControls() { ////@begin MenuItemPanel content construction - MenuItemPanel* itemPanel1 = this; + MenuItemPanel* itemPanel1 = this; - wxStaticBox* itemStaticBoxSizer2Static = new wxStaticBox(itemPanel1, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer2 = new wxStaticBoxSizer(itemStaticBoxSizer2Static, wxVERTICAL); - itemPanel1->SetSizer(itemStaticBoxSizer2); + wxStaticBox* itemStaticBoxSizer2Static = new wxStaticBox(itemPanel1, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer2 = new wxStaticBoxSizer(itemStaticBoxSizer2Static, wxVERTICAL); + itemPanel1->SetSizer(itemStaticBoxSizer2); - wxStaticBox* itemStaticBoxSizer3Static = new wxStaticBox(itemPanel1, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer3 = new wxStaticBoxSizer(itemStaticBoxSizer3Static, wxHORIZONTAL); - itemStaticBoxSizer2->Add(itemStaticBoxSizer3, 0, wxGROW, 5); + wxStaticBox* itemStaticBoxSizer3Static = new wxStaticBox(itemPanel1, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer3 = new wxStaticBoxSizer(itemStaticBoxSizer3Static, wxHORIZONTAL); + itemStaticBoxSizer2->Add(itemStaticBoxSizer3, 0, wxGROW, 5); - wxStaticText* itemStaticText4 = new wxStaticText( itemPanel1, wxID_STATIC, _("Option:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); + wxStaticText* itemStaticText4 = new wxStaticText( itemPanel1, wxID_STATIC, _("Option:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_Option = new wxTextCtrl( itemPanel1, ID_OPTION, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); - if (ShowToolTips()) - m_Option->SetToolTip(_("The name of the option")); - itemStaticBoxSizer3->Add(m_Option, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + m_Option = new wxTextCtrl( itemPanel1, ID_OPTION, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + if (ShowToolTips()) + m_Option->SetToolTip(_("The name of the option")); + itemStaticBoxSizer3->Add(m_Option, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer7Static = new wxStaticBox(itemPanel1, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer7 = new wxStaticBoxSizer(itemStaticBoxSizer7Static, wxHORIZONTAL); - itemStaticBoxSizer2->Add(itemStaticBoxSizer7, 0, wxGROW, 5); + wxStaticBox* itemStaticBoxSizer7Static = new wxStaticBox(itemPanel1, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer7 = new wxStaticBoxSizer(itemStaticBoxSizer7Static, wxHORIZONTAL); + itemStaticBoxSizer2->Add(itemStaticBoxSizer7, 0, wxGROW, 5); - wxStaticText* itemStaticText8 = new wxStaticText( itemPanel1, wxID_STATIC, _("Dialog:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer7->Add(itemStaticText8, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); + wxStaticText* itemStaticText8 = new wxStaticText( itemPanel1, wxID_STATIC, _("Dialog:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer7->Add(itemStaticText8, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer7->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer7->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxString* m_DialogStrings = NULL; - m_Dialog = new wxComboBox( itemPanel1, ID_DIALOG, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_DialogStrings, wxCB_READONLY|wxCB_SORT ); - if (ShowToolTips()) - m_Dialog->SetToolTip(_("The dialog to hand control over to if this option is chosen")); - itemStaticBoxSizer7->Add(m_Dialog, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + wxArrayString m_DialogStrings; + m_Dialog = new wxComboBox( itemPanel1, ID_DIALOG, _T(""), wxDefaultPosition, wxDefaultSize, m_DialogStrings, wxCB_READONLY|wxCB_SORT ); + if (ShowToolTips()) + m_Dialog->SetToolTip(_("The dialog to hand control over to if this option is chosen")); + itemStaticBoxSizer7->Add(m_Dialog, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer11Static = new wxStaticBox(itemPanel1, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer11 = new wxStaticBoxSizer(itemStaticBoxSizer11Static, wxHORIZONTAL); - itemStaticBoxSizer2->Add(itemStaticBoxSizer11, 0, wxGROW, 5); + wxStaticBox* itemStaticBoxSizer11Static = new wxStaticBox(itemPanel1, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer11 = new wxStaticBoxSizer(itemStaticBoxSizer11Static, wxHORIZONTAL); + itemStaticBoxSizer2->Add(itemStaticBoxSizer11, 0, wxGROW, 5); - wxButton* itemButton12 = new wxButton( itemPanel1, ID_DELETE, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); - if (ShowToolTips()) - itemButton12->SetToolTip(_("Delete this menu item")); - itemStaticBoxSizer11->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxButton* itemButton12 = new wxButton( itemPanel1, ID_DELETE, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + if (ShowToolTips()) + itemButton12->SetToolTip(_("Delete this menu item")); + itemStaticBoxSizer11->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxButton* itemButton13 = new wxButton( itemPanel1, ID_MOVE_UP, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 ); - if (ShowToolTips()) - itemButton13->SetToolTip(_("Move this menu item up")); - itemStaticBoxSizer11->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxButton* itemButton13 = new wxButton( itemPanel1, ID_MOVE_UP, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 ); + if (ShowToolTips()) + itemButton13->SetToolTip(_("Move this menu item up")); + itemStaticBoxSizer11->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxButton* itemButton14 = new wxButton( itemPanel1, ID_MOVE_DOWN, _("Move Down"), wxDefaultPosition, wxDefaultSize, 0 ); - if (ShowToolTips()) - itemButton14->SetToolTip(_("Move this menu item down")); - itemStaticBoxSizer11->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxButton* itemButton14 = new wxButton( itemPanel1, ID_MOVE_DOWN, _("Move Down"), wxDefaultPosition, wxDefaultSize, 0 ); + if (ShowToolTips()) + itemButton14->SetToolTip(_("Move this menu item down")); + itemStaticBoxSizer11->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); ////@end MenuItemPanel content construction } @@ -195,8 +195,8 @@ void MenuItemPanel::CreateControls() void MenuItemPanel::OnInitDialog( wxInitDialogEvent& event ) { ////@begin wxEVT_INIT_DIALOG event handler for ID_MENU_ITEM in MenuItemPanel. - // Before editing this code, remove the block markers. - event.Skip(); + // Before editing this code, remove the block markers. + event.Skip(); ////@end wxEVT_INIT_DIALOG event handler for ID_MENU_ITEM in MenuItemPanel. } @@ -207,8 +207,8 @@ void MenuItemPanel::OnInitDialog( wxInitDialogEvent& event ) void MenuItemPanel::OnDeleteClick( wxCommandEvent& event ) { ////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DELETE in MenuItemPanel. - // Before editing this code, remove the block markers. - event.Skip(); + // Before editing this code, remove the block markers. + event.Skip(); ////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DELETE in MenuItemPanel. } @@ -219,8 +219,8 @@ void MenuItemPanel::OnDeleteClick( wxCommandEvent& event ) void MenuItemPanel::OnMoveUpClick( wxCommandEvent& event ) { ////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_MOVE_UP in MenuItemPanel. - // Before editing this code, remove the block markers. - event.Skip(); + // Before editing this code, remove the block markers. + event.Skip(); ////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_MOVE_UP in MenuItemPanel. } @@ -231,8 +231,8 @@ void MenuItemPanel::OnMoveUpClick( wxCommandEvent& event ) void MenuItemPanel::OnMoveDownClick( wxCommandEvent& event ) { ////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_MOVE_DOWN in MenuItemPanel. - // Before editing this code, remove the block markers. - event.Skip(); + // Before editing this code, remove the block markers. + event.Skip(); ////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_MOVE_DOWN in MenuItemPanel. } @@ -253,8 +253,8 @@ wxBitmap MenuItemPanel::GetBitmapResource( const wxString& name ) { // Bitmap retrieval ////@begin MenuItemPanel bitmap retrieval - wxUnusedVar(name); - return wxNullBitmap; + wxUnusedVar(name); + return wxNullBitmap; ////@end MenuItemPanel bitmap retrieval } @@ -266,7 +266,7 @@ wxIcon MenuItemPanel::GetIconResource( const wxString& name ) { // Icon retrieval ////@begin MenuItemPanel icon retrieval - wxUnusedVar(name); - return wxNullIcon; + wxUnusedVar(name); + return wxNullIcon; ////@end MenuItemPanel icon retrieval } |
