[1809] | 1 | /************************************************************************
|
---|
| 2 | filename: CEGUIScheme_xmlHandler.h
|
---|
| 3 | created: 21/2/2004
|
---|
| 4 | author: Paul D Turner
|
---|
| 5 |
|
---|
| 6 | purpose: Defines abstract base class for the GUI Scheme object.
|
---|
| 7 | *************************************************************************/
|
---|
| 8 | /*************************************************************************
|
---|
| 9 | Crazy Eddie's GUI System (http://www.cegui.org.uk)
|
---|
| 10 | Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
|
---|
| 11 |
|
---|
| 12 | This library is free software; you can redistribute it and/or
|
---|
| 13 | modify it under the terms of the GNU Lesser General Public
|
---|
| 14 | License as published by the Free Software Foundation; either
|
---|
| 15 | version 2.1 of the License, or (at your option) any later version.
|
---|
| 16 |
|
---|
| 17 | This library is distributed in the hope that it will be useful,
|
---|
| 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | Lesser General Public License for more details.
|
---|
| 21 |
|
---|
| 22 | You should have received a copy of the GNU Lesser General Public
|
---|
| 23 | License along with this library; if not, write to the Free Software
|
---|
| 24 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 25 | *************************************************************************/
|
---|
| 26 | #ifndef _CEGUIScheme_xmlHandler_h_
|
---|
| 27 | #define _CEGUIScheme_xmlHandler_h_
|
---|
| 28 |
|
---|
| 29 | #include "CEGUIScheme.h"
|
---|
| 30 | #include "CEGUIXMLHandler.h"
|
---|
| 31 |
|
---|
| 32 | // Start of CEGUI namespace section
|
---|
| 33 | namespace CEGUI
|
---|
| 34 | {
|
---|
| 35 |
|
---|
| 36 | /*!
|
---|
| 37 | \brief
|
---|
| 38 | Handler class used to parse the Scheme XML files using SAX2
|
---|
| 39 | */
|
---|
| 40 | class Scheme_xmlHandler : public XMLHandler
|
---|
| 41 | {
|
---|
| 42 | public:
|
---|
| 43 | /*************************************************************************
|
---|
| 44 | Construction & Destruction
|
---|
| 45 | *************************************************************************/
|
---|
| 46 | /*!
|
---|
| 47 | \brief
|
---|
| 48 | Constructor for Scheme::xmlHandler objects
|
---|
| 49 |
|
---|
| 50 | \param scheme
|
---|
| 51 | Pointer to the Scheme object creating this xmlHandler object
|
---|
| 52 | */
|
---|
| 53 | Scheme_xmlHandler(Scheme* scheme) : d_scheme(scheme)
|
---|
| 54 | {}
|
---|
| 55 |
|
---|
| 56 | /*!
|
---|
| 57 | \brief
|
---|
| 58 | Destructor for Scheme::xmlHandler objects
|
---|
| 59 | */
|
---|
| 60 | virtual ~Scheme_xmlHandler(void)
|
---|
| 61 | {}
|
---|
| 62 |
|
---|
| 63 | /*************************************************************************
|
---|
| 64 | SAX2 Handler overrides
|
---|
| 65 | *************************************************************************/
|
---|
| 66 | /*!
|
---|
| 67 | \brief
|
---|
| 68 | document processing (only care about elements, schema validates format)
|
---|
| 69 | */
|
---|
| 70 | virtual void elementStart(const String& element, const XMLAttributes& attributes);
|
---|
| 71 | virtual void elementEnd(const String& element);
|
---|
| 72 |
|
---|
| 73 | private:
|
---|
| 74 | /*************************************************************************
|
---|
| 75 | Implementation Constants
|
---|
| 76 | *************************************************************************/
|
---|
| 77 | // XML related strings
|
---|
| 78 | static const String GUISchemeElement; //!< Root GUIScheme element.
|
---|
| 79 | static const String ImagesetElement; //!< Element specifying an Imageset
|
---|
| 80 | static const String ImagesetFromImageElement; //!< Element specifying an Imageset to be created directly via an image file.
|
---|
| 81 | static const String FontElement; //!< Element specifying a Font
|
---|
| 82 | static const String WindowSetElement; //!< Element specifying a module and set of WindowFactory elements.
|
---|
| 83 | static const String WindowFactoryElement; //!< Element specifying a WindowFactory type.
|
---|
| 84 | static const String WindowAliasElement; //!< Element specifying a WindowFactory type alias
|
---|
| 85 | static const String FalagardMappingElement; //!< Element specifying a Falagard window mapping
|
---|
| 86 | static const String LookNFeelElement; //!< Element specifying a LookNFeel.
|
---|
| 87 | static const String NameAttribute; //!< Attribute specifying the name of some object.
|
---|
| 88 | static const String FilenameAttribute; //!< Attribute specifying the name of some file.
|
---|
| 89 | static const String AliasAttribute; //!< Attribute specifying an alias name.
|
---|
| 90 | static const String TargetAttribute; //!< Attribute specifying target for an alias.
|
---|
| 91 | static const String ResourceGroupAttribute; //!< Attribute specifying resource group for some loadable resource.
|
---|
| 92 | static const String WindowTypeAttribute; //!< Attribute specifying the type of a window being created via a mapping.
|
---|
| 93 | static const String TargetTypeAttribute; //!< Attribute specifying the base target type of a falagard mapped window type.
|
---|
| 94 | static const String LookNFeelAttribute; //!< Attribute specifying the name of a LookNFeel for a falagard mapping..
|
---|
| 95 |
|
---|
| 96 |
|
---|
| 97 | /*************************************************************************
|
---|
| 98 | Implementation Data
|
---|
| 99 | *************************************************************************/
|
---|
| 100 | Scheme* d_scheme; //!< Scheme object that we are helping to build
|
---|
| 101 | };
|
---|
| 102 |
|
---|
| 103 | } // End of CEGUI namespace section
|
---|
| 104 |
|
---|
| 105 | #endif // end of guard _CEGUIScheme_xmlHandler_h_
|
---|