FLTK 1.4.0
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. More...
 
void measure (int &w, int &h) const
 Measures the size of the label. More...
 

Public Attributes

Fl_Align align_
 alignment of label
 
Fl_Color color
 text color
 
Fl_Imagedeimage
 optional image for a deactivated label
 
Fl_Font font
 label font used in text
 
Fl_Imageimage
 optional image for an active label
 
Fl_Fontsize size
 size of label font
 
uchar type
 type of label. More...
 
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: