Wrap GtkOverlay widget

	* Create gtk/src/overlay.{hg,ccg}
	* Update gtk/src/filelist.am
	* Add "get-child-position" signal to gtk/src/gtk_signals.defs
	* Add GTK_TYPE_OVERLAY to
	tools/extra_defs_gen/generate_defs_gtk.cc
	* Add overlay.h to gtkmm.h
parent 301a0839
......@@ -334,6 +334,8 @@ gtk/gtkmm/offscreenwindow.cc
gtk/gtkmm/offscreenwindow.h
gtk/gtkmm/orientable.cc
gtk/gtkmm/orientable.h
gtk/gtkmm/overlay.cc
gtk/gtkmm/overlay.h
gtk/gtkmm/pagesetup.cc
gtk/gtkmm/pagesetup.h
gtk/gtkmm/pagesetupunixdialog.cc
......
......@@ -202,6 +202,7 @@ extern const int gtkmm_micro_version;
#include <gtkmm/numerableicon.h>
#include <gtkmm/object.h>
#include <gtkmm/offscreenwindow.h>
#include <gtkmm/overlay.h>
#include <gtkmm/paned.h>
#include <gtkmm/pagesetup.h>
#ifndef G_OS_WIN32
......
......@@ -112,6 +112,7 @@ gtkmm_files_any_hg = \
notebook.hg \
offscreenwindow.hg \
orientable.hg \
overlay.hg \
pagesetup.hg \
paned.hg \
papersize.hg \
......
......@@ -6105,6 +6105,18 @@
(construct-only #f)
)
;; From GtkOverlay
(define-signal get-child-position
(of-object "GtkOverlay")
(return-type "gboolean")
(when "last")
(parameters
'("GtkWidget*" "p0")
'("GdkRectangle*" "p1")
)
)
;; From GtkPaned
(define-signal cycle-child-focus
......
/*
* Copyright 2014 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <gtk/gtk.h>
namespace Gtk
{
} // namespace Gtk
/*
* Copyright (C) 2014 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <gtkmm/bin.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
namespace Gtk
{
/** A container which overlays widgets on top of each other.
*
* Gtk::Overlay is a container which contains a single main child, on top
* of which it can place “overlay” widgets. The
* position of each overlay widget is determined by its Gtk::Widget:halign
* and Gtk::Widget:valign properties. E.g. a widget with both alignments
* set to Gtk::ALIGN_START will be placed at the top left corner of the
* main widget, whereas an overlay with halign set to Gtk::ALIGN_CENTER
* and valign set to Gtk::ALIGN_END will be placed a the bottom edge of
* the main widget, horizontally centered. The position can be adjusted
* by setting the margin properties of the child to non-zero values.
*
* More complicated placement of overlays is possible by connecting
* to the Gtk::Overlay::get-child-position signal.
*
* The Gtk::Overlay implementation of the Gtk::Buildable interface
* supports placing a child as an overlay by specifying “overlay” as
* the “type” attribute of a `<child>` element.
*
* @ingroup Containers
* @newin{3,2}
*/
class Overlay
: public Bin
{
_CLASS_GTKOBJECT(Overlay, GtkOverlay, GTK_OVERLAY, Gtk::Bin, GtkBin)
public:
/** Creates a new Overlay.
*/
_CTOR_DEFAULT
_WRAP_METHOD(void add_overlay(Gtk::Widget& widget), gtk_overlay_add_overlay)
#m4 _CONVERSION(`GdkRectangle*',`Gdk::Rectangle&',`Glib::wrap($3)')
_WRAP_SIGNAL(bool get_child_position(Gtk::Widget* widget, Gdk::Rectangle& allocation), "get-child-position")
// Gtk::Overlay has no properties nor vfuncs as of 3.2.
};
} // namespace Gtk
......@@ -146,6 +146,7 @@ int main(int argc, char** argv)
<< get_defs( GTK_TYPE_NUMERABLE_ICON )
<< get_defs( GTK_TYPE_OFFSCREEN_WINDOW )
<< get_defs( GTK_TYPE_ORIENTABLE )
<< get_defs( GTK_TYPE_OVERLAY )
<< get_defs( GTK_TYPE_PANED )
<< get_defs( GTK_TYPE_PLACES_SIDEBAR )
#ifdef GDK_WINDOWING_X11
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment