fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

Fl_Scroll.cxx
Go to the documentation of this file.
1 //
2 // "$Id$"
3 //
4 // Scroll widget for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2015 by Bill Spitzak and others.
7 //
8 // This library is free software. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18 
19 #include <FL/Fl.H>
20 #include <FL/Fl_Tiled_Image.H>
21 #include <FL/Fl_Scroll.H>
22 #include <FL/fl_draw.H>
23 
26  // Note: the scrollbars are removed from the group before calling
27  // Fl_Group::clear() to take advantage of the optimized widget removal
28  // and deletion. Finally they are added to Fl_Scroll's group again. This
29  // is MUCH faster than removing the widgets one by one (STR #2409).
30 
34  add(hscrollbar);
35  add(scrollbar);
36 }
37 
40  Fl_Widget** a = (Fl_Widget**)array();
41  if (a[children()-1] != &scrollbar) {
42  int i,j; for (i = j = 0; j < children(); j++)
43  if (a[j] != &hscrollbar && a[j] != &scrollbar) a[i++] = a[j];
44  a[i++] = &hscrollbar;
45  a[i++] = &scrollbar;
46  }
47 }
48 
49 // Draw widget's background and children within a specific clip region
50 // So widget can just redraw damaged parts.
51 //
52 void Fl_Scroll::draw_clip(void* v,int X, int Y, int W, int H) {
53  fl_push_clip(X,Y,W,H);
54  Fl_Scroll* s = (Fl_Scroll*)v;
55  // erase background as needed...
56  switch (s->box()) {
57  case FL_NO_BOX :
58  case FL_UP_FRAME :
59  case FL_DOWN_FRAME :
60  case FL_THIN_UP_FRAME :
61  case FL_THIN_DOWN_FRAME :
62  case FL_ENGRAVED_FRAME :
63  case FL_EMBOSSED_FRAME :
64  case FL_BORDER_FRAME :
65  case _FL_SHADOW_FRAME :
66  case _FL_ROUNDED_FRAME :
67  case _FL_OVAL_FRAME :
70  if (s->parent() == (Fl_Group *)s->window() && Fl::scheme_bg_) {
72  Y-(Y%((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->h()),
73  W+((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->w(),
75  break;
76  }
77 
78  default :
79  fl_color(s->color());
80  fl_rectf(X,Y,W,H);
81  break;
82  }
83  Fl_Widget*const* a = s->array();
84  for (int i=s->children()-2; i--;) {
85  Fl_Widget& o = **a++;
86  s->draw_child(o);
87  s->draw_outside_label(o);
88  }
89  fl_pop_clip();
90 }
91 
103 
104  // inner box of widget (excluding scrollbars)
105  si.innerbox.x = x()+Fl::box_dx(box());
106  si.innerbox.y = y()+Fl::box_dy(box());
107  si.innerbox.w = w()-Fl::box_dw(box());
108  si.innerbox.h = h()-Fl::box_dh(box());
109 
110  // accumulate a bounding box for all the children
111  si.child.l = si.innerbox.x;
112  si.child.r = si.innerbox.x;
113  si.child.b = si.innerbox.y;
114  si.child.t = si.innerbox.y;
115  int first = 1;
116  Fl_Widget*const* a = array();
117  for (int i=children(); i--;) {
118  Fl_Widget* o = *a++;
119  if ( o==&scrollbar || o==&hscrollbar ) continue;
120  if ( first ) {
121  first = 0;
122  si.child.l = o->x();
123  si.child.r = o->x()+o->w();
124  si.child.b = o->y()+o->h();
125  si.child.t = o->y();
126  } else {
127  if (o->x() < si.child.l) si.child.l = o->x();
128  if (o->y() < si.child.t) si.child.t = o->y();
129  if (o->x()+o->w() > si.child.r) si.child.r = o->x()+o->w();
130  if (o->y()+o->h() > si.child.b) si.child.b = o->y()+o->h();
131  }
132  }
133 
134  // Turn the scrollbars on and off as necessary.
135  // See if children would fit if we had no scrollbars...
136  {
137  int X = si.innerbox.x;
138  int Y = si.innerbox.y;
139  int W = si.innerbox.w;
140  int H = si.innerbox.h;
141 
143  si.vneeded = 0;
144  si.hneeded = 0;
145  if (type() & VERTICAL) {
146  if ((type() & ALWAYS_ON) || si.child.t < Y || si.child.b > Y+H) {
147  si.vneeded = 1;
148  W -= si.scrollsize;
149  if (scrollbar.align() & FL_ALIGN_LEFT) X += si.scrollsize;
150  }
151  }
152  if (type() & HORIZONTAL) {
153  if ((type() & ALWAYS_ON) || si.child.l < X || si.child.r > X+W) {
154  si.hneeded = 1;
155  H -= si.scrollsize;
156  if (scrollbar.align() & FL_ALIGN_TOP) Y += si.scrollsize;
157  // recheck vertical since we added a horizontal scrollbar
158  if (!si.vneeded && (type() & VERTICAL)) {
159  if ((type() & ALWAYS_ON) || si.child.t < Y || si.child.b > Y+H) {
160  si.vneeded = 1;
161  W -= si.scrollsize;
162  if (scrollbar.align() & FL_ALIGN_LEFT) X += si.scrollsize;
163  }
164  }
165  }
166  }
167  si.innerchild.x = X;
168  si.innerchild.y = Y;
169  si.innerchild.w = W;
170  si.innerchild.h = H;
171  }
172 
173  // calculate hor scrollbar position
174  si.hscroll.x = si.innerchild.x;
176  ? si.innerbox.y
177  : si.innerbox.y + si.innerbox.h - si.scrollsize;
178  si.hscroll.w = si.innerchild.w;
179  si.hscroll.h = si.scrollsize;
180 
181  // calculate ver scrollbar position
183  ? si.innerbox.x
184  : si.innerbox.x + si.innerbox.w - si.scrollsize;
185  si.vscroll.y = si.innerchild.y;
186  si.vscroll.w = si.scrollsize;
187  si.vscroll.h = si.innerchild.h;
188 
189  // calculate h/v scrollbar values (pos/size/first/total)
190  si.hscroll.pos = si.innerchild.x - si.child.l;
191  si.hscroll.size = si.innerchild.w;
192  si.hscroll.first = 0;
193  si.hscroll.total = si.child.r - si.child.l;
194  if ( si.hscroll.pos < 0 ) { si.hscroll.total += (-si.hscroll.pos); si.hscroll.first = si.hscroll.pos; }
195 
196  si.vscroll.pos = si.innerchild.y - si.child.t;
197  si.vscroll.size = si.innerchild.h;
198  si.vscroll.first = 0;
199  si.vscroll.total = si.child.b - si.child.t;
200  if ( si.vscroll.pos < 0 ) { si.vscroll.total += (-si.vscroll.pos); si.vscroll.first = si.vscroll.pos; }
201 
202 // printf("DEBUG --- ScrollInfo ---\n");
203 // printf("DEBUG scrollsize: %d\n", si.scrollsize);
204 // printf("DEBUG hneeded, vneeded: %d %d\n", si.hneeded, si.vneeded);
205 // printf("DEBUG innerbox.x, si.innerbox.y, si.innerbox.w,si.innerbox.h);
206 // printf("DEBUG innerchild.xywh: %d %d %d %d\n", si.innerchild.x, si.innerchild.y, si.innerchild.w, si.innerchild.h);
207 // printf("DEBUG child lrbt: %d %d %d %d\n", si.child.l, si.child.r, si.child.b, si.child.t);
208 // printf("DEBUG hscroll xywh: %d %d %d %d\n", si.hscroll.x, si.hscroll.y, si.hscroll.w, si.hscroll.h);
209 // printf("DEBUG vscroll xywh: %d %d %d %d\n", si.vscroll.x, si.vscroll.y, si.vscroll.w, si.vscroll.h);
210 // printf("DEBUG horz scroll vals: %d %d %d %d\n", si.hscroll.pos, si.hscroll.size, si.hscroll.first, si.hscroll.total);
211 // printf("DEBUG vert scroll vals: %d %d %d %d\n", si.vscroll.pos, si.vscroll.size, si.vscroll.first, si.vscroll.total);
212 // printf("DEBUG \n");
213 }
214 
225 void Fl_Scroll::bbox(int& X, int& Y, int& W, int& H) {
226  X = x()+Fl::box_dx(box());
227  Y = y()+Fl::box_dy(box());
228  W = w()-Fl::box_dw(box());
229  H = h()-Fl::box_dh(box());
230  if (scrollbar.visible()) {
231  W -= scrollbar.w();
232  if (scrollbar.align() & FL_ALIGN_LEFT) X += scrollbar.w();
233  }
234  if (hscrollbar.visible()) {
235  H -= hscrollbar.h();
236  if (scrollbar.align() & FL_ALIGN_TOP) Y += hscrollbar.h();
237  }
238 }
239 
242  int X,Y,W,H; bbox(X,Y,W,H);
243 
244  uchar d = damage();
245 
246  if (d & FL_DAMAGE_ALL) { // full redraw
247  draw_box(box(),x(),y(),w(),h(),color());
248  draw_clip(this, X, Y, W, H);
249  } else {
250  if (d & FL_DAMAGE_SCROLL) {
251  // scroll the contents:
252  fl_scroll(X, Y, W, H, oldx-xposition_, oldy-yposition_, draw_clip, this);
253 
254  // Erase the background as needed...
255  Fl_Widget*const* a = array();
256  int L, R, T, B;
257  L = 999999;
258  R = 0;
259  T = 999999;
260  B = 0;
261  for (int i=children()-2; i--; a++) {
262  if ((*a)->x() < L) L = (*a)->x();
263  if (((*a)->x() + (*a)->w()) > R) R = (*a)->x() + (*a)->w();
264  if ((*a)->y() < T) T = (*a)->y();
265  if (((*a)->y() + (*a)->h()) > B) B = (*a)->y() + (*a)->h();
266  }
267  if (L > X) draw_clip(this, X, Y, L - X, H);
268  if (R < (X + W)) draw_clip(this, R, Y, X + W - R, H);
269  if (T > Y) draw_clip(this, X, Y, W, T - Y);
270  if (B < (Y + H)) draw_clip(this, X, B, W, Y + H - B);
271  }
272  if (d & FL_DAMAGE_CHILD) { // draw damaged children
273  fl_push_clip(X, Y, W, H);
274  Fl_Widget*const* a = array();
275  for (int i=children()-2; i--;) update_child(**a++);
276  fl_pop_clip();
277  }
278  }
279 
280  // Calculate where scrollbars should go, and draw them
281  {
282  ScrollInfo si;
283  recalc_scrollbars(si);
284 
285  // Now that we know what's needed, make it so.
286  if (si.vneeded && !scrollbar.visible()) {
288  d = FL_DAMAGE_ALL;
289  }
290  else if (!si.vneeded && scrollbar.visible()) {
292  draw_clip(this, si.vscroll.x, si.vscroll.y, si.vscroll.w, si.vscroll.h);
293  d = FL_DAMAGE_ALL;
294  }
295  if (si.hneeded && !hscrollbar.visible()) {
297  d = FL_DAMAGE_ALL;
298  }
299  else if (!si.hneeded && hscrollbar.visible()) {
301  draw_clip(this, si.hscroll.x, si.hscroll.y, si.hscroll.w, si.hscroll.h);
302  d = FL_DAMAGE_ALL;
303  }
304  else if ( hscrollbar.h() != si.scrollsize || scrollbar.w() != si.scrollsize ) {
305  // scrollsize changed
306  d = FL_DAMAGE_ALL;
307  }
308 
309  scrollbar.resize(si.vscroll.x, si.vscroll.y, si.vscroll.w, si.vscroll.h);
310  oldy = yposition_ = si.vscroll.pos; // si.innerchild.y - si.child.t;
312 
313  hscrollbar.resize(si.hscroll.x, si.hscroll.y, si.hscroll.w, si.hscroll.h);
314  oldx = xposition_ = si.hscroll.pos; // si.innerchild.x - si.child.l;
316  }
317 
318  // draw the scrollbars:
319  if (d & FL_DAMAGE_ALL) {
322  if (scrollbar.visible() && hscrollbar.visible()) {
323  // fill in the little box in the corner
324  fl_color(color());
326  }
327  } else {
330  }
331 }
332 
357 void Fl_Scroll::resize(int X, int Y, int W, int H) {
358  int dx = X-x(), dy = Y-y();
359  int dw = W-w(), dh = H-h();
360  Fl_Widget::resize(X,Y,W,H); // resize _before_ moving children around
362  // move all the children:
363  Fl_Widget*const* a = array();
364  for (int i=children()-2; i--;) {
365  Fl_Widget* o = *a++;
366  o->position(o->x()+dx, o->y()+dy);
367  }
368  if (dw==0 && dh==0) {
369  char pad = ( scrollbar.visible() && hscrollbar.visible() );
370  char al = ( (scrollbar.align() & FL_ALIGN_LEFT) != 0 );
371  char at = ( (scrollbar.align() & FL_ALIGN_TOP) !=0 );
372  scrollbar.position(al?X:X+W-scrollbar.w(), (at&&pad)?Y+hscrollbar.h():Y);
373  hscrollbar.position((al&&pad)?X+scrollbar.w():X, at?Y:Y+H-hscrollbar.h());
374  } else {
375  // FIXME recalculation of scrollbars needs to be moved out of "draw()" (STR #1895)
376  redraw(); // need full recalculation of scrollbars
377  }
378 }
379 
396 void Fl_Scroll::scroll_to(int X, int Y) {
397  int dx = xposition_-X;
398  int dy = yposition_-Y;
399  if (!dx && !dy) return;
400  xposition_ = X;
401  yposition_ = Y;
402  Fl_Widget*const* a = array();
403  for (int i=children(); i--;) {
404  Fl_Widget* o = *a++;
405  if (o == &hscrollbar || o == &scrollbar) continue;
406  o->position(o->x()+dx, o->y()+dy);
407  }
409  else damage(FL_DAMAGE_SCROLL);
410 }
411 
413  Fl_Scroll* s = (Fl_Scroll*)(o->parent());
414  s->scroll_to(int(((Fl_Scrollbar*)o)->value()), s->yposition());
415 }
416 
418  Fl_Scroll* s = (Fl_Scroll*)(o->parent());
419  s->scroll_to(s->xposition(), int(((Fl_Scrollbar*)o)->value()));
420 }
432 Fl_Scroll::Fl_Scroll(int X,int Y,int W,int H,const char* L)
433  : Fl_Group(X,Y,W,H,L),
434  scrollbar(X+W-Fl::scrollbar_size(),Y,
435  Fl::scrollbar_size(),H-Fl::scrollbar_size()),
436  hscrollbar(X,Y+H-Fl::scrollbar_size(),
437  W-Fl::scrollbar_size(),Fl::scrollbar_size()) {
438  type(BOTH);
439  xposition_ = oldx = 0;
440  yposition_ = oldy = 0;
441  scrollbar_size_ = 0;
445 }
446 
447 int Fl_Scroll::handle(int event) {
449  return Fl_Group::handle(event);
450 }
451 
452 //
453 // End of "$Id$".
454 //
Fl_Scroll::ScrollInfo
Definition: Fl_Scroll.H:108
FL_ALIGN_LEFT
const Fl_Align FL_ALIGN_LEFT
Definition: Enumerations.H:839
Fl_Scroll::hscrollbar_cb
static void hscrollbar_cb(Fl_Widget *, void *)
Definition: Fl_Scroll.cxx:412
Fl_Scroll::xposition
int xposition() const
Definition: Fl_Scroll.H:163
Fl_Widget::y
int y() const
Definition: Fl_Widget.H:289
FL_DAMAGE_ALL
Definition: Enumerations.H:1112
Fl.H
Fl_Scroll::handle
int handle(int)
Definition: Fl_Scroll.cxx:447
Fl_Widget::align
Fl_Align align() const
Definition: Fl_Widget.H:348
Fl_Scrollbar
Definition: Fl_Scrollbar.H:43
fl_rectf
void fl_rectf(int x, int y, int w, int h)
Definition: fl_draw.H:206
Fl_Scroll::ScrollInfo::hscroll
Fl_Scrollbar_Data hscroll
horizontal scrollbar region + values
Definition: Fl_Scroll.H:132
Fl_Scroll::bbox
void bbox(int &, int &, int &, int &)
Definition: Fl_Scroll.cxx:225
Fl_Widget::draw_box
void draw_box() const
Definition: fl_boxtype.cxx:442
Fl_Scroll::VERTICAL
Definition: Fl_Scroll.H:154
_FL_PLASTIC_UP_FRAME
plastic version of FL_UP_FRAME
Definition: Enumerations.H:637
_FL_ROUNDED_FRAME
see figure 1
Definition: Enumerations.H:625
FL_ENGRAVED_FRAME
see figure 1
Definition: Enumerations.H:617
Fl::box_dx
static int box_dx(Fl_Boxtype)
Definition: fl_boxtype.cxx:360
FL_THIN_UP_FRAME
see figure 1
Definition: Enumerations.H:613
FL_DAMAGE_SCROLL
Definition: Enumerations.H:1108
Fl_Scroll::yposition_
int yposition_
Definition: Fl_Scroll.H:89
Fl_Scroll::ScrollInfo::hneeded
int hneeded
horizontal scrollbar visibility
Definition: Fl_Scroll.H:130
fl_color
void fl_color(Fl_Color c)
Definition: fl_draw.H:52
Fl_Scroll::ScrollInfo::Fl_Scrollbar_Data::pos
int pos
scrollbar tab's "position of first line displayed"
Definition: Fl_Scroll.H:121
FL_BORDER_FRAME
see figure 1
Definition: Enumerations.H:621
Fl_Widget::window
Fl_Window * window() const
Definition: Fl_Window.cxx:118
Fl_Group::clear
void clear()
Definition: Fl_Group.cxx:383
Fl_Scroll::ScrollInfo::child
Fl_Region_LRTB child
child bounding box: left/right/top/bottom
Definition: Fl_Scroll.H:129
Fl_Scroll::scrollbar_cb
static void scrollbar_cb(Fl_Widget *, void *)
Definition: Fl_Scroll.cxx:417
Fl_Scroll::clear
void clear()
Definition: Fl_Scroll.cxx:25
H
static int H
Definition: Fl_Tooltip.cxx:76
Fl_Widget::x
int x() const
Definition: Fl_Widget.H:284
Fl_Widget::set_visible
void set_visible()
Definition: Fl_Widget.H:696
Fl_Scroll::ScrollInfo::Fl_Scrollbar_Data::x
int x
Definition: Fl_Scroll.H:120
Fl_Scroll::ScrollInfo::Fl_Scrollbar_Data::size
int size
scrollbar tab's "size of window in lines"
Definition: Fl_Scroll.H:122
Fl_Scroll::HORIZONTAL
Definition: Fl_Scroll.H:153
Fl::box_dh
static int box_dh(Fl_Boxtype)
Definition: fl_boxtype.cxx:397
FL_HORIZONTAL
#define FL_HORIZONTAL
The valuator can work horizontally.
Definition: Fl_Valuator.H:31
Fl_Scroll::scrollbar
Fl_Scrollbar scrollbar
Definition: Fl_Scroll.H:144
Fl_Scroll::ScrollInfo::Fl_Region_LRTB::l
int l
(l)eft "x" position, aka x1
Definition: Fl_Scroll.H:113
Fl_Widget::w
int w() const
Definition: Fl_Widget.H:294
Fl::box_dw
static int box_dw(Fl_Boxtype)
Definition: fl_boxtype.cxx:391
Fl_Widget::clear_visible
void clear_visible()
Definition: Fl_Widget.H:702
Fl_Widget::color
Fl_Color color() const
Definition: Fl_Widget.H:378
dw
uchar dw
Definition: fl_boxtype.cxx:286
Fl_Widget::position
void position(int X, int Y)
Definition: Fl_Widget.H:332
Fl_Widget::w
void w(int v)
Definition: Fl_Widget.H:143
Fl_Scroll.H
fl_scroll
FL_EXPORT void fl_scroll(int X, int Y, int W, int H, int dx, int dy, void(*draw_area)(void *, int, int, int, int), void *data)
Definition: fl_scroll_area.cxx:40
Fl::box_dy
static int box_dy(Fl_Boxtype)
Definition: fl_boxtype.cxx:385
_FL_OVAL_FRAME
see figure 1
Definition: Enumerations.H:633
Fl_Widget::x
void x(int v)
Definition: Fl_Widget.H:139
_FL_SHADOW_FRAME
see figure 1
Definition: Enumerations.H:622
Fl_Scroll::ScrollInfo::vneeded
int vneeded
vertical scrollbar visibility
Definition: Fl_Scroll.H:131
Fl_Scroll::scroll_to
void scroll_to(int, int)
Definition: Fl_Scroll.cxx:396
fl_draw.H
utility header to pull drawing functions together
Fl_Tiled_Image
Definition: Fl_Tiled_Image.H:34
Fl_Group::array
Fl_Widget *const * array() const
Definition: Fl_Group.cxx:44
Fl_Scroll::Fl_Scroll
Fl_Scroll(int X, int Y, int W, int H, const char *l=0)
Definition: Fl_Scroll.cxx:432
Fl_Scroll::recalc_scrollbars
void recalc_scrollbars(ScrollInfo &si)
Definition: Fl_Scroll.cxx:102
Fl_Scroll::ScrollInfo::Fl_Scrollbar_Data::y
int y
Definition: Fl_Scroll.H:120
Fl_Widget::visible
unsigned int visible() const
Definition: Fl_Widget.H:660
Fl_Scroll::resize
void resize(int X, int Y, int W, int H)
Definition: Fl_Scroll.cxx:357
Fl_Scroll::ScrollInfo::Fl_Region_XYWH::w
int w
Definition: Fl_Scroll.H:110
Fl_Scroll::ScrollInfo::Fl_Region_XYWH::y
int y
Definition: Fl_Scroll.H:110
_FL_PLASTIC_DOWN_FRAME
plastic version of FL_DOWN_FRAME
Definition: Enumerations.H:638
Fl_Scroll::ScrollInfo::Fl_Scrollbar_Data::total
int total
scrollbar tab's "total number of lines"
Definition: Fl_Scroll.H:124
Fl_Scrollbar::value
int value() const
Definition: Fl_Scrollbar.H:65
Fl_Widget::damage
uchar damage() const
Definition: Fl_Widget.H:917
fl_push_clip
void fl_push_clip(int x, int y, int w, int h)
Definition: fl_draw.H:82
Fl_Widget::redraw
void redraw()
Definition: Fl.cxx:1782
first
static idle_cb * first
Definition: Fl_add_idle.cxx:33
Fl_Widget
Definition: Fl_Widget.H:101
Fl_Group
Definition: Fl_Group.H:41
FL_NO_BOX
nothing is drawn at all, this box is invisible
Definition: Enumerations.H:605
Fl_Group::add
void add(Fl_Widget &)
Definition: Fl_Group.cxx:491
Fl_Widget::box
Fl_Boxtype box() const
Definition: Fl_Widget.H:363
Fl_Scroll::ScrollInfo::scrollsize
int scrollsize
the effective scrollbar thickness (local or global)
Definition: Fl_Scroll.H:126
Fl_Widget::h
int h() const
Definition: Fl_Widget.H:299
Fl_Group::children
int children() const
Definition: Fl_Group.H:75
Fl_Scroll::xposition_
int xposition_
Definition: Fl_Scroll.H:89
Fl_Scroll
Definition: Fl_Scroll.H:87
Fl_Widget::h
void h(int v)
Definition: Fl_Widget.H:145
Fl_Scroll::ScrollInfo::Fl_Region_LRTB::r
int r
(r)ight "x" position, aka x2
Definition: Fl_Scroll.H:114
Fl_Scroll::ScrollInfo::Fl_Region_LRTB::b
int b
(b)ottom "y" position, aka y2
Definition: Fl_Scroll.H:116
Fl_Widget::y
void y(int v)
Definition: Fl_Widget.H:141
Fl::scrollbar_size
static int scrollbar_size()
Definition: Fl.cxx:196
Fl_Scroll::ScrollInfo::vscroll
Fl_Scrollbar_Data vscroll
vertical scrollbar region + values
Definition: Fl_Scroll.H:133
fl_pop_clip
void fl_pop_clip()
Definition: fl_draw.H:103
Fl_Group::handle
int handle(int)
Definition: Fl_Group.cxx:147
Fl_Widget::callback
Fl_Callback_p callback() const
Definition: Fl_Widget.H:561
Fl_Scroll::draw
void draw()
Definition: Fl_Scroll.cxx:240
Fl_Image::draw
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0)
Definition: Fl_Image.cxx:66
Fl
Definition: Fl.H:135
FL_ALIGN_TOP
const Fl_Align FL_ALIGN_TOP
Definition: Enumerations.H:833
dy
uchar dy
Definition: fl_boxtype.cxx:286
Fl_Group::update_child
void update_child(Fl_Widget &widget) const
Definition: Fl_Group.cxx:754
FL_EMBOSSED_FRAME
see figure 1
Definition: Enumerations.H:618
Fl_Scroll::ScrollInfo::innerchild
Fl_Region_XYWH innerchild
widget's inner box, including scrollbars
Definition: Fl_Scroll.H:128
Fl_Widget::type
uchar type() const
Definition: Fl_Widget.H:274
Fl_Widget::parent
Fl_Group * parent() const
Definition: Fl_Widget.H:254
Fl::scheme_bg_
static Fl_Image * scheme_bg_
Definition: Fl.H:262
Fl_Scroll::oldx
int oldx
Definition: Fl_Scroll.H:90
Y
static int Y
Definition: Fl_Tooltip.cxx:76
Fl_Group::remove
void remove(int index)
Definition: Fl_Group.cxx:503
Fl_Scroll::scrollbar_size_
int scrollbar_size_
Definition: Fl_Scroll.H:91
Fl_Scroll::BOTH
Definition: Fl_Scroll.H:155
Fl_Widget::resize
virtual void resize(int x, int y, int w, int h)
Definition: Fl_Widget.cxx:150
Fl_Scroll::ScrollInfo::Fl_Region_LRTB::t
int t
(t)op "y" position, aka y1
Definition: Fl_Scroll.H:115
FL_UP_FRAME
see figure 1
Definition: Enumerations.H:609
Fl_Scroll::ScrollInfo::Fl_Scrollbar_Data::first
int first
scrollbar tab's "number of first line"
Definition: Fl_Scroll.H:123
Fl_Tiled_Image.H
uchar
unsigned char uchar
Definition: fl_types.h:30
Fl_Scroll::ScrollInfo::Fl_Scrollbar_Data::h
int h
Definition: Fl_Scroll.H:120
Fl_Scroll::yposition
int yposition() const
Definition: Fl_Scroll.H:165
FL_THIN_DOWN_FRAME
see figure 1
Definition: Enumerations.H:614
Fl_Group::draw_outside_label
void draw_outside_label(const Fl_Widget &widget) const
Definition: Fl_Group.cxx:780
Fl_Scroll::ScrollInfo::Fl_Scrollbar_Data::w
int w
Definition: Fl_Scroll.H:120
dh
uchar dh
Definition: fl_boxtype.cxx:286
Fl_Scroll::ScrollInfo::Fl_Region_XYWH::h
int h
Definition: Fl_Scroll.H:110
Fl_Scroll::oldy
int oldy
Definition: Fl_Scroll.H:90
FL_DAMAGE_CHILD
Definition: Enumerations.H:1106
Fl_Group::draw_child
void draw_child(Fl_Widget &widget) const
Definition: Fl_Group.cxx:768
dx
uchar dx
Definition: fl_boxtype.cxx:286
Fl_Scroll::hscrollbar
Fl_Scrollbar hscrollbar
Definition: Fl_Scroll.H:145
Fl_Widget::image
Fl_Image * image()
Definition: Fl_Widget.H:514
Fl_Scroll::ScrollInfo::Fl_Region_XYWH::x
int x
Definition: Fl_Scroll.H:110
Fl_Scroll::draw_clip
static void draw_clip(void *, int, int, int, int)
Definition: Fl_Scroll.cxx:52
Fl_Scroll::ScrollInfo::innerbox
Fl_Region_XYWH innerbox
widget's inner box, excluding scrollbars
Definition: Fl_Scroll.H:127
FL_DOWN_FRAME
see figure 1
Definition: Enumerations.H:610
Fl_Scroll::fix_scrollbar_order
void fix_scrollbar_order()
Definition: Fl_Scroll.cxx:39
Fl_Scroll::ALWAYS_ON
Definition: Fl_Scroll.H:156