Freya  0.0.1
A Gtk3 MPD Client
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
GManager::VolumeSlider Class Reference

Manages the VolumeSlider. More...

#include <VolumeSlider.hh>

Inheritance diagram for GManager::VolumeSlider:
[legend]
Collaboration diagram for GManager::VolumeSlider:
[legend]

Public Member Functions

 VolumeSlider (MPD::Client &client, const Glib::RefPtr< Gtk::Builder > &builder)

Protected Member Functions

bool on_draw (const Cairo::RefPtr< Cairo::Context > &cr)
 Override to draw the widget.
void on_percent_change ()
 Called whenever the percentage changes.

Detailed Description

Manages the VolumeSlider.

Updates on the mixer event, only updates every 0.05 seconds to prevent high ressource-usage. Also schedules an Glib::signal_idle() event instead of executing it directly.

Definition at line 47 of file VolumeSlider.hh.


Constructor & Destructor Documentation

GManager::VolumeSlider::VolumeSlider ( MPD::Client &  client,
const Glib::RefPtr< Gtk::Builder > &  builder 
)

Member Function Documentation

bool GManager::VolumeSlider::on_draw ( const Cairo::RefPtr< Cairo::Context > &  cr) [protected, 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

Parameters:
cra Cairo::Context
Returns:
true if everything is handeled, false to let other callbacks be called

Implements CairoSlider.

void GManager::VolumeSlider::on_percent_change ( ) [protected, virtual]

Called whenever the percentage changes.

Implements CairoSlider.


The documentation for this class was generated from the following file: