00001 #ifndef T_WXEXT_FRAME_CLASS 00002 #define T_WXEXT_FRAME_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : t_wxext_frame * 00007 * Author : Chris Koeritz * 00008 * Author : Aaron Buchanan * 00009 * * 00010 * Purpose: * 00011 * * 00012 * Defines the application's frame class. This utilizes the * 00013 * t_wxext_frame for its base functionality. * 00014 * * 00015 ******************************************************************************* 00016 * Copyright (c) 1995-$now By Author. This program is free software; you can * 00017 * redistribute it and/or modify it under the terms of the GNU General Public * 00018 * License as published by the Free Software Foundation; either version 2 of * 00019 * the License or (at your option) any later version. This is online at: * 00020 * http://www.fsf.org/copyleft/gpl.html * 00021 * Please send any updates to: fred@gruntose.com * 00022 \*****************************************************************************/ 00023 00024 #include <wx_ext/wx_tiny_shell.h> 00025 00026 class t_wxext_frame : public wx_tiny_shell 00027 { 00028 public: 00029 t_wxext_frame(const istring &window_title, const istring &name_root, 00030 int file_size = int(1.2 * MEGABYTE)); 00031 // constructs a wxFrame window with the "window_title". the 00032 // "name_root" is used as the base part of the config file's name and 00033 // diagnostic output file's name. 00034 virtual ~t_wxext_frame(); 00035 00036 IMPLEMENT_CLASS_NAME("t_wxext_frame"); 00037 00038 // IDs for the controls and the menu commands 00039 enum 00040 { 00041 // it is important for the id corresponding to the "About" command to have 00042 // this standard value as otherwise it won't be handled properly under Mac 00043 // (where it is special and put into the "Apple" menu) 00044 About = wxID_ABOUT, 00045 LOAD_FILE_ITEM = 123, 00046 PICK_FONT_ITEM = 124 00047 //hmmm: fix those randomly chosen number! 00048 }; 00049 00050 virtual int execute() { return 0; } 00051 // forwards the application_base responsibility upwards to derived objects. 00052 00053 protected: 00054 // event handlers (these functions should _not_ be virtual) 00055 void OnAbout(wxCommandEvent &event); 00056 void OnLoadFile(wxCommandEvent &event); 00057 void OnPickFont(wxCommandEvent &event); 00058 00059 private: 00060 istring *_location; // last location where we were browsing for files. 00061 DECLARE_EVENT_TABLE() 00062 }; 00063 00064 #endif 00065
1.5.1