00001 //--------------------------------------------------------------------------- 00002 /// \file CATGuiFactory.h 00003 /// \brief Object factory for creating a GUI from XML 00004 /// \ingroup CATGUI 00005 /// 00006 /// Copyright (c) 2003-2008 by Michael Ellison. 00007 /// See COPYING.txt for the \ref gaslicense License (MIT License). 00008 /// 00009 // $Author: mikeellison $ 00010 // $Date: 2008-01-30 06:11:10 -0600 (Wed, 30 Jan 2008) $ 00011 // $Revision: $ 00012 // $NoKeywords: $ 00013 // 00014 //--------------------------------------------------------------------------- 00015 #ifndef CATGUIFactory_H_ 00016 #define CATGUIFactory_H_ 00017 00018 #include "CATXMLObject.h" 00019 #include "CATXMLFactory.h" 00020 00021 /// \class CATGuiFactory 00022 /// \brief Object factory for creating a GUI from XML 00023 /// \ingroup CATGUI 00024 /// 00025 /// \sa CATXMLParser, CATXMLFactory 00026 class CATGuiFactory : public CATXMLFactory 00027 { 00028 public: 00029 /// CATGuiFactory constructor. 00030 /// 00031 /// CATGuiFactory is an overridden version of CATXMLFactory specifically 00032 /// for creating the GUI framework from an .XML skin. 00033 /// 00034 /// \param skinRoot - the base directory of the skin 00035 /// \param skinPath - full path to the skin 00036 CATGuiFactory(const CATString& skinRoot, const CATString& skinPath); 00037 00038 /// CATGuiFactory destructor 00039 virtual ~CATGuiFactory(); 00040 00041 virtual CATXMLObject* CreateObject( const CATWChar* objectType); 00042 00043 protected: 00044 /// fSkinRoot is the base directory of the skin. This is used 00045 /// to find supporting files referenced by the skin 00046 CATString fSkinRoot; 00047 00048 /// fSkinPath holds the full path for the skin's .XML file. 00049 CATString fSkinPath; 00050 }; 00051 00052 #endif // CATGUIFactory_H_ 00053 00054