This file is indexed.

/usr/include/pangomm-1.4/pangomm/layoutiter.h is in libpangomm-1.4-dev 2.40.1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
// Generated by gmmproc 2.49.5 -- DO NOT MODIFY!
#ifndef _PANGOMM_LAYOUTITER_H
#define _PANGOMM_LAYOUTITER_H


#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>

/* $Id: layoutiter.hg,v 1.2 2003/12/14 11:54:05 murrayc Exp $ */

/* layoutiter.h
 *
 * Copyright 2001-2002 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <pangomm/layoutline.h>
#include <pangomm/layoutrun.h>
#include <pango/pango-layout.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef struct _PangoLayoutIter PangoLayoutIter; }
#endif

namespace Pango
{

/** A Pango::LayoutIter can be used to iterate over the visual extents of a Pango::Layout.
 */
class LayoutIter
{
  public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  using CppObjectType = LayoutIter;
  using BaseObjectType = PangoLayoutIter;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

  /** Get the GType for this class, for use with the underlying GObject type system.
   */
  static GType get_type() G_GNUC_CONST;

  LayoutIter();

  explicit LayoutIter(PangoLayoutIter* gobject, bool make_a_copy = true);

  LayoutIter(const LayoutIter& other);
  LayoutIter& operator=(const LayoutIter& other);

  LayoutIter(LayoutIter&& other) noexcept;
  LayoutIter& operator=(LayoutIter&& other) noexcept;

  ~LayoutIter() noexcept;

  void swap(LayoutIter& other) noexcept;

  ///Provides access to the underlying C instance.
  PangoLayoutIter*       gobj()       { return gobject_; }

  ///Provides access to the underlying C instance.
  const PangoLayoutIter* gobj() const { return gobject_; }

  ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
  PangoLayoutIter* gobj_copy() const;

protected:
  PangoLayoutIter* gobject_;

private:

  
public:

  
  /** Gets the current byte index. Note that iterating forward by char
   * moves in visual order, not logical order, so indexes may not be
   * sequential. Also, the index may be equal to the length of the text
   * in the layout, if on the <tt>nullptr</tt> run (see get_run()).
   * 
   * @return Current byte index.
   */
  int get_index() const;
  
  /** Gets the current run. When iterating by run, at the end of each
   * line, there's a position with a <tt>nullptr</tt> run, so this function can return
   * <tt>nullptr</tt>. The <tt>nullptr</tt> run at the end of each line ensures that all lines have
   * at least one run, even lines consisting of only a newline.
   * 
   * Use the faster get_run_readonly() if you do not plan
   * to modify the contents of the run (glyphs, glyph widths, etc.).
   * 
   * @return The current run.
   */
  LayoutRun get_run() const;
  //TODO: Use pango_layout_iter_get_run_readonly()?

  
  /** Gets the current line.
   * 
   * Use the faster get_line_readonly() if you do not plan
   * to modify the contents of the line (glyphs, glyph widths, etc.).
   * 
   * @return The current line.
   */
  Glib::RefPtr<LayoutLine> get_line() const;
  //TODO: We should really have a const and non-const version: _WRAP_METHOD(Glib::RefPtr<const LayoutLine> get_line() const, pango_layout_iter_get_line_readonly, refreturn)


  /** Determines whether @a iter is on the last line of the layout.
   * 
   * @return <tt>true</tt> if @a iter is on the last line.
   */
  bool at_last_line() const;

  
  /** Gets the layout associated with a Pango::LayoutIter.
   * 
   * @newin{1,20}
   * 
   * @return The layout associated with @a iter.
   */
  Glib::RefPtr<Layout> get_layout();
  
  /** Gets the layout associated with a Pango::LayoutIter.
   * 
   * @newin{1,20}
   * 
   * @return The layout associated with @a iter.
   */
  Glib::RefPtr<const Layout> get_layout() const;

  
  /** Moves @a iter forward to the next character in visual order. If @a iter was already at
   * the end of the layout, returns <tt>false</tt>.
   * 
   * @return Whether motion was possible.
   */
  bool next_char();
  
  /** Moves @a iter forward to the next cluster in visual order. If @a iter
   * was already at the end of the layout, returns <tt>false</tt>.
   * 
   * @return Whether motion was possible.
   */
  bool next_cluster();
  
  /** Moves @a iter forward to the next run in visual order. If @a iter was
   * already at the end of the layout, returns <tt>false</tt>.
   * 
   * @return Whether motion was possible.
   */
  bool next_run();
  
  /** Moves @a iter forward to the start of the next line. If @a iter is
   * already on the last line, returns <tt>false</tt>.
   * 
   * @return Whether motion was possible.
   */
  bool next_line();

  /** Gets the extents of the current character, in layout coordinates (origin is the top left of the entire layout).
   * Only logical extents can sensibly be obtained for characters; ink extents make sense only down to the level of clusters.
   * @return The logical extents of the current character.
   */
  Rectangle get_char_extents() const;
  

  /** Gets the extents of the current cluster, in layout coordinates
   * (origin is the top left of the entire layout).
   * 
   * @param ink_rect Rectangle to fill with ink extents, or <tt>nullptr</tt>.
   * @param logical_rect Rectangle to fill with logical extents, or <tt>nullptr</tt>.
   */
  void get_cluster_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;

  /** Gets the ink extents of the current cluster, in layout coordinates (origin is the top left of the entire layout).
   * @return The extents of the current cluster as drawn.
   */
  Rectangle get_cluster_ink_extents() const;

  /** Gets the logical extents of the current cluster, in layout coordinates (origin is the top left of the entire layout).
   * @return The logical extents of the current cluster.
   */
  Rectangle get_cluster_logical_extents() const;

  
  /** Gets the extents of the current run in layout coordinates
   * (origin is the top left of the entire layout).
   * 
   * @param ink_rect Rectangle to fill with ink extents, or <tt>nullptr</tt>.
   * @param logical_rect Rectangle to fill with logical extents, or <tt>nullptr</tt>.
   */
  void get_run_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;

  /** Gets the ink extents of the current run in layout coordinates (origin is the top left of the entire layout).
   * @return The extents of the current run as drawn.
   */
  Rectangle get_run_ink_extents() const;

  /** Gets the logical extents of the current run in layout coordinates (origin is the top left of the entire layout).
   * @return The logical extents of the current run.
   */
  Rectangle get_run_logical_extents() const;

  
  /** Obtains the extents of the current line. @a ink_rect or @a logical_rect
   * can be <tt>nullptr</tt> if you aren't interested in them. Extents are in layout
   * coordinates (origin is the top-left corner of the entire
   * Pango::Layout).  Thus the extents returned by this function will be
   * the same width/height but not at the same x/y as the extents
   * returned from Pango::LayoutLine::get_extents().
   * 
   * @param ink_rect Rectangle to fill with ink extents, or <tt>nullptr</tt>.
   * @param logical_rect Rectangle to fill with logical extents, or <tt>nullptr</tt>.
   */
  void get_line_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;

  /** Obtains the ink extents of the current line.
   * @return The extents of the current line as drawn.
   */
  Rectangle get_line_ink_extents() const;

  /** Obtains the logical extents of the current line.
   * @return The logical extents of the current line.
   */
  Rectangle get_line_logical_extents() const;

  
  /** Divides the vertical space in the Pango::Layout being iterated over
   * between the lines in the layout, and returns the space belonging to
   * the current line.  A line's range includes the line's logical
   * extents, plus half of the spacing above and below the line, if
   * set_spacing() has been called to set layout spacing.
   * The Y positions are in layout coordinates (origin at top left of the
   * entire layout).
   * 
   * @param y0 Start of line, or <tt>nullptr</tt>.
   * @param y1 End of line, or <tt>nullptr</tt>.
   */
  void get_line_yrange(int& y0, int& y1) const;

  
  /** Obtains the extents of the Pango::Layout being iterated
   * over. @a ink_rect or @a logical_rect can be <tt>nullptr</tt> if you
   * aren't interested in them.
   * 
   * @param ink_rect Rectangle to fill with ink extents,
   * or <tt>nullptr</tt>.
   * @param logical_rect Rectangle to fill with logical
   * extents, or <tt>nullptr</tt>.
   */
  void get_layout_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;

  /** Obtains the ink extents of the Pango::Layout being iterated over.
   * @return The extents of the layout as drawn.
   */
  Rectangle get_layout_ink_extents() const;

  /** Obtains the logical extents of the Pango::Layout being iterated over.
   * @return The logical extents of the layout.
   */
  Rectangle get_layout_logical_extents() const;

  
  /** Gets the Y position of the current line's baseline, in layout
   * coordinates (origin at top left of the entire layout).
   * 
   * @return Baseline of current line.
   */
  int get_baseline() const;

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  /** @deprecated Use the copy constructor instead.
   * This was only ever for internal use anyway.
   */
  void assign_gobj(PangoLayoutIter* src);
#endif


};

} //namespace Pango


namespace Pango
{

/** @relates Pango::LayoutIter
 * @param lhs The left-hand side
 * @param rhs The right-hand side
 */
inline void swap(LayoutIter& lhs, LayoutIter& rhs) noexcept
  { lhs.swap(rhs); }

} // namespace Pango

namespace Glib
{

/** A Glib::wrap() method for this object.
 *
 * @param object The C instance.
 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 * @result A C++ instance that wraps this C instance.
 *
 * @relates Pango::LayoutIter
 */
Pango::LayoutIter wrap(PangoLayoutIter* object, bool take_copy = false);

#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <>
class Value<Pango::LayoutIter> : public Glib::Value_Boxed<Pango::LayoutIter>
{};
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

} // namespace Glib


#endif /* _PANGOMM_LAYOUTITER_H */