Google

logo top
Main Page   Widgets   Namespaces   Book  

Gtk::Scale Class Reference
[Widgets]

Abstract base clase for Gtk::HScale and Gtk::VScale. More...

Inheritance diagram for Gtk::Scale:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~Scale ()
GtkScale* gobj ()
const GtkScale* gobj () const
void set_digits (int digits)
 Set the number of decimal digits.

int get_digits () const
 Get the number of decimal digits.

void set_draw_value (bool draw_value=true)
 Set whether the current value is displayed as a string next to the slider.

bool get_draw_value () const
 Get whether the current value is displayed as a string next to the slider.

void set_value_pos (PositionType pos)
 Set the position in which the value is displayed.

PositionType get_value_pos () const
 Get the position in which the value is displayed.

Glib::SignalProxy1< Glib::ustring,
double > 
signal_format_value ()
Glib::PropertyProxy<int> property_digits ()
 Number of displayed decimal digits.

Glib::PropertyProxy<bool> property_draw_value ()
 Whether to draw the value as a string next to slider.

Glib::PropertyProxy<PositionTypeproperty_value_pos ()
 The position in which the value is displayed.


Protected Methods

virtual void draw_value_vfunc ()
virtual Glib::ustring on_format_value (double value)
 Scale ()
virtual int calc_digits_ (double step)

Related Functions

(Note that these are not member functions.)

Gtk::Scale* wrap (GtkScale* object, bool take_copy=false)

Detailed Description

Abstract base clase for Gtk::HScale and Gtk::VScale.

A Gtk::Scale is a slider control used to select a numeric value. To use it, you'll probably want to investigate the methods on its base class, Gtk::Range, in addition to the methods for Gtk::Scale itself. To set the value of a scale, you would normally use set_value(). To detect changes to the value, you would normally use signal_value_changed().

The Gtk::Scale widget is an abstract class, used only for deriving the subclasses Gtk::HScale and Gtk::VScale, so you should instantiate them instead.


Constructor & Destructor Documentation

virtual Gtk::Scale::~Scale (   [virtual]
 

Gtk::Scale::Scale (   [protected]
 


Member Function Documentation

virtual int Gtk::Scale::calc_digits_ ( double    step [protected, virtual]
 

virtual void Gtk::Scale::draw_value_vfunc (   [protected, virtual]
 

int Gtk::Scale::get_digits (   const
 

Get the number of decimal digits.

bool Gtk::Scale::get_draw_value (   const
 

Get whether the current value is displayed as a string next to the slider.

PositionType Gtk::Scale::get_value_pos (   const
 

Get the position in which the value is displayed.

const GtkScale* Gtk::Scale::gobj (   const [inline]
 

Reimplemented from Gtk::Range.

Reimplemented in Gtk::VScale, and Gtk::HScale.

GtkScale* Gtk::Scale::gobj (   [inline]
 

Reimplemented from Gtk::Range.

Reimplemented in Gtk::VScale, and Gtk::HScale.

virtual Glib::ustring Gtk::Scale::on_format_value ( double    value [protected, virtual]
 

Glib::PropertyProxy<int> Gtk::Scale::property_digits (  
 

Number of displayed decimal digits.

Glib::PropertyProxy<bool> Gtk::Scale::property_draw_value (  
 

Whether to draw the value as a string next to slider.

Glib::PropertyProxy<PositionType> Gtk::Scale::property_value_pos (  
 

The position in which the value is displayed.

void Gtk::Scale::set_digits ( int    digits
 

Set the number of decimal digits.

This also causes the adjustment to be rounded off so the retrieved value matches the value the user sees. Setting digits to 1 gives for example 1.0, 2 gives 1.00, etc.

void Gtk::Scale::set_draw_value ( bool    draw_value = true
 

Set whether the current value is displayed as a string next to the slider.

void Gtk::Scale::set_value_pos ( PositionType    pos
 

Set the position in which the value is displayed.

Glib::SignalProxy1<Glib::ustring,double> Gtk::Scale::signal_format_value (  
 

Prototype:
Glib::ustring format_value(double value)


Friends And Related Function Documentation

Gtk::Scale* wrap ( GtkScale*    object,
bool    take_copy = false
[related]
 


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