CellAreaBox

The GtkCellAreaBox renders cell renderers into a row or a column depending on its GtkOrientation.

GtkCellAreaBox uses a notion of packing. Packing refers to adding cell renderers with reference to a particular position in a GtkCellAreaBox. There are two reference positions: the start and the end of the box. When the GtkCellAreaBox 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 GtkCellRenderers rendered in adjacent rows can be configured by configuring the "align" child cell property with gtk_cell_area_cell_set_property() or by specifying the "align" argument to gtk_cell_area_box_pack_start() and gtk_cell_area_box_pack_end().

Constructors

this
this(GtkCellAreaBox* gtkCellAreaBox)

Sets our main struct and passes it to the parent class

this
this()

Creates a new GtkCellAreaBox.

Members

Functions

getCellAreaBoxStruct
GtkCellAreaBox* getCellAreaBoxStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getSpacing
int getSpacing()

Gets the spacing added between cell renderers.

getStruct
void* getStruct()

the main Gtk struct as a void*

packEnd
void packEnd(CellRenderer renderer, int expand, int alig, int fixed)

Adds renderer to box, packed with reference to the end of box. The renderer is packed after (away from end of) any other GtkCellRenderer packed with reference to the end of box.

packStart
void packStart(CellRenderer renderer, int expand, int alig, int fixed)

Adds renderer to box, packed with reference to the start of box. The renderer is packed after any other GtkCellRenderer packed with reference to the start of box.

setSpacing
void setSpacing(int spacing)

Sets the spacing to add between cell renderers in box.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin OrientableT!(GtkCellAreaBox)
Undocumented in source.

Variables

gtkCellAreaBox
GtkCellAreaBox* gtkCellAreaBox;

the main Gtk struct

Inherited Members

From CellArea

gtkCellArea
GtkCellArea* gtkCellArea;

the main Gtk struct

getCellAreaStruct
GtkCellArea* getCellAreaStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
__anonymous
mixin BuildableT!(GtkCellArea)
Undocumented in source.
__anonymous
mixin CellLayoutT!(GtkCellArea)
Undocumented in source.
connectedSignals
int[string] connectedSignals;
onAddEditableListeners
void delegate(CellRenderer, CellEditableIF, GdkRectangle*, string, CellArea)[] onAddEditableListeners;
Undocumented in source.
addOnAddEditable
void addOnAddEditable(void delegate(CellRenderer, CellEditableIF, GdkRectangle*, string, CellArea) dlg, ConnectFlags connectFlags)

Indicates that editing has started on renderer and that editable should be added to the owning cell-layouting widget at cell_area. Since 3.0

callBackAddEditable
void callBackAddEditable(GtkCellArea* areaStruct, GtkCellRenderer* renderer, GtkCellEditable* editable, GdkRectangle* cellArea, gchar* path, CellArea _cellArea)
Undocumented in source. Be warned that the author may not have intended to support it.
onApplyAttributesListeners
void delegate(TreeModelIF, TreeIter, gboolean, gboolean, CellArea)[] onApplyAttributesListeners;
Undocumented in source.
addOnApplyAttributes
void addOnApplyAttributes(void delegate(TreeModelIF, TreeIter, gboolean, gboolean, CellArea) dlg, ConnectFlags connectFlags)

This signal is emitted whenever applying attributes to area from model Since 3.0

callBackApplyAttributes
void callBackApplyAttributes(GtkCellArea* areaStruct, GtkTreeModel* model, GtkTreeIter* iter, gboolean isExpander, gboolean isExpanded, CellArea _cellArea)
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusChangedListeners
void delegate(CellRenderer, string, CellArea)[] onFocusChangedListeners;
Undocumented in source.
addOnFocusChanged
void addOnFocusChanged(void delegate(CellRenderer, string, CellArea) dlg, ConnectFlags connectFlags)

Indicates that focus changed on this area. This signal is emitted either as a result of focus handling or event handling. It's possible that the signal is emitted even if the currently focused renderer did not change, this is because focus may change to the same renderer in the same cell area for a different row of data. Since 3.0

callBackFocusChanged
void callBackFocusChanged(GtkCellArea* areaStruct, GtkCellRenderer* renderer, gchar* path, CellArea _cellArea)
Undocumented in source. Be warned that the author may not have intended to support it.
onRemoveEditableListeners
void delegate(CellRenderer, CellEditableIF, CellArea)[] onRemoveEditableListeners;
Undocumented in source.
addOnRemoveEditable
void addOnRemoveEditable(void delegate(CellRenderer, CellEditableIF, CellArea) dlg, ConnectFlags connectFlags)

Indicates that editing finished on renderer and that editable should be removed from the owning cell-layouting widget. Since 3.0

callBackRemoveEditable
void callBackRemoveEditable(GtkCellArea* areaStruct, GtkCellRenderer* renderer, GtkCellEditable* editable, CellArea _cellArea)
Undocumented in source. Be warned that the author may not have intended to support it.
add
void add(CellRenderer renderer)

Adds renderer to area with the default child cell properties.

remove
void remove(CellRenderer renderer)

Removes renderer from area.

hasRenderer
int hasRenderer(CellRenderer renderer)

Checks if area contains renderer.

foreac
void foreac(GtkCellCallback callback, void* callbackData)

Calls callback for every GtkCellRenderer in area.

foreachAlloc
void foreachAlloc(CellAreaContext context, Widget widget, Rectangle cellArea, Rectangle backgroundArea, GtkCellAllocCallback callback, void* callbackData)

Calls callback for every GtkCellRenderer in area with the allocated rectangle inside cell_area.

event
int event(CellAreaContext context, Widget widget, Event event, Rectangle cellArea, GtkCellRendererState flags)

Delegates event handling to a GtkCellArea.

render
void render(CellAreaContext context, Widget widget, Context cr, Rectangle backgroundArea, Rectangle cellArea, GtkCellRendererState flags, int paintFocus)

Renders area's cells according to area's layout onto widget at the given coordinates.

getCellAllocation
void getCellAllocation(CellAreaContext context, Widget widget, CellRenderer renderer, Rectangle cellArea, Rectangle allocation)

Derives the allocation of renderer inside area if area were to be renderered in cell_area.

getCellAtPosition
CellRenderer getCellAtPosition(CellAreaContext context, Widget widget, Rectangle cellArea, int x, int y, Rectangle allocArea)

Gets the GtkCellRenderer at x and y coordinates inside area and optionally returns the full cell allocation for it inside cell_area.

createContext
CellAreaContext createContext()

Creates a GtkCellAreaContext to be used with area for all purposes. GtkCellAreaContext 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 GtkCellAreaContext which was used to request the size of those rows of data).

copyContext
CellAreaContext copyContext(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. 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.

getRequestMode
GtkSizeRequestMode getRequestMode()

Gets whether the area prefers a height-for-width layout or a width-for-height layout.

getPreferredWidth
void getPreferredWidth(CellAreaContext context, Widget widget, int minimumWidth, int naturalWidth)

Retrieves 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.

getPreferredHeightForWidth
void getPreferredHeightForWidth(CellAreaContext context, Widget widget, int width, int minimumHeight, int naturalHeight)

Retrieves 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().

getPreferredHeight
void getPreferredHeight(CellAreaContext context, Widget widget, int minimumHeight, int naturalHeight)

Retrieves 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.

getPreferredWidthForHeight
void getPreferredWidthForHeight(CellAreaContext context, Widget widget, int height, int minimumWidth, int naturalWidth)

Retrieves 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().

getCurrentPathString
string getCurrentPathString()

Gets 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.

applyAttributes
void applyAttributes(TreeModelIF treeModel, TreeIter iter, int isExpander, int isExpanded)

Applies any connected attributes to the renderers in area by pulling the values from tree_model.

attributeConnect
void attributeConnect(CellRenderer renderer, string attribute, int column)

Connects an attribute to apply values from column for the GtkTreeModel in use.

attributeDisconnect
void attributeDisconnect(CellRenderer renderer, string attribute)

Disconnects attribute for the renderer in area so that attribute will no longer be updated with values from the model.

classInstallCellProperty
void classInstallCellProperty(GtkCellAreaClass* aclass, uint propertyId, ParamSpec pspec)

Installs a cell property on a cell area class.

classFindCellProperty
ParamSpec classFindCellProperty(GtkCellAreaClass* aclass, string propertyName)

Finds a cell property of a cell area class by name.

classListCellProperties
ParamSpec[] classListCellProperties(GtkCellAreaClass* aclass)

Returns all cell properties of a cell area class.

cellSetValist
void cellSetValist(CellRenderer renderer, string firstPropertyName, void* varArgs)

Sets one or more cell properties for renderer in area.

cellGetValist
void cellGetValist(CellRenderer renderer, string firstPropertyName, void* varArgs)

Gets the values of one or more cell properties for renderer in area.

cellSetProperty
void cellSetProperty(CellRenderer renderer, string propertyName, Value value)

Sets a cell property for renderer in area.

cellGetProperty
void cellGetProperty(CellRenderer renderer, string propertyName, Value value)

Gets the value of a cell property for renderer in area.

isActivatable
int isActivatable()

Returns whether the area can do anything when activated, after applying new attributes to area.

activate
int activate(CellAreaContext context, Widget widget, Rectangle cellArea, GtkCellRendererState flags, int editOnly)

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.

focus
int focus(GtkDirectionType 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. Implementing GtkCellArea classes should implement this method to receive and navigate focus in its own way particular to how it lays out cells.

setFocusCell
void setFocusCell(CellRenderer renderer)

Explicitly 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().

getFocusCell
CellRenderer getFocusCell()

Retrieves the currently focused cell for area

addFocusSibling
void addFocusSibling(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. Events handled by focus siblings can also activate the given focusable renderer.

removeFocusSibling
void removeFocusSibling(CellRenderer renderer, CellRenderer sibling)

Removes sibling from renderer's focus sibling list (see gtk_cell_area_add_focus_sibling()).

isFocusSibling
int isFocusSibling(CellRenderer renderer, CellRenderer sibling)

Returns whether sibling is one of renderer's focus siblings (see gtk_cell_area_add_focus_sibling()).

getFocusSiblings
ListG getFocusSiblings(CellRenderer renderer)

Gets the focus sibling cell renderers for renderer.

getFocusFromSibling
CellRenderer getFocusFromSibling(CellRenderer renderer)

Gets 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.

getEditedCell
CellRenderer getEditedCell()

Gets the GtkCellRenderer in area that is currently being edited.

getEditWidget
CellEditableIF getEditWidget()

Gets the GtkCellEditable widget currently used to edit the currently edited cell.

activateCell
int activateCell(Widget widget, CellRenderer renderer, Event event, Rectangle cellArea, GtkCellRendererState flags)

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.

stopEditing
void stopEditing(int canceled)

Explicitly 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().

innerCellArea
void innerCellArea(Widget widget, Rectangle cellArea, Rectangle innerArea)

This 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().

requestRenderer
void requestRenderer(CellRenderer renderer, GtkOrientation orientation, Widget widget, int forSize, int minimumSize, int naturalSize)

This 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.

From OrientableIF

getOrientableTStruct
GtkOrientable* getOrientableTStruct()
Undocumented in source.
getStruct
void* getStruct()

the main Gtk struct as a void*

getOrientation
GtkOrientation getOrientation()

Retrieves the orientation of the orientable. Since 2.16

setOrientation
void setOrientation(GtkOrientation orientation)

Sets the orientation of the orientable. Since 2.16

Meta