00001
00002
00003
00004
00005 #ifndef __GScrollBar_h
00006 #define __GScrollBar_h
00007
00008 #define SCROLL_BAR_SIZE 15
00009
00014 class LgiClass GScrollBar :
00015 public GControl,
00016 public ResObject
00017 {
00018 friend class GLayout;
00019
00020 protected:
00021 class GScrollBarPrivate *d;
00022
00023 #if WIN32NATIVE
00024 GViewI *GetMyView();
00025 void Update();
00026 void SetParentFlag(bool Bool);
00027 #endif
00028
00029 public:
00031 GScrollBar();
00032
00033 const char *GetClass() { return "GScrollBar"; }
00034
00036 GScrollBar(int id, int x, int y, int cx, int cy, const char *name);
00037 ~GScrollBar();
00038
00040 static int GetScrollSize();
00041
00043 bool Vertical();
00045 void SetVertical(bool v);
00047 int64 Value();
00049 void Value(int64 p);
00051 void Limits(int64 &Low, int64 &High);
00053 void SetLimits(int64 Low, int64 High);
00055 int Page();
00057 void SetPage(int p);
00059 bool Valid();
00060
00061 #if WIN32NATIVE
00062 bool SetPos(GRect &p, bool Repaint = false);
00063 void SetParent(GViewI *p);
00064 bool Invalidate(GRect *r = NULL, bool Repaint = false, bool NonClient = false);
00065 #else
00066 bool Attach(GViewI *p);
00067 void OnPaint(GSurface *pDC);
00068 void OnPosChange();
00069 void OnMouseClick(GMouse &m);
00070 void OnMouseMove(GMouse &m);
00071 bool OnKey(GKey &k);
00072 void OnMouseWheel(double Lines);
00073 void OnPulse();
00074 #endif
00075
00076
00077 int OnEvent(GMessage *Msg);
00078
00080 virtual void OnChange(int Pos) {}
00082 virtual void OnConfigure() {}
00083 };
00084
00085 #endif