Commit 26c59eeb authored by Ian Martin's avatar Ian Martin Committed by Murray Cumming

Add GridLayout

This is based on changes in this patch:
https://bugzilla.gnome.org/show_bug.cgi?id=725125#c7
parent eb4911ed
......@@ -92,6 +92,7 @@
#include <cluttermm/fixed-layout.h>
#include <cluttermm/flow-layout.h>
#include <cluttermm/frame-source.h>
#include <cluttermm/grid-layout.h>
#include <cluttermm/group.h>
#include <cluttermm/image.h>
#include <cluttermm/init.h>
......
......@@ -50,6 +50,7 @@ files_hg = \
effect.hg \
fixed-layout.hg \
flow-layout.hg \
grid-layout.hg \
group.hg \
image.hg \
input-device.hg \
......
/* Copyright (C) 2014 The cluttermm 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 <clutter/clutter.h>
namespace Clutter
{
} //namespace Clutter
/* Copyright (C) 2014 The cluttermm 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 <cluttermm/layout-manager.h>
#include <cluttermm/types.h>
_DEFS(cluttermm,clutter)
_PINCLUDE(cluttermm/private/layout-manager_p.h)
_PINCLUDE(glibmm/private/object_p.h)
namespace Clutter
{
class Actor;
_WRAP_ENUM(GridPosition, ClutterGridPosition)
class GridLayout :
public LayoutManager
{
_CLASS_GOBJECT(GridLayout, ClutterGridLayout, CLUTTER_GRID_LAYOUT, LayoutManager, ClutterLayoutManager)
_DERIVES_INITIALLY_UNOWNED()
protected:
_WRAP_CTOR(GridLayout(), clutter_grid_layout_new)
public:
_WRAP_CREATE()
_WRAP_METHOD(void attach(const Glib::RefPtr<Actor>& child, int left, int top, int width, int height), clutter_grid_layout_attach)
_WRAP_METHOD(void attach_next_to(const Glib::RefPtr<Actor>& child, const Glib::RefPtr<Actor>& sibling, GridPosition side, int width, int height), clutter_grid_layout_attach_next_to)
_WRAP_METHOD(Glib::RefPtr<Actor> get_child_at(int left, int top), clutter_grid_layout_get_child_at, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Actor> get_child_at(int left, int top) const, clutter_grid_layout_get_child_at, refreturn, constversion)
_WRAP_METHOD(void insert_column(int position), clutter_grid_layout_insert_column)
_WRAP_METHOD(void insert_row(int position), clutter_grid_layout_insert_row)
_WRAP_METHOD(void insert_next_to(const Glib::RefPtr<Actor>& sibling, GridPosition side), clutter_grid_layout_insert_next_to )
_WRAP_METHOD(void set_orientation(Orientation orientation), clutter_grid_layout_set_orientation)
_WRAP_METHOD(Orientation get_orientation() const, clutter_grid_layout_get_orientation)
_WRAP_METHOD(void set_column_homogeneous(bool homogeneous = true), clutter_grid_layout_set_column_homogeneous)
_WRAP_METHOD(bool get_column_homogeneous() const, clutter_grid_layout_get_column_homogeneous)
_WRAP_METHOD(void set_row_homogeneous(bool homogeneous = true), clutter_grid_layout_set_row_homogeneous)
_WRAP_METHOD(bool get_row_homogeneous() const, clutter_grid_layout_get_row_homogeneous)
_WRAP_METHOD(void set_column_spacing(guint spacing), clutter_grid_layout_set_column_spacing)
_WRAP_METHOD(guint get_column_spacing() const, clutter_grid_layout_get_column_spacing)
_WRAP_METHOD(void set_row_spacing(guint spacing), clutter_grid_layout_set_row_spacing)
_WRAP_METHOD(guint get_row_spacing() const, clutter_grid_layout_get_row_spacing)
_WRAP_PROPERTY("column-homogeneous", bool)
_WRAP_PROPERTY("column-spacing", guint)
_WRAP_PROPERTY("row-homogeneous", bool)
_WRAP_PROPERTY("row-spacing", guint)
_WRAP_PROPERTY("orientation", Orientation)
};
} // namespace Clutter
......@@ -190,6 +190,7 @@ _CONV_ENUM(Clutter,ContentGravity)
_CONV_ENUM(Clutter,ContentRepeat)
_CONV_ENUM(Clutter,FlowOrientation)
_CONV_ENUM(Clutter,Gravity)
_CONV_ENUM(Clutter,GridPosition)
_CONV_ENUM(Clutter,InputDeviceType)
_CONV_ENUM(Clutter,Interpolation)
_CONV_ENUM(Clutter,LayoutFlags)
......
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