Canola
0.8.D001
|
#include <retro_button.h>
Public Member Functions | |
virtual | ~retro_button () |
retro_button (const char *caption, const char *color, const Gdk::RGBA &text_fg, bool toggle=false) | |
sigc::signal< void > | signal_clicked (void) |
sigc::signal< void > | signal_released (void) |
Private Member Functions | |
bool | pressed_callback (const _GdkEventButton *event) |
bool | released_callback (const _GdkEventButton *event) |
bool | enter_callback (const _GdkEventCrossing *event) |
bool | leave_callback (const _GdkEventCrossing *event) |
void | up (void) |
void | down (void) |
retro_button () | |
retro_button (const retro_button &rhs) | |
retro_button & | operator= (const retro_button &rhs) |
Private Attributes | |
Glib::RefPtr< Gdk::Pixbuf > | normal_image |
Glib::RefPtr< Gdk::Pixbuf > | active_image |
Glib::RefPtr< Gdk::Pixbuf > | disabled_image |
Gtk::Image | appearance |
Gtk::Label | text |
Gtk::Alignment | text_aligner |
Gtk::Fixed | layout |
sigc::signal< void > | signal_clicked_sender |
sigc::signal< void > | signal_released_sender |
bool | inside |
bool | pressed |
bool | toggle |
bool | active |
The retro_button class is used to represent the processing required to draw a retro button in the style of the original calculator.
Definition at line 28 of file retro_button.h.
retro_button::~retro_button | ( | ) | [virtual] |
The destructor.
Definition at line 22 of file retro_button.cc.
retro_button::retro_button | ( | const char * | caption, |
const char * | color, | ||
const Gdk::RGBA & | text_fg, | ||
bool | toggle = false |
||
) |
The constructor.
caption | The label to put on the top of the button. |
color | The vague color name of the button. |
text_fg | The foreground color to use for the caption. |
toggle | whether or not the button is a toggle button (true) or a normal button (false). |
Definition at line 35 of file retro_button.cc.
retro_button::retro_button | ( | ) | [private] |
The default constructor. Do not use.
retro_button::retro_button | ( | const retro_button & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
void retro_button::down | ( | void | ) | [private] |
The down method is used to perform the processing attendant to the button going down. It switches images and moves the label slightly.
Definition at line 183 of file retro_button.cc.
bool retro_button::enter_callback | ( | const _GdkEventCrossing * | event | ) | [private] |
The enter_callback method is used to handle the enter signal passed to us by the parent (base) class released signal. The constructor subscribes to the signal.
Definition at line 137 of file retro_button.cc.
bool retro_button::leave_callback | ( | const _GdkEventCrossing * | event | ) | [private] |
The fubar method is used to to handle the leave signal passed to us by the parent (base) class released signal. The constructor subscribes to the signal.
Definition at line 159 of file retro_button.cc.
retro_button& retro_button::operator= | ( | const retro_button & | rhs | ) | [private] |
The assignment operator. Do not use.
rhs | The right hand side of the assignment. |
bool retro_button::pressed_callback | ( | const _GdkEventButton * | event | ) | [private] |
The pressed_callback method is used to handle the pressed signal passed to us by the parent (base) class pressed signal. The constructor subscribes to the signal.
Definition at line 77 of file retro_button.cc.
bool retro_button::released_callback | ( | const _GdkEventButton * | event | ) | [private] |
The released method is used to handle the released signal passed to us by the parent (base) class released signal. The constructor subscribes to the signal.
Definition at line 96 of file retro_button.cc.
sigc::signal<void> retro_button::signal_clicked | ( | void | ) | [inline] |
The signal_clicked method is used to obtain the signal that will be issued when the button is clicked.
Definition at line 57 of file retro_button.h.
sigc::signal<void> retro_button::signal_released | ( | void | ) | [inline] |
The signal_released method is used to obtain the signal that will be issued when the button is released (toggle buttons only).
Definition at line 63 of file retro_button.h.
void retro_button::up | ( | void | ) | [private] |
The up method is used to perform the processing attendant to the button going up. It switches images and moves the label slightly.
Definition at line 191 of file retro_button.cc.
bool retro_button::active [private] |
The active instance variable is used to remember whether or not this button is in the "active" state at present.
Definition at line 187 of file retro_button.h.
Glib::RefPtr<Gdk::Pixbuf> retro_button::active_image [private] |
The normal_image instance variable is used to remember when the button looks like when it has been pressed.
Definition at line 76 of file retro_button.h.
Gtk::Image retro_button::appearance [private] |
The appearance instance variable is used to remember the state of the image widget displaying the image that looks like the button in it's present state.
Definition at line 89 of file retro_button.h.
Glib::RefPtr<Gdk::Pixbuf> retro_button::disabled_image [private] |
The normal_image instance variable is used to remember when the button looks like when it has been disabled.
Definition at line 82 of file retro_button.h.
bool retro_button::inside [private] |
The inside instance variable is used to remember whether or not the pointer is inside the button at the moment.
Definition at line 128 of file retro_button.h.
Gtk::Fixed retro_button::layout [private] |
The layout instance variable is used to remember the state of the way the image and the label are displayed for the button. In particular, the label is over the top of the button, but one pixel offset when pressed.
Definition at line 110 of file retro_button.h.
Glib::RefPtr<Gdk::Pixbuf> retro_button::normal_image [private] |
The normal_image instance variable is used to remember when the button looks like when it has not been pressed.
Definition at line 70 of file retro_button.h.
bool retro_button::pressed [private] |
The pressed instance variable is used to remember whether or not the button is pressed at the moment.
Definition at line 134 of file retro_button.h.
sigc::signal<void> retro_button::signal_clicked_sender [private] |
The signal_clicked_sender instance variable is used to remember the callbacks subscribed to the "clicked" signal.
Definition at line 116 of file retro_button.h.
sigc::signal<void> retro_button::signal_released_sender [private] |
The signal_released_sender instance variable is used to remember the callbacks subscribed to the "released" signal.
Definition at line 122 of file retro_button.h.
Gtk::Label retro_button::text [private] |
The text instance variable is used to remember the state of widget displaying the button's label.
Definition at line 95 of file retro_button.h.
Gtk::Alignment retro_button::text_aligner [private] |
The text_aligner instance variable is used to remember the state of the widget keeping the label centered over the present state image.
Definition at line 102 of file retro_button.h.
bool retro_button::toggle [private] |
The toggle instance variable is used to remember whether or no this button is a toggle button.
Definition at line 140 of file retro_button.h.