00001 #ifndef KDE_SCROLLBAR_H
00002 #define KDE_SCROLLBAR_H
00003
00004 #include <faith/widget.h>
00005 #include <faith/application.h>
00006 #include <faith/ui.h>
00007
00008 namespace Faith
00009 {
00010
00011 class FAITH_UI_EXPORT ScrollBar : public Widget
00012 {
00013 K_OBJECT
00014
00015 struct ScrollBarPrivate;
00016 ScrollBarPrivate *d;
00017
00018 void init(int min, int max, Orientation o);
00019
00020 public:
00021 ScrollBar(Faith::Widget *parent, const char *name=0);
00022 ScrollBar(int min, int max, Faith::Widget *parent, const char *name=0);
00023
00024 ScrollBar(Orientation o, Faith::Widget *parent, const char *name=0);
00025 ScrollBar(int min, int max, Orientation o, Faith::Widget *parent, const char *name=0);
00026
00027 ~ScrollBar();
00028
00029 void setRange(int min, int max);
00030
00031 int value() const;
00032
00033 int minValue() const;
00034 int maxValue() const;
00035
00040 int pageStep() const;
00041
00042 Orientation orientation() const;
00043
00044
00045 int sliderStart() const;
00046
00047 virtual void polish(Style *);
00048
00049 public slots:
00050 void scrollTo(int);
00051
00052
00053 signals:
00054 void valueChanged();
00055 void valueChanged(int);
00056 void scrolled(int);
00057 void scrolled();
00058
00059 protected:
00060 void paintEvent(Faith::PaintEvent *e);
00061 void mouseReleaseEvent(Faith::MouseEvent *e);
00062 void mousePressEvent(Faith::MouseEvent *e);
00063 void mouseMoveEvent(Faith::MouseEvent *e);
00064 };
00065
00066
00067 }
00068
00069 #endif