gtkmm 3.6.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions
Gtk::CellAreaBox Class Reference

A cell area that renders CellRenderers into a row or a colum, depending on its orientation. More...

Inheritance diagram for Gtk::CellAreaBox:
[legend]

List of all members.

## Public Member Functions
virtual | ~CellAreaBox ()
GtkCellAreaBox* | gobj ()
| Provides access to the underlying C GObject.
const GtkCellAreaBox* | gobj () const
| Provides access to the underlying C GObject.
GtkCellAreaBox* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void | pack_start (CellRenderer& renderer, bool expand=false, bool align=true, bool fixed=false)
| Adds renderer to box, packed with reference to the start of box.
void | pack_end (CellRenderer& renderer, bool expand=false, bool align=true, bool fixed=false)
| Adds renderer to box, packed with reference to the end of box.
int | get_spacing () const
| Gets the spacing added between cell renderers.
void | set_spacing (int spacing)
| Sets the spacing to add between cell renderers in box.
Glib::PropertyProxy< int > | property_spacing ()
| Space which is inserted between cells.
Glib::PropertyProxy_ReadOnly< int > | property_spacing () const
| Space which is inserted between cells.
Public Member Functions inherited from Gtk::CellArea
virtual | ~CellArea ()
void | add (CellRenderer& renderer)
| Adds renderer to area with the default child cell properties.
void | remove (CellRenderer& renderer)
| Removes renderer from area.
bool | has_renderer (CellRenderer& renderer)
| Checks if area contains renderer.
void | foreach (const SlotForeach& slot)
| Calls the slot for every CellRenderer in the CellArea.
void | foreach (const Glib::RefPtr< CellAreaContext >& context, Widget* widget, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& background_area, const SlotForeachAlloc& slot)
| Calls the slot for every CellRenderer in the CellArea with the allocated rectangle inside the cell_area rectangle.
int | event (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, GdkEvent* event, const Gdk::Rectangle& cell_area, GtkCellRendererState flags)
| Delegates event handling to a Gtk::CellArea.
void | render (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, const ::Cairo::RefPtr< ::Cairo::Context >& cr, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags, bool paint_focus)
| Renders area's cells according to area's layout onto widget at the given coordinates.
void | get_cell_allocation (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, CellRenderer& renderer, const Gdk::Rectangle& cell_area, Gdk::Rectangle& allocation)
| Derives the allocation of renderer inside area if area were to be renderered in cell_area.
CellRenderer* | get_cell_at_position (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, const Gdk::Rectangle& cell_area, int x, int y, Gdk::Rectangle& alloc_area)
| Gets the Gtk::CellRenderer at x and y coordinates inside area and optionally returns the full cell allocation for it inside cell_area.
const CellRenderer* | get_cell_at_position (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, const Gdk::Rectangle& cell_area, int x, int y, Gdk::Rectangle& alloc_area) const
| Gets the Gtk::CellRenderer at x and y coordinates inside area and optionally returns the full cell allocation for it inside cell_area.
Glib::RefPtr< CellAreaContext > | create_context () const
| Creates a Gtk::CellAreaContext to be used with area for all purposes.
Glib::RefPtr< CellAreaContext > | copy_context (const Glib::RefPtr< const CellAreaContext >& context)
| This is sometimes needed for cases where rows need to share alignments in one orientation but may be separately grouped in the opposing orientation.
SizeRequestMode | get_request_mode () const
| Gets whether the area prefers a height-for-width layout or a width-for-height layout.
void | get_preferred_width (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int& minimum_width, int& natural_width)
| Retrieves a cell area's initial minimum and natural width.
void | get_preferred_height_for_width (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int width, int& minimum_height, int& natural_height)
| Retrieves a cell area's minimum and natural height if it would be given the specified width.
void | get_preferred_height (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int& minimum_height, int& natural_height)
| Retrieves a cell area's initial minimum and natural height.
void | get_preferred_width_for_height (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int height, int& minimum_width, int& natural_width)
| Retrieves a cell area's minimum and natural width if it would be given the specified height.
Glib::ustring | get_current_path_string () const
| Gets the current Gtk::TreePath string for the currently applied Gtk::TreeIter, this is implicitly updated when apply_attributes() is called and can be used to interact with renderers from Gtk::CellArea subclasses.
void | apply_attributes (const Glib::RefPtr< TreeModel >& tree_model, const TreeModel::iterator& iter, bool is_expander, bool is_expanded)
| Applies any connected attributes to the renderers in area by pulling the values from tree_model.
void | attribute_connect (CellRenderer& renderer, const Glib::ustring& attribute, int column)
| Connects an attribute to apply values from column for the Gtk::TreeModel in use.
void | attribute_disconnect (CellRenderer& renderer, const Glib::ustring& attribute)
| Disconnects attribute for the renderer in area so that attribute will no longer be updated with values from the model.
void | cell_set_property (CellRenderer& renderer, const Glib::ustring& property_name, const Glib::ValueBase& value)
| Sets a cell property for renderer in area.
void | cell_get_property (CellRenderer& renderer, const Glib::ustring& property_name, Glib::ValueBase& value)
| Gets the value of a cell property for renderer in area.
bool | is_activatable () const
| Returns whether the area can do anything when activated, after applying new attributes to area.
bool | activate (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, const Gdk::Rectangle& cell_area, CellRendererState flags, bool edit_only)
| Activates area, usually by activating the currently focused cell, however some subclasses which embed widgets in the area can also activate a widget if it currently has the focus.
bool | focus (DirectionType direction)
| This should be called by the area's owning layout widget when focus is to be passed to area, or moved within area for a given direction and row data.
void | set_focus_cell (CellRenderer& renderer)
| Explicitly sets the currently focused cell to renderer.
CellRenderer* | get_focus_cell ()
| Retrieves the currently focused cell for area.
const CellRenderer* | get_focus_cell () const
| Retrieves the currently focused cell for area.
void | add_focus_sibling (CellRenderer& renderer, CellRenderer& sibling)
| Adds sibling to renderer's focusable area, focus will be drawn around renderer and all of its siblings if renderer can focus for a given row.
void | remove_focus_sibling (CellRenderer& renderer, CellRenderer& sibling)
| Removes sibling from renderer's focus sibling list (see add_focus_sibling()).
bool | is_focus_sibling (CellRenderer& renderer, CellRenderer& sibling)
| Returns whether sibling is one of renderer's focus siblings (see add_focus_sibling()).
std::vector< CellRenderer* > | get_focus_siblings (CellRenderer& renderer)
| Gets the focus sibling cell renderers for renderer.
std::vector< const CellRenderer* > | get_focus_siblings (const CellRenderer& renderer) const
| Gets the focus sibling cell renderers for renderer.
CellRenderer* | get_focus_from_sibling (CellRenderer& renderer)
| Gets the Gtk::CellRenderer which is expected to be focusable for which renderer is, or may be a sibling.
const CellRenderer* | get_focus_from_sibling (CellRenderer& renderer) const
| Gets the Gtk::CellRenderer which is expected to be focusable for which renderer is, or may be a sibling.
CellRenderer* | get_edited_cell ()
| Gets the Gtk::CellRenderer in area that is currently being edited.
const CellRenderer* | get_edited_cell () const
| Gets the Gtk::CellRenderer in area that is currently being edited.
CellEditable* | get_edit_widget ()
| Gets the Gtk::CellEditable widget currently used to edit the currently edited cell.
const CellEditable* | get_edit_widget () const
| Gets the Gtk::CellEditable widget currently used to edit the currently edited cell.
bool | activate_cell (Widget& widget, CellRenderer& renderer, GdkEvent*event, const Gdk::Rectangle& cell_area, CellRendererState flags)
| This is used by Gtk::CellArea subclasses when handling events to activate cells, the base Gtk::CellArea class activates cells for keyboard events for free in its own GtkCellArea->activate() implementation.
void | stop_editing (bool canceled)
| Explicitly stops the editing of the currently edited cell.
void | inner_cell_area (Widget& widget, const Gdk::Rectangle& cell_area, Gdk::Rectangle& inner_area)
| This is a convenience function for Gtk::CellArea implementations to get the inner area where a given Gtk::CellRenderer will be rendered.
void | request_renderer (CellRenderer& renderer, Orientation orientation, Widget& widget, int for_size, int& minimum_size, int& natural_size)
| This is a convenience function for Gtk::CellArea implementations to request size for cell renderers.
Public Member Functions inherited from Glib::Object
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj_copy () const
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Gtk::Buildable
virtual | ~Buildable ()
void | set_name (const Glib::ustring& name)
| Sets the name of the buildable object.
Glib::ustring | get_name () const
| Gets the name of the buildable object.
Public Member Functions inherited from Glib::Interface
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
virtual | ~Interface ()
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj_copy () const
Public Member Functions inherited from Gtk::CellLayout
virtual | ~CellLayout ()
template<class ColumnType >
void | pack_start (const TreeModelColumn< ColumnType >& model_column, bool expand=true)
void | pack_start (CellRenderer& cell, bool expand=true)
| Packs the cell into the beginning of cell_layout.
void | pack_end (CellRenderer& cell, bool expand=true)
| Adds the cell to the end of cell_layout.
std::vector< CellRenderer* > | get_cells ()
| Return value: a list of cell renderers.
std::vector< const CellRenderer* > | get_cells () const
| Return value: a list of cell renderers.
CellRenderer* | get_first_cell ()
| Gets the CellRenderer for the column.
const CellRenderer* | get_first_cell () const
| Gets the CellRenderer for the column.
void | clear ()
| Unsets all the mappings on all renderers on cell_layout and removes all renderers from cell_layout.
void | add_attribute (CellRenderer& cell, const Glib::ustring& attribute, int column)
| Adds an attribute mapping to the list in cell_layout.
void | add_attribute (const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column)
void | add_attribute (CellRenderer& cell, const Glib::ustring& attribute, const TreeModelColumnBase& column)
void | set_cell_data_func (CellRenderer& cell, const SlotCellData& slot)
void | clear_attributes (CellRenderer& cell)
| Clears all existing attributes previously set with set_attributes().
void | reorder (CellRenderer& cell, int position)
| Re-inserts cell at position.
Glib::RefPtr< CellArea > | get_area ()
| Returns the underlying Gtk::CellArea which might be cell_layout if called on a Gtk::CellArea or might be `0` if no Gtk::CellArea is used by cell_layout.
Glib::RefPtr< const CellArea > | get_area () const
| Returns the underlying Gtk::CellArea which might be cell_layout if called on a Gtk::CellArea or might be `0` if no Gtk::CellArea is used by cell_layout.
template<class T_ModelColumnType >
void | pack_start (const TreeModelColumn< T_ModelColumnType >& column, bool expand)
Public Member Functions inherited from Gtk::Orientable
virtual | ~Orientable ()
void | set_orientation (Orientation orientation)
| Sets the orientation of the orientable.
Orientation | get_orientation () const
| Retrieves the orientation of the orientable.
Glib::PropertyProxy< Orientation > | property_orientation ()
| The orientation of the orientable.
Glib::PropertyProxy_ReadOnly < Orientation > | property_orientation () const
| The orientation of the orientable.

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system.
static Glib::RefPtr< CellAreaBox > | create ()
Static Public Member Functions inherited from Gtk::Orientable
static void | add_interface (GType gtype_implementer)

## Protected Member Functions
| CellAreaBox ()
Protected Member Functions inherited from Gtk::CellArea
| CellArea ()
Glib::SignalProxy4< void, CellRenderer*, CellEditable *, const Gdk::Rectangle &, const Glib::ustring& > | signal_add_editable ()
Glib::SignalProxy2< void, CellRenderer*, CellEditable* > | signal_remove_editable ()
Glib::SignalProxy2< void, CellRenderer*, const Glib::ustring& > | signal_focus_changed ()
virtual SizeRequestMode | get_request_mode_vfunc () const
virtual void | get_preferred_width_vfunc (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int& minimum_width, int& natural_width)
virtual void | get_preferred_height_for_width_vfunc (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int width, int& minimum_height, int& natural_height)
virtual void | get_preferred_height_vfunc (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int& minimum_height, int& natural_height)
virtual void | get_preferred_width_for_height_vfunc (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int height, int& minimum_width, int& natural_width)
Glib::PropertyProxy < CellRenderer* > | property_focus_cell ()
| The cell which currently has focus.
Glib::PropertyProxy_ReadOnly < CellRenderer* > | property_focus_cell () const
| The cell which currently has focus.
Glib::PropertyProxy_ReadOnly < CellRenderer* > | property_edited_cell () const
| The cell which is currently being edited.
Glib::PropertyProxy_ReadOnly < CellEditable* > | property_edit_widget () const
| The widget currently editing the edited cell.
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
virtual | ~Object ()
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
virtual | ~ObjectBase ()=0
void | initialize (GObject *castitem)
Protected Member Functions inherited from Gtk::Buildable
| Buildable ()
| You should derive from this class to use it.
Protected Member Functions inherited from Glib::Interface
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
virtual | ~ObjectBase ()=0
void | initialize (GObject *castitem)
Protected Member Functions inherited from Gtk::CellLayout
| CellLayout ()
| You should derive from this class to use it.
virtual void | pack_start_vfunc (CellRenderer* cell, bool expand)
virtual void | pack_end_vfunc (CellRenderer* cell, bool expand)
virtual void | clear_vfunc ()
virtual void | add_attribute_vfunc (CellRenderer* cell, const Glib::ustring& attribute, int column)
virtual void | clear_attributes_vfunc (CellRenderer* cell)
virtual void | reorder_vfunc (CellRenderer* cell, int position)
Protected Member Functions inherited from Gtk::Orientable
| Orientable ()
| You should derive from this class to use it.

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gtk::CellAreaBox > | wrap (GtkCellAreaBox* object, bool take_copy=false)
| A Glib::wrap() method for this object.
Related Functions inherited from Gtk::CellArea
Glib::RefPtr< Gtk::CellArea > | wrap (GtkCellArea* object, bool take_copy=false)
| A Glib::wrap() method for this object.
Related Functions inherited from Gtk::Buildable
Glib::RefPtr< Gtk::Buildable > | wrap (GtkBuildable* object, bool take_copy=false)
| A Glib::wrap() method for this object.
Related Functions inherited from Gtk::CellLayout
Glib::RefPtr< Gtk::CellLayout > | wrap (GtkCellLayout* object, bool take_copy=false)
| A Glib::wrap() method for this object.
Related Functions inherited from Gtk::Orientable
Glib::RefPtr< Gtk::Orientable > | wrap (GtkOrientable* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Additional Inherited Members
Public Types inherited from Gtk::CellArea
typedef sigc::slot< bool, CellRenderer* > | SlotForeach
| For instance, bool on_foreach(Gtk::CellRenderer* renderer);.
typedef sigc::slot< bool, CellRenderer*, const Gdk::Rectangle&, const Gdk::Rectangle& > | SlotForeachAlloc
| For instance, bool on_foreach(Gtk::CellRenderer* renderer, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& background_area>);.
Public Types inherited from Glib::Object
typedef void(* | DestroyNotify )(gpointer data)
Public Types inherited from Gtk::CellLayout
typedef sigc::slot< void, const TreeModel::const_iterator& > | SlotCellData

## Detailed Description

A cell area that renders CellRenderers into a row or a colum, depending on its orientation.

This class uses a notion of packing. Packing refers to adding cell renderers with reference to a particular position in a CellAreaBox. There are two reference positions: the start and the end of the box. When the CellAreaBox is oriented in the Gtk::ORIENTATION_VERTICAL orientation, the start is defined as the top of the box and the end is defined as the bottom. In the Gtk::ORIENTATION_HORIZONTAL orientation start is defined as the left side and the end is defined as the right side.

Alignments of CellRenderers rendered in adjacent rows can be configured by configuring the align_child cell property with CellArea::cell_set_property() or by specifying the "align" argument to pack_start() or pack_end().

Since gtkmm 3.0:

## Constructor & Destructor Documentation

virtual Gtk::CellAreaBox::~CellAreaBox | ( |  | ) |
| virtual

Gtk::CellAreaBox::CellAreaBox | ( |  | ) |
| protected

## Member Function Documentation

static Glib::RefPtr<CellAreaBox> Gtk::CellAreaBox::create | ( |  | ) |
| static

int Gtk::CellAreaBox::get_spacing | ( |  | ) | const

Gets the spacing added between cell renderers.

Since gtkmm 3.0:

Returns:
  The space added between cell renderers in box.

static GType Gtk::CellAreaBox::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

Reimplemented from Gtk::CellArea.

GtkCellAreaBox* Gtk::CellAreaBox::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

Reimplemented from Gtk::CellArea.

const GtkCellAreaBox* Gtk::CellAreaBox::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

Reimplemented from Gtk::CellArea.

GtkCellAreaBox* Gtk::CellAreaBox::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gtk::CellArea.

void Gtk::CellAreaBox::pack_end | ( | CellRenderer& | renderer,
|  | bool | expand = `false`,
|  | bool | align = `true`,
|  | bool | fixed = `false`
| ) |  |

Adds renderer to box, packed with reference to the end of box.

The renderer is packed after (away from end of) any other Gtk::CellRenderer packed with reference to the end of box.

Since gtkmm 3.0:

Parameters:

  renderer | The Gtk::CellRenderer to add.
  expand | Whether renderer should receive extra space when the area receives more than its natural size.
  align | Whether renderer should be aligned in adjacent rows.
  fixed | Whether renderer should have the same size in all rows.

void Gtk::CellAreaBox::pack_start | ( | CellRenderer& | renderer,
|  | bool | expand = `false`,
|  | bool | align = `true`,
|  | bool | fixed = `false`
| ) |  |

Adds renderer to box, packed with reference to the start of box.

The renderer is packed after any other Gtk::CellRenderer packed with reference to the start of box.

Since gtkmm 3.0:

Parameters:

  renderer | The Gtk::CellRenderer to add.
  expand | Whether renderer should receive extra space when the area receives more than its natural size.
  align | Whether renderer should be aligned in adjacent rows.
  fixed | Whether renderer should have the same size in all rows.

Glib::PropertyProxy< int > Gtk::CellAreaBox::property_spacing | ( |  | ) |

Space which is inserted between cells.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< int > Gtk::CellAreaBox::property_spacing | ( |  | ) | const

Space which is inserted between cells.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::CellAreaBox::set_spacing | ( | int | spacing | ) |

Sets the spacing to add between cell renderers in box.

Since gtkmm 3.0:

Parameters:

  spacing | The space to add between Gtk::CellRenderers.

## Friends And Related Function Documentation

Glib::RefPtr< Gtk::CellAreaBox > wrap | ( | GtkCellAreaBox * | object,
|  | bool | take_copy = `false`
| ) |  |
| related

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- gtkmm/cellareabox.h