Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

skin_parser.hpp

00001 /*****************************************************************************
00002  * skin_parser.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2004 the VideoLAN team
00005  * $Id: skin_parser.hpp 12517 2005-09-11 20:03:18Z ipkiss $
00006  *
00007  * Authors: Cyril Deguet     <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef SKIN_PARSER_HPP
00025 #define SKIN_PARSER_HPP
00026 
00027 #include "xmlparser.hpp"
00028 #include "builder_data.hpp"
00029 #include <set>
00030 
00031 
00033 class SkinParser: public XMLParser
00034 {
00035     public:
00036         SkinParser( intf_thread_t *pIntf, const string &rFileName,
00037                     const string &rPath );
00038         virtual ~SkinParser() {}
00039 
00040         const BuilderData &getData() const { return m_data; }
00041 
00042     private:
00044         BuilderData m_data;
00046         string m_curWindowId;
00047         string m_curLayoutId;
00048         string m_curListId;
00049         string m_curTreeId;
00051         int m_xOffset, m_yOffset;
00052         list<int> m_xOffsetList, m_yOffsetList;
00054         int m_curLayer;
00056         set<string> m_idSet;
00058         const string m_path;
00059 
00061         virtual void handleBeginElement( const string &rName,
00062                                          AttrList_t &attr );
00063         virtual void handleEndElement( const string &rName );
00064 
00066 
00067         bool convertBoolean( const char *value ) const;
00068         int convertColor( const char *transcolor ) const;
00069         string convertFileName( const char *fileName ) const;
00072         int convertInRange( const char *value, int minValue, int maxValue,
00073                             const string &rAttribute ) const;
00075 
00077         const string generateId() const;
00078 
00080         const string uniqueId( const string &id );
00081 };
00082 
00083 #endif

Generated on Tue Dec 20 10:14:42 2005 for vlc-0.8.4a by  doxygen 1.4.2