Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: CellRendererText

[18:7] extends: object

Renders text in a cell A GtkCellRendererText renders a given text in its cell, using the font, color and style information provided by its properties. The text will be ellipsized if it is too long and the GtkCellRendererText:ellipsize property allows it. If the GtkCellRenderer:mode is %GTK_CELL_RENDERER_MODE_EDITABLE, the GtkCellRendererText allows to edit its text using an entry.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • CellRendererText ()

    Creates a new GtkCellRendererText. Adjust how text is drawn using object properties. Object properties can be set globally (with g_object_set()). Also, with GtkTreeViewColumn, you can bind a property to a value in a GtkTreeModel. For example, you can bind the “text” property on the cell renderer to a string value in the model, thus rendering a different string in each row of the GtkTreeView.

  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asCellRenderer ()

    Wraps this handle as CellRenderer.

    • @r A CellRenderer object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnEdited (callback Fn, UserData = null)

    This signal is emitted after @renderer has been edited. It is the responsibility of the application to update the model and store @new_text at the position indicated by @path.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (CellRendererText Self, string Path, string New_text).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setAlignset (bool Value)

    Writes the align-set property.

    • @p Value is the new property value.
    • @r None.
  • setAlignment (string Value)

    Specifies how to align the lines of text with respect to each other. Note that this property describes how to align the lines of text in case there are several of them. The "xalign" property of GtkCellRenderer, on the other hand, sets the horizontal alignment of the whole text.

    • @p Value is the new property value.
    • @r None.
  • setAttributes (object Value)

    Writes the attributes property.

    • @p Value is the new property value.
    • @r None.
  • setBackground (string Value)

    Writes the background property.

    • @p Value is the new property value.
    • @r None.
  • setBackgroundset (bool Value)

    Writes the background-set property.

    • @p Value is the new property value.
    • @r None.
  • setEditable (bool Value)

    Writes the editable property.

    • @p Value is the new property value.
    • @r None.
  • setEditableset (bool Value)

    Writes the editable-set property.

    • @p Value is the new property value.
    • @r None.
  • setEllipsize (string Value)

    Specifies the preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string. Setting it to %PANGO_ELLIPSIZE_NONE turns off ellipsizing. See the wrap-width property for another way of making the text fit into a given width.

    • @p Value is the new property value.
    • @r None.
  • setEllipsizeset (bool Value)

    Writes the ellipsize-set property.

    • @p Value is the new property value.
    • @r None.
  • setFamily (string Value)

    Writes the family property.

    • @p Value is the new property value.
    • @r None.
  • setFamilyset (bool Value)

    Writes the family-set property.

    • @p Value is the new property value.
    • @r None.
  • setFont (string Value)

    Writes the font property.

    • @p Value is the new property value.
    • @r None.
  • setFontdesc (object Value)

    Writes the font-desc property.

    • @p Value is the new property value.
    • @r None.
  • setForeground (string Value)

    Writes the foreground property.

    • @p Value is the new property value.
    • @r None.
  • setForegroundset (bool Value)

    Writes the foreground-set property.

    • @p Value is the new property value.
    • @r None.
  • setLanguage (string Value)

    Writes the language property.

    • @p Value is the new property value.
    • @r None.
  • setLanguageset (bool Value)

    Writes the language-set property.

    • @p Value is the new property value.
    • @r None.
  • setMarkup (string Value)

    Writes the markup property.

    • @p Value is the new property value.
    • @r None.
  • setMaxwidthchars (int Value)

    The desired maximum width of the cell, in characters. If this property is set to -1, the width will be calculated automatically. For cell renderers that ellipsize or wrap text; this property controls the maximum reported width of the cell. The cell should not receive any greater allocation unless it is set to expand in its GtkCellLayout and all of the cell's siblings have received their natural width.

    • @p Value is the new property value.
    • @r None.
  • setPlaceholdertext (string Value)

    The text that will be displayed in the GtkCellRenderer if GtkCellRendererText:editable is %TRUE and the cell is empty.

    • @p Value is the new property value.
    • @r None.
  • setRise (int Value)

    Writes the rise property.

    • @p Value is the new property value.
    • @r None.
  • setRiseset (bool Value)

    Writes the rise-set property.

    • @p Value is the new property value.
    • @r None.
  • setScale (double Value)

    Writes the scale property.

    • @p Value is the new property value.
    • @r None.
  • setScaleset (bool Value)

    Writes the scale-set property.

    • @p Value is the new property value.
    • @r None.
  • setSingleparagraphmode (bool Value)

    Writes the single-paragraph-mode property.

    • @p Value is the new property value.
    • @r None.
  • setSize (int Value)

    Writes the size property.

    • @p Value is the new property value.
    • @r None.
  • setSizepoints (double Value)

    Writes the size-points property.

    • @p Value is the new property value.
    • @r None.
  • setSizeset (bool Value)

    Writes the size-set property.

    • @p Value is the new property value.
    • @r None.
  • setStretch (string Value)

    Writes the stretch property.

    • @p Value is the new property value.
    • @r None.
  • setStretchset (bool Value)

    Writes the stretch-set property.

    • @p Value is the new property value.
    • @r None.
  • setStrikethrough (bool Value)

    Writes the strikethrough property.

    • @p Value is the new property value.
    • @r None.
  • setStrikethroughset (bool Value)

    Writes the strikethrough-set property.

    • @p Value is the new property value.
    • @r None.
  • setStyle (string Value)

    Writes the style property.

    • @p Value is the new property value.
    • @r None.
  • setStyleset (bool Value)

    Writes the style-set property.

    • @p Value is the new property value.
    • @r None.
  • setText (string Value)

    Writes the text property.

    • @p Value is the new property value.
    • @r None.
  • setUnderline (string Value)

    Writes the underline property.

    • @p Value is the new property value.
    • @r None.
  • setUnderlineset (bool Value)

    Writes the underline-set property.

    • @p Value is the new property value.
    • @r None.
  • setVariant (string Value)

    Writes the variant property.

    • @p Value is the new property value.
    • @r None.
  • setVariantset (bool Value)

    Writes the variant-set property.

    • @p Value is the new property value.
    • @r None.
  • setWeight (int Value)

    Writes the weight property.

    • @p Value is the new property value.
    • @r None.
  • setWeightset (bool Value)

    Writes the weight-set property.

    • @p Value is the new property value.
    • @r None.
  • setWidthchars (int Value)

    The desired width of the cell, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the cell will request either 3 characters or the property value, whichever is greater.

    • @p Value is the new property value.
    • @r None.
  • setWrapmode (string Value)

    Specifies how to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string. This property has no effect unless the wrap-width property is set.

    • @p Value is the new property value.
    • @r None.
  • setWrapwidth (int Value)

    Specifies the minimum width at which the text is wrapped. The wrap-mode property can be used to influence at what character positions the line breaks can be placed. Setting wrap-width to -1 turns wrapping off.

    • @p Value is the new property value.
    • @r None.
  • set_fixed_height_from_font (int number_of_rows)

    Sets the height of a renderer to explicitly be determined by the “font” and “y_pad” property set on it. Further changes in these properties do not affect the height, so they must be accompanied by a subsequent call to this function. Using this function is inflexible, and should really only be used if calculating the size of a cell is too slow (ie, a massive number of cells displayed). If @number_of_rows is -1, then the fixed height is unset, and the height is determined by the properties again.

    • @p number_of_rows is Number of rows of text each cell renderer is allocated, or -1.
    • @r None.

class: CellRendererTextMeta

[895:14] static extends: object

Generated metadata helpers for CellRendererText class surfaces.

Methods

  • properties ()

    Returns property metadata for CellRendererText.

    • @r A list.
  • signals ()

    Returns signal metadata for CellRendererText.

    • @r A list.

class: CellRendererTextEditedCallback

[825:7] extends: object

Generated low-level callback wrapper for GIR callback edited.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • CellRendererTextEditedCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, path, new_text, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.