00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _FL_SCROLL_H_
00023 #define _FL_SCROLL_H_
00024
00025 #include "Fl_Group.h"
00026 #include "Fl_Scrollbar.h"
00027
00029 class FL_API Fl_Scroll : public Fl_Group {
00030 Fl_End endgroup;
00031 public:
00033 Fl_Scroll(int X,int Y,int W,int H,const char*l=0);
00034
00036 Fl_Scroll(const char* l = 0,int layout_size=30,Fl_Align layout_al=FL_ALIGN_TOP,int label_w=100);
00037
00038 enum {
00039 HORIZONTAL = 1,
00040 VERTICAL = 2,
00041 BOTH = 3,
00042 ALWAYS_ON = 4,
00043 HORIZONTAL_ALWAYS = 5,
00044 VERTICAL_ALWAYS = 6,
00045 BOTH_ALWAYS = 7
00046 };
00047
00048 virtual int handle(int);
00049 virtual void layout();
00050 virtual void draw();
00051
00053 int xposition() const {return xposition_;}
00054 int yposition() const {return yposition_;}
00055 void position(int, int);
00056
00058 int edge_offset() { return edge_offset_; }
00059 void edge_offset(int v) { edge_offset_ = v; }
00060
00061 void bbox(int&,int&,int&,int&);
00062 Fl_Scrollbar scrollbar;
00063 Fl_Scrollbar hscrollbar;
00064
00065 private:
00066 int edge_offset_;
00067 int xposition_, yposition_;
00068 int layoutdx, layoutdy;
00069 int scrolldx, scrolldy;
00070
00072 void ctor_init();
00073
00074 static void hscrollbar_cb(Fl_Widget*, void*);
00075 static void scrollbar_cb(Fl_Widget*, void*);
00076 static void draw_clip(void*,int,int,int,int);
00077 };
00078
00079 #endif