Class Index Cross Index Namespace Index

Class Gtk::Adjustment

A GtkObject representing an adjustable bounded value.
Contained in: Gtk
Derived from: Gtk::Data
Derived by: none

#include <gtk--/adjustment.h>


public function member index:

Adjustment(gfloat value, gfloat lower, gfloat upper, gfloat step_increment=1, gfloat page_increment=10, gfloat page_size=0);
emitable signal void changed();
void clamp_page(gfloat lower, gfloat upper);
gfloat get_lower() const;
gfloat get_page_increment() const;
gfloat get_page_size() const;
gfloat get_step_increment() const;
gfloat get_upper() const;
gfloat get_value() const;
GtkAdjustment* gtkobj();
const GtkAdjustment* gtkobj() const;
static bool isA(Object* object);
void set_lower(gfloat lower);
void set_page_increment(gfloat incr);
void set_page_size(gfloat size);
void set_step_increment(gfloat incr);
void set_upper(gfloat upper);
void set_value(gfloat value);
emitable signal void value_changed();
virtual ~Adjustment();
 

protected function member index:

virtual void changed_impl();
virtual void value_changed_impl();
 

Description:

The adjustment is used for holding numerical values and controlling the range of values a widget can take on. It can be used with the Gtk::SpinButton::, Gtk::ScrollBar::, and Gtk::Scale:: widgets.


Function Member Descriptions:

Gtk::Adjustment::Adjustment - Constructor.

Adjustment(gfloat value, gfloat lower, gfloat upper, gfloat step_increment=1, gfloat page_increment=10, gfloat page_size=0);
value: The initial value of the adjustment, and consequently, the widget that uses this adjustment. This value must be between lower and upper.

lower: The lowest value this adjustment can take.

upper: An upper value for the adjustment, but see below to determine what this value should be set to.

step_increment: The amount the adjustment changes when incremented by one. For example, clicking on a scrollbar's left or right arrows will change the value by this amount.

page_increment: The amount an adjustment changes when "paged". Clicking in the trough of a scrollbar or using the page up and page down keys will change the value by this amount.

page_size: The relative size of a scrollbar's (or another widget's equivalent) handle. For example, if upper-lower equals 100, and page_size equals 25, then the bar will fill 1/4th of the width or height of the widget, leaving 3/4ths left as trough.

The upper value is not the maximum value that the adjustment can achieve. To calculate the upper value, determine what you want the maximum value for the adjustment to be, and add the page_size amount to that.



Gtk::Adjustment::changed -



emitable signal void changed();
virtual void changed_impl();

Gtk::Adjustment::clamp_page -



void clamp_page(gfloat lower, gfloat upper);

Gtk::Adjustment::get_lower - Returns the current lower value.

gfloat get_lower() const;

Gtk::Adjustment::get_page_increment - Returns the current page_increment value.

gfloat get_page_increment() const;

Gtk::Adjustment::get_page_size - Returns the current page_size value.

gfloat get_page_size() const;

Gtk::Adjustment::get_step_increment - Returns the current step_increment value.

gfloat get_step_increment() const;

Gtk::Adjustment::get_upper - Returns the current upper value.

gfloat get_upper() const;

Gtk::Adjustment::get_value - Returns the current value.

gfloat get_value() const;

Gtk::Adjustment::gtkobj - Returns the underlaying gtk+ object.

GtkAdjustment* gtkobj();

Gtk::Adjustment::isA - Returns true if object is this type.

static bool isA(Object* object);

Gtk::Adjustment::set_lower - Sets the lower value.

void set_lower(gfloat lower);

Gtk::Adjustment::set_page_increment - Sets the page_increment value.

void set_page_increment(gfloat incr);

Gtk::Adjustment::set_page_size - Sets the page_size value.

void set_page_size(gfloat size);

Gtk::Adjustment::set_step_increment - Sets the step_increment value.

void set_step_increment(gfloat incr);

Gtk::Adjustment::set_upper - Sets the upper value.

void set_upper(gfloat upper);

Gtk::Adjustment::set_value - Set the adjustment to a specific value. Will by default emit the value_changed signal.

void set_value(gfloat value);

Gtk::Adjustment::value_changed - This signal is emmited when the adjustment's value has changed.

emitable signal void value_changed();
virtual void value_changed_impl();