FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  ]

class Fl_Timer

Class Hierarchy

Include Files

    #include <FL/Fl_Timer.H>


This is provided only to emulate the Forms Timer widget. It works by making a timeout callback every 1/5 second. This is wasteful and inaccurate if you just want something to happen a fixed time in the future. You should directly call Fl::add_timeout() instead.


Fl_Timer::Fl_Timer(uchar type, int x, int y, int w, int h, const char *label = 0)

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:
  • FL_NORMAL_TIMER - The timer just does the callback and displays the string "Timer" in the widget.
  • FL_VALUE_TIMER - The timer does the callback and displays the current timer value in the widget.
  • FL_HIDDEN_TIMER - The timer just does the callback and does not display anything.

virtual Fl_Timer::~Fl_Timer()

Destroys the timer and removes the timeout.

char direction() const
void direction(char d)

Gets or sets the direction of the timer. If the direction is zero then the timer will count up, otherwise it will count down from the initial value().

char suspended() const
void suspended(char d)

Gets or sets whether the timer is suspended.

float value() const
void value(float)

User Comments [ Add Comment ]

No comments for this page.


Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.