|
Freya
0.0.1
A Gtk3 MPD Client
|
#include <CairoSlider.hh>
Public Member Functions | |
| CairoSlider () | |
| ~CairoSlider () | |
Protected Member Functions | |
| virtual bool | on_draw (const Cairo::RefPtr< Cairo::Context > &cr)=0 |
| Override to draw the widget. | |
| int | get_border () |
| Returns the current position of the slider. | |
| double | get_percentage () |
| Get the current percentage shown in the slider. | |
| void | set_percentage (double p) |
| Set the slider to p and redraw. | |
| virtual void | on_percent_change ()=0 |
| Called whenever the percentage changes. | |
| virtual double | get_update_timeout () |
| Only allows updates every <x.xx> seconds. | |
| virtual Gdk::RGBA & | get_active_color () |
| Get the active color of the slider. | |
| virtual Gdk::RGBA & | get_inactive_color () |
| Get the inactive color of the slider. | |
Definition at line 7 of file CairoSlider.hh.
| virtual Gdk::RGBA& CairoSlider::get_active_color | ( | ) | [protected, virtual] |
Get the active color of the slider.
| int CairoSlider::get_border | ( | ) | [protected] |
Returns the current position of the slider.
This is useful in on_draw(), you shouldn't calculate the percentage value from this though
| virtual Gdk::RGBA& CairoSlider::get_inactive_color | ( | ) | [protected, virtual] |
Get the inactive color of the slider.
| double CairoSlider::get_percentage | ( | ) | [protected] |
Get the current percentage shown in the slider.
| virtual double CairoSlider::get_update_timeout | ( | ) | [inline, protected, virtual] |
Only allows updates every <x.xx> seconds.
Definition at line 62 of file CairoSlider.hh.
| virtual bool CairoSlider::on_draw | ( | const Cairo::RefPtr< Cairo::Context > & | cr | ) | [protected, pure virtual] |
Override to draw the widget.
on_draw() is always called when the widget needs to be redrawn, therefore all drawing logic should happen here, possibly in a optimized way.
See also: http://developer.gnome.org/gtkmm-tutorial/3.0/chapter-drawingarea.html
| cr | a Cairo::Context |
Implemented in GManager::VolumeSlider.
| virtual void CairoSlider::on_percent_change | ( | ) | [protected, pure virtual] |
Called whenever the percentage changes.
Implemented in GManager::VolumeSlider.
| void CairoSlider::set_percentage | ( | double | p | ) | [protected] |
Set the slider to p and redraw.
| p | a double between 0.0 and 100.0 |
1.8.0