It derives from <GtkWidget>.
Shows text in a predefined area.
You likely want to use <GtkLabel> instead as this
widget is intended only for a small subset of use cases. The main
scenario envisaged is inside lists such as
<GtkColumnView>.
While a <GtkLabel> sizes itself depending on the
text that is displayed, <GtkInscription> 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.
<GtkInscription> has a single CSS node with
the name label.
A list of style attributes to apply to the text of the inscription.
Its value is a <PangoAttrList>, or
#f.
Set it with (set! (inscription:attributes self) value).
Utility property that sets both the inscription:text and inscription:attributes properties, mainly intended for use
in GtkBuilder ui files to ease translation support and bindings.
This function uses parse-markup to
parse the markup into text and attributes. The markup must be valid. If
you cannot ensure that, consider using
parse-markup and setting the two
properties yourself.
Its value is a string, or #f.
It can only be set, with (set! (inscription:markup self) value).
The number of characters that should fit into the inscription at minimum.
This influences the requested width, not the width actually given to the widget, which might turn out to be larger.
Note that this is an approximate character width, so some characters might be wider and some might be thinner, so do not expect the number of characters to exactly match.
If you set this property to 0, the inscription will not request any width at all and its width will be determined entirely by its surroundings.
Its value is an unsigned 32-bit integer.
Set it with (set! (inscription:min-chars self) value).
The number of lines that should fit into the inscription at minimum.
This influences the requested height, not the height actually given to the widget, which might turn out to be larger.
Note that this is an approximate line height, so if the text uses things like fancy Unicode or attribute that influence the height, the text might not fit.
If you set this property to 0, the inscription will not request any height at all and its height will be determined entirely by its surroundings.
Its value is an unsigned 32-bit integer.
Set it with (set! (inscription:min-lines self) value).
The number of characters that should ideally fit into the inscription.
This influences the requested width, not the width actually given to the widget. The widget might turn out larger as well as smaller.
If this property is set to a value smaller than inscription:min-chars, that value will be used. In
particular, for the default value of 0, this will always be the case.
Its value is an unsigned 32-bit integer.
Set it with (set! (inscription:nat-chars self) value).
The number of lines that should ideally fit into the inscription.
This influences the requested height, not the height actually given to the widget. The widget might turn out larger as well as smaller.
If this property is set to a value smaller than inscription:min-lines, that value will be used. In
particular, for the default value of 0, this will always be the case.
Its value is an unsigned 32-bit integer.
Set it with (set! (inscription:nat-lines self) value).
The displayed text.
Its value is a string, or #f.
Set it with (set! (inscription:text self) value).
The overflow method to use for the text.
Its value is a
<GtkInscriptionOverflow> (or, to set
it, one of its symbols).
Set it with (set! (inscription:text-overflow self) value).
Controls how the line wrapping is done.
Note that unlike <GtkLabel>, the default here is
word-char.
Its value is a <PangoWrapMode> (or, to set
it, one of its symbols).
Set it with (set! (inscription:wrap-mode self) value).
The horizontal alignment of the text inside the allocated size.
Compare this to widget:halign,
which determines how the inscription’s size allocation is positioned in
the available space.
Its value is a real number.
Set it with (set! (inscription:xalign self) value).
The vertical alignment of the text inside the allocated size.
Compare this to widget:valign,
which determines how the inscription’s size allocation is positioned in
the available space.
Its value is a real number.
Set it with (set! (inscription:yalign self) value).
Gets the inscription’s attribute list.
Passed: a <GtkInscription>.
Returned: a <PangoAttrList>, or #f.
the attribute list
Gets the min-chars of the inscription.
See the inscription:min-chars property.
Passed: a <GtkInscription>.
Returned: an unsigned 32-bit integer.
the min-chars property
Gets the min-lines of the inscription.
See the inscription:min-lines property.
Passed: a <GtkInscription>.
Returned: an unsigned 32-bit integer.
the min-lines property
Gets the nat-chars of the inscription.
See the inscription:nat-chars property.
Passed: a <GtkInscription>.
Returned: an unsigned 32-bit integer.
the nat-chars property
Gets the nat-lines of the inscription.
See the inscription:nat-lines property.
Passed: a <GtkInscription>.
Returned: an unsigned 32-bit integer.
the nat-lines property
Gets the text that is displayed.
Passed: a <GtkInscription>.
Returned: a string, or #f.
The displayed text
Gets the inscription’s overflow method.
Passed: a <GtkInscription>.
Returned: a <GtkInscriptionOverflow>.
the overflow method
Returns line wrap mode used by the inscription.
See inscription:set-wrap-mode.
Passed: a <GtkInscription>.
Returned: a <PangoWrapMode>.
the line wrap mode
Gets the xalign of the inscription.
See the inscription:xalign
property.
Passed: a <GtkInscription>.
Returned: a real number.
the xalign property
Gets the yalign of the inscription.
See the inscription:yalign
property.
Passed: a <GtkInscription>.
Returned: a real number.
the yalign property
Creates a new <GtkInscription> with the given
text.
Passed, or left out: a string, or #f.
The text to display.
Returned: a <GtkWidget>.
a new <GtkInscription>
Apply attributes to the inscription text.
These attributes will not be evaluated for sizing the inscription.
Passed: a <GtkInscription>.
Passed, or left out: a <PangoAttrList>, or
#f.
Utility function to set the text and attributes to be displayed.
See the inscription:markup
property.
Passed: a <GtkInscription>.
Passed, or left out: a string, or #f.
The markup to display
Sets the min-chars of the inscription.
See the inscription:min-chars property.
Passed: a <GtkInscription>.
Passed: an unsigned 32-bit integer.
the minimum number of characters that should fit, approximately
Sets the min-lines of the inscription.
See the inscription:min-lines property.
Passed: a <GtkInscription>.
Passed: an unsigned 32-bit integer.
the minimum number of lines that should fit, approximately
Sets the nat-chars of the inscription.
See the inscription:nat-chars property.
Passed: a <GtkInscription>.
Passed: an unsigned 32-bit integer.
the number of characters that should ideally fit, approximately
Sets the nat-lines of the inscription.
See the inscription:nat-lines property.
Passed: a <GtkInscription>.
Passed: an unsigned 32-bit integer.
the number of lines that should ideally fit
Sets the text to be displayed.
Passed: a <GtkInscription>.
Passed, or left out: a string, or #f.
The text to display
Sets what to do when the text doesn’t fit.
Passed: a <GtkInscription>.
Passed: a <GtkInscriptionOverflow>, or
one of its symbols.
the overflow method to use
Controls how line wrapping is done.
Passed: a <GtkInscription>.
Passed: a <PangoWrapMode>, or one of its
symbols.
the line wrapping mode
Sets the xalign of the inscription.
See the inscription:xalign
property.
Passed: a <GtkInscription>.
Passed: a real number.
the new xalign value, between 0 and 1
Sets the yalign of the inscription.
See the inscription:yalign
property.
Passed: a <GtkInscription>.
Passed: a real number.
the new yalign value, between 0 and 1