Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::Range Class Reference

A GtkRange C++ wrapper class. More...

#include <xfc/gtk/range.hh>

Inheritance diagram for Xfc::Gtk::Range:

Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable Xfc::Gtk::Scale Xfc::Gtk::Scrollbar Xfc::Gtk::HScale Xfc::Gtk::VScale Xfc::Gtk::HScrollbar Xfc::Gtk::VScrollbar List of all members.

Signal Prototypes

Public Member Functions

Accessors
Methods
Signal Proxies

Detailed Description

A GtkRange C++ wrapper class.

Range is the base class for widgets that show an adjustable range, such as Scale and Scrollbar.

See also: the Range Widget HOWTO and example.


Constructor & Destructor Documentation

Xfc::Gtk::Range::Range ( GtkRange *  range,
bool  owns_reference = false 
) [explicit, protected]

Construct a new Range from an existing GtkRange.

Parameters:
range A pointer to a GtkRange.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The range can be a newly created GtkRange or an existing GtkRange (see G::Object::Object).

Xfc::Gtk::Range::Range ( GtkRange *  range,
bool  owns_reference = false 
) [explicit, protected]

Construct a new Range from an existing GtkRange.

Parameters:
range A pointer to a GtkRange.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The range can be a newly created GtkRange or an existing GtkRange (see G::Object::Object).


Member Function Documentation

UpdateType Xfc::Gtk::Range::get_policy (  )  const

Gets the update policy of range (see set_update_policy()).

Returns:
The current update policy.

Adjustment* Xfc::Gtk::Range::get_adjustment (  )  const

Get the Adjustment which is the "model" object for Range (see set_adjustment() for details).

Returns:
The Adjustemnt.
The return value does not have a reference added, so it should not be unreferenced.

bool Xfc::Gtk::Range::get_inverted (  )  const

Gets the value set by set_inverted().

Returns:
true if the range is inverted.

void Xfc::Gtk::Range::set_update_policy ( UpdateType  policy  ) 

Sets the update policy for the range.

Parameters:
policy The update policy.
UPDATE_CONTINUOUS means that anytime the range slider is moved, the range value will change and the value_changed signal will be emitted. UPDATE_DELAYED means that the value will be updated after a brief timeout where no slider motion occurs, so updates are spaced by a short time rather than continuous. UPDATE_DISCONTINUOUS means that the value will only be updated when the user releases the button and ends the slider drag operation.

void Xfc::Gtk::Range::set_adjustment ( Adjustment adjustment  ) 

Sets the adjustment to be used as the "model" object for this range widget.

Parameters:
adjustment The Adjustment.
The adjustment indicates the current range value, the minimum and maximum range values, the step/page increments used for keybindings and scrolling, and the page size. The page size is normally 0 for Scale and non-zero for Scrollbar, and indicates the size of the visible area of the widget being scrolled. The page size affects the size of the scrollbar slider.

void Xfc::Gtk::Range::set_inverted ( bool  setting  ) 

Sets whether the lower to higher values should be inverted.

Parameters:
setting Set true to invert the range.
Ranges normally move from lower to higher values as the slider moves from top to bottom or left to right. Inverted ranges have higher values at the top or on the left rather than on the bottom or right.

void Xfc::Gtk::Range::set_increments ( double  step,
double  page 
)

Sets the step and page sizes for the range.

Parameters:
step The step size.
page The page size.
The step size is used when the user clicks the Scrollbar arrows or moves GtkScale via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.

void Xfc::Gtk::Range::set_range ( double  min,
double  max 
)

Sets the allowable values in the Range, and clamps the range value to be between min and max.

Parameters:
min The minimum range value.
max The maximum range value.
If the range has a non-zero page size, it is clamped between min and max - page-size.

void Xfc::Gtk::Range::set_value ( double  value  ) 

Sets the current value of the range; if the value is outside the minimum or maximum range values, it will be clamped to fit inside them.

Parameters:
value The new value of the range.
The range emits the "value_changed" signal if the value changes.


Member Data Documentation

const ValueChangedSignalType Xfc::Gtk::Range::value_changed_signal [static, protected]

Value changed signal (see signal_value_changed()).

Calls a slot with the signature:

< void function();
<

const AdjustBoundsSignalType Xfc::Gtk::Range::adjust_bounds_signal [static, protected]

Adjust bounds signal (see signal_adjust_bounds()).

Calls a slot with the signature:

< void function(double new_value);
< // new_value: The new range value.
<


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3