gltk
0.3
a C++ widget library built on GLUT
|
a combo of an Entry and two Buttons. More...
#include <spinbutton.hh>
Public Member Functions | |
SpinButton (double climb_rate=0.0, unsigned digits=0) | |
construct with initial climb_rate and digits | |
void | get_preferred_width (int &min, int &nat) const |
obtain minimum & natural widths | |
void | get_preferred_height (int &min, int &nat) const |
obtain minimum & natural heights | |
int | get_value_as_int () const |
get value as an int | |
unsigned | get_digits () const |
get digits | |
void | set_digits (unsigned digits) |
set digits | |
void | set_snap_to_ticks (bool snap_to_ticks) |
set snap_to_ticks | |
void | set_increments (double step, double page) |
set step and page increments | |
void | set_range (double min, double max) |
set the range of Adjustment | |
void | set_wrap (bool wrap=true) |
wrap value when limits are reached | |
void | set_width_chars (int n_chars) |
set the width of Entry field in number of characters | |
Protected Attributes | |
double | climb_rate |
acceleration rate when buttons are pressed | |
unsigned | digits |
number of digits after decimal place | |
bool | snap_to_ticks |
snap to multiples of step increment | |
bool | wrap |
wrap to opposite side when limit is reached |
SpinButton::SpinButton | ( | double | climb_rate = 0.0 , |
unsigned | digits = 0 |
||
) |
construct with initial climb_rate and digits
climb_rate | initial value for climb_rate |
digits | initial value for digits |