Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_Scroll.h

00001 /*
00002  * $Id: Fl_Scroll.h,v 1.5 2003/04/01 16:39:03 parshin Exp $
00003  *
00004  * Extended Fast Light Toolkit (EFLTK)
00005  * Copyright (C) 2002-2003 by EDE-Team
00006  * WWW: http://www.sourceforge.net/projects/ede
00007  *
00008  * Fast Light Toolkit (FLTK)
00009  * Copyright (C) 1998-2003 by Bill Spitzak and others.
00010  * WWW: http://www.fltk.org
00011  *
00012  * This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00013  * version 2. See COPYING for details.
00014  *
00015  * Author : Mikko Lahteenmaki
00016  * Email  : mikko@fltk.net
00017  *
00018  * Please report all bugs and problems to "efltk-bugs@fltk.net"
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 { // values for type()
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

Generated on Thu Jul 31 15:33:45 2003 for eFLTK by doxygen1.2.15