00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef BUILDER_HPP
00026 #define BUILDER_HPP
00027
00028 #include "builder_data.hpp"
00029 #include "../src/os_graphics.hpp"
00030 #include "../src/generic_window.hpp"
00031 #include "../src/generic_layout.hpp"
00032 #include "../src/generic_bitmap.hpp"
00033 #include "../src/generic_font.hpp"
00034 #include "../commands/cmd_generic.hpp"
00035 #include "../controls/ctrl_generic.hpp"
00036 #include "../utils/bezier.hpp"
00037
00038 #include <string>
00039 #include <list>
00040 #include <map>
00041
00042 class Theme;
00043
00044
00046 class Builder: public SkinObject
00047 {
00048 public:
00049 Builder( intf_thread_t *pIntf, const BuilderData &rData );
00050 virtual ~Builder();
00051
00054 Theme *build();
00055
00057 CmdGeneric *parseAction( const string &rAction );
00058
00059 private:
00061 const BuilderData &m_rData;
00062
00064 Theme *m_pTheme;
00065
00066 void addTheme( const BuilderData::Theme &rData );
00067 void addBitmap( const BuilderData::Bitmap &rData );
00068 void addBitmapFont( const BuilderData::BitmapFont &rData );
00069 void addFont( const BuilderData::Font &rData );
00070 void addWindow( const BuilderData::Window &rData );
00071 void addLayout( const BuilderData::Layout &rData );
00072 void addAnchor( const BuilderData::Anchor &rData );
00073 void addButton( const BuilderData::Button &rData );
00074 void addCheckbox( const BuilderData::Checkbox &rData );
00075 void addImage( const BuilderData::Image &rData );
00076 void addText( const BuilderData::Text &rData );
00077 void addRadialSlider( const BuilderData::RadialSlider &rData );
00078 void addSlider( const BuilderData::Slider &rData );
00079 void addList( const BuilderData::List &rData );
00080 void addTree( const BuilderData::Tree &rData );
00081 void addVideo( const BuilderData::Video &rData );
00082
00084 const Position makePosition( const string &rLeftTop,
00085 const string &rRightBottom,
00086 int xPos, int yPos, int width, int height,
00087 const Box &rBox ) const;
00088
00090 GenericFont *getFont( const string &fontId );
00091
00093 Bezier *getPoints( const char *pTag ) const;
00094
00096 image_handler_t *m_pImageHandler;
00097 };
00098
00099 #endif
00100