Canola
0.8.D001
|
#include <slider.h>
Public Types | |
typedef sigc::signal< void > | value_changed_signal_t |
Public Member Functions | |
virtual | ~slider () |
value_changed_signal_t & | value_changed_signal (void) |
int | get_value (void) const |
void | set_value (int n) |
Protected Member Functions | |
slider (const std::string &name, int npos, bool act_on_rel=false) | |
Private Types | |
typedef Glib::RefPtr< Gdk::Pixbuf > | pixbuf_pointer |
Private Member Functions | |
bool | on_button_press (GdkEventButton *ep) |
bool | on_button_release (GdkEventButton *ep) |
bool | on_motion_notify (GdkEventMotion *ep) |
void | update_value (int x, int y) |
slider () | |
slider (const slider &rhs) | |
slider & | operator= (const slider &rhs) |
Private Attributes | |
int | nvalues |
int | value |
std::vector< pixbuf_pointer > | value_images |
Gtk::Image | appearance |
bool | down |
bool | inside |
int | old_value |
int | frac |
value_changed_signal_t | value_changed_source |
bool | activate_on_release |
The slider class is used to represent a control that slides horizontally to assume one of several positions.
typedef Glib::RefPtr<Gdk::Pixbuf> slider::pixbuf_pointer [private] |
typedef sigc::signal<void> slider::value_changed_signal_t |
slider::~slider | ( | ) | [virtual] |
slider::slider | ( | const std::string & | name, |
int | npos, | ||
bool | act_on_rel = false |
||
) | [protected] |
The constructor. For use by derived classes only.
name | The base name of the images used to display the slider. |
npos | The number of positions (0..<n) the slider can assume. |
act_on_rel | Whether the widget is activated on release (true), or always active. |
slider::slider | ( | ) | [private] |
The default constructor. Do not use.
slider::slider | ( | const slider & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
int slider::get_value | ( | void | ) | const |
bool slider::on_button_press | ( | GdkEventButton * | ep | ) | [private] |
bool slider::on_button_release | ( | GdkEventButton * | ep | ) | [private] |
bool slider::on_motion_notify | ( | GdkEventMotion * | ep | ) | [private] |
The assignment operator. Do not use.
rhs | The right hand side of the assignment. |
void slider::set_value | ( | int | n | ) |
void slider::update_value | ( | int | x, |
int | y | ||
) | [private] |
The update_value method is used to take the position indivcated by an event, and determine whether or not the switch value has changed. If it has, the image will change, and a value_changed_source signal will be emitted.
bool slider::activate_on_release [private] |
Gtk::Image slider::appearance [private] |
bool slider::down [private] |
int slider::frac [private] |
bool slider::inside [private] |
int slider::nvalues [private] |
int slider::old_value [private] |
int slider::value [private] |
std::vector<pixbuf_pointer> slider::value_images [private] |