[gtkmm] Added OffscreenWindow. Added Window::get/set_mnemonics_visible().
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtkmm] Added OffscreenWindow. Added Window::get/set_mnemonics_visible().
- Date: Thu, 14 Jan 2010 12:12:22 +0000 (UTC)
commit f1ea90918b3b486d7dbbb1bc64838673d8648550
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Jan 14 13:12:12 2010 +0100
Added OffscreenWindow. Added Window::get/set_mnemonics_visible().
* gtk/src/offscreenwindow.[hg|ccg]: Added this, wrapping
GtkOffscreenWindow.
* gtk/gtkmm.h: Include offscreenwindow.h.
* gtk/src/window.hg: Added get/set_mnemonics_visible().
Added mnemonics, accept-focus, and focus-on-map properties.
ChangeLog | 18 +++++++++--
gtk/gtkmm.h | 1 +
gtk/src/filelist.am | 1 +
gtk/src/offscreenwindow.ccg | 30 +++++++++++++++++++
gtk/src/offscreenwindow.hg | 67 +++++++++++++++++++++++++++++++++++++++++++
gtk/src/window.hg | 10 +++++-
6 files changed, 121 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4cf2cf3..e522153 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,14 @@
-2010-01-14 Murray Cumming <murrayc murrayc-desktop>
+2010-01-14 Murray Cumming <murrayc murrayc com>
+
+ Added OffscreenWindow. Added Window::get/set_mnemonics_visible().
+
+ * gtk/src/offscreenwindow.[hg|ccg]: Added this, wrapping
+ GtkOffscreenWindow.
+ * gtk/gtkmm.h: Include offscreenwindow.h.
+ * gtk/src/window.hg: Added get/set_mnemonics_visible().
+ Added mnemonics, accept-focus, and focus-on-map properties.
+
+2010-01-14 Murray Cumming <murrayc murrayc com>
Fix build with latest GTK+.
@@ -234,7 +244,7 @@ This is the master branch. See also the gtkmm-2-18 branch.
* gtk/src/gtk_docs.xml: Regenerated.
-2009-09-21 Murray Cumming <murrayc murrayc-desktop>
+2009-09-21 Murray Cumming <murrayc murrayc com>
Regenerate enums .defs.
@@ -442,7 +452,7 @@ This is the master branch. See also the gtkmm-2-18 branch.
* gtk/src/printoperation.hg: Added update_custom_widget signal.
* gtk/src/statusicon.hg: Added get/set_title() and property.
-2009-08-24 Murray Cumming <murrayc murrayc-desktop>
+2009-08-24 Murray Cumming <murrayc murrayc com>
Fix an API break.
@@ -3096,7 +3106,7 @@ This is the trunk branch for gtkmm 2.13/14.
* examples/book/custom/custom_widget/mywidget.cc,h: Update the custom widget
example to use cairo-based drawing instead of the old GDK drawing functions.
-2007-05-03 Murray Cumming <murrayc murrayc-desktop>
+2007-05-03 Murray Cumming <murrayc murrayc com>
* docs/tutorial/gtkmm-tut.xml: Basics: Split part of the example section into
a Headers and Linking section, with slightly fuller information.
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index 44a7dab..fcad19f 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -113,6 +113,7 @@ extern const int gtkmm_micro_version;
#include <gtkmm/misc.h>
#include <gtkmm/notebook.h>
#include <gtkmm/object.h>
+#include <gtkmm/offscreenwindow.h>
#include <gtkmm/optionmenu.h>
#include <gtkmm/paned.h>
#include <gtkmm/pagesetup.h>
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 078bcc3..e7c4c5f 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -94,6 +94,7 @@ gtkmm_files_any_hg = \
misc.hg \
notebook.hg \
object.hg \
+ offscreenwindow.hg \
optionmenu.hg \
orientable.hg \
pagesetup.hg \
diff --git a/gtk/src/offscreenwindow.ccg b/gtk/src/offscreenwindow.ccg
new file mode 100644
index 0000000..cab85b3
--- /dev/null
+++ b/gtk/src/offscreenwindow.ccg
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+/* $Id: offscreenwindow.ccg,v 1.5 2006/06/13 17:24:35 murrayc Exp $ */
+
+/*
+ *
+ * Copyright 2010 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtk.h>
+
+
+namespace Gtk
+{
+
+} // namespace Gtk
+
diff --git a/gtk/src/offscreenwindow.hg b/gtk/src/offscreenwindow.hg
new file mode 100644
index 0000000..3ff3fe2
--- /dev/null
+++ b/gtk/src/offscreenwindow.hg
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+_CONFIGINCLUDE(gtkmmconfig.h)
+
+#include <gtkmm/window.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/window_p.h)
+
+namespace Gtk
+{
+
+/** A top-level container widget used to manage offscreen rendering of child widgets.
+ * OffscreenWindow is strictly intended to be used for obtaining
+ * snapshots of widgets that are not part of a normal widget hierarchy.
+ * It differs from Gtk::Widget::get_snapshot() in that the widget you
+ * want to get a snapshot of need not be displayed on the user's screen
+ * as a part of a widget hierarchy. However, since OffscreenWindow
+ * is a top-level widget you cannot obtain snapshots of a full window
+ * with it since you cannot pack a toplevel widget in another toplevel.
+ *
+ * The idea is to take a widget and manually set the state of it,
+ * add it to an OffscreenWindow and then retrieve the snapshot
+ * as a Gdk::Pixmap or Gdk::Pixbuf.
+ *
+ * OffscreenWindow derives from Window only as an implementation
+ * detail. Applications should not use any API specific to #GtkWindow
+ * to operate on this object. It should be treated as a Bin that
+ * has no parent widget.
+ *
+ * When contained offscreen widgets are redrawn, OffscreenWindow
+ * will emit a "damage-event" signal.
+ *
+ * @ingroup Containers
+ * @ingroup Widgets
+ */
+class OffscreenWindow : public Window
+{
+ _CLASS_GTKOBJECT(OffscreenWindow, GtkOffscreenWindow, GTK_OFFSCREEN_WINDOW, Gtk::Window, GtkWindow)
+ _UNMANAGEABLE
+public:
+ _CTOR_DEFAULT()
+
+ _WRAP_METHOD(Glib::RefPtr<Gdk::Pixmap> get_pixmap(), gtk_offscreen_window_get_pixmap)
+ _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_pixbuf(), gtk_offscreen_window_get_pixbuf)
+};
+
+} // namespace Gtk
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 66b04b8..1ad1ab3 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -76,6 +76,7 @@ public:
_WRAP_PROPERTY("default_height", int)
_WRAP_PROPERTY("destroy_with_parent", bool)
_WRAP_PROPERTY("icon", Glib::RefPtr<Gdk::Pixbuf>)
+ _WRAP_PROPERTY("mnemonics-visible", bool)
_WRAP_PROPERTY("screen", Glib::RefPtr<Gdk::Screen>)
_WRAP_PROPERTY("is_active", bool)
@@ -87,9 +88,10 @@ public:
_WRAP_PROPERTY("decorated", bool)
_WRAP_PROPERTY("gravity", Gdk::Gravity)
_WRAP_PROPERTY("transient_for", Window*)
- _WRAP_PROPERTY("urgency_hint", bool)
+ _WRAP_PROPERTY("urgency_hint", bool)
+ _WRAP_PROPERTY("accept-focus", bool)
+ _WRAP_PROPERTY("focus-on-map", bool)
_WRAP_PROPERTY("deletable", bool)
- _WRAP_PROPERTY("opacity", double)
bool is_toplevel() const;
bool is_dialog() const;
@@ -191,9 +193,13 @@ dnl
//_WRAP_METHOD(void set_destroy_with_parent(bool setting = true), gtk_window_set_destroy_with_parent)
// I don't that that this is ever a good thing for C++.murrayc.
+ //TODO: Remove?
_WRAP_METHOD(bool get_destroy_with_parent() const, gtk_window_get_destroy_with_parent)
// I don't that that this is ever a good thing for C++.murrayc.
+ _WRAP_METHOD(void set_mnemonics_visible(bool setting = true), gtk_window_set_mnemonics_visible)
+ _WRAP_METHOD(bool get_mnemonics_visible() const, gtk_window_get_mnemonics_visible)
+
_WRAP_METHOD(void set_resizable(bool resizable = true), gtk_window_set_resizable)
_WRAP_METHOD(bool get_resizable() const, gtk_window_get_resizable)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]