~ubuntu-branches/ubuntu/saucy/atkmm1.6/saucy-proposed

« back to all changes in this revision

Viewing changes to atk/atkmm/hypertext.h

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2010-11-02 20:35:53 UTC
  • Revision ID: james.westby@ubuntu.com-20101102203553-syno2w6yedmcdgk8
ImportĀ upstreamĀ versionĀ 2.22.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
// Generated by gtkmmproc -- DO NOT MODIFY!
 
3
#ifndef _ATKMM_HYPERTEXT_H
 
4
#define _ATKMM_HYPERTEXT_H
 
5
 
 
6
 
 
7
#include <glibmm.h>
 
8
 
 
9
/* $Id: hypertext.hg,v 1.3 2006/04/12 11:11:24 murrayc Exp $ */
 
10
 
 
11
/* Copyright (C) 2003 The gtkmm Development Team
 
12
 *
 
13
 * This library is free software; you can redistribute it and/or
 
14
 * modify it under the terms of the GNU Lesser General Public
 
15
 * License as published by the Free Software Foundation; either
 
16
 * version 2.1 of the License, or (at your option) any later version.
 
17
 *
 
18
 * This library is distributed in the hope that it will be useful,
 
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
21
 * Lesser General Public License for more details.
 
22
 *
 
23
 * You should have received a copy of the GNU Lesser General Public
 
24
 * License along with this library; if not, write to the Free
 
25
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
26
 */
 
27
 
 
28
 
 
29
#include <atkmm/hyperlink.h>
 
30
 
 
31
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
32
extern "C"
 
33
{
 
34
  typedef struct _AtkHypertextIface AtkHypertextIface;
 
35
  typedef struct _AtkHypertext      AtkHypertext;
 
36
}
 
37
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
38
 
 
39
/** The ATK interface which provides standard mechanism for manipulating hyperlinks.
 
40
 */
 
41
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
42
typedef struct _AtkHypertext AtkHypertext;
 
43
typedef struct _AtkHypertextClass AtkHypertextClass;
 
44
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
45
 
 
46
 
 
47
namespace Atk
 
48
{ class Hypertext_Class; } // namespace Atk
 
49
namespace Atk
 
50
{
 
51
 
 
52
class Object;
 
53
 
 
54
 
 
55
class Hypertext : public Glib::Interface
 
56
{
 
57
  
 
58
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
59
 
 
60
public:
 
61
  typedef Hypertext CppObjectType;
 
62
  typedef Hypertext_Class CppClassType;
 
63
  typedef AtkHypertext BaseObjectType;
 
64
  typedef AtkHypertextIface BaseClassType;
 
65
 
 
66
private:
 
67
  friend class Hypertext_Class;
 
68
  static CppClassType hypertext_class_;
 
69
 
 
70
  // noncopyable
 
71
  Hypertext(const Hypertext&);
 
72
  Hypertext& operator=(const Hypertext&);
 
73
 
 
74
protected:
 
75
  Hypertext(); // you must derive from this class
 
76
 
 
77
  /** Called by constructors of derived classes. Provide the result of 
 
78
   * the Class init() function to ensure that it is properly 
 
79
   * initialized.
 
80
   * 
 
81
   * @param interface_class The Class object for the derived type.
 
82
   */
 
83
  explicit Hypertext(const Glib::Interface_Class& interface_class);
 
84
 
 
85
public:
 
86
  // This is public so that C++ wrapper instances can be
 
87
  // created for C instances of unwrapped types.
 
88
  // For instance, if an unexpected C type implements the C interface. 
 
89
  explicit Hypertext(AtkHypertext* castitem);
 
90
 
 
91
protected:
 
92
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
93
 
 
94
public:
 
95
  virtual ~Hypertext();
 
96
 
 
97
  static void add_interface(GType gtype_implementer);
 
98
 
 
99
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
100
  static GType get_type()      G_GNUC_CONST;
 
101
  static GType get_base_type() G_GNUC_CONST;
 
102
#endif
 
103
 
 
104
  ///Provides access to the underlying C GObject.
 
105
  AtkHypertext*       gobj()       { return reinterpret_cast<AtkHypertext*>(gobject_); }
 
106
 
 
107
  ///Provides access to the underlying C GObject.  
 
108
  const AtkHypertext* gobj() const { return reinterpret_cast<AtkHypertext*>(gobject_); }
 
109
 
 
110
private:
 
111
 
 
112
public:
 
113
 
 
114
  
 
115
  /** Gets the link in this hypertext document at index 
 
116
   *  @a link_index
 
117
   * @param link_index An integer specifying the desired link.
 
118
   * @return The link in this hypertext document at
 
119
   * index @a link_index.
 
120
   */
 
121
  Glib::RefPtr<Hyperlink> get_link(int link_index);
 
122
  
 
123
  /** Gets the link in this hypertext document at index 
 
124
   *  @a link_index
 
125
   * @param link_index An integer specifying the desired link.
 
126
   * @return The link in this hypertext document at
 
127
   * index @a link_index.
 
128
   */
 
129
  Glib::RefPtr<const Hyperlink> get_link(int link_index) const;
 
130
  
 
131
  /** Gets the number of links within this hypertext document.
 
132
   * @return The number of links within this hypertext document.
 
133
   */
 
134
  int get_n_links() const;
 
135
  
 
136
  /** Gets the index into the array of hyperlinks that is associated with
 
137
   * the character specified by @a char_index.
 
138
   * @param char_index A character index.
 
139
   * @return An index into the array of hyperlinks in @a hypertext,
 
140
   * or -1 if there is no hyperlink associated with this character.
 
141
   */
 
142
  int get_link_index(int char_index) const;
 
143
 
 
144
  
 
145
  /**
 
146
   * @par Prototype:
 
147
   * <tt>void on_my_%link_selected(int link_index)</tt>
 
148
   */
 
149
 
 
150
  Glib::SignalProxy1< void,int > signal_link_selected();
 
151
 
 
152
 
 
153
    virtual Glib::RefPtr<Hyperlink> get_link_vfunc(int link_index);
 
154
 
 
155
    virtual int get_n_links_vfunc() const;
 
156
 
 
157
    virtual int get_link_index_vfunc(int char_index) const;
 
158
 
 
159
 
 
160
public:
 
161
 
 
162
public:
 
163
  //C++ methods used to invoke GTK+ virtual functions:
 
164
 
 
165
protected:
 
166
  //GTK+ Virtual Functions (override these to change behaviour):
 
167
 
 
168
  //Default Signal Handlers::
 
169
  virtual void on_link_selected(int link_index);
 
170
 
 
171
 
 
172
};
 
173
 
 
174
} // namespace Atk
 
175
 
 
176
 
 
177
namespace Glib
 
178
{
 
179
  /** A Glib::wrap() method for this object.
 
180
   * 
 
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.
 
184
   *
 
185
   * @relates Atk::Hypertext
 
186
   */
 
187
  Glib::RefPtr<Atk::Hypertext> wrap(AtkHypertext* object, bool take_copy = false);
 
188
 
 
189
} // namespace Glib
 
190
 
 
191
 
 
192
#endif /* _ATKMM_HYPERTEXT_H */
 
193