logo top
Main Page   Widgets   Namespaces   Book  

Gtk::SpinButton Class Reference
[Widgets]

Inheritance diagram for Gtk::SpinButton:

Inheritance graph
[legend]
List of all members.

Detailed Description

numeric Entry with up/down buttons Slightly misnamed, this should be called a SpinEntry.


Public Member Functions

void configure (Adjustment& adjustment, double climb_rate, guint digits)
const Gtk::Adjustmentget_adjustment () const
 Get the adjustment associated with a Gtk::SpinButton.
Gtk::Adjustmentget_adjustment ()
 Get the adjustment associated with a Gtk::SpinButton.
guint get_digits () const
 Fetches the precision of spin_button .
void get_increments (double& step, double& page) const
 Gets the current step and page the increments used by spin_button .
bool get_numeric () const
 Returns whether non-numeric text can be typed into the spin button.
void get_range (double& min, double& max) const
 Gets the range allowed for spin_button .
bool get_snap_to_ticks () const
 Returns whether the values are corrected to the nearest step.
SpinButtonUpdatePolicy get_update_policy () const
 Gets the update behavior of a spin button.
double get_value () const
 Get the value in the spin_button .
int get_value_as_int () const
 Get the value spin_button represented as an integer.
bool get_wrap () const
 Returns whether the spin button's value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.
const GtkSpinButton* gobj () const
 Provides access to the underlying C GtkObject.
GtkSpinButton* gobj ()
 Provides access to the underlying C GtkObject.
void set_adjustment (Adjustment& adjustment)
 Replaces the Gtk::Adjustment associated with spin_button .
void set_digits (guint digits)
 Set the precision to be displayed by spin_button .
void set_increments (double step, double page)
 Sets the step and page increments for spin_button.
void set_numeric (bool numeric=true)
 Sets the flag that determines if non-numeric text can be typed into the spin button.
void set_range (double min, double max)
 Sets the minimum and maximum allowable values for spin_button.
void set_snap_to_ticks (bool snap_to_ticks=true)
 Sets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.
void set_update_policy (SpinButtonUpdatePolicy policy)
 Sets the update behavior of a spin button.
void set_value (double value)
 Set the value of spin_button .
void set_wrap (bool wrap=true)
 Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.
Glib::SignalProxy1<int, double*> signal_input ()
 
Prototype:
int input(double* new_value)

Glib::SignalProxy0<bool> signal_output ()
 
Prototype:
bool output()

Glib::SignalProxy0<void> signal_value_changed ()
 
Prototype:
void value_changed()

void spin (SpinType direction, double increment)
 Increment or decrement a spin button's value in a specified direction by a specified amount.
 SpinButton (Adjustment& adjustment, double climb_rate=0.0, guint digits=0)
 SpinButton (double climb_rate=0.0, guint digits=0)
void unset_adjustment ()
void update ()
 Manually force an update of the spin button.
virtual ~SpinButton ()

Related Functions

(Note that these are not member functions.)

Gtk::SpinButtonwrap (GtkSpinButton* object, bool take_copy=false)
 
Parameters:
object The C instance


Constructor & Destructor Documentation

virtual Gtk::SpinButton::~SpinButton (  )  [virtual]

Gtk::SpinButton::SpinButton ( double  climb_rate = 0.0,
guint  digits = 0 
)

Gtk::SpinButton::SpinButton ( Adjustment adjustment,
double  climb_rate = 0.0,
guint  digits = 0 
) [explicit]


Member Function Documentation

void Gtk::SpinButton::configure ( Adjustment adjustment,
double  climb_rate,
guint  digits 
)

const Gtk::Adjustment* Gtk::SpinButton::get_adjustment (  )  const

Get the adjustment associated with a Gtk::SpinButton.

Returns:
The Gtk::Adjustment of spin_button .

Gtk::Adjustment* Gtk::SpinButton::get_adjustment (  ) 

Get the adjustment associated with a Gtk::SpinButton.

Returns:
The Gtk::Adjustment of spin_button .

guint Gtk::SpinButton::get_digits (  )  const

Fetches the precision of spin_button .

See set_digits().

Returns:
The current precision.

void Gtk::SpinButton::get_increments ( double &  step,
double &  page 
) const

Gets the current step and page the increments used by spin_button .

See set_increments().

Parameters:
step Location to store step increment, or 0.
page Location to store page increment, or 0.

bool Gtk::SpinButton::get_numeric (  )  const

Returns whether non-numeric text can be typed into the spin button.

See set_numeric().

Returns:
true if only numeric text can be entered.

void Gtk::SpinButton::get_range ( double &  min,
double &  max 
) const

Gets the range allowed for spin_button .

See set_range().

Parameters:
min Location to store minimum allowed value, or 0.
max Location to store maximum allowed value, or 0.

bool Gtk::SpinButton::get_snap_to_ticks (  )  const

Returns whether the values are corrected to the nearest step.

See set_snap_to_ticks().

Returns:
true if values are snapped to the nearest step.

SpinButtonUpdatePolicy Gtk::SpinButton::get_update_policy (  )  const

Gets the update behavior of a spin button.

See set_update_policy().

Returns:
The current update policy.

double Gtk::SpinButton::get_value (  )  const

Get the value in the spin_button .

Returns:
The value of spin_button .

int Gtk::SpinButton::get_value_as_int (  )  const

Get the value spin_button represented as an integer.

Returns:
The value of spin_button .

bool Gtk::SpinButton::get_wrap (  )  const

Returns whether the spin button's value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.

See set_wrap().

Returns:
true if the spin button wraps around.

const GtkSpinButton* Gtk::SpinButton::gobj (  )  const [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Entry.

GtkSpinButton* Gtk::SpinButton::gobj (  )  [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Entry.

void Gtk::SpinButton::set_adjustment ( Adjustment adjustment  ) 

Replaces the Gtk::Adjustment associated with spin_button .

Parameters:
adjustment A Gtk::Adjustment to replace the existing adjustment.

void Gtk::SpinButton::set_digits ( guint  digits  ) 

Set the precision to be displayed by spin_button .

Up to 20 digit precision is allowed.

Parameters:
digits The number of digits after the decimal point to be displayed for the spin button's value.

void Gtk::SpinButton::set_increments ( double  step,
double  page 
)

Sets the step and page increments for spin_button.

This affects how quickly the value changes when the spin button's arrows are activated.

Parameters:
step Increment applied for a button 1 press.
page Increment applied for a button 2 press.

void Gtk::SpinButton::set_numeric ( bool  numeric = true  ) 

Sets the flag that determines if non-numeric text can be typed into the spin button.

Parameters:
numeric Flag indicating if only numeric entry is allowed.

void Gtk::SpinButton::set_range ( double  min,
double  max 
)

Sets the minimum and maximum allowable values for spin_button.

Parameters:
min Minimum allowable value.
max Maximum allowable value.

void Gtk::SpinButton::set_snap_to_ticks ( bool  snap_to_ticks = true  ) 

Sets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.

Parameters:
snap_to_ticks A flag indicating if invalid values should be corrected.

void Gtk::SpinButton::set_update_policy ( SpinButtonUpdatePolicy  policy  ) 

Sets the update behavior of a spin button.

This determines whether the spin button is always updated or only when a valid value is set.

Parameters:
policy A Gtk::SpinButtonUpdatePolicy value.

void Gtk::SpinButton::set_value ( double  value  ) 

Set the value of spin_button .

Parameters:
value The new value.

void Gtk::SpinButton::set_wrap ( bool  wrap = true  ) 

Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.

Parameters:
wrap A flag indicating if wrapping behavior is performed.

Glib::SignalProxy1< int,double* > Gtk::SpinButton::signal_input (  ) 

Prototype:
int input(double* new_value)

Glib::SignalProxy0< bool > Gtk::SpinButton::signal_output (  ) 

Prototype:
bool output()

Glib::SignalProxy0< void > Gtk::SpinButton::signal_value_changed (  ) 

Prototype:
void value_changed()

void Gtk::SpinButton::spin ( SpinType  direction,
double  increment 
)

Increment or decrement a spin button's value in a specified direction by a specified amount.

Parameters:
direction A Gtk::SpinType indicating the direction to spin.
increment Step increment to apply in the specified direction.

void Gtk::SpinButton::unset_adjustment (  ) 

void Gtk::SpinButton::update (  ) 

Manually force an update of the spin button.


Friends And Related Function Documentation

Gtk::SpinButton* wrap ( GtkSpinButton *  object,
bool  take_copy = false 
) [related]

Parameters:
object The C instance

Parameters:
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated for gtkmm 2.4 by Doxygen 1.5.1 © 1997-2001