gtk.inscription
Module for [Inscription] class
Types 3
[gtk.inscription.Inscription] is a widget to show text in a predefined area.
You likely want to use [gtk.label.Label] instead as this widget is intended only for a small subset of use cases. The main scenario envisaged is inside lists such as [gtk.column_view.ColumnView].
While a [gtk.label.Label] sizes itself depending on the text that is displayed, [gtk.inscription.Inscription] is given a size and inscribes the given text into that space as well as it can.
Users of this widget should take care to plan behaviour for the common case where the text doesn't fit exactly in the allocated space.
Methods
Inscription self()Returns `this`, for use in `with` statements.InscriptionGidBuilder builder()Get builder for [gtk.inscription.Inscription] Returns: New builder objectpango.attr_list.AttrList attributes() @propertyGet `attributes` property. Returns: A list of style attributes to apply to the text of the inscription.void attributes(pango.attr_list.AttrList propval) @propertySet `attributes` property. Params: propval = A list of style attributes to apply to the text of the inscription.void markup(string propval) @propertySet `markup` property. Params: propval = Utility property that sets both the [gtk.inscription.Inscription.text] and [gtk.inscription.Inscription.attributes] properties, mainly intended for use in G...uint minChars() @propertyGet `minChars` property. Returns: The number of characters that should fit into the inscription at minimum.void minChars(uint propval) @propertySet `minChars` property. Params: propval = The number of characters that should fit into the inscription at minimum.uint minLines() @propertyGet `minLines` property. Returns: The number of lines that should fit into the inscription at minimum.void minLines(uint propval) @propertySet `minLines` property. Params: propval = The number of lines that should fit into the inscription at minimum.uint natChars() @propertyGet `natChars` property. Returns: The number of characters that should ideally fit into the inscription.void natChars(uint propval) @propertySet `natChars` property. Params: propval = The number of characters that should ideally fit into the inscription.uint natLines() @propertyGet `natLines` property. Returns: The number of lines that should ideally fit into the inscription.void natLines(uint propval) @propertySet `natLines` property. Params: propval = The number of lines that should ideally fit into the inscription.gtk.types.InscriptionOverflow textOverflow() @propertyGet `textOverflow` property. Returns: The overflow method to use for the text.void textOverflow(gtk.types.InscriptionOverflow propval) @propertySet `textOverflow` property. Params: propval = The overflow method to use for the text.pango.types.WrapMode wrapMode() @propertyGet `wrapMode` property. Returns: Controls how the line wrapping is done.void wrapMode(pango.types.WrapMode propval) @propertySet `wrapMode` property. Params: propval = Controls how the line wrapping is done.float xalign() @propertyGet `xalign` property. Returns: The horizontal alignment of the text inside the allocated size.void xalign(float propval) @propertySet `xalign` property. Params: propval = The horizontal alignment of the text inside the allocated size.float yalign() @propertyGet `yalign` property. Returns: The vertical alignment of the text inside the allocated size.void yalign(float propval) @propertySet `yalign` property. Params: propval = The vertical alignment of the text inside the allocated size.pango.attr_list.AttrList getAttributes()Gets the inscription's attribute list. Returns: the attribute listuint getMinChars()Gets the `min-chars` of the inscription.uint getMinLines()Gets the `min-lines` of the inscription.uint getNatChars()Gets the `nat-chars` of the inscription.uint getNatLines()Gets the `nat-lines` of the inscription.string getText()Gets the text that is displayed. Returns: The displayed textgtk.types.InscriptionOverflow getTextOverflow()Gets the inscription's overflow method. Returns: the overflow methodpango.types.WrapMode getWrapMode()Returns line wrap mode used by the inscription.float getXalign()Gets the `xalign` of the inscription.float getYalign()Gets the `yalign` of the inscription.void setAttributes(pango.attr_list.AttrList attrs = null)Apply attributes to the inscription text.void setMarkup(string markup = null)Utility function to set the text and attributes to be displayed.void setMinChars(uint minChars)Sets the `min-chars` of the inscription.void setMinLines(uint minLines)Sets the `min-lines` of the inscription.void setNatChars(uint natChars)Sets the `nat-chars` of the inscription.void setNatLines(uint natLines)Sets the `nat-lines` of the inscription.void setText(string text = null)Sets the text to be displayed.void setTextOverflow(gtk.types.InscriptionOverflow overflow)Sets what to do when the text doesn't fit.void setWrapMode(pango.types.WrapMode wrapMode)Controls how line wrapping is done.void setXalign(float xalign)Sets the `xalign` of the inscription.void setYalign(float yalign)Sets the `yalign` of the inscription.classInscriptionGidBuilderImpl(T) : gtk.widget.WidgetGidBuilderImpl!T, gtk.accessible_text.AccessibleTextGidBuilderImpl!T
Methods
T attributes(pango.attr_list.AttrList propval)Set `attributes` property. Params: propval = A list of style attributes to apply to the text of the inscription. Returns: Builder instance for fluent chainingT markup(string propval)Set `markup` property. Params: propval = Utility property that sets both the [gtk.inscription.Inscription.text] and [gtk.inscription.Inscription.attributes] properties, mainly intended for use in G...T minChars(uint propval)Set `minChars` property. Params: propval = The number of characters that should fit into the inscription at minimum.T minLines(uint propval)Set `minLines` property. Params: propval = The number of lines that should fit into the inscription at minimum.T natChars(uint propval)Set `natChars` property. Params: propval = The number of characters that should ideally fit into the inscription.T natLines(uint propval)Set `natLines` property. Params: propval = The number of lines that should ideally fit into the inscription.T text(string propval)Set `text` property. Params: propval = The displayed text. Returns: Builder instance for fluent chainingT textOverflow(gtk.types.InscriptionOverflow propval)Set `textOverflow` property. Params: propval = The overflow method to use for the text. Returns: Builder instance for fluent chainingT wrapMode(pango.types.WrapMode propval)Set `wrapMode` property. Params: propval = Controls how the line wrapping is done.T xalign(float propval)Set `xalign` property. Params: propval = The horizontal alignment of the text inside the allocated size.T yalign(float propval)Set `yalign` property. Params: propval = The vertical alignment of the text inside the allocated size.Fluent builder for [gtk.inscription.Inscription]
Methods