An abstract base class for laying out CellRenderers. More...
List of all members.
Public Member Functions |
virtual | ~CellArea () |
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) |
void | remove (CellRenderer& renderer) |
bool | has_renderer (CellRenderer& renderer) |
int | event (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, GdkEvent* event, const Gdk::Rectangle& cell_area, GtkCellRendererState flags) |
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) |
void | get_cell_allocation (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, CellRenderer& renderer, const Gdk::Rectangle& cell_area, Gdk::Rectangle& allocation) |
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 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 |
Glib::RefPtr< CellAreaContext > | create_context () const |
Glib::RefPtr< CellAreaContext > | copy_context (const Glib::RefPtr< const CellAreaContext >& context) |
SizeRequestMode | get_request_mode () const |
void | get_preferred_width (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int& minimum_width, int& natural_width) |
void | get_preferred_height_for_width (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int width, int& minimum_height, int& natural_height) |
void | get_preferred_height (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int& minimum_height, int& natural_height) |
void | get_preferred_width_for_height (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, int height, int& minimum_width, int& natural_width) |
Glib::ustring | get_current_path_string () const |
void | apply_attributes (const Glib::RefPtr< TreeModel >& tree_model, const TreeModel::iterator& iter, bool is_expander, bool is_expanded) |
void | attribute_connect (CellRenderer& renderer, const Glib::ustring& attribute, int column) |
void | attribute_disconnect (CellRenderer& renderer, const Glib::ustring& attribute) |
void | cell_set_property (CellRenderer& renderer, const Glib::ustring& property_name, const Glib::ValueBase&value) |
void | cell_get_property (CellRenderer& renderer, const Glib::ustring& property_name, Glib::ValueBase&value) |
bool | is_activatable () const |
bool | activate (const Glib::RefPtr< CellAreaContext >& context, Widget& widget, const Gdk::Rectangle& cell_area, CellRendererState flags, bool edit_only) |
bool | focus (DirectionType direction) |
void | set_focus_cell (CellRenderer& renderer) |
CellRenderer* | get_focus_cell () |
const CellRenderer* | get_focus_cell () const |
void | add_focus_sibling (CellRenderer& renderer, CellRenderer& sibling) |
void | remove_focus_sibling (CellRenderer& renderer, CellRenderer& sibling) |
bool | is_focus_sibling (CellRenderer& renderer, CellRenderer& sibling) |
CellRenderer* | get_focus_from_sibling (CellRenderer& renderer) |
const CellRenderer* | get_focus_from_sibling (CellRenderer& renderer) const |
CellRenderer* | get_edited_cell () |
const CellRenderer* | get_edited_cell () const |
CellEditable* | get_edit_widget () |
const CellEditable* | get_edit_widget () const |
bool | activate_cell (Widget& widget, CellRenderer& renderer, GdkEvent* event, const Gdk::Rectangle& cell_area, CellRendererState flags) |
void | stop_editing (bool canceled) |
void | inner_cell_area (Widget& widget, const Gdk::Rectangle& cell_area, Gdk::Rectangle& inner_area) |
void | request_renderer (CellRenderer& renderer, Orientation orientation, Widget& widget, int for_size, int& minimum_size, int& natural_size) |
Protected Member Functions |
| CellArea () |
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) |
Related Functions |
(Note that these are not member functions.)
|
Glib::RefPtr< Gtk::CellArea > | wrap (GtkCellArea* object, bool take_copy=false) |
| A Glib::wrap() method for this object.
|
Detailed Description
An abstract base class for laying out CellRenderers.
This is an abstract base class for CellLayout widgets (also referred to as "layouting widgets") to interface with an arbitrary number of CellRenderers and interact with the user for a given TreeModel row.
The cell area handles events, focus navigation, drawing and size requests and allocations for a given row of data.
Usually users dont have to interact with the CellArea directly unless they are implementing a cell layouting widget themselves.
Requesting area sizes
As outlined in Gtk::Widget's geometry management description, GTK+ uses a height-for-width geometry management system to compute the sizes of widgets and user interfaces. CellArea uses the same semantics to calculate the size of an area for an arbitrary number of TreeModel rows.
When requesting the size of a cell area one needs to calculate the size for a handful of rows, and this will be done differently by different layouting widgets. For instance a TreeViewColumn always lines up the areas from top to bottom while an IconView, on the other hand, might enforce that all areas received the same width and wrap the areas around, requesting height for more cell areas when allocated less width.
It's also important for areas to maintain some cell alignments with areas rendered for adjacent rows (cells can appear "columnized" inside an area even when the size of cells are different in each row). For this reason the CellArea uses a CellAreaContext object to store the alignments and sizes along the way (as well as the overall largest minimum and natural size for all the rows which have been calculated with the said context).
The CellAreaContext is an opaque object specific to the CellArea which created it (see CellArea::create_context()). The owning cell-layouting widget can create as many contexts as it wishes to calculate sizes of rows which should receive the same size in at least one orientation (horizontally or vertically). However, it's important that the same CellAreaContext which was used to request the sizes for a given TreeModel row be used when rendering or processing events for that row.
Cell Properties
The CellArea introduces cell propertie for CellRenderers in very much the same way that Gtk::Container introduces child properties for Widgets. This provides some general interfaces for defining the relationship cell areas have with their cells. For instance in a CellAreaBox a cell might "expand" and receive extra space when the area is allocated more than its full natural request, or a cell might be configured to "align" with adjacent rows which were requested and rendered with the same CellAreaContext.
To set the value of a cell property, use cell_set_property(). To obtain the value of a cell property, use cell_get_property().
- Since gtkmm 3.0:
Constructor & Destructor Documentation
virtual Gtk::CellArea::~CellArea |
( |
) |
[virtual] |
Gtk::CellArea::CellArea |
( |
) |
[protected] |
Member Function Documentation
const CellEditable* Gtk::CellArea::get_edit_widget |
( |
) |
const |
const CellRenderer* Gtk::CellArea::get_edited_cell |
( |
) |
const |
void Gtk::CellArea::get_preferred_height_for_width |
( |
const Glib::RefPtr< CellAreaContext >& |
context, |
|
|
Widget& |
widget, |
|
|
int |
width, |
|
|
int & |
minimum_height, |
|
|
int & |
natural_height |
|
) |
| |
virtual void Gtk::CellArea::get_preferred_height_for_width_vfunc |
( |
const Glib::RefPtr< CellAreaContext >& |
context, |
|
|
Widget& |
widget, |
|
|
int |
width, |
|
|
int & |
minimum_height, |
|
|
int & |
natural_height |
|
) |
| [protected, virtual] |
virtual void Gtk::CellArea::get_preferred_height_vfunc |
( |
const Glib::RefPtr< CellAreaContext >& |
context, |
|
|
Widget& |
widget, |
|
|
int & |
minimum_height, |
|
|
int & |
natural_height |
|
) |
| [protected, virtual] |
void Gtk::CellArea::get_preferred_width_for_height |
( |
const Glib::RefPtr< CellAreaContext >& |
context, |
|
|
Widget& |
widget, |
|
|
int |
height, |
|
|
int & |
minimum_width, |
|
|
int & |
natural_width |
|
) |
| |
virtual void Gtk::CellArea::get_preferred_width_for_height_vfunc |
( |
const Glib::RefPtr< CellAreaContext >& |
context, |
|
|
Widget& |
widget, |
|
|
int |
height, |
|
|
int & |
minimum_width, |
|
|
int & |
natural_width |
|
) |
| [protected, virtual] |
virtual void Gtk::CellArea::get_preferred_width_vfunc |
( |
const Glib::RefPtr< CellAreaContext >& |
context, |
|
|
Widget& |
widget, |
|
|
int & |
minimum_width, |
|
|
int & |
natural_width |
|
) |
| [protected, virtual] |
virtual SizeRequestMode Gtk::CellArea::get_request_mode_vfunc |
( |
) |
const [protected, virtual] |
const GtkCellArea* Gtk::CellArea::gobj |
( |
) |
const [inline] |
GtkCellArea* Gtk::CellArea::gobj |
( |
) |
[inline] |
GtkCellArea* Gtk::CellArea::gobj_copy |
( |
) |
|
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Reimplemented in Gtk::CellAreaBox.
bool Gtk::CellArea::is_activatable |
( |
) |
const |
void Gtk::CellArea::request_renderer |
( |
CellRenderer& |
renderer, |
|
|
Orientation |
orientation, |
|
|
Widget& |
widget, |
|
|
int |
for_size, |
|
|
int & |
minimum_size, |
|
|
int & |
natural_size |
|
) |
| |
void Gtk::CellArea::set_focus_cell |
( |
CellRenderer& |
renderer ) |
|
void Gtk::CellArea::stop_editing |
( |
bool |
canceled ) |
|
Friends And Related Function Documentation
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: