See: https://developer.gnome.org/gtk3/3.2/GtkLabel.html
gtk :: GtkLabel :: defaultinit
gtk :: GtkLabel :: set_markup
Set simple formatted text content from aformat
string and the content
which is escaped
core :: Pointer :: address_is_null
Is the address behind this Object at NULL?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
gtk :: GtkWidget :: defaultinit
gtk :: GtkMisc :: defaultinit
gtk :: GtkLabel :: defaultinit
core :: Pointer :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).gtk :: GtkWidget :: sensitive=
Sets the sensitivity of a widget. sensitive -> the user can interact with it.gtk :: GtkMisc :: set_alignment
gtk :: GtkLabel :: set_markup
Set simple formatted text content from aformat
string and the content
which is escaped
gtk :: GtkMisc :: set_padding
gtk :: GtkWidget :: set_size_request
Set the minimum dimension of this widgetgtk :: GtkWidget :: signal_connect
# A widget that displays a small to medium amount of text
# See: https://developer.gnome.org/gtk3/3.2/GtkLabel.html
extern class GtkLabel `{GtkLabel *`}
super GtkMisc
# Create a GtkLabel with text
new (text: String) import String.to_cstring `{
return (GtkLabel*)gtk_label_new(String_to_cstring(text));
`}
# Set the text of the label
fun text=(text: String) import String.to_cstring `{
gtk_label_set_text(self, String_to_cstring(text));
`}
# Returns the text of the label
fun text: String import CString.to_s `{
return CString_to_s((char*)gtk_label_get_text(self));
`}
# Sets the angle of rotation for the label.
# An angle of 90 reads from from bottom to top, an angle of 270, from top to bottom.
fun angle=(degre: Float) `{
gtk_label_set_angle(self, degre);
`}
# Returns the angle of rotation for the label.
fun angle: Float `{
return gtk_label_get_angle(self);
`}
# Set simple formatted text content from a `format` string and the `content` which is escaped
#
# ~~~nitish
# GtkLabel lbl = new GtkLabel("Non-formatted text")
# lbl.set_markup("<span style=\"italic\">\%s</span>".to_cstring,
# "Italic content")
# ~~~
fun set_markup(format, content: CString) `{
char *formatted = g_markup_printf_escaped(format, content);
gtk_label_set_markup(self, formatted);
g_free(formatted);
`}
# Set justification of the lines in the label relative to each other
fun justify=(value: GtkJustification) `{ gtk_label_set_justify(self, value); `}
# Get justification of the lines in the label relative to each other
fun justify: GtkJustification `{ return gtk_label_get_justify(self); `}
end
lib/gtk/v3_4/gtk_core.nit:669,1--718,3