[gtkmm] ApplicationWindow: Add get_id() and documentation.



commit fb8e40064047d08afb5ff9d09f0e834d6b73ebbb
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Sep 25 22:22:53 2012 +0200

    ApplicationWindow: Add get_id() and documentation.
    
            * gtk/src/applicationwindow.hg: Wrap the new method and add
    class overview documentation based on the GTK+ documentation.

 ChangeLog                    |    7 +++++++
 gtk/src/applicationwindow.hg |   42 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 48 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 510a2ba..6bbb21c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-09-25  Murray Cumming  <murrayc murrayc com>
 
+        ApplicationWindow: Add get_id() and documentation.
+
+        * gtk/src/applicationwindow.hg: Wrap the new method and add 
+	class overview documentation based on the GTK+ documentation.
+
+2012-09-25  Murray Cumming  <murrayc murrayc com>
+
         IconView: Added some new methods and properties.
 
         * gtk/src/iconview.hg: Added get_item_row() and get_item_column().
diff --git a/gtk/src/applicationwindow.hg b/gtk/src/applicationwindow.hg
index 47c6733..8881a7e 100644
--- a/gtk/src/applicationwindow.hg
+++ b/gtk/src/applicationwindow.hg
@@ -27,7 +27,45 @@ _PINCLUDE(gtkmm/private/window_p.h)
 namespace Gtk
 {
 
-/** TODO
+/** A Gtk::Window subclass with Gtk::Application support.
+ *
+ * ApplicationWindow is a Gtk::Window subclass that offers some
+ * extra functionality for better integration with Gtk::Application
+ * features.  Notably, it can handle both the application menu as well
+ * as the menubar. See set_app_menu() and
+ * set_menubar().
+ *
+ * This class derives from Gio::ActionGroup and Gio::ActionMap,
+ * to let you add window-specific actions that will be exported by the
+ * associated Gtk::Application, together with its application-wide
+ * actions.  Window-specific actions are prefixed with the "win."
+ * prefix and application-wide actions are prefixed with the "app."
+ * prefix.  Actions must be addressed with the prefixed name when
+ * referring to them from a Gio::MenuModel.
+ *
+ * Note that widgets that are placed inside a Gtk::ApplicationWindow
+ * can also activate these actions, if they implement the
+ * Gtk::Actionable interface.
+ *
+ * As with Gtk::Application, the GDK lock will be acquired when
+ * processing actions arriving from other processes and should therefore
+ * be held when activating actions locally (if GDK threads are enabled).
+ *
+ * The settings Gtk::Settings::property_gtk_shell_shows_app_menu() and
+ * Gtk::Settings::property_gtk_shell_shows_menubar() tell GTK+ whether the
+ * desktop environment is showing the application menu and menubar
+ * models outside the application as part of the desktop shell.
+ * For instance, on OS X, both menus will be displayed remotely;
+ * on Windows neither will be. gnome-shell (starting with version 3.4)
+ * will display the application menu, but not the menubar.
+ *
+ * If the desktop environment does not display the menubar, then
+ * Gtk::ApplicationWindow will automatically show a Gtk::MenuBar for it.
+ * (see the <a href="http://developer.gnome.org/gtk3/stable/GtkApplication.html#GtkApplication.description";>GtkApplication documentation</a> for some screenshots of how this
+ * looks on different platforms).
+ * This behaviour can be overridden with the Gtk::ApplicationWindow::property_show_menubar()
+ * property. If the desktop environment does not display the application
+ * menu, then it will automatically be included in the menubar.
  */
 class ApplicationWindow
 : public Gtk::Window,
@@ -45,6 +83,8 @@ public:
   _WRAP_METHOD(void set_show_menubar(bool show_menubar = true), gtk_application_window_set_show_menubar)
   _WRAP_METHOD(bool get_show_menubar() const, gtk_application_window_get_show_menubar)
 
+  _WRAP_METHOD(guint get_id() const, gtk_application_window_get_id)
+
   _WRAP_PROPERTY("show-menubar", bool)
 };
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]