Maeomm Reference Documentation: hildonsmm |
It represents an application running in the Hildon framework. The Hildon::Program tracks the top-most status of an application and informs the task navigator when the application can be hibernated.
It also provides tools to get and set menus and toolbars which are common for all application windows.
The Hildon::Program object is created by calling the static get_instance() method, which takes no parameters and returns a new Hildon::Program.
The following methods are of particular interest:
The menus can be made both manually or using the action-based Gtk::UIManager.
The main difference in maemo compared to normal GTK+/gtkmm usage is that toolbars can be common to all Hildon::Windows in an application or they can be used only in a particular HildonWindow.
Public Member Functions | ||||
void | add_window (Window& window) | |||
Registers a HildonWindow as belonging to a given HildonProgram . | ||||
bool | get_can_hibernate () const | |||
| ||||
const Gtk::Menu* | get_common_menu () const | |||
| ||||
Gtk::Menu* | get_common_menu () | |||
| ||||
const Gtk::Toolbar* | get_common_toolbar () const | |||
| ||||
Gtk::Toolbar* | get_common_toolbar () | |||
| ||||
bool | get_is_topmost () const | |||
| ||||
const HildonProgram* | gobj () const | |||
Provides access to the underlying C GObject. | ||||
HildonProgram* | gobj () | |||
Provides access to the underlying C GObject. | ||||
HildonProgram* | gobj_copy () | |||
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | ||||
void | remove_window (Window& window) | |||
Used to unregister a window from the program. | ||||
void | set_can_hibernate (bool can_hibernate=true) | |||
Used to set whether or not the Hildon task navigator should be able to set the program to hibernation in case of low memory. | ||||
void | set_common_menu (Gtk::Menu& menu) | |||
Sets a GtkMenu that will appear in all the HildonWindow registered to the Hildon::Program. | ||||
void | set_common_toolbar (Gtk::Toolbar& toolbar) | |||
Sets a GtkToolbar that will appear in all the HildonWindow registered to the Hildon::Program. | ||||
virtual | ~Program () | |||
Static Public Member Functions | ||||
static Glib::RefPtr<Program> | get_instance () | |||
| ||||
Related Functions | ||||
(Note that these are not member functions.) | ||||
Glib::RefPtr<Hildon::Program> | wrap (HildonProgram* object, bool take_copy=false) | |||
|
virtual Hildon::Program::~Program | ( | ) | [virtual] |
void Hildon::Program::add_window | ( | Window& | window | ) |
Registers a HildonWindow as belonging to a given HildonProgram .
This allows to apply program-wide settings as all the registered windows, such as hildon_program_set_common_menu() and hildon_pogram_set_common_toolbar()
window | A HildonWindow to be added. |
bool Hildon::Program::get_can_hibernate | ( | ) | const |
const Gtk::Menu* Hildon::Program::get_common_menu | ( | ) | const |
0
of no common menu was set.
Gtk::Menu* Hildon::Program::get_common_menu | ( | ) |
0
of no common menu was set.
const Gtk::Toolbar* Hildon::Program::get_common_toolbar | ( | ) | const |
0
of no common menu was set.
Gtk::Toolbar* Hildon::Program::get_common_toolbar | ( | ) |
0
of no common menu was set.
static Glib::RefPtr<Program> Hildon::Program::get_instance | ( | ) | [static] |
The object is created on the first call. Note that you're not supposed to unref the returned object since it's not reffed in the first place.
bool Hildon::Program::get_is_topmost | ( | ) | const |
const HildonProgram* Hildon::Program::gobj | ( | ) | const [inline] |
HildonProgram* Hildon::Program::gobj | ( | ) | [inline] |
HildonProgram* Hildon::Program::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void Hildon::Program::remove_window | ( | Window& | window | ) |
Used to unregister a window from the program.
Subsequent calls to hildon_program_set_common_menu() and hildon_pogram_set_common_toolbar() will not affect the window
window | The HildonWindow to unregister. |
void Hildon::Program::set_can_hibernate | ( | bool | can_hibernate = true |
) |
Used to set whether or not the Hildon task navigator should be able to set the program to hibernation in case of low memory.
can_hibernate | Whether or not the Hildon::Program can hibernate. |
void Hildon::Program::set_common_menu | ( | Gtk::Menu & | menu | ) |
Sets a GtkMenu that will appear in all the HildonWindow registered to the Hildon::Program.
Only one common GtkMenu can be set, further call will detach the previous common GtkMenu. A HildonWindow can use it's own GtkMenu with hildon_window_set_menu
menu | A GtkMenu to use as common menu for the program. |
void Hildon::Program::set_common_toolbar | ( | Gtk::Toolbar & | toolbar | ) |
Sets a GtkToolbar that will appear in all the HildonWindow registered to the Hildon::Program.
Only one common GtkToolbar can be set, further call will detach the previous common GtkToolbar. A HildonWindow can use its own GtkToolbar with hildon_window_set_toolbar . Both Hildon::Program and HildonWindow specific toolbars will be shown
toolbar | A GtkToolbar to use as common toolbar for the program. |
Glib::RefPtr<Hildon::Program> wrap | ( | HildonProgram * | object, | |
bool | take_copy = false | |||
) | [related] |
object | The C instance |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |