summaryrefslogtreecommitdiff
path: root/FL/Fl_Scroll.H
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2014-07-16 03:32:14 +0000
committerGreg Ercolano <erco@seriss.com>2014-07-16 03:32:14 +0000
commitafcd967fd88b5cc0f7b43441d985ea739455e414 (patch)
tree344518bf1b455db0429fa06e25155ba2ac9cf68a /FL/Fl_Scroll.H
parent73821732239738743ac5dc6833222b0c88437b8f (diff)
* Modified the ScrollInfo structure for more modularity,
which helps doxygen docs be clear. * Changed loop in recalc_scrollbars() to loop thru /all/ children and skip over scrollbars, instead of assuming fix_scrollbar_order() has been called. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Scroll.H')
-rw-r--r--FL/Fl_Scroll.H36
1 files changed, 26 insertions, 10 deletions
diff --git a/FL/Fl_Scroll.H b/FL/Fl_Scroll.H
index 4d763faae..ebf7123b8 100644
--- a/FL/Fl_Scroll.H
+++ b/FL/Fl_Scroll.H
@@ -99,17 +99,33 @@ protected: // NEW (STR#1895)
#else
private: // OLD
#endif
- // Structure to manage scrollbar and widget interior sizes.
+ /**
+ Structure to manage scrollbar and widget interior sizes.
+ This is filled out by recalc_scrollbars() for use in calculations
+ that need to know the visible scroll area size, etc.
+ \note Availability in FLTK_ABI_VERSION 10303 or higher.
+ */
typedef struct {
- int scrollsize; // the scrollsize (global|local)
- int innerbox_x, innerbox_y, innerbox_w, innerbox_h; // widget's inner box (excludes scrollbars)
- int innerchild_x, innerchild_y, innerchild_w, innerchild_h; // widget's inner box including scrollbars
- int child_l, child_r, child_b, child_t; // child bounding box: left/right/bottom/top
- int hneeded, vneeded; // hor + ver scrollbar visibility
- int hscroll_x, hscroll_y, hscroll_w, hscroll_h; // hor scrollbar size/position
- int vscroll_x, vscroll_y, vscroll_w, vscroll_h; // ver scrollbar size/position
- int hpos, hsize, hfirst, htotal; // hor scrollbar values (pos/size/first/total)
- int vpos, vsize, vfirst, vtotal; // ver scrollbar values (pos/size/first/total)
+ /// A local struct to manage a region defined by xywh
+ typedef struct { int x,y,w,h; } Fl_Region_XYWH;
+ /// A local struct to manage a region defined by left/right/bottom/top
+ typedef struct { int l,r,b,t; } Fl_Region_LRBT;
+ /// A local struct to manage a scrollbar's xywh region and tab values
+ typedef struct {
+ int x,y,w,h;
+ int pos; ///< scrollbar tab's position value
+ int size; ///< scrollbar tab's size
+ int first; ///< scrollbar tab's first value
+ int total; ///< scrollbar tab's total value
+ } Fl_Scrollbar_Data;
+ int scrollsize; ///< the effective scrollbar thickness (local or global)
+ Fl_Region_XYWH innerbox; ///< widget's inner box, excluding scrollbars
+ Fl_Region_XYWH innerchild; ///< widget's inner box, including scrollbars
+ Fl_Region_LRBT child; ///< child bounding box: left/right/bottom/top
+ int hneeded; ///< horizontal scrollbar visibility
+ int vneeded; ///< vertical scrollbar visibility
+ Fl_Scrollbar_Data hscroll; ///< horizontal scrollbar region + values
+ Fl_Scrollbar_Data vscroll; ///< vertical scrollbar region + values
} ScrollInfo;
void recalc_scrollbars(ScrollInfo &si);