Dillo v3.1.1-119-g140d9ebd
Loading...
Searching...
No Matches
dw::fltk::ui::ComplexButton Class Reference

#include <fltkcomplexbutton.hh>

Public Member Functions

virtual int handle (int)
 
 ComplexButton (int X, int Y, int W, int H, const char *L=0)
 The constructor creates the button using the given position, size and label.
 
 ~ComplexButton ()
 
int value (int v)
 Sets the current value of the button.
 
char value () const
 Returns the current value of the button (0 or 1).
 
Fl_Boxtype down_box () const
 Returns the current down box type, which is drawn when value() is non-zero.
 
void down_box (Fl_Boxtype b)
 Sets the down box type.
 

Protected Member Functions

virtual void draw ()
 

Private Attributes

char value_
 
char oldval
 
uchar down_box_
 

Detailed Description

Definition at line 30 of file fltkcomplexbutton.hh.

Constructor & Destructor Documentation

◆ ComplexButton()

ComplexButton::ComplexButton ( int  X,
int  Y,
int  W,
int  H,
const char *  L = 0 
)

The constructor creates the button using the given position, size and label.

Parameters
[in]X,Y,W,Hposition and size of the widget
[in]Lwidget label, default is no label

Definition at line 122 of file fltkcomplexbutton.cc.

References down_box(), oldval, and value_.

◆ ~ComplexButton()

ComplexButton::~ComplexButton ( )

Definition at line 130 of file fltkcomplexbutton.cc.

Member Function Documentation

◆ down_box() [1/2]

Fl_Boxtype dw::fltk::ui::ComplexButton::down_box ( ) const
inline

Returns the current down box type, which is drawn when value() is non-zero.

Return values
Fl_Boxtype

Definition at line 55 of file fltkcomplexbutton.hh.

References down_box_.

Referenced by ComplexButton(), and draw().

◆ down_box() [2/2]

void dw::fltk::ui::ComplexButton::down_box ( Fl_Boxtype  b)
inline

Sets the down box type.

The default value of 0 causes FLTK to figure out the correct matching down version of box().

Parameters
[in]bdown box type

Definition at line 62 of file fltkcomplexbutton.hh.

References down_box_.

◆ draw()

void ComplexButton::draw ( )
protectedvirtual

Definition at line 45 of file fltkcomplexbutton.cc.

References down_box(), and value().

◆ handle()

int ComplexButton::handle ( int  event)
virtual

Definition at line 58 of file fltkcomplexbutton.cc.

References handle(), oldval, value(), and value_.

Referenced by handle().

◆ value() [1/2]

char dw::fltk::ui::ComplexButton::value ( ) const
inline

Returns the current value of the button (0 or 1).

Definition at line 49 of file fltkcomplexbutton.hh.

References value_.

Referenced by draw(), and handle().

◆ value() [2/2]

int ComplexButton::value ( int  v)

Sets the current value of the button.

A non-zero value sets the button to 1 (ON), and zero sets it to 0 (OFF).

Parameters
[in]vbutton value.

Definition at line 32 of file fltkcomplexbutton.cc.

References oldval, and value_.

Member Data Documentation

◆ down_box_

uchar dw::fltk::ui::ComplexButton::down_box_
private

Definition at line 33 of file fltkcomplexbutton.hh.

Referenced by down_box(), and down_box().

◆ oldval

char dw::fltk::ui::ComplexButton::oldval
private

Definition at line 32 of file fltkcomplexbutton.hh.

Referenced by ComplexButton(), handle(), and value().

◆ value_

char dw::fltk::ui::ComplexButton::value_
private

Definition at line 31 of file fltkcomplexbutton.hh.

Referenced by ComplexButton(), handle(), value(), and value().


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