Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkinscription.h
Go to the documentation of this file.
1/*
2 * Copyright © 2022 Benjamin Otte
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authors: Benjamin Otte <otte@gnome.org>
18 */
19
20#pragma once
21
22#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
23#error "Only <gtk/gtk.h> can be included directly."
24#endif
25
26#include <gtk/gtkwidget.h>
27
29
30#define GTK_TYPE_INSCRIPTION (gtk_inscription_get_type ())
31
32/**
33 * GtkInscriptionOverflow:
34 * @GTK_INSCRIPTION_OVERFLOW_CLIP: Clip the remaining text
35 * @GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START: Omit characters at the start of the text
36 * @GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE: Omit characters at the middle of the text
37 * @GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END: Omit characters at the end of the text
38 *
39 * The different methods to handle text in #GtkInscription when it doesn't
40 * fit the available space.
41 *
42 * Since: 4.8
43 */
50
52G_DECLARE_FINAL_TYPE (GtkInscription, gtk_inscription, GTK, INSCRIPTION, GtkWidget)
53
55GtkWidget * gtk_inscription_new (const char *text);
56
58const char * gtk_inscription_get_text (GtkInscription *self);
60void gtk_inscription_set_text (GtkInscription *self,
61 const char *text);
65void gtk_inscription_set_attributes (GtkInscription *self,
66 PangoAttrList *attrs);
68void gtk_inscription_set_markup (GtkInscription *self,
69 const char *markup);
73void gtk_inscription_set_text_overflow (GtkInscription *self,
74 GtkInscriptionOverflow overflow);
78void gtk_inscription_set_wrap_mode (GtkInscription *self,
79 PangoWrapMode wrap_mode);
80
82guint gtk_inscription_get_min_chars (GtkInscription *self);
84void gtk_inscription_set_min_chars (GtkInscription *self,
85 guint min_chars);
87guint gtk_inscription_get_nat_chars (GtkInscription *self);
89void gtk_inscription_set_nat_chars (GtkInscription *self,
90 guint nat_chars);
92guint gtk_inscription_get_min_lines (GtkInscription *self);
94void gtk_inscription_set_min_lines (GtkInscription *self,
95 guint min_lines);
97guint gtk_inscription_get_nat_lines (GtkInscription *self);
99void gtk_inscription_set_nat_lines (GtkInscription *self,
100 guint nat_lines);
101
103float gtk_inscription_get_xalign (GtkInscription *self);
105void gtk_inscription_set_xalign (GtkInscription *self,
106 float xalign);
108float gtk_inscription_get_yalign (GtkInscription *self);
110void gtk_inscription_set_yalign (GtkInscription *self,
111 float yalign);
112
114
#define GDK_AVAILABLE_IN_4_8
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
GDK_AVAILABLE_IN_4_8 const char * gtk_inscription_get_text(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_min_chars(GtkInscription *self, guint min_chars)
GDK_AVAILABLE_IN_4_8 guint gtk_inscription_get_nat_lines(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_min_lines(GtkInscription *self, guint min_lines)
GDK_AVAILABLE_IN_4_8 GtkInscriptionOverflow gtk_inscription_get_text_overflow(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_nat_chars(GtkInscription *self, guint nat_chars)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_wrap_mode(GtkInscription *self, PangoWrapMode wrap_mode)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_xalign(GtkInscription *self, float xalign)
GDK_AVAILABLE_IN_4_8 PangoWrapMode gtk_inscription_get_wrap_mode(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_text_overflow(GtkInscription *self, GtkInscriptionOverflow overflow)
GtkInscriptionOverflow
@ GTK_INSCRIPTION_OVERFLOW_CLIP
@ GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END
@ GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START
@ GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_text(GtkInscription *self, const char *text)
GDK_AVAILABLE_IN_4_8 PangoAttrList * gtk_inscription_get_attributes(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_nat_lines(GtkInscription *self, guint nat_lines)
GDK_AVAILABLE_IN_4_8 guint gtk_inscription_get_min_lines(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_yalign(GtkInscription *self, float yalign)
GDK_AVAILABLE_IN_4_8 guint gtk_inscription_get_min_chars(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 float gtk_inscription_get_yalign(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 guint gtk_inscription_get_nat_chars(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 float gtk_inscription_get_xalign(GtkInscription *self)
GDK_AVAILABLE_IN_4_8 GDK_AVAILABLE_IN_4_8 GtkWidget * gtk_inscription_new(const char *text)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_markup(GtkInscription *self, const char *markup)
GDK_AVAILABLE_IN_4_8 void gtk_inscription_set_attributes(GtkInscription *self, PangoAttrList *attrs)
#define G_DECLARE_FINAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName)
Definition gtype.h:1602
unsigned int guint
Definition gtypes.h:61
struct _PangoAttrList PangoAttrList
PangoWrapMode