1 /////////////////////////////////////////////////////////////////////////////// 2 // 3 // wxFormBuilder - A Visual Dialog Editor for wxWidgets. 4 // Copyright (C) 2005 José Antonio Hurtado 5 // 6 // This program is free software; you can redistribute it and/or 7 // modify it under the terms of the GNU General Public License 8 // as published by the Free Software Foundation; either version 2 9 // of the License, or (at your option) any later version. 10 // 11 // This program is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 // GNU General Public License for more details. 15 // 16 // You should have received a copy of the GNU General Public License 17 // along with this program; if not, write to the Free Software 18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 // 20 // Written by 21 // Ryan Mulder - rjmyst3@gmail.com 22 // 23 /////////////////////////////////////////////////////////////////////////////// 24 #ifndef WXFBDEFS_H 25 #define WXFBDEFS_H 26 27 #include <boost/smart_ptr.hpp> 28 #include <map> 29 #include <vector> 30 #include <wx/string.h> 31 32 class ObjectBase; 33 class ObjectInfo; 34 class ObjectPackage; 35 class Property; 36 class PropertyInfo; 37 class OptionList; 38 class CodeInfo; 39 class EventInfo; 40 class Event; 41 class PropertyCategory; 42 class wxFBManager; 43 class CodeWriter; 44 class TemplateParser; 45 class TCCodeWriter; 46 class StringCodeWriter; 47 48 // Let's go with a few typedefs for frequently used types, 49 // please use it, code will be cleaner and easier to read. 50 51 typedef boost::shared_ptr<OptionList> POptionList; 52 typedef boost::shared_ptr<ObjectBase> PObjectBase; 53 typedef boost::weak_ptr<ObjectBase> WPObjectBase; 54 typedef boost::shared_ptr<ObjectPackage> PObjectPackage; 55 typedef boost::weak_ptr<ObjectPackage> WPObjectPackage; 56 57 typedef boost::shared_ptr<CodeInfo> PCodeInfo; 58 typedef boost::shared_ptr<ObjectInfo> PObjectInfo; 59 typedef boost::shared_ptr<Property> PProperty; 60 typedef boost::shared_ptr<PropertyInfo> PPropertyInfo; 61 typedef boost::shared_ptr<EventInfo> PEventInfo; 62 typedef boost::shared_ptr<Event> PEvent; 63 typedef boost::shared_ptr<PropertyCategory> PPropertyCategory; 64 65 typedef std::map<wxString, PPropertyInfo> PropertyInfoMap; 66 typedef std::map<wxString, PObjectInfo> ObjectInfoMap; 67 typedef std::map<wxString, PEventInfo> EventInfoMap; 68 typedef std::map<wxString, PProperty> PropertyMap; 69 typedef std::map<wxString, PEvent> EventMap; 70 71 72 typedef std::vector<PObjectBase> ObjectBaseVector; 73 typedef std::vector<PEvent> EventVector; 74 75 typedef boost::shared_ptr<wxFBManager> PwxFBManager; 76 typedef boost::shared_ptr<CodeWriter> PCodeWriter; 77 typedef boost::shared_ptr<TemplateParser> PTemplateParser; 78 typedef boost::shared_ptr<TCCodeWriter> PTCCodeWriter; 79 typedef boost::shared_ptr<StringCodeWriter> PStringCodeWriter; 80 81 // Flatnotebook styles are stored in config, if style #defines change, or config is manually modified, these style overrides still apply 82 #define FNB_STYLE_OVERRIDES( x ) ( x | wxFNB_CUSTOM_DLG | wxFNB_NO_X_BUTTON ) & ( ~wxFNB_X_ON_TAB & ~wxFNB_MOUSE_MIDDLE_CLOSES_TABS & ~wxFNB_DCLICK_CLOSES_TABS & ~wxFNB_ALLOW_FOREIGN_DND ) 83 84 #endif //WXFBDEFS_H 85