24 lines
469 B
C++
24 lines
469 B
C++
#pragma once
|
|
|
|
#include <gtkmm.h>
|
|
#include <sigc++/sigc++.h>
|
|
#include <string>
|
|
|
|
class VolumeWidget : public Gtk::Box {
|
|
public:
|
|
VolumeWidget();
|
|
virtual ~VolumeWidget();
|
|
|
|
// Refresh displayed volume from the system
|
|
void update();
|
|
|
|
protected:
|
|
// timeout handler for periodic polling; return true to keep polling
|
|
bool on_timeout();
|
|
|
|
private:
|
|
Gtk::Label label;
|
|
Glib::RefPtr<Gtk::GestureClick> click;
|
|
sigc::connection timeoutConn;
|
|
};
|