Back to Seed Clases

Gtk


Classes

Interfaces

Structs

Unions

Enums

Class Gtk.CellRenderer

Import line: Gtk = imports.gi.Gtk;
GIR File: Gtk-3.0.gir
C documentation: GtkCellRenderer
Class : CellRenderer
Extends: GObject.InitiallyUnowned
The GtkCellRenderer is a base class of a set of objects used for
rendering a cell to a cairo_t. These objects are used primarily by
the GtkTreeView widget, though they aren't tied to them in any
specific way. It is worth noting that GtkCellRenderer is not a
GtkWidget and cannot be treated as such.
The primary use of a GtkCellRenderer is for drawing a certain graphical
elements on a cairo_t. Typically, one cell renderer is used to
draw many cells on the screen. To this extent, it isn't expected that a
CellRenderer keep any permanent state around. Instead, any state is set
just prior to use using GObjects property system. Then, the
cell is measured using gtk_cell_renderer_get_size(). Finally, the cell
is rendered in the correct location using gtk_cell_renderer_render().
There are a number of rules that must be followed when writing a new
GtkCellRenderer. First and formost, its important that a certain set
of properties will always yield a cell renderer of the same size,
barring a GtkStyle change. The GtkCellRenderer also has a number of
generic properties that are expected to be honored by all children.
Beyond merely rendering a cell, cell renderers can optionally
provide active user interface elements. A cell renderer can be
activatable like GtkCellRendererToggle,
which toggles when it gets activated by a mouse click, or it can be
editable like GtkCellRendererText, which
allows the user to edit the text using a GtkEntry.
To make a cell renderer activatable or editable, you have to
implement the GtkCellRendererClass.activate or
GtkCellRendererClass.start_editing virtual functions, respectively.
Properties
Properties Defined By
Methods / Constructors
Method / Constructor Defined By
Events - usage syntax: this.signals.EVENTNAME.connect( Function )
Event Defined By
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
Gtk.CellArea
Property
edited_cell : Gtk.CellRenderer read only
The cell in the area that is currently edited
This property is read-only and only changes as
a result of a call gtk_cell_area_activate_cell().
Gtk.CellArea
Property
focus_cell : Gtk.CellRenderer
The cell in the area that currently has focus
Gtk.CellArea
Signal
focus_changed (CellArea self, CellRenderer renderer, String path) : none
Indicates that focus changed on this area.
Gtk.CellArea
Signal
remove_editable (CellArea self, CellRenderer renderer, CellEditable editable) : none
Indicates that editing finished on renderer and that editable
should be removed from the owning cell-layouting widget.
Gtk.CellArea
Method
activate_cell (Widget widget, CellRenderer renderer, Event event, RectangleInt cell_area, CellRendererState flags) : gboolean
This is used by GtkCellArea subclasses when handling events
to activate cells, the base GtkCellArea class activates cells
for keyboard events for free in its own GtkCellArea->activate()
implementation.
Gtk.CellArea
Method
add (CellRenderer renderer) : none
Adds renderer to area with the default child cell properties.
Gtk.CellArea
Method
add_focus_sibling (CellRenderer renderer, CellRenderer sibling) : none
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.
Gtk.CellArea
Method
attribute_connect (CellRenderer renderer, String attribute, gint32 column) : none
Connects an attribute to apply values from column for the
GtkTreeModel in use.
Gtk.CellArea
Method
attribute_disconnect (CellRenderer renderer, String attribute) : none
Disconnects attribute for the renderer in area so that
attribute will no longer be updated with values from the
model.
Gtk.CellArea
Method
cell_get_property (CellRenderer renderer, String property_name, Value value) : none
Gets the value of a cell property for renderer in area.
Gtk.CellArea
Method
cell_set_property (CellRenderer renderer, String property_name, Value value) : none
Sets a cell property for renderer in area.
Gtk.CellArea
Method
get_cell_allocation (CellAreaContext context, Widget widget, CellRenderer renderer, RectangleInt cell_area) : cairo.RectangleInt
Derives the allocation of renderer inside area if area
were to be renderered in cell_area.
Gtk.CellArea
Method
get_cell_at_position (CellAreaContext context, Widget widget, RectangleInt cell_area, gint32 x, gint32 y, Object out_values) : Gtk.CellRenderer
Gets the GtkCellRenderer at x and y coordinates inside area and optionally
returns the full cell allocation for it inside cell_area.
Gtk.CellArea
Method
get_edited_cell () : Gtk.CellRenderer
Gets the GtkCellRenderer in area that is currently
being edited.
Gtk.CellArea
Method
get_focus_cell () : Gtk.CellRenderer
Retrieves the currently focused cell for area
Gtk.CellArea
Method
get_focus_from_sibling (CellRenderer renderer) : Gtk.CellRenderer
Gets the GtkCellRenderer which is expected to be focusable
for which renderer is, or may be a sibling.
Gtk.CellArea
Method
get_focus_siblings (CellRenderer renderer) : Array
Gets the focus sibling cell renderers for renderer.
Gtk.CellArea
Method
has_renderer (CellRenderer renderer) : gboolean
Checks if area contains renderer.
Gtk.CellArea
Method
is_focus_sibling (CellRenderer renderer, CellRenderer sibling) : gboolean
Returns whether sibling is one of renderer's focus siblings
(see gtk_cell_area_add_focus_sibling()).
Gtk.CellArea
Method
remove (CellRenderer renderer) : none
Removes renderer from area.
Gtk.CellArea
Method
remove_focus_sibling (CellRenderer renderer, CellRenderer sibling) : none
Removes sibling from renderer's focus sibling list
(see gtk_cell_area_add_focus_sibling()).
Gtk.CellArea
Method
request_renderer (CellRenderer renderer, Orientation orientation, Widget widget, gint32 for_size) : Object
This is a convenience function for GtkCellArea implementations
to request size for cell renderers.
Gtk.CellArea
Method
set_focus_cell (CellRenderer renderer) : none
Explicitly sets the currently focused cell to renderer.
Gtk.CellAreaBox
Method
pack_end (CellRenderer renderer, gboolean expand, gboolean align, gboolean fixed) : none
Adds renderer to box, packed with reference to the end of box.
Gtk.CellAreaBox
Method
pack_start (CellRenderer renderer, gboolean expand, gboolean align, gboolean fixed) : none
Adds renderer to box, packed with reference to the start of box.
Gtk.CellLayout
Method
add_attribute (CellRenderer cell, String attribute, gint32 column) : none
Adds an attribute mapping to the list in cell_layout.
Gtk.CellLayout
Method
clear_attributes (CellRenderer cell) : none
Clears all existing attributes previously set with
gtk_cell_layout_set_attributes().
Gtk.CellLayout
Method
pack_end (CellRenderer cell, gboolean expand) : none
Adds the cell to the end of cell_layout.
Gtk.CellLayout
Method
pack_start (CellRenderer cell, gboolean expand) : none
Packs the cell into the beginning of cell_layout.
Gtk.CellLayout
Method
reorder (CellRenderer cell, gint32 position) : none
Re-inserts cell at position.
Gtk.CellLayout
Method
set_cell_data_func (CellRenderer cell, Function func, void* func_data, Function destroy) : none
Sets the GtkCellLayoutDataFunc to use for cell_layout.
Gtk.IconView
Method
set_cursor (TreePath path, CellRenderer cell, gboolean start_editing) : none
Sets the current keyboard focus to be at path, and selects it.
Gtk.IconView
Method
set_tooltip_cell (Tooltip tooltip, TreePath path, CellRenderer cell) : none
Sets the tip area of tooltip to the area which cell occupies in
the item pointed to by path.
Gtk.TreeView
Method
insert_column_with_data_func (gint32 position, String title, CellRenderer cell, Function func, void* data, Function dnotify) : gint32
Convenience function that inserts a new column into the GtkTreeView
with the given cell renderer and a GtkCellDataFunc to set cell renderer
attributes (normally using data from the model).
Gtk.TreeView
Method
set_cursor_on_cell (TreePath path, TreeViewColumn focus_column, CellRenderer focus_cell, gboolean start_editing) : none
Sets the current keyboard focus to be at path, and selects it.
Gtk.TreeView
Method
set_tooltip_cell (Tooltip tooltip, TreePath path, TreeViewColumn column, CellRenderer cell) : none
Sets the tip area of tooltip to the area path, column and cell have
in common.
Gtk.TreeViewColumn
Method
add_attribute (CellRenderer cell_renderer, String attribute, gint32 column) : none
Adds an attribute mapping to the list in tree_column.
Gtk.TreeViewColumn
Method
cell_get_position (CellRenderer cell_renderer, Object out_values) : gboolean
Obtains the horizontal position and size of a cell in a column.
Gtk.TreeViewColumn
Method
clear_attributes (CellRenderer cell_renderer) : none
Clears all existing attributes previously set with
gtk_tree_view_column_set_attributes().
Gtk.TreeViewColumn
Method
focus_cell (CellRenderer cell) : none
Sets the current keyboard focus to be at cell, if the column contains
2 or more editable and activatable cells.
Gtk.TreeViewColumn
Method
pack_end (CellRenderer cell, gboolean expand) : none
Adds the cell to end of the column.
Gtk.TreeViewColumn
Method
pack_start (CellRenderer cell, gboolean expand) : none
Packs the cell into the beginning of the column.
Gtk.TreeViewColumn
Method
set_cell_data_func (CellRenderer cell_renderer, Function func, void* func_data, Function destroy) : none
Sets the GtkTreeViewColumnFunc to use for the column.
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:12:14 GMT+0800 (HKT)