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

Fl_Positioner Class Reference

#include <Fl_Positioner.H>

Inheritance diagram for Fl_Positioner:
Collaboration diagram for Fl_Positioner:

List of all members.

Public Member Functions

int handle (int)
 Fl_Positioner (int x, int y, int w, int h, const char *l=0)
double xvalue () const
double yvalue () const
int xvalue (double)
int yvalue (double)
int value (double, double)
void xbounds (double, double)
double xminimum () const
void xminimum (double a)
double xmaximum () const
void xmaximum (double a)
void ybounds (double, double)
double yminimum () const
void yminimum (double a)
double ymaximum () const
void ymaximum (double a)
void xstep (double a)
void ystep (double a)

Protected Member Functions

void draw (int, int, int, int)
int handle (int, int, int, int, int)
void draw ()

Detailed Description

This class is provided for Forms compatibility. It provides 2D input. It would be useful if this could be put atop another widget so that the crosshairs are on top, but this is not implemented. The color of the crosshairs is selection_color().

positioner.png

Definition at line 46 of file Fl_Positioner.H.


Constructor & Destructor Documentation

Fl_Positioner::Fl_Positioner ( int  X,
int  Y,
int  W,
int  H,
const char *  l = 0 
)

Creates a new Fl_Positioner widget using the given position, size, and label string. The default boxtype is FL_NO_BOX.

Definition at line 131 of file Fl_Positioner.cxx.

References Fl_Widget::align(), Fl_Widget::box(), FL_ALIGN_BOTTOM, FL_DOWN_BOX, FL_RED, FL_WHEN_CHANGED, Fl_Widget::selection_color(), and Fl_Widget::when().


Member Function Documentation

void Fl_Positioner::draw ( int  X,
int  Y,
int  W,
int  H 
) [protected]
void Fl_Positioner::draw ( ) [protected, virtual]

Draws the widget. Never call this function directly. FLTK will schedule redrawing whenever needed. If your widget must be redrawn as soon as possible, call redraw() instead.

Override this function to draw your own widgets.

If you ever need to call another widget's draw method from within your own draw() method, e.g. for an embedded scrollbar, you can do it (because draw() is virtual) like this:

        Fl_Widget *s = &scroll;         // scroll is an embedded Fl_Scrollbar
        s->draw();                      // calls Fl_Scrollbar::draw()

Implements Fl_Widget.

Definition at line 55 of file Fl_Positioner.cxx.

References Fl_Widget::draw_label(), Fl_Widget::h(), Fl_Widget::w(), Fl_Widget::x(), and Fl_Widget::y().

int Fl_Positioner::handle ( int  event,
int  X,
int  Y,
int  W,
int  H 
) [protected]
int Fl_Positioner::handle ( int  event) [virtual]

Handles the specified event. You normally don't call this method directly, but instead let FLTK do it when the user interacts with the widget.

When implemented in a widget, this function must return 0 if the widget does not use the event or 1 otherwise.

Most of the time, you want to call the inherited handle() method in your overridden method so that you don't short-circuit events that you don't handle. In this last case you should return the callee retval.

Parameters:
[in]eventthe kind of event received
Return values:
0if the event was not used or understood
1if the event was used and can be deleted
See also:
Fl_Event

Reimplemented from Fl_Widget.

Definition at line 123 of file Fl_Positioner.cxx.

References Fl_Widget::h(), handle(), Fl_Widget::w(), Fl_Widget::x(), and Fl_Widget::y().

int Fl_Positioner::value ( double  X,
double  Y 
)

Returns the current position in x and y.

Definition at line 61 of file Fl_Positioner.cxx.

References Fl_Widget::clear_changed(), and Fl_Widget::redraw().

Referenced by xvalue(), and yvalue().

void Fl_Positioner::xbounds ( double  a,
double  b 
)

Sets the X axis bounds.

Definition at line 144 of file Fl_Positioner.cxx.

References b, and Fl_Widget::redraw().

double Fl_Positioner::xmaximum ( ) const [inline]

Gets the X axis maximum

Definition at line 81 of file Fl_Positioner.H.

void Fl_Positioner::xmaximum ( double  a) [inline]

Same as xbounds(xminimum(), a)

Definition at line 83 of file Fl_Positioner.H.

double Fl_Positioner::xminimum ( ) const [inline]

Gets the X axis minimum

Definition at line 77 of file Fl_Positioner.H.

void Fl_Positioner::xminimum ( double  a) [inline]

Same as xbounds(a, xmaximum())

Definition at line 79 of file Fl_Positioner.H.

void Fl_Positioner::xstep ( double  a) [inline]

Sets the stepping value for the X axis.

Definition at line 94 of file Fl_Positioner.H.

double Fl_Positioner::xvalue ( ) const [inline]

Gets the X axis coordinate.

Definition at line 69 of file Fl_Positioner.H.

Referenced by draw().

int Fl_Positioner::xvalue ( double  X)

Sets the X axis coordinate.

Definition at line 70 of file Fl_Positioner.cxx.

References value().

void Fl_Positioner::ybounds ( double  a,
double  b 
)

Sets the Y axis bounds.

Definition at line 152 of file Fl_Positioner.cxx.

References b, and Fl_Widget::redraw().

void Fl_Positioner::ymaximum ( double  a) [inline]

Same as ybounds(ymininimum(), a)

Definition at line 92 of file Fl_Positioner.H.

double Fl_Positioner::ymaximum ( ) const [inline]

Gets the Y axis maximum

Definition at line 90 of file Fl_Positioner.H.

double Fl_Positioner::yminimum ( ) const [inline]

Gets the Y axis minimum

Definition at line 86 of file Fl_Positioner.H.

void Fl_Positioner::yminimum ( double  a) [inline]

Same as ybounds(a, ymaximum())

Definition at line 88 of file Fl_Positioner.H.

void Fl_Positioner::ystep ( double  a) [inline]

Sets the stepping value for the Y axis.

Definition at line 96 of file Fl_Positioner.H.

int Fl_Positioner::yvalue ( double  Y)

Sets the Y axis coordinate.

Definition at line 75 of file Fl_Positioner.cxx.

References value().

double Fl_Positioner::yvalue ( ) const [inline]

Gets the Y axis coordinate.

Definition at line 71 of file Fl_Positioner.H.

Referenced by draw().


The documentation for this class was generated from the following files: