A cell area that renders CellRenderers into a row or a colum, depending on its orientation.
More...
|
| CellAreaBox (CellAreaBox &&src) noexcept |
|
CellAreaBox & | operator= (CellAreaBox &&src) noexcept |
|
| ~CellAreaBox () noexcept override |
|
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=false, bool fixed=true) |
| Adds renderer to box, packed with reference to the start of box.
|
|
void | pack_end (CellRenderer &renderer, bool expand=false, bool align=false, bool fixed=true) |
| 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 () |
| The amount of space to reserve between cells.
|
|
Glib::PropertyProxy_ReadOnly< int > | property_spacing () const |
| The amount of space to reserve between cells.
|
|
| CellArea (CellArea &&src) noexcept |
|
CellArea & | operator= (CellArea &&src) noexcept |
|
| ~CellArea () noexcept override |
|
GtkCellArea * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GtkCellArea * | gobj () const |
| Provides access to the underlying C GObject.
|
|
GtkCellArea * | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
|
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, const Glib::RefPtr< const Gdk::Event > &gdk_event, const Gdk::Rectangle &cell_area, GtkCellRendererState flags) |
| Delegates event handling to a Gtk::CellArea .
|
|
void | snapshot (const Glib::RefPtr< CellAreaContext > &context, Widget &widget, const Glib::RefPtr< Gtk::Snapshot > & snapshot, const Gdk::Rectangle &background_area, const Gdk::Rectangle &cell_area, CellRendererState flags, bool paint_focus) |
| Snapshots area’s cells according to area’s layout onto 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 rendered 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::CellArea Context 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.
|
|
int | attribute_get_column (CellRenderer &renderer, const Glib::ustring &attribute) const |
| Returns the model column that an attribute has been mapped to, or -1 if the attribute is not mapped.
|
|
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, const Glib::RefPtr< const Gdk::Event > &gdk_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.
|
|
| Buildable (Buildable &&src) noexcept |
|
Buildable & | operator= (Buildable &&src) noexcept |
|
| ~Buildable () noexcept override |
|
GtkBuildable * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GtkBuildable * | gobj () const |
| Provides access to the underlying C GObject.
|
|
Glib::ustring | get_buildable_id () const |
| Gets the ID of the buildable object.
|
|
| CellLayout (CellLayout &&src) noexcept |
|
CellLayout & | operator= (CellLayout &&src) noexcept |
|
| ~CellLayout () noexcept override |
|
GtkCellLayout * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GtkCellLayout * | gobj () const |
| Provides access to the underlying C GObject.
|
|
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 () |
| Returns the cell renderers which have been added to cell_layout.
|
|
std::vector< const CellRenderer * > | get_cells () const |
| Returns the cell renderers which have been added to cell_layout.
|
|
CellRenderer * | get_first_cell () |
| Gets the CellRenderer for the first column if any has been added, or nullptr otherwise.
|
|
const CellRenderer * | get_first_cell () const |
| Gets the CellRenderer for the first column if any has been added, or nullptr otherwise.
|
|
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 nullptr 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 nullptr if no Gtk::CellArea is used by cell_layout.
|
|
template<class T_ModelColumnType > |
void | pack_start (const TreeModelColumn< T_ModelColumnType > &column, bool expand) |
|
| Orientable (Orientable &&src) noexcept |
|
Orientable & | operator= (Orientable &&src) noexcept |
|
| ~Orientable () noexcept override |
|
GtkOrientable * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GtkOrientable * | gobj () const |
| Provides access to the underlying C GObject.
|
|
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.
|
|
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:
- Deprecated:
- 4.10: List views use widgets for displaying their contents.