/* 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, see .
*/
_CONFIGINCLUDE(gtkmmconfig.h)
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
namespace Gtk
{
class GTKMM_API CellArea;
/** This stores geometrical information for a series of rows in a CellArea.
*
* CellAreaContext is used by widgets such as TreeView and IconView,
* but application developers do not usually need to be aware of it.
*
* The CellAreaContext object is created by a given CellArea
* and is used to store cell sizes and alignments for a series of
* TreeModel rows that are requested and rendered in the same context.
*
* CellLayout widgets can create any number of contexts in which to
* request and render groups of data rows. However. it's important that the
* same context which was used to request sizes for a given TreeModel
* row also be used for the same row when calling other CellArea APIs
* such as gtk_cell_area_render() and gtk_cell_area_event().
*/
class GTKMM_API CellAreaContext : public Glib::Object
{
_CLASS_GOBJECT(CellAreaContext, GtkCellAreaContext, GTK_CELL_AREA_CONTEXT, Glib::Object, GObject, , , GTKMM_API)
public:
protected:
public:
_WRAP_METHOD(Glib::RefPtr get_area(), gtk_cell_area_context_get_area, refreturn)
_WRAP_METHOD(Glib::RefPtr get_area() const, gtk_cell_area_context_get_area, refreturn, constversion)
_WRAP_METHOD(void allocate(int width, int height), gtk_cell_area_context_allocate)
_WRAP_METHOD(void reset(), gtk_cell_area_context_reset)
_WRAP_METHOD(void get_preferred_width(int& minimum_width, int& natural_width) const, gtk_cell_area_context_get_preferred_width)
_WRAP_METHOD(void get_preferred_height(int& minimum_height, int& natural_height) const, gtk_cell_area_context_get_preferred_height)
_WRAP_METHOD(void get_preferred_height_for_width(int width, int& minimum_height, int& natural_height) const, gtk_cell_area_context_get_preferred_height_for_width)
_WRAP_METHOD(void get_preferred_width_for_height(int height, int& minimum_width, int& natural_width) const, gtk_cell_area_context_get_preferred_width_for_height)
_WRAP_METHOD(void get_allocation(int& width, int& height) const, gtk_cell_area_context_get_allocation)
_WRAP_METHOD(void push_preferred_width(int minimum_width, int natural_width), gtk_cell_area_context_push_preferred_width)
_WRAP_METHOD(void push_preferred_height(int minimum_height, int natural_height), gtk_cell_area_context_push_preferred_height)
_WRAP_PROPERTY("area", CellArea*)
_WRAP_PROPERTY("minimum-width", int)
_WRAP_PROPERTY("natural-width", int)
_WRAP_PROPERTY("minimum-height", int)
_WRAP_PROPERTY("natural-height", int)
};
} //namespace Gtk