FLTK 1.3.2

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions
Fl_Positioner Class Reference

This class is provided for Forms compatibility. More...

`#include <Fl_Positioner.H>`

Inheritance diagram for Fl_Positioner:

List of all members.

## Public Member Functions
| 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.
int | handle (int)
| Handles the specified event.
int | value (double, double)
| Returns the current position in x and y.
void | xbounds (double, double)
| Sets the X axis bounds.
double | xmaximum () const
| Gets the X axis maximum.
void | xmaximum (double a)
| Same as xbounds(xminimum(), a)
double | xminimum () const
| Gets the X axis minimum.
void | xminimum (double a)
| Same as xbounds(a, xmaximum())
void | xstep (double a)
| Sets the stepping value for the X axis.
double | xvalue () const
| Gets the X axis coordinate.
int | xvalue (double)
| Sets the X axis coordinate.
void | ybounds (double, double)
| Sets the Y axis bounds.
double | ymaximum () const
| Gets the Y axis maximum.
void | ymaximum (double a)
| Same as ybounds(ymininimum(), a)
double | yminimum () const
| Gets the Y axis minimum.
void | yminimum (double a)
| Same as ybounds(a, ymaximum())
void | ystep (double a)
| Sets the stepping value for the Y axis.
double | yvalue () const
| Gets the Y axis coordinate.
int | yvalue (double)
| Sets the Y axis coordinate.
## Protected Member Functions
void | draw (int, int, int, int)
void | draw ()
| Draws the widget.
int | handle (int, int, int, int, int)

## 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().

## 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.

## Member Function Documentation

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.

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] | event | the kind of event received

Return values:

  0 | if the event was not used or understood
  1 | if the event was used and can be deleted

See also:
  Fl_Event

Reimplemented from Fl_Widget.

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

Returns the current position in x and y.

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

Sets the X axis bounds.

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

Sets the stepping value for the X axis.

double Fl_Positioner::xvalue | ( |  | ) | const`[inline]`

Gets the X axis coordinate.

int Fl_Positioner::xvalue | ( | double | X | ) |

Sets the X axis coordinate.

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

Sets the Y axis bounds.

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

Sets the stepping value for the Y axis.

double Fl_Positioner::yvalue | ( |  | ) | const`[inline]`

Gets the Y axis coordinate.

int Fl_Positioner::yvalue | ( | double | Y | ) |

Sets the Y axis coordinate.

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

- Fl_Positioner.H
- Fl_Positioner.cxx