Blame pango/pangomm/layoutrun.h

Packit 78284e
// Generated by gmmproc 2.49.5 -- DO NOT MODIFY!
Packit 78284e
#ifndef _PANGOMM_LAYOUTRUN_H
Packit 78284e
#define _PANGOMM_LAYOUTRUN_H
Packit 78284e
Packit 78284e
Packit 78284e
#include <glibmm/ustring.h>
Packit 78284e
#include <sigc++/sigc++.h>
Packit 78284e
Packit 78284e
/* layoutrun.h
Packit 78284e
 *
Packit 78284e
 * Copyright (C) 1998-1999 The gtkmm Development Team
Packit 78284e
 *
Packit 78284e
 * This library is free software; you can redistribute it and/or
Packit 78284e
 * modify it under the terms of the GNU Lesser General Public
Packit 78284e
 * License as published by the Free Software Foundation; either
Packit 78284e
 * version 2.1 of the License, or (at your option) any later version.
Packit 78284e
 *
Packit 78284e
 * This library is distributed in the hope that it will be useful,
Packit 78284e
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 78284e
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 78284e
 * Lesser General Public License for more details.
Packit 78284e
 *
Packit 78284e
 * You should have received a copy of the GNU Lesser General Public
Packit 78284e
 * License along with this library; if not, write to the Free
Packit 78284e
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Packit 78284e
 */
Packit 78284e
Packit 78284e
#include <pangomm/attributes.h> //For LogAttr.
Packit 78284e
#include <pango/pango-layout.h>
Packit 78284e
Packit 78284e
Packit 78284e
#ifndef DOXYGEN_SHOULD_SKIP_THIS
Packit 78284e
extern "C" { typedef struct _PangoGlyphItem PangoGlyphItem; }
Packit 78284e
#endif
Packit 78284e
Packit 78284e
namespace Pango
Packit 78284e
{
Packit 78284e
Packit 78284e
class Item;
Packit 78284e
class GlyphString;
Packit 78284e
class LayoutRun;
Packit 78284e
Packit 78284e
/** A Pango::GlyphItem is a pair of a Pango::Items and the glyphs resulting from shaping the text corresponding to an item.
Packit 78284e
 * As an example of the usage of Pango::GlyphItem, the results of shaping text with Pango::Layout is a list of Pango::LayoutLine, 
Packit 78284e
 * each of which contains a list of Pango::GlyphItem. 
Packit 78284e
 */
Packit 78284e
typedef LayoutRun GlyphItem;
Packit 78284e
Packit 78284e
//TODO: Change this to just GlyphItem when we can break API/ABI.
Packit 78284e
Packit 78284e
/** A Pango::LayoutRun represents a single run within a LayoutLine.
Packit 78284e
 * It is simply an alternate name for GlyphItem.
Packit 78284e
 */
Packit 78284e
class LayoutRun
Packit 78284e
{
Packit 78284e
  public:
Packit 78284e
#ifndef DOXYGEN_SHOULD_SKIP_THIS
Packit 78284e
  using CppObjectType = LayoutRun;
Packit 78284e
  using BaseObjectType = PangoGlyphItem;
Packit 78284e
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
Packit 78284e
Packit 78284e
  /** Get the GType for this class, for use with the underlying GObject type system.
Packit 78284e
   */
Packit 78284e
  static GType get_type() G_GNUC_CONST;
Packit 78284e
Packit 78284e
  LayoutRun();
Packit 78284e
Packit 78284e
  explicit LayoutRun(PangoGlyphItem* gobject, bool make_a_copy = true);
Packit 78284e
Packit 78284e
  LayoutRun(const LayoutRun& other);
Packit 78284e
  LayoutRun& operator=(const LayoutRun& other);
Packit 78284e
Packit 78284e
  LayoutRun(LayoutRun&& other) noexcept;
Packit 78284e
  LayoutRun& operator=(LayoutRun&& other) noexcept;
Packit 78284e
Packit 78284e
  ~LayoutRun() noexcept;
Packit 78284e
Packit 78284e
  void swap(LayoutRun& other) noexcept;
Packit 78284e
Packit 78284e
  ///Provides access to the underlying C instance.
Packit 78284e
  PangoGlyphItem*       gobj()       { return gobject_; }
Packit 78284e
Packit 78284e
  ///Provides access to the underlying C instance.
Packit 78284e
  const PangoGlyphItem* gobj() const { return gobject_; }
Packit 78284e
Packit 78284e
  ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
Packit 78284e
  PangoGlyphItem* gobj_copy() const;
Packit 78284e
Packit 78284e
protected:
Packit 78284e
  PangoGlyphItem* gobject_;
Packit 78284e
Packit 78284e
private:
Packit 78284e
Packit 78284e
  
Packit 78284e
  /** Modifies @a orig to cover only the text after @a split_index, and
Packit 78284e
   * returns a new item that covers the text before @a split_index that
Packit 78284e
   * used to be in @a orig. You can think of @a split_index as the length of
Packit 78284e
   * the returned item. @a split_index may not be 0, and it may not be
Packit 78284e
   * greater than or equal to the length of @a orig (that is, there must
Packit 78284e
   * be at least one byte assigned to each item, you can't create a
Packit 78284e
   * zero-length item).
Packit 78284e
   * 
Packit 78284e
   * This function is similar in function to Pango::Item::split() (and uses
Packit 78284e
   * it internally.)
Packit 78284e
   * 
Packit 78284e
   * @newin{1,2}
Packit 78284e
   * 
Packit 78284e
   * @param text Text to which positions in @a orig apply.
Packit 78284e
   * @param split_index Byte index of position to split item, relative to the start of the item.
Packit 78284e
   * @return The newly allocated item representing text before
Packit 78284e
   *  @a split_index, which should be freed
Packit 78284e
   * with free().
Packit 78284e
   */
Packit 78284e
  GlyphItem split(const Glib::ustring& text, int split_index);
Packit 78284e
Packit 78284e
  //This takes ownership of the GlyphItem, which is strange: _WRAP_METHOD(GSList* apply_attrs(const Glib::ustring& text, const AttrList& list), pango_glyph_item_apply_attrs)
Packit 78284e
  
Packit 78284e
  /** Adds spacing between the graphemes of @a glyph_item to
Packit 78284e
   * give the effect of typographic letter spacing.
Packit 78284e
   * 
Packit 78284e
   * @newin{1,6}
Packit 78284e
   * 
Packit 78284e
   * @param text Text that @a glyph_item corresponds to
Packit 78284e
   * (glyph_item->item->offset is an offset from the
Packit 78284e
   * start of @a text).
Packit 78284e
   * @param log_attrs Logical attributes for the item
Packit 78284e
   * (the first logical attribute refers to the position
Packit 78284e
   * before the first character in the item).
Packit 78284e
   * @param letter_spacing Amount of letter spacing to add
Packit 78284e
   * in Pango units. May be negative, though too large
Packit 78284e
   * negative values will give ugly results.
Packit 78284e
   */
Packit 78284e
  void letter_space(const Glib::ustring& text, const LogAttr& log_attrs, int letter_spacing =  0);
Packit 78284e
Packit 78284e
  /** Gets the Pango::Item object that provides information about the segment of text in this run.
Packit 78284e
   * @return A Pango::Item object.
Packit 78284e
   */
Packit 78284e
  Item get_item() const;
Packit 78284e
Packit 78284e
  /** Gets the string of glyphs obtained by shaping the text for this item.
Packit 78284e
   * @return A Pango::GlyphString object.
Packit 78284e
   */
Packit 78284e
  GlyphString get_glyphs() const;
Packit 78284e
Packit 78284e
Packit 78284e
};
Packit 78284e
Packit 78284e
} /* namespace Pango */
Packit 78284e
Packit 78284e
Packit 78284e
namespace Pango
Packit 78284e
{
Packit 78284e
Packit 78284e
/** @relates Pango::LayoutRun
Packit 78284e
 * @param lhs The left-hand side
Packit 78284e
 * @param rhs The right-hand side
Packit 78284e
 */
Packit 78284e
inline void swap(LayoutRun& lhs, LayoutRun& rhs) noexcept
Packit 78284e
  { lhs.swap(rhs); }
Packit 78284e
Packit 78284e
} // namespace Pango
Packit 78284e
Packit 78284e
namespace Glib
Packit 78284e
{
Packit 78284e
Packit 78284e
/** A Glib::wrap() method for this object.
Packit 78284e
 *
Packit 78284e
 * @param object The C instance.
Packit 78284e
 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Packit 78284e
 * @result A C++ instance that wraps this C instance.
Packit 78284e
 *
Packit 78284e
 * @relates Pango::LayoutRun
Packit 78284e
 */
Packit 78284e
Pango::LayoutRun wrap(PangoGlyphItem* object, bool take_copy = false);
Packit 78284e
Packit 78284e
#ifndef DOXYGEN_SHOULD_SKIP_THIS
Packit 78284e
template <>
Packit 78284e
class Value<Pango::LayoutRun> : public Glib::Value_Boxed<Pango::LayoutRun>
Packit 78284e
{};
Packit 78284e
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
Packit 78284e
Packit 78284e
} // namespace Glib
Packit 78284e
Packit 78284e
Packit 78284e
#endif /* _PANGOMM_LAYOUTRUN_H */
Packit 78284e