package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Cell_area/index.html
Module Wrappers.Cell_area
type t = [ `cell_area | `initially_unowned | `object_ ] Gobject.objval stop_editing : t -> bool -> unitExplicitly stops the editing of the currently edited cell.
If @canceled is %TRUE, the currently edited cell renderer will emit the ::editing-canceled signal, otherwise the the ::editing-done signal will be emitted on the current edit widget.
See gtk_cell_area_get_edited_cell() and gtk_cell_area_get_edit_widget().
val snapshot :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
[ `snapshot | `object_ ] Gobject.obj ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.t ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.t ->
Gtk_enums.cellrendererstate ->
bool ->
unitSnapshots @area’s cells according to @area’s layout onto at the given coordinates.
val set_focus_cell :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj option ->
unitExplicitly sets the currently focused cell to @renderer.
This is generally called by implementations of `GtkCellAreaClass.focus()` or `GtkCellAreaClass.event()`, however it can also be used to implement functions such as gtk_tree_view_set_cursor_on_cell().
val request_renderer :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
Gtk_enums.orientation ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
int ->
int * intThis is a convenience function for `GtkCellArea` implementations to request size for cell renderers. It’s important to use this function to request size and then use gtk_cell_area_inner_cell_area() at render and event time since this function will add padding around the cell for focus painting.
val remove_focus_sibling :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
unitRemoves @sibling from @renderer’s focus sibling list (see gtk_cell_area_add_focus_sibling()).
val remove :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
unitRemoves @renderer from @area.
val is_focus_sibling :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
boolReturns whether @sibling is one of @renderer’s focus siblings (see gtk_cell_area_add_focus_sibling()).
val is_activatable : t -> boolReturns whether the area can do anything when activated, after applying new attributes to @area.
val inner_cell_area :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.t ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.tThis is a convenience function for `GtkCellArea` implementations to get the inner area where a given `GtkCellRenderer` will be rendered. It removes any padding previously added by gtk_cell_area_request_renderer().
val has_renderer :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
boolChecks if @area contains @renderer.
val get_request_mode : t -> Gtk_enums.sizerequestmodeGets whether the area prefers a height-for-width layout or a width-for-height layout.
val get_preferred_width_for_height :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
int ->
int * intRetrieves a cell area’s minimum and natural width if it would be given the specified @height.
@area stores some geometrical information in @context along the way while calling gtk_cell_area_get_preferred_height(). It’s important to perform a series of gtk_cell_area_get_preferred_height() requests with @context first and then call gtk_cell_area_get_preferred_width_for_height() on each cell area individually to get the height for width of each fully requested row.
If at some point, the height of a single row changes, it should be requested with gtk_cell_area_get_preferred_height() again and then the full height of the requested rows checked again with gtk_cell_area_context_get_preferred_height().
val get_preferred_width :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
int * intRetrieves a cell area’s initial minimum and natural width.
@area will store some geometrical information in @context along the way; when requesting sizes over an arbitrary number of rows, it’s not important to check the @minimum_width and @natural_width of this call but rather to consult gtk_cell_area_context_get_preferred_width() after a series of requests.
val get_preferred_height_for_width :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
int ->
int * intRetrieves a cell area’s minimum and natural height if it would be given the specified @width.
@area stores some geometrical information in @context along the way while calling gtk_cell_area_get_preferred_width(). It’s important to perform a series of gtk_cell_area_get_preferred_width() requests with @context first and then call gtk_cell_area_get_preferred_height_for_width() on each cell area individually to get the height for width of each fully requested row.
If at some point, the width of a single row changes, it should be requested with gtk_cell_area_get_preferred_width() again and then the full width of the requested rows checked again with gtk_cell_area_context_get_preferred_width().
val get_preferred_height :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
int * intRetrieves a cell area’s initial minimum and natural height.
@area will store some geometrical information in @context along the way; when requesting sizes over an arbitrary number of rows, it’s not important to check the @minimum_height and @natural_height of this call but rather to consult gtk_cell_area_context_get_preferred_height() after a series of requests.
val get_focus_siblings :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj listGets the focus sibling cell renderers for @renderer.
val get_focus_from_sibling :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj optionGets the `GtkCellRenderer` which is expected to be focusable for which @renderer is, or may be a sibling.
This is handy for `GtkCellArea` subclasses when handling events, after determining the renderer at the event location it can then chose to activate the focus cell for which the event cell may have been a sibling.
val get_focus_cell :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj optionRetrieves the currently focused cell for @area
val get_edited_cell :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj optionGets the `GtkCellRenderer` in @area that is currently being edited.
val get_edit_widget : t -> [ `cell_editable ] Gobject.obj optionGets the `GtkCellEditable` widget currently used to edit the currently edited cell.
val get_current_path_string : t -> stringGets the current `GtkTreePath` string for the currently applied `GtkTreeIter`, this is implicitly updated when gtk_cell_area_apply_attributes() is called and can be used to interact with renderers from `GtkCellArea` subclasses.
val get_cell_at_position :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.t ->
int ->
int ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj
* Ocgtk_gdk.Gdk.Wrappers.Rectangle.tGets the `GtkCellRenderer` at @x and @y coordinates inside @area and optionally returns the full cell allocation for it inside @cell_area.
val get_cell_allocation :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.t ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.tDerives the allocation of @renderer inside @area if @area were to be rendered in @cell_area.
val focus : t -> Gtk_enums.directiontype -> boolThis 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.
Implementing `GtkCellArea` classes should implement this method to receive and navigate focus in its own way particular to how it lays out cells.
val event :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
Ocgtk_gdk.Gdk.Wrappers.Event.t ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.t ->
Gtk_enums.cellrendererstate ->
intDelegates event handling to a `GtkCellArea`.
val create_context : t -> [ `cell_area_context | `object_ ] Gobject.objCreates a `GtkCellArea`Context to be used with @area for all purposes. `GtkCellArea`Context stores geometry information for rows for which it was operated on, it is important to use the same context for the same row of data at all times (i.e. one should render and handle events with the same `GtkCellArea`Context which was used to request the size of those rows of data).
val copy_context :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `cell_area_context | `object_ ] Gobject.objThis is sometimes needed for cases where rows need to share alignments in one orientation but may be separately grouped in the opposing orientation.
For instance, `GtkIconView` creates all icons (rows) to have the same width and the cells theirin to have the same horizontal alignments. However each row of icons may have a separate collective height. `GtkIconView` uses this to request the heights of each row based on a context which was already used to request all the row widths that are to be displayed.
val cell_set_property :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
string ->
Gobject.Value.t ->
unitSets a cell property for @renderer in @area.
val cell_get_property :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
string ->
Gobject.Value.t ->
unitGets the value of a cell property for @renderer in @area.
val attribute_get_column :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
string ->
intReturns the model column that an attribute has been mapped to, or -1 if the attribute is not mapped.
val attribute_disconnect :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
string ->
unitDisconnects @attribute for the @renderer in @area so that attribute will no longer be updated with values from the model.
val attribute_connect :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
string ->
int ->
unitConnects an @attribute to apply values from @column for the `GtkTreeModel` in use.
val apply_attributes :
t ->
[ `tree_model ] Gobject.obj ->
[ `tree_iter ] Gobject.obj ->
bool ->
bool ->
unitApplies any connected attributes to the renderers in @area by pulling the values from @tree_model.
val add_focus_sibling :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
unitAdds @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.
Events handled by focus siblings can also activate the given focusable @renderer.
val add :
t ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
unitAdds @renderer to @area with the default child cell properties.
val activate_cell :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
Ocgtk_gdk.Gdk.Wrappers.Event.t ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.t ->
Gtk_enums.cellrendererstate ->
boolThis 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.
val activate :
t ->
[ `cell_area_context | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
Ocgtk_gdk.Gdk.Wrappers.Rectangle.t ->
Gtk_enums.cellrendererstate ->
bool ->
boolActivates @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.
val on_focus_changed :
?after:bool ->
t ->
callback:
(renderer:[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
path:string ->
unit) ->
Gobject.Signal.handler_idval on_remove_editable :
?after:bool ->
t ->
callback:
(renderer:[ `cell_renderer | `initially_unowned | `object_ ] Gobject.obj ->
editable:[ `cell_editable ] Gobject.obj ->
unit) ->
Gobject.Signal.handler_id