Maeomm Reference Documentation: hildonmm |
Public Member Functions | |
virtual | ~Program () |
HildonProgram* | gobj () |
Provides access to the underlying C GObject. | |
const HildonProgram* | gobj () const |
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 | add_window (Window& window) |
Registers a Hildon::Window as belonging to a given Hildon::Program. | |
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. | |
bool | get_can_hibernate () const |
Return value: true if the program can hibernate, false otherwise. | |
void | set_common_menu (Gtk::Menu& menu) |
Sets a Gtk::Menu that will appear in all Hildon::Windows registered with the Hildon::Program. | |
Gtk::Menu* | get_common_menu () |
Return value: the Gtk::Menu or 0 of no common menu was set. | |
const Gtk::Menu* | get_common_menu () const |
Return value: the Gtk::Menu or 0 of no common menu was set. | |
void | set_common_app_menu (AppMenu& menu) |
Sets a Hildon::AppMenu that will appear in all Hildon::Windows registered with the Hildon::Program. | |
AppMenu* | get_common_app_menu () |
Return value: the Hildon::AppMenu or 0 of no common app menu was. | |
const AppMenu* | get_common_app_menu () const |
Return value: the Hildon::AppMenu or 0 of no common app menu was. | |
void | set_common_toolbar (Gtk::Toolbar& toolbar) |
Sets a Gtk::Toolbar that will appear in all the Hildon::Window registered to the Hildon::Program. | |
Gtk::Toolbar* | get_common_toolbar () |
Return value: the Gtk::Toolbar or 0 of no common toolbar was. | |
const Gtk::Toolbar* | get_common_toolbar () const |
Return value: the Gtk::Toolbar or 0 of no common toolbar was. | |
bool | get_is_topmost () const |
Return value: true if a window or dialog is topmost, false . | |
Static Public Member Functions | |
static Glib::RefPtr<Program> | get_instance () |
Return value: the Hildon::Program. | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr<Hildon::Program> | wrap (HildonProgram* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
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 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.
virtual Hildon::Program::~Program | ( | ) | [virtual] |
HildonProgram* Hildon::Program::gobj | ( | ) | [inline] |
const HildonProgram* Hildon::Program::gobj | ( | ) | const [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.
static Glib::RefPtr<Program> Hildon::Program::get_instance | ( | ) | [static] |
void Hildon::Program::add_window | ( | Window& | window | ) |
Registers a Hildon::Window as belonging to a given Hildon::Program.
This allows to apply program-wide settings as all the registered windows, such as set_common_menu(), set_common_app_menu() and set_common_toolbar().
window | A Hildon::Window to be added. |
void Hildon::Program::remove_window | ( | Window& | window | ) |
Used to unregister a window from the program.
Subsequent calls to set_common_menu(), set_common_app_menu() and set_common_toolbar() will not affect the window.
window | The Hildon::Window 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. |
bool Hildon::Program::get_can_hibernate | ( | ) | const |
Return value: true
if the program can hibernate, false
otherwise.
true
if the program can hibernate, false
otherwise. void Hildon::Program::set_common_menu | ( | Gtk::Menu & | menu | ) |
Sets a Gtk::Menu that will appear in all Hildon::Windows registered with the Hildon::Program.
Only one common Gtk::Menu can be set, further calls will detach the previous common Gtk::Menu. A Hildon::Window can use its own Gtk::Menu with Hildon::Window::set_menu()
This method does not support Hildon::AppMenus. See set_common_app_menu() for that.
menu | A Gtk::Menu to use as common menu for the program. |
Gtk::Menu* Hildon::Program::get_common_menu | ( | ) |
const Gtk::Menu* Hildon::Program::get_common_menu | ( | ) | const |
void Hildon::Program::set_common_app_menu | ( | AppMenu& | menu | ) |
Sets a Hildon::AppMenu that will appear in all Hildon::Windows registered with the Hildon::Program.
Only one common Hildon::AppMenu can be set, further calls will detach the previous common Hildon::AppMenu. A Hildon::Window can use its own Hildon::AppMenu with Hildon::Window::set_app_menu()
This method does not support Gtk::Menus. See set_common_menu() for that.
menu | A Hildon::AppMenu to use as common menu for the program. |
AppMenu* Hildon::Program::get_common_app_menu | ( | ) |
Return value: the Hildon::AppMenu or 0
of no common app menu was.
0
of no common app menu was set.const AppMenu* Hildon::Program::get_common_app_menu | ( | ) | const |
Return value: the Hildon::AppMenu or 0
of no common app menu was.
0
of no common app menu was set.void Hildon::Program::set_common_toolbar | ( | Gtk::Toolbar & | toolbar | ) |
Sets a Gtk::Toolbar that will appear in all the Hildon::Window registered to the Hildon::Program.
Only one common Gtk::Toolbar can be set, further call will detach the previous common Gtk::Toolbar. A Hildon::Window can use its own Gtk::Toolbar with Hildon::Window::add_toolbar(). Both Hildon::Program and Hildon::Window specific toolbars will be shown
toolbar | A Gtk::Toolbar to use as common toolbar for the program. |
Gtk::Toolbar* Hildon::Program::get_common_toolbar | ( | ) |
Return value: the Gtk::Toolbar or 0
of no common toolbar was.
0
of no common toolbar was set. const Gtk::Toolbar* Hildon::Program::get_common_toolbar | ( | ) | const |
Return value: the Gtk::Toolbar or 0
of no common toolbar was.
0
of no common toolbar was set. bool Hildon::Program::get_is_topmost | ( | ) | const |
Return value: true
if a window or dialog is topmost, false
.
true
if a window or dialog is topmost, false
otherwise.
Glib::RefPtr<Hildon::Program> wrap | ( | HildonProgram * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
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. |