00001 #ifndef __CScrollBarImages__ 00002 #define __CScrollBarImages__ 00003 00004 #include "../Graphics/IImage.hpp" 00005 #include "../Graphics/CGraphics.hpp" 00006 00007 // =========================================================================== 00008 00009 using Exponent::GUI::Graphics::CGraphics; 00010 using Exponent::GUI::Graphics::IImage; 00011 00012 // =========================================================================== 00013 00014 namespace Exponent 00015 { 00016 namespace GUI 00017 { 00018 namespace Controls 00019 { 00064 class CScrollBarImages : public CCountedObject 00065 { 00067 EXPONENT_CLASS_DECLARATION; 00070 // =========================================================================== 00071 00072 public: 00073 00074 // =========================================================================== 00075 00079 CScrollBarImages(); 00080 00084 virtual ~CScrollBarImages(); 00085 00086 // =========================================================================== 00087 00091 CScrollBarImages &operator = (const CScrollBarImages &other); 00092 00093 // =========================================================================== 00094 00099 bool isValid(); 00100 00101 // =========================================================================== 00102 00110 bool drawScrollBarImages(CGraphics &graphics, const CRect &area, const bool isVertical); 00111 00112 // =========================================================================== 00113 00121 void setImages(IImage *topCap, IImage *bottomCap, IImage *thumb, IImage *repeat); 00122 00127 IImage *getTopImage() const { return m_topCap; } 00128 00133 IImage *getBottomImage() const { return m_bottomCap; } 00134 00139 IImage *getThumbImage() const { return m_thumb; } 00140 00145 IImage *getRepeatImage() const { return m_repeat; } 00146 00147 // =========================================================================== 00148 00158 void loadFromResourceFolder(const CSystemString &resourceFolder); 00159 00160 // =========================================================================== 00161 00162 protected: 00163 00164 // =========================================================================== 00165 00166 IImage *m_topCap; 00167 IImage *m_bottomCap; 00168 IImage *m_thumb; 00169 IImage *m_repeat; 00170 bool m_isValid; 00171 }; 00172 } 00173 } 00174 } 00175 #endif // End of CScrollBarImages.hpp