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
00026
00027
00028 #ifndef SCROLLERTHEME_H
00029 #define SCROLLERTHEME_H
00030
00031 #include ".\ComponentTheme.h"
00032 #include "..\..\event\MouseListener.h"
00033 #include "..\..\util\GradientColor.h"
00034 #include "..\..\util\Rectangle.h"
00035
00036 namespace ui
00037 {
00038 namespace theme
00039 {
00040 namespace defaulttheme
00041 {
00042 class ScrollerTheme : public ComponentTheme, public event::MouseAdapter
00043 {
00044 public:
00045 ScrollerTheme();
00046 ~ScrollerTheme();
00047 void installTheme(Component *comp);
00048 void deinstallTheme(Component *comp);
00049 void paint(Graphics& g,Component *comp);
00050 const util::Dimension getPreferredSize(const Component *comp) const;
00051
00052 private:
00053 void mousePressed(const event::MouseEvent &e);
00054 void mouseReleased(const event::MouseEvent &e);
00055 void mouseMotion(const event::MouseEvent &e);
00056 void paintKnob(Graphics &g, int x, int y, int width, int height, bool dragging, int orientation);
00057 util::Color raisedShadow;
00058 util::Color raisedHighlight;
00059 util::GradientColor backgroundRaisedHorizontal;
00060 util::GradientColor backgroundLoweredHorizontal;
00061 util::GradientColor backgroundRaisedVertical;
00062 util::GradientColor backgroundLoweredVertical;
00063 util::Dimension scrollerKnob;
00064 util::Color background;
00065 };
00066 }
00067 }
00068 }
00069
00070 #endif