Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

stylemanager_default.h

Go to the documentation of this file.
00001 /*
00002         ClanGUI, copyrights by various people. Have a look in the CREDITS file.
00003         
00004         This sourcecode is distributed using the Library GNU Public Licence,
00005         version 2 or (at your option) any later version. Please read LICENSE
00006         for details.
00007 */
00008 
00010 
00011 #ifndef header_stylemanager_default
00012 #define header_stylemanager_default
00013 
00014 #include "stylemanager.h"
00015 #include "component_options.h"
00016 
00017 class CL_ResourceManager;
00018 class CL_Component;
00019 
00020 enum GUIColor
00021 {
00022         GUICOLOR_SELECTED_OUTLINE,
00023         GUICOLOR_DARK_OUTLINE,
00024         GUICOLOR_DARK_OUTLINE_DISABLED,
00025         GUICOLOR_DARKER_SHADE,
00026         GUICOLOR_MEDIUM_SHADE,
00027         GUICOLOR_BRIGHT_SHADE,
00028         GUICOLOR_BRIGHT_SHADE_DISABLED,
00029         GUICOLOR_DARK_SHADE,
00030         GUICOLOR_DARK_SHADE_DISABLED,
00031         GUICOLOR_WHITE,
00032         GUICOLOR_SELECTION,
00033         GUICOLOR_CARET,
00034         GUICOLOR_SCROLLBAR,
00035         GUICOLOR_BUTTON,
00036         GUICOLOR_BUTTON_DISABLED,
00037         GUICOLOR_BUTTON_TOGGLED,
00038         GUICOLOR_WINDOW_NORMAL,
00039         GUICOLOR_WINDOW_TITLEBAR,
00040         GUICOLOR_PROGRESSBAR,
00041         GUICOLOR_PROGRESSBAR_FILLED
00042 };
00043 
00044 class CL_StyleManager_Default : public CL_StyleManager
00045 //: Style manager that uses the default clanlib gui style.
00046 {
00047 // Construction:
00048 public:
00049         CL_StyleManager_Default(CL_ResourceManager *resources);
00050         virtual ~CL_StyleManager_Default();
00051 
00052 // Attributes:
00053 public:
00054         const std::string &get_default_font() const;
00055 
00056         const std::string &get_combo_normal() const;
00057         const std::string &get_combo_toggled() const;
00058         const std::string &get_combo_disabled() const;
00059 
00060         const std::string &get_checkbox_checked() const;
00061         const std::string &get_checkbox_unchecked() const;
00062         const std::string &get_checkbox_disabled() const;
00063 
00064 // Operations:
00065 public:
00066         void set_default_font(const std::string &font);
00067 
00068         void set_combo_normal(const std::string &normal);
00069         void set_combo_toggled(const std::string &toggled);
00070         void set_combo_disabled(const std::string &disabled);
00071 
00072         void set_checkbox_checked(const std::string &checked);
00073         void set_checkbox_unchecked(const std::string &unchecked);
00074         void set_checkbox_disabled(const std::string &disabled);
00075 
00076         void fill_rect(int x1, int y1, int x2, int y2, GUIColor col);
00077         void draw_rect(int x1, int y1, int x2, int y2, GUIColor col);
00078         void draw_line(int x1, int y1, int x2, int y2, GUIColor col);
00079         void draw_box(int x1, int y1, int x2, int y2, GUIColor topleft, GUIColor bottomright);
00080 
00081 // Overrideables:
00082 public:
00083         virtual CL_Component *create_component(
00084                 const std::string &type,
00085                 const CL_ComponentOptions &options,
00086                 CL_Component *parent);
00087 
00088         virtual void connect_styles(
00089                 const std::string &type,
00090                 const CL_ComponentOptions &options,
00091                 CL_Component *owner);
00092 
00093 // Implementation:
00094 private:
00095         CL_StyleManager_Default(const CL_StyleManager_Default &copy) : CL_StyleManager(NULL) { return; } // disallow copy contruction
00096         class CL_StyleManager_Default_Generic *impl;
00097 };
00098 
00099 #endif

Generated at Wed Apr 4 19:54:04 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001