summaryrefslogtreecommitdiff
path: root/src/forms_timer.cxx
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-09-15 00:27:28 +0000
committerFabien Costantini <fabien@onepost.net>2008-09-15 00:27:28 +0000
commitfdcfef214e67b0b1162ef4098ba960efd7049523 (patch)
treeec879deb42fe1fbf3ec5a93cf2d7227cf09ed25e /src/forms_timer.cxx
parente760e8a6e7335ab0689686b907dcafe94aa168db (diff)
Doxygen documentation WP7 Done. Fl_Menu_Item was a real pain to doxyfy.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6248 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/forms_timer.cxx')
-rw-r--r--src/forms_timer.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/forms_timer.cxx b/src/forms_timer.cxx
index 031d67f27..33627761d 100644
--- a/src/forms_timer.cxx
+++ b/src/forms_timer.cxx
@@ -126,11 +126,28 @@ int Fl_Timer::handle(int event) {
return 0;
}
+/**
+ Destroys the timer and removes the timeout.
+*/
Fl_Timer::~Fl_Timer() {
Fl::remove_timeout(stepcb, this);
}
+/**
+ Creates a new Fl_Timer widget using the given type, position,
+ size, and label string. The type parameter can be any of the
+ following symbolic constants:
+ <UL>
+ <LI>FL_NORMAL_TIMER - The timer just does the callback and
+ displays the string &quot;Timer&quot; in the widget. </LI>
+ <LI>FL_VALUE_TIMER - The timer does the callback and displays
+ the current timer value in the widget. </LI>
+ <LI>FL_HIDDEN_TIMER - The timer just does the callback and
+ does not display anything. </LI>
+ </UL>
+*/
Fl_Timer::Fl_Timer(uchar t, int X, int Y, int W, int H, const char* l)
+
: Fl_Widget(X, Y, W, H, l) {
box(FL_DOWN_BOX);
selection_color(FL_RED);
@@ -141,7 +158,7 @@ Fl_Timer::Fl_Timer(uchar t, int X, int Y, int W, int H, const char* l)
if (t == FL_HIDDEN_TIMER) clear_visible();
if (t == FL_VALUE_TIMER) align(FL_ALIGN_LEFT);
}
-
+/** Sets the current timer value */
void Fl_Timer::value(double d) {
delay = total = d;
on = (d > 0.0);
@@ -151,6 +168,7 @@ void Fl_Timer::value(double d) {
if (on) Fl::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
}
+/** Gets or sets whether the timer is suspended.*/
void Fl_Timer::suspended(char d) {
if (!d) {
if (on) return;