CtkCellRenderer

CtkCellRenderer — An object for rendering a single cell

Functions

Properties

char * cell-background Write
CdkColor * cell-background-cdk Read / Write
CdkRGBA * cell-background-rgba Read / Write
gboolean cell-background-set Read / Write
gboolean editing Read
int height Read / Write
gboolean is-expanded Read / Write
gboolean is-expander Read / Write
CtkCellRendererMode mode Read / Write
gboolean sensitive Read / Write
gboolean visible Read / Write
int width Read / Write
float xalign Read / Write
guint xpad Read / Write
float yalign Read / Write
guint ypad Read / Write

Signals

void editing-canceled Run First
void editing-started Run First

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── CtkCellRenderer
            ├── CtkCellRendererText
            ├── CtkCellRendererPixbuf
            ├── CtkCellRendererProgress
            ├── CtkCellRendererSpinner
            ╰── CtkCellRendererToggle

Includes

#include <ctk/ctk.h>

Description

The CtkCellRenderer 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 CtkTreeView widget, though they aren’t tied to them in any specific way. It is worth noting that CtkCellRenderer is not a CtkWidget and cannot be treated as such.

The primary use of a CtkCellRenderer 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 ctk_cell_renderer_get_size(). Finally, the cell is rendered in the correct location using ctk_cell_renderer_render().

There are a number of rules that must be followed when writing a new CtkCellRenderer. First and foremost, it’s important that a certain set of properties will always yield a cell renderer of the same size, barring a CtkStyle change. The CtkCellRenderer 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 CtkCellRendererToggle, which toggles when it gets activated by a mouse click, or it can be “editable” like CtkCellRendererText, which allows the user to edit the text using a widget implementing the CtkCellEditable interface, e.g. CtkEntry. To make a cell renderer activatable or editable, you have to implement the CtkCellRendererClass.activate or CtkCellRendererClass.start_editing virtual functions, respectively.

Many properties of CtkCellRenderer and its subclasses have a corresponding “set” property, e.g. “cell-background-set” corresponds to “cell-background”. These “set” properties reflect whether a property has been set or not. You should not set them independently.

Functions

ctk_cell_renderer_class_set_accessible_type ()

void
ctk_cell_renderer_class_set_accessible_type
                               (CtkCellRendererClass *renderer_class,
                                GType type);

Sets the type to be used for creating accessibles for cells rendered by cell renderers of renderer_class . Note that multiple accessibles will be created.

This function should only be called from class init functions of cell renderers.

Parameters

renderer_class

class to set the accessible type for

 

type

The object type that implements the accessible for widget_class . The type must be a subtype of CtkRendererCellAccessible

 

ctk_cell_renderer_get_aligned_area ()

void
ctk_cell_renderer_get_aligned_area (CtkCellRenderer *cell,
                                    CtkWidget *widget,
                                    CtkCellRendererState flags,
                                    const CdkRectangle *cell_area,
                                    CdkRectangle *aligned_area);

Gets the aligned area used by cell inside cell_area . Used for finding the appropriate edit and focus rectangle.

Parameters

cell

a CtkCellRenderer instance

 

widget

the CtkWidget this cell will be rendering to

 

flags

render flags

 

cell_area

cell area which would be passed to ctk_cell_renderer_render()

 

aligned_area

the return location for the space inside cell_area that would acually be used to render.

[out]

Since: 3.0


ctk_cell_renderer_get_size ()

void
ctk_cell_renderer_get_size (CtkCellRenderer *cell,
                            CtkWidget *widget,
                            const CdkRectangle *cell_area,
                            gint *x_offset,
                            gint *y_offset,
                            gint *width,
                            gint *height);

ctk_cell_renderer_get_size has been deprecated since version 3.0 and should not be used in newly-written code.

Use ctk_cell_renderer_get_preferred_size() instead.

Obtains the width and height needed to render the cell. Used by view widgets to determine the appropriate size for the cell_area passed to ctk_cell_renderer_render(). If cell_area is not NULL, fills in the x and y offsets (if set) of the cell relative to this location.

Please note that the values set in width and height , as well as those in x_offset and y_offset are inclusive of the xpad and ypad properties.

Parameters

cell

a CtkCellRenderer

 

widget

the widget the renderer is rendering to

 

cell_area

The area a cell will be allocated, or NULL.

[allow-none]

x_offset

location to return x offset of cell relative to cell_area , or NULL.

[out][allow-none]

y_offset

location to return y offset of cell relative to cell_area , or NULL.

[out][allow-none]

width

location to return width needed to render a cell, or NULL.

[out][allow-none]

height

location to return height needed to render a cell, or NULL.

[out][allow-none]

ctk_cell_renderer_render ()

void
ctk_cell_renderer_render (CtkCellRenderer *cell,
                          cairo_t *cr,
                          CtkWidget *widget,
                          const CdkRectangle *background_area,
                          const CdkRectangle *cell_area,
                          CtkCellRendererState flags);

Invokes the virtual render function of the CtkCellRenderer. The three passed-in rectangles are areas in cr . Most renderers will draw within cell_area ; the xalign, yalign, xpad, and ypad fields of the CtkCellRenderer should be honored with respect to cell_area . background_area includes the blank space around the cell, and also the area containing the tree expander; so the background_area rectangles for all cells tile to cover the entire window .

Parameters

cell

a CtkCellRenderer

 

cr

a cairo context to draw to

 

widget

the widget owning window

 

background_area

entire cell area (including tree expanders and maybe padding on the sides)

 

cell_area

area normally rendered by a cell renderer

 

flags

flags that affect rendering

 

ctk_cell_renderer_activate ()

gboolean
ctk_cell_renderer_activate (CtkCellRenderer *cell,
                            CdkEvent *event,
                            CtkWidget *widget,
                            const gchar *path,
                            const CdkRectangle *background_area,
                            const CdkRectangle *cell_area,
                            CtkCellRendererState flags);

Passes an activate event to the cell renderer for possible processing. Some cell renderers may use events; for example, CtkCellRendererToggle toggles when it gets a mouse click.

Parameters

cell

a CtkCellRenderer

 

event

a CdkEvent

 

widget

widget that received the event

 

path

widget-dependent string representation of the event location; e.g. for CtkTreeView, a string representation of CtkTreePath

 

background_area

background area as passed to ctk_cell_renderer_render()

 

cell_area

cell area as passed to ctk_cell_renderer_render()

 

flags

render flags

 

Returns

TRUE if the event was consumed/handled


ctk_cell_renderer_start_editing ()

CtkCellEditable *
ctk_cell_renderer_start_editing (CtkCellRenderer *cell,
                                 CdkEvent *event,
                                 CtkWidget *widget,
                                 const gchar *path,
                                 const CdkRectangle *background_area,
                                 const CdkRectangle *cell_area,
                                 CtkCellRendererState flags);

Starts editing the contents of this cell , through a new CtkCellEditable widget created by the CtkCellRendererClass.start_editing virtual function.

Parameters

cell

a CtkCellRenderer

 

event

a CdkEvent.

[nullable]

widget

widget that received the event

 

path

widget-dependent string representation of the event location; e.g. for CtkTreeView, a string representation of CtkTreePath

 

background_area

background area as passed to ctk_cell_renderer_render()

 

cell_area

cell area as passed to ctk_cell_renderer_render()

 

flags

render flags

 

Returns

A new CtkCellEditable for editing this cell , or NULL if editing is not possible.

[nullable][transfer none]


ctk_cell_renderer_stop_editing ()

void
ctk_cell_renderer_stop_editing (CtkCellRenderer *cell,
                                gboolean canceled);

Informs the cell renderer that the editing is stopped. If canceled is TRUE, the cell renderer will emit the “editing-canceled” signal.

This function should be called by cell renderer implementations in response to the “editing-done” signal of CtkCellEditable.

Parameters

cell

A CtkCellRenderer

 

canceled

TRUE if the editing has been canceled

 

Since: 2.6


ctk_cell_renderer_get_fixed_size ()

void
ctk_cell_renderer_get_fixed_size (CtkCellRenderer *cell,
                                  gint *width,
                                  gint *height);

Fills in width and height with the appropriate size of cell .

Parameters

cell

A CtkCellRenderer

 

width

location to fill in with the fixed width of the cell, or NULL.

[out][allow-none]

height

location to fill in with the fixed height of the cell, or NULL.

[out][allow-none]

ctk_cell_renderer_set_fixed_size ()

void
ctk_cell_renderer_set_fixed_size (CtkCellRenderer *cell,
                                  gint width,
                                  gint height);

Sets the renderer size to be explicit, independent of the properties set.

Parameters

cell

A CtkCellRenderer

 

width

the width of the cell renderer, or -1

 

height

the height of the cell renderer, or -1

 

ctk_cell_renderer_get_visible ()

gboolean
ctk_cell_renderer_get_visible (CtkCellRenderer *cell);

Returns the cell renderer’s visibility.

Parameters

cell

A CtkCellRenderer

 

Returns

TRUE if the cell renderer is visible

Since: 2.18


ctk_cell_renderer_set_visible ()

void
ctk_cell_renderer_set_visible (CtkCellRenderer *cell,
                               gboolean visible);

Sets the cell renderer’s visibility.

Parameters

cell

A CtkCellRenderer

 

visible

the visibility of the cell

 

Since: 2.18


ctk_cell_renderer_get_sensitive ()

gboolean
ctk_cell_renderer_get_sensitive (CtkCellRenderer *cell);

Returns the cell renderer’s sensitivity.

Parameters

cell

A CtkCellRenderer

 

Returns

TRUE if the cell renderer is sensitive

Since: 2.18


ctk_cell_renderer_set_sensitive ()

void
ctk_cell_renderer_set_sensitive (CtkCellRenderer *cell,
                                 gboolean sensitive);

Sets the cell renderer’s sensitivity.

Parameters

cell

A CtkCellRenderer

 

sensitive

the sensitivity of the cell

 

Since: 2.18


ctk_cell_renderer_get_alignment ()

void
ctk_cell_renderer_get_alignment (CtkCellRenderer *cell,
                                 gfloat *xalign,
                                 gfloat *yalign);

Fills in xalign and yalign with the appropriate values of cell .

Parameters

cell

A CtkCellRenderer

 

xalign

location to fill in with the x alignment of the cell, or NULL.

[out][allow-none]

yalign

location to fill in with the y alignment of the cell, or NULL.

[out][allow-none]

Since: 2.18


ctk_cell_renderer_set_alignment ()

void
ctk_cell_renderer_set_alignment (CtkCellRenderer *cell,
                                 gfloat xalign,
                                 gfloat yalign);

Sets the renderer’s alignment within its available space.

Parameters

cell

A CtkCellRenderer

 

xalign

the x alignment of the cell renderer

 

yalign

the y alignment of the cell renderer

 

Since: 2.18


ctk_cell_renderer_get_padding ()

void
ctk_cell_renderer_get_padding (CtkCellRenderer *cell,
                               gint *xpad,
                               gint *ypad);

Fills in xpad and ypad with the appropriate values of cell .

Parameters

cell

A CtkCellRenderer

 

xpad

location to fill in with the x padding of the cell, or NULL.

[out][allow-none]

ypad

location to fill in with the y padding of the cell, or NULL.

[out][allow-none]

Since: 2.18


ctk_cell_renderer_set_padding ()

void
ctk_cell_renderer_set_padding (CtkCellRenderer *cell,
                               gint xpad,
                               gint ypad);

Sets the renderer’s padding.

Parameters

cell

A CtkCellRenderer

 

xpad

the x padding of the cell renderer

 

ypad

the y padding of the cell renderer

 

Since: 2.18


ctk_cell_renderer_get_state ()

CtkStateFlags
ctk_cell_renderer_get_state (CtkCellRenderer *cell,
                             CtkWidget *widget,
                             CtkCellRendererState cell_state);

Translates the cell renderer state to CtkStateFlags, based on the cell renderer and widget sensitivity, and the given CtkCellRendererState.

Parameters

cell

a CtkCellRenderer, or NULL.

[nullable]

widget

a CtkWidget, or NULL.

[nullable]

cell_state

cell renderer state

 

Returns

the widget state flags applying to cell

Since: 3.0


ctk_cell_renderer_is_activatable ()

gboolean
ctk_cell_renderer_is_activatable (CtkCellRenderer *cell);

Checks whether the cell renderer can do something when activated.

Parameters

cell

A CtkCellRenderer

 

Returns

TRUE if the cell renderer can do anything when activated

Since: 3.0


ctk_cell_renderer_get_preferred_height ()

void
ctk_cell_renderer_get_preferred_height
                               (CtkCellRenderer *cell,
                                CtkWidget *widget,
                                gint *minimum_size,
                                gint *natural_size);

Retreives a renderer’s natural size when rendered to widget .

Parameters

cell

a CtkCellRenderer instance

 

widget

the CtkWidget this cell will be rendering to

 

minimum_size

location to store the minimum size, or NULL.

[out][allow-none]

natural_size

location to store the natural size, or NULL.

[out][allow-none]

Since: 3.0


ctk_cell_renderer_get_preferred_height_for_width ()

void
ctk_cell_renderer_get_preferred_height_for_width
                               (CtkCellRenderer *cell,
                                CtkWidget *widget,
                                gint width,
                                gint *minimum_height,
                                gint *natural_height);

Retreives a cell renderers’s minimum and natural height if it were rendered to widget with the specified width .

Parameters

cell

a CtkCellRenderer instance

 

widget

the CtkWidget this cell will be rendering to

 

width

the size which is available for allocation

 

minimum_height

location for storing the minimum size, or NULL.

[out][allow-none]

natural_height

location for storing the preferred size, or NULL.

[out][allow-none]

Since: 3.0


ctk_cell_renderer_get_preferred_size ()

void
ctk_cell_renderer_get_preferred_size (CtkCellRenderer *cell,
                                      CtkWidget *widget,
                                      CtkRequisition *minimum_size,
                                      CtkRequisition *natural_size);

Retrieves the minimum and natural size of a cell taking into account the widget’s preference for height-for-width management.

Parameters

cell

a CtkCellRenderer instance

 

widget

the CtkWidget this cell will be rendering to

 

minimum_size

location for storing the minimum size, or NULL.

[out][allow-none]

natural_size

location for storing the natural size, or NULL.

[out][allow-none]

Since: 3.0


ctk_cell_renderer_get_preferred_width ()

void
ctk_cell_renderer_get_preferred_width (CtkCellRenderer *cell,
                                       CtkWidget *widget,
                                       gint *minimum_size,
                                       gint *natural_size);

Retreives a renderer’s natural size when rendered to widget .

Parameters

cell

a CtkCellRenderer instance

 

widget

the CtkWidget this cell will be rendering to

 

minimum_size

location to store the minimum size, or NULL.

[out][allow-none]

natural_size

location to store the natural size, or NULL.

[out][allow-none]

Since: 3.0


ctk_cell_renderer_get_preferred_width_for_height ()

void
ctk_cell_renderer_get_preferred_width_for_height
                               (CtkCellRenderer *cell,
                                CtkWidget *widget,
                                gint height,
                                gint *minimum_width,
                                gint *natural_width);

Retreives a cell renderers’s minimum and natural width if it were rendered to widget with the specified height .

Parameters

cell

a CtkCellRenderer instance

 

widget

the CtkWidget this cell will be rendering to

 

height

the size which is available for allocation

 

minimum_width

location for storing the minimum size, or NULL.

[out][allow-none]

natural_width

location for storing the preferred size, or NULL.

[out][allow-none]

Since: 3.0


ctk_cell_renderer_get_request_mode ()

CtkSizeRequestMode
ctk_cell_renderer_get_request_mode (CtkCellRenderer *cell);

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

Parameters

cell

a CtkCellRenderer instance

 

Returns

The CtkSizeRequestMode preferred by this renderer.

Since: 3.0

Types and Values

enum CtkCellRendererState

Tells how a cell is to be rendered.

Members

CTK_CELL_RENDERER_SELECTED

The cell is currently selected, and probably has a selection colored background to render to.

 

CTK_CELL_RENDERER_PRELIT

The mouse is hovering over the cell.

 

CTK_CELL_RENDERER_INSENSITIVE

The cell is drawn in an insensitive manner

 

CTK_CELL_RENDERER_SORTED

The cell is in a sorted row

 

CTK_CELL_RENDERER_FOCUSED

The cell is in the focus row.

 

CTK_CELL_RENDERER_EXPANDABLE

The cell is in a row that can be expanded. Since 3.4

 

CTK_CELL_RENDERER_EXPANDED

The cell is in a row that is expanded. Since 3.4

 

enum CtkCellRendererMode

Identifies how the user can interact with a particular cell.

Members

CTK_CELL_RENDERER_MODE_INERT

The cell is just for display and cannot be interacted with. Note that this doesn’t mean that eg. the row being drawn can’t be selected -- just that a particular element of it cannot be individually modified.

 

CTK_CELL_RENDERER_MODE_ACTIVATABLE

The cell can be clicked.

 

CTK_CELL_RENDERER_MODE_EDITABLE

The cell can be edited or otherwise modified.

 

struct CtkCellRenderer

struct CtkCellRenderer;

struct CtkCellRendererClass

struct CtkCellRendererClass {
  /* vtable - not signals */
  CtkSizeRequestMode (* get_request_mode)                (CtkCellRenderer      *cell);
  void               (* get_preferred_width)             (CtkCellRenderer      *cell,
                                                          CtkWidget            *widget,
                                                          gint                 *minimum_size,
                                                          gint                 *natural_size);
  void               (* get_preferred_height_for_width)  (CtkCellRenderer      *cell,
                                                          CtkWidget            *widget,
                                                          gint                  width,
                                                          gint                 *minimum_height,
                                                          gint                 *natural_height);
  void               (* get_preferred_height)            (CtkCellRenderer      *cell,
                                                          CtkWidget            *widget,
                                                          gint                 *minimum_size,
                                                          gint                 *natural_size);
  void               (* get_preferred_width_for_height)  (CtkCellRenderer      *cell,
                                                          CtkWidget            *widget,
                                                          gint                  height,
                                                          gint                 *minimum_width,
                                                          gint                 *natural_width);
  void               (* get_aligned_area)                (CtkCellRenderer      *cell,
                                                          CtkWidget            *widget,
							  CtkCellRendererState  flags,
                                                          const CdkRectangle   *cell_area,
                                                          CdkRectangle         *aligned_area);
  void               (* get_size)                        (CtkCellRenderer      *cell,
                                                          CtkWidget            *widget,
                                                          const CdkRectangle   *cell_area,
                                                          gint                 *x_offset,
                                                          gint                 *y_offset,
                                                          gint                 *width,
                                                          gint                 *height);
  void               (* render)                          (CtkCellRenderer      *cell,
                                                          cairo_t              *cr,
                                                          CtkWidget            *widget,
                                                          const CdkRectangle   *background_area,
                                                          const CdkRectangle   *cell_area,
                                                          CtkCellRendererState  flags);
  gboolean           (* activate)                        (CtkCellRenderer      *cell,
                                                          CdkEvent             *event,
                                                          CtkWidget            *widget,
                                                          const gchar          *path,
                                                          const CdkRectangle   *background_area,
                                                          const CdkRectangle   *cell_area,
                                                          CtkCellRendererState  flags);
  CtkCellEditable *  (* start_editing)                   (CtkCellRenderer      *cell,
                                                          CdkEvent             *event,
                                                          CtkWidget            *widget,
                                                          const gchar          *path,
                                                          const CdkRectangle   *background_area,
                                                          const CdkRectangle   *cell_area,
                                                          CtkCellRendererState  flags);

  /* Signals */
  void (* editing_canceled) (CtkCellRenderer *cell);
  void (* editing_started)  (CtkCellRenderer *cell,
			     CtkCellEditable *editable,
			     const gchar     *path);
};

Members

get_request_mode ()

Called to gets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.

 

get_preferred_width ()

Called to get a renderer’s natural width.

 

get_preferred_height_for_width ()

Called to get a renderer’s natural height for width.

 

get_preferred_height ()

Called to get a renderer’s natural height.

 

get_preferred_width_for_height ()

Called to get a renderer’s natural width for height.

 

get_aligned_area ()

Called to get the aligned area used by cell inside cell_area .

 

get_size ()

Called to get the width and height needed to render the cell. Deprecated: 3.0.

 

render ()

Called to render the content of the CtkCellRenderer.

 

activate ()

Called to activate the content of the CtkCellRenderer.

 

start_editing ()

Called to initiate editing the content of the CtkCellRenderer.

 

editing_canceled ()

Signal gets emitted when the user cancels the process of editing a cell.

 

editing_started ()

Signal gets emitted when a cell starts to be edited.

 

Property Details

The “cell-background” property

  “cell-background”          char *

Cell background color as a string.

Owner: CtkCellRenderer

Flags: Write

Default value: NULL


The “cell-background-cdk” property

  “cell-background-cdk”      CdkColor *

Cell background as a CdkColor

Owner: CtkCellRenderer

Flags: Read / Write


The “cell-background-rgba” property

  “cell-background-rgba”     CdkRGBA *

Cell background as a CdkRGBA

Owner: CtkCellRenderer

Flags: Read / Write

Since: 3.0


The “cell-background-set” property

  “cell-background-set”      gboolean

Whether the cell background color is set.

Owner: CtkCellRenderer

Flags: Read / Write

Default value: FALSE


The “editing” property

  “editing”                  gboolean

Whether the cell renderer is currently in editing mode.

Owner: CtkCellRenderer

Flags: Read

Default value: FALSE


The “height” property

  “height”                   int

The fixed height.

Owner: CtkCellRenderer

Flags: Read / Write

Allowed values: >= -1

Default value: -1


The “is-expanded” property

  “is-expanded”              gboolean

Row is an expander row, and is expanded.

Owner: CtkCellRenderer

Flags: Read / Write

Default value: FALSE


The “is-expander” property

  “is-expander”              gboolean

Row has children.

Owner: CtkCellRenderer

Flags: Read / Write

Default value: FALSE


The “mode” property

  “mode”                     CtkCellRendererMode

Editable mode of the CellRenderer.

Owner: CtkCellRenderer

Flags: Read / Write

Default value: CTK_CELL_RENDERER_MODE_INERT


The “sensitive” property

  “sensitive”                gboolean

Display the cell sensitive.

Owner: CtkCellRenderer

Flags: Read / Write

Default value: TRUE


The “visible” property

  “visible”                  gboolean

Display the cell.

Owner: CtkCellRenderer

Flags: Read / Write

Default value: TRUE


The “width” property

  “width”                    int

The fixed width.

Owner: CtkCellRenderer

Flags: Read / Write

Allowed values: >= -1

Default value: -1


The “xalign” property

  “xalign”                   float

The x-align.

Owner: CtkCellRenderer

Flags: Read / Write

Allowed values: [0,1]

Default value: 0.5


The “xpad” property

  “xpad”                     guint

The xpad.

Owner: CtkCellRenderer

Flags: Read / Write

Default value: 0


The “yalign” property

  “yalign”                   float

The y-align.

Owner: CtkCellRenderer

Flags: Read / Write

Allowed values: [0,1]

Default value: 0.5


The “ypad” property

  “ypad”                     guint

The ypad.

Owner: CtkCellRenderer

Flags: Read / Write

Default value: 0

Signal Details

The “editing-canceled” signal

void
user_function (CtkCellRenderer *renderer,
               gpointer         user_data)

This signal gets emitted when the user cancels the process of editing a cell. For example, an editable cell renderer could be written to cancel editing when the user presses Escape.

See also: ctk_cell_renderer_stop_editing().

Parameters

renderer

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First

Since: 2.4


The “editing-started” signal

void
user_function (CtkCellRenderer *renderer,
               CtkCellEditable *editable,
               char            *path,
               gpointer         user_data)

This signal gets emitted when a cell starts to be edited. The intended use of this signal is to do special setup on editable , e.g. adding a CtkEntryCompletion or setting up additional columns in a CtkComboBox.

See ctk_cell_editable_start_editing() for information on the lifecycle of the editable and a way to do setup that doesn’t depend on the renderer .

Note that CTK+ doesn't guarantee that cell renderers will continue to use the same kind of widget for editing in future releases, therefore you should check the type of editable before doing any specific setup, as in the following example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
static void
text_editing_started (CtkCellRenderer *cell,
                      CtkCellEditable *editable,
                      const gchar     *path,
                      gpointer         data)
{
  if (CTK_IS_ENTRY (editable))

    {
      CtkEntry *entry = CTK_ENTRY (editable);

      // ... create a CtkEntryCompletion

      ctk_entry_set_completion (entry, completion);
    }
}

Parameters

renderer

the object which received the signal

 

editable

the CtkCellEditable

 

path

the path identifying the edited cell

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First

Since: 2.6

See Also

CtkCellEditable