Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::Throbber Class Reference

Simple Gtk Throbber/Spinner. More...

#include <>>

Public Member Functions

 Throbber (Gtk::IconSize &icon_size)
 Constructor.
 Throbber (BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &builder)
 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.

Detailed Description

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.

Author
Tim Niemueller

Definition at line 31 of file throbber.h.

Constructor & Destructor Documentation

fawkes::Throbber::Throbber ( Gtk::IconSize &  icon_size)

Constructor.

Parameters
icon_sizedesired icon size. Be aware that the icon may not be available in all sizes in the current theme.

Definition at line 71 of file throbber.cpp.

fawkes::Throbber::Throbber ( BaseObjectType *  cobject,
const Glib::RefPtr< Gtk::Builder > &  builder 
)

Constructor.

Special ctor to be used with Gtk::Builder's get_widget_derived().

Parameters
cobjectGtk C object
builderGtk builder

Definition at line 52 of file throbber.cpp.

Member Function Documentation

bool fawkes::Throbber::anim_running ( )

Check if animation is running.

Returns
true if animation is currently running, false otherwise.

Definition at line 170 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.

Parameters
stock_idstock ID of image to set

Definition at line 205 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.

Parameters
timeoutnew timeout for animation in ms

Definition at line 160 of file throbber.cpp.

void fawkes::Throbber::start_anim ( )

Start animation.

Definition at line 177 of file throbber.cpp.

void fawkes::Throbber::stop_anim ( )

Stop animation.

Definition at line 187 of file throbber.cpp.


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