Fawkes API
Fawkes Development Version
|
Simple Gtk Throbber/Spinner. More...
#include <>>
Public Member Functions | |
Throbber (Gtk::IconSize &icon_size) | |
Constructor. | |
void | set_timeout (unsigned int timeout) |
Set the animation timeout. | |
bool | anim_running () |
Check if animation is running. | |
void | start_anim () |
Start animation. | |
void | stop_anim () |
Stop animation. | |
void | set_stock (const Gtk::StockID &stock_id) |
Set image from stock ID. |
Simple Gtk Throbber/Spinner.
The throbber shows a spinning icon as a small image. It has been specifically prepared to be used as a custom image Gtk::ToolItem in a Gtk::Toolbar. The icon is defined by the currently active Gtk theme.
fawkes::Throbber::Throbber | ( | Gtk::IconSize & | icon_size | ) |
Constructor.
icon_size | desired icon size. Be aware that the icon may not be available in all sizes in the current theme. |
Definition at line 73 of file throbber.cpp.
bool fawkes::Throbber::anim_running | ( | ) |
Check if animation is running.
Definition at line 172 of file throbber.cpp.
void fawkes::Throbber::set_stock | ( | const Gtk::StockID & | stock_id | ) |
Set image from stock ID.
The image will be overwritten by a running animation or when the animation is started again. It will not be automatically reset to this stock ID if the animation stops, rather you have to do this by yourself.
stock_id | stock ID of image to set |
Definition at line 207 of file throbber.cpp.
void fawkes::Throbber::set_timeout | ( | unsigned int | timeout | ) |
Set the animation timeout.
The animation timeout is the time between two frames. It defaults to 100ms.
timeout | new timeout for animation in ms |
Definition at line 162 of file throbber.cpp.
void fawkes::Throbber::start_anim | ( | ) |
Start animation.
Definition at line 179 of file throbber.cpp.
void fawkes::Throbber::stop_anim | ( | ) |
Stop animation.
Definition at line 189 of file throbber.cpp.