1/* Pango
2 * pango-tabs.h: Tab-related stuff
3 *
4 * Copyright (C) 2000 Red Hat Software
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22#ifndef __PANGO_TABS_H__
23#define __PANGO_TABS_H__
24
25#include <pango/pango-types.h>
26
27G_BEGIN_DECLS
28
29typedef struct _PangoTabArray PangoTabArray;
30
31/**
32 * PangoTabAlign:
33 * @PANGO_TAB_LEFT: the text appears to the right of the tab stop position
34 * @PANGO_TAB_RIGHT: the text appears to the left of the tab stop position
35 * until the available space is filled. Since: 1.50
36 * @PANGO_TAB_CENTER: the text is centered at the tab stop position
37 * until the available space is filled. Since: 1.50
38 * @PANGO_TAB_DECIMAL: text before the first occurrence of the decimal point
39 * character appears to the left of the tab stop position (until the available
40 * space is filled), the rest to the right. Since: 1.50
41 *
42 * `PangoTabAlign` specifies where the text appears relative to the tab stop
43 * position.
44 */
45typedef enum
46{
47 PANGO_TAB_LEFT,
48 PANGO_TAB_RIGHT,
49 PANGO_TAB_CENTER,
50 PANGO_TAB_DECIMAL
51} PangoTabAlign;
52
53#define PANGO_TYPE_TAB_ARRAY (pango_tab_array_get_type ())
54
55PANGO_AVAILABLE_IN_ALL
56PangoTabArray *pango_tab_array_new (gint initial_size,
57 gboolean positions_in_pixels);
58PANGO_AVAILABLE_IN_ALL
59PangoTabArray *pango_tab_array_new_with_positions (gint size,
60 gboolean positions_in_pixels,
61 PangoTabAlign first_alignment,
62 gint first_position,
63 ...);
64PANGO_AVAILABLE_IN_ALL
65GType pango_tab_array_get_type (void) G_GNUC_CONST;
66PANGO_AVAILABLE_IN_ALL
67PangoTabArray *pango_tab_array_copy (PangoTabArray *src);
68PANGO_AVAILABLE_IN_ALL
69void pango_tab_array_free (PangoTabArray *tab_array);
70PANGO_AVAILABLE_IN_ALL
71gint pango_tab_array_get_size (PangoTabArray *tab_array);
72PANGO_AVAILABLE_IN_ALL
73void pango_tab_array_resize (PangoTabArray *tab_array,
74 gint new_size);
75PANGO_AVAILABLE_IN_ALL
76void pango_tab_array_set_tab (PangoTabArray *tab_array,
77 gint tab_index,
78 PangoTabAlign alignment,
79 gint location);
80PANGO_AVAILABLE_IN_ALL
81void pango_tab_array_get_tab (PangoTabArray *tab_array,
82 gint tab_index,
83 PangoTabAlign *alignment,
84 gint *location);
85PANGO_AVAILABLE_IN_ALL
86void pango_tab_array_get_tabs (PangoTabArray *tab_array,
87 PangoTabAlign **alignments,
88 gint **locations);
89
90PANGO_AVAILABLE_IN_ALL
91gboolean pango_tab_array_get_positions_in_pixels (PangoTabArray *tab_array);
92
93PANGO_AVAILABLE_IN_1_50
94void pango_tab_array_set_positions_in_pixels (PangoTabArray *tab_array,
95 gboolean positions_in_pixels);
96
97PANGO_AVAILABLE_IN_1_50
98char * pango_tab_array_to_string (PangoTabArray *tab_array);
99PANGO_AVAILABLE_IN_1_50
100PangoTabArray * pango_tab_array_from_string (const char *text);
101
102PANGO_AVAILABLE_IN_1_50
103void pango_tab_array_set_decimal_point (PangoTabArray *tab_array,
104 int tab_index,
105 gunichar decimal_point);
106PANGO_AVAILABLE_IN_1_50
107gunichar pango_tab_array_get_decimal_point (PangoTabArray *tab_array,
108 int tab_index);
109
110PANGO_AVAILABLE_IN_1_50
111void pango_tab_array_sort (PangoTabArray *tab_array);
112
113G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoTabArray, pango_tab_array_free)
114
115G_END_DECLS
116
117#endif /* __PANGO_TABS_H__ */
118

source code of include/pango-1.0/pango/pango-tabs.h