summaryrefslogtreecommitdiff
path: root/src/Fl_Scroll.cxx
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-09-15 08:41:54 +0000
committerFabien Costantini <fabien@onepost.net>2008-09-15 08:41:54 +0000
commitb9ca1333769f87c029430a9d14a7a9937d400f93 (patch)
tree61b8043afc286a950b7624004ed549f84531fdb3 /src/Fl_Scroll.cxx
parentfdcfef214e67b0b1162ef4098ba960efd7049523 (diff)
Doxygen documentation WP8 Done. Reserved WP9, WP10. Will now check WP3 from engelsman and integrates it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6250 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Scroll.cxx')
-rw-r--r--src/Fl_Scroll.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/Fl_Scroll.cxx b/src/Fl_Scroll.cxx
index 701aa2dd3..ae575024f 100644
--- a/src/Fl_Scroll.cxx
+++ b/src/Fl_Scroll.cxx
@@ -30,7 +30,7 @@
#include <FL/Fl_Scroll.H>
#include <FL/fl_draw.H>
-// Clear all but the scrollbars...
+/** Clear all but the scrollbars... */
void Fl_Scroll::clear() {
for (int i=children() - 1; i >= 0; i --) {
Fl_Widget* o = child(i);
@@ -41,7 +41,7 @@ void Fl_Scroll::clear() {
}
}
-// Insure the scrollbars are the last children:
+/** Insure the scrollbars are the last children */
void Fl_Scroll::fix_scrollbar_order() {
Fl_Widget** a = (Fl_Widget**)array();
if (a[children()-1] != &scrollbar) {
@@ -259,6 +259,7 @@ void Fl_Scroll::resize(int X, int Y, int W, int H) {
}
}
+/** Moves the contents of the scroll group to a new position.*/
void Fl_Scroll::scroll_to(int X, int Y) {
int dx = xposition_-X;
int dy = yposition_-Y;
@@ -284,7 +285,16 @@ void Fl_Scroll::scrollbar_cb(Fl_Widget* o, void*) {
Fl_Scroll* s = (Fl_Scroll*)(o->parent());
s->scroll_to(s->xposition(), int(((Fl_Scrollbar*)o)->value()));
}
-
+/**
+ Creates a new Fl_Scroll widget using the given position,
+ size, and label string. The default boxtype is FL_NO_BOX.
+ <B>The destructor <I>also deletes all the children</I>. This allows a
+ whole tree to be deleted at once, without having to keep a pointer to
+ all the children in the user code. A kludge has been done so the
+ Fl_Scroll and all of it's children can be automatic (local)
+ variables, but you must declare the Fl_Scroll<I>first</I>, so
+ that it is destroyed last.
+*/
Fl_Scroll::Fl_Scroll(int X,int Y,int W,int H,const char* L)
: Fl_Group(X,Y,W,H,L),
scrollbar(X+W-Fl::scrollbar_size(),Y,