Package: gtk

Class gtk:inscription

Superclasses

Documented Subclasses

None

Direct Slots

attributes
The attributes property of type pango:attr-list (Read / Write)
The list of style attributes to apply to the text of the inscription.
markup
The markup property of type :string (Write)
Utility property that sets both the text and attributes properties, mainly intended for use in gtk:builder UI files to ease translation support and bindings. This function uses the pango:parse-markup function to parse the markup into text and attributes. The markup must be valid. If you cannot ensure that, consider using the pango:parse-markup function and setting the two properties yourself.
min-chars
The min-chars property of type :uint (Read / Write)
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.
Default value: 3
min-lines
The min-lines property of type :uint (Read / Write)
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.
Default value: 1
nat-chars
The nat-chars property of type :uint (Read / Write)
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 the min-chars property, that value will be used. In particular, for the default value of 0, this will always be the case.
Default value: 0
nat-lines
The nat-lines property of type :uint (Read / Write)
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 the min-lines property, that value will be used. In particular, for the default value of 0, this will always be the case.
Default value: 0
text
The text property of type :string (Read / Write)
The displayed text.
Default value: nil
text-overflow
The text-overflow property of type gtk:inscription-overflow (Read / Write)
The overflow method to use for the text.
Default value: :clip
wrap-mode
The wrap-mode property of type pango:wrap-mode (Read / Write)
Controls how the line wrapping is done. Note that unlike the gtk:label widget, the default here is the :word-char value.
Default value: :word-char
xalign
The xalign property of type :float (Read / Write)
The horizontal alignment of the text inside the allocated size. Compare this to the halign property, which determines how the size allocation of the inscription is positioned in the available space.
Allowed values: [0.0, 1.0]
Default value: 0.0
yalign
The yalign property of type :float (Read / Write)
The vertical alignment of the text inside the allocated size. Compare this to the valign property, which determines how the size allocation of the inscription is positioned in the available space.
Allowed values: [0.0, 1.0]
Default value: 0.5

Details

The gtk:inscription widget is a widget to show text in a predefined area. You likely want to use the gtk:label widget instead as this widget is intended only for a small subset of use cases. The main scenario envisaged is inside lists such as the gtk:column-view widget.

While a gtk:label widget sizes itself depending on the text that is displayed, the gtk:inscription widget 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 does not fit exactly in the allocated space.

Since 4.8
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2024-10-28