1 /******************************************************* 2 Copyright (C) 2006 Madhan Kanagavel 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2 of the License, or 7 (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program; if not, write to the Free Software 16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 ********************************************************/ 18 19 #ifndef MM_EX_NEWACCTDIALOG_H_ 20 #define MM_EX_NEWACCTDIALOG_H_ 21 22 #include "model/Model_Account.h" 23 #include "mmtextctrl.h" 24 25 class mmNewAcctDialog : public wxDialog 26 { 27 wxDECLARE_DYNAMIC_CLASS(mmNewAcctDialog); 28 wxDECLARE_EVENT_TABLE(); 29 30 public: 31 mmNewAcctDialog(); 32 mmNewAcctDialog(Model_Account::Data* account, wxWindow* parent); 33 ~mmNewAcctDialog(); 34 35 bool Create(wxWindow* parent 36 , wxWindowID id 37 , const wxString& caption 38 , const wxPoint& pos 39 , const wxSize& size 40 , long style); 41 42 private: 43 void CreateControls(); 44 45 // utility functions 46 void OnOk(wxCommandEvent& event); 47 void OnCancel(wxCommandEvent& event); 48 void OnCurrency(wxCommandEvent& event); 49 void fillControls(void); 50 void OnCustonImage(wxCommandEvent& event); 51 void OnTextEntered(wxCommandEvent& event); 52 void OnAttachments(wxCommandEvent& event); 53 54 void OnImageButton(wxCommandEvent& event); 55 void changeFocus(wxChildFocusEvent& event); 56 57 private: 58 Model_Account::Data* m_account; 59 wxTextCtrl* m_textAccountName; 60 wxTextCtrl* m_notesCtrl; 61 mmTextCtrl* m_itemInitValue; 62 wxImageList* m_imageList; 63 wxBitmapButton* m_bitmapButtons; 64 wxBitmapButton* bAttachments_; 65 wxString m_accessInfo; 66 wxString m_notesLabel; 67 int m_currencyID; 68 bool m_accessChanged; 69 }; 70 71 #endif 72