FLTK 1.4.5: Fl_Label Struct Reference

FLTK 1.4.5

Loading...
Searching...
No Matches
Fl_Label Struct Reference

This struct stores all information for a text or mixed graphics label. More...

`#include <Fl_Widget.H>`

## Public Member Functions
void | draw (int, int, int, int, Fl_Align) const
| Draws the label aligned to the given box.
void | measure (int &w, int &h) const
| Measures the size of the label.

## Public Attributes
Fl_Align | align_
| alignment of label
Fl_Color | color
| text color
Fl_Image * | deimage
| optional image for a deactivated label
Fl_Font | font
| label font used in text
signed char | h_margin_
| Spacing between label and the horizontally aligned side of the widget.
Fl_Image * | image
| optional image for an active label
Fl_Fontsize | size
| size of label font
uchar | spacing
| Spacing between an image and the label text.
uchar | type
| type of label.
signed char | v_margin_
| Spacing between label and the vertically aligned side of the widget.
const char * | value
| label text

## Detailed Description

This struct stores all information for a text or mixed graphics label.

Todo
  There is an aspiration that the Fl_Label type will become a widget by itself. That way we will be avoiding a lot of code duplication by handling labels in a similar fashion to widgets containing text. We also provide an easy interface for very complex labels, containing html or vector graphics. However, this re-factoring is not in place in this release.

## Member Function Documentation

## ◆ draw()

void Fl_Label::draw | ( | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | Fl_Align | align ) const

Draws the label aligned to the given box.

Draws a label with arbitrary alignment in an arbitrary box.

## ◆ measure()

void Fl_Label::measure | ( | int & | W,
|  | int & | H ) const

Measures the size of the label.

Parameters

  [in,out] | W,H | : this is the requested size for the label text plus image; on return, this will contain the size needed to fit the label

## Member Data Documentation

## ◆ type

uchar Fl_Label::type

type of label.

See also
  Fl_Labeltype

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

- Fl_Widget.H
- fl_labeltype.cxx