2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _PANGOMM_TABARRAY_H
4 #define _PANGOMM_TABARRAY_H
13 * Copyright (C) 1998-1999 The gtkmm Development Team
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 #include <pangomm/attrlist.h>
31 #include <pango/pango-tabs.h>
32 #include <pango/pango-break.h> //For PangoLogAttrs.
35 #include <glibmmconfig.h>
36 GLIBMM_USING_STD(pair)
39 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 extern "C" { typedef struct _PangoTabArray PangoTabArray; }
47 /** @addtogroup pangommEnums Enums and Flags */
50 * @ingroup pangommEnums
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
65 class Value<Pango::TabAlign> : public Glib::Value_Enum<Pango::TabAlign>
68 static GType value_type() G_GNUC_CONST;
72 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
79 /** A Pango::TabArray contains an array of tab stops.
80 * Each tab stop has an alignment and a position.
85 #ifndef DOXYGEN_SHOULD_SKIP_THIS
86 typedef TabArray CppObjectType;
87 typedef PangoTabArray BaseObjectType;
89 static GType get_type() G_GNUC_CONST;
90 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
94 explicit TabArray(PangoTabArray* gobject, bool make_a_copy = true);
96 TabArray(const TabArray& other);
97 TabArray& operator=(const TabArray& other);
101 void swap(TabArray& other);
103 ///Provides access to the underlying C instance.
104 PangoTabArray* gobj() { return gobject_; }
106 ///Provides access to the underlying C instance.
107 const PangoTabArray* gobj() const { return gobject_; }
109 ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
110 PangoTabArray* gobj_copy() const;
113 PangoTabArray* gobject_;
119 explicit TabArray(int initial_size, bool positions_in_pixels = true);
122 /** Gets the number of tab stops in @a tab_array .
123 * @return The number of tab stops in the array.
125 int get_size() const;
127 /** Resizes a tab array. You must subsequently initialize any tabs that
128 * were added as a result of growing the array.
129 * @param new_size New size of the array.
131 void resize(int new_size);
133 /** Sets the alignment and location of a tab stop.
134 * @a alignment must always be Pango::TAB_LEFT in the current
136 * @param tab_index The index of a tab stop.
137 * @param alignment Tab alignment.
138 * @param location Tab location in Pango units.
140 void set_tab(int tab_index, TabAlign alignment, int location);
142 /** Gets the alignment and position of a tab stop.
143 * @return An std::pair<TabAlign, int>. The first element represents the tab stop alignment, the second one is the tab position.
145 std::pair<TabAlign,int> get_tab(int tab_index) const;
147 /** Gets an array of std::pairs containing the tab stop alignments and tab positions.
148 * @return An array of std::pair<TabAlign, int>. The first element in each pair represents the tab stop alignment, the second one is the tab position.
150 Glib::ArrayHandle< std::pair<TabAlign,int> > get_tabs() const;
153 /** Return value: whether positions are in pixels.
154 * @return Whether positions are in pixels.
156 bool get_positions_in_pixels() const;
167 /** @relates Pango::TabArray
168 * @param lhs The left-hand side
169 * @param rhs The right-hand side
171 inline void swap(TabArray& lhs, TabArray& rhs)
179 /** A Glib::wrap() method for this object.
181 * @param object The C instance.
182 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
183 * @result A C++ instance that wraps this C instance.
185 * @relates Pango::TabArray
187 Pango::TabArray wrap(PangoTabArray* object, bool take_copy = false);
189 #ifndef DOXYGEN_SHOULD_SKIP_THIS
191 class Value<Pango::TabArray> : public Glib::Value_Boxed<Pango::TabArray>
193 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
198 #endif /* _PANGOMM_TABARRAY_H */