add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / atk / atkmm / hyperlink.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _ATKMM_HYPERLINK_H
4 #define _ATKMM_HYPERLINK_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
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 Library General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 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  * Library General Public License for more details.
22  *
23  * You should have received a copy of the GNU Library 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 #include <atkmm/action.h>
29
30
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
32 typedef struct _AtkHyperlink AtkHyperlink;
33 typedef struct _AtkHyperlinkClass AtkHyperlinkClass;
34 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
35
36
37 namespace Atk
38 { class Hyperlink_Class; } // namespace Atk
39 namespace Atk
40 {
41
42 class Object;
43
44 /* An ATK object which encapsulates a link or set of links in a hypertext document.
45  * It implements the AtkAction interface.
46  */
47
48 class Hyperlink
49   : public Glib::Object,
50     public Atk::Action
51 {
52   
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54
55 public:
56   typedef Hyperlink CppObjectType;
57   typedef Hyperlink_Class CppClassType;
58   typedef AtkHyperlink BaseObjectType;
59   typedef AtkHyperlinkClass BaseClassType;
60
61 private:  friend class Hyperlink_Class;
62   static CppClassType hyperlink_class_;
63
64 private:
65   // noncopyable
66   Hyperlink(const Hyperlink&);
67   Hyperlink& operator=(const Hyperlink&);
68
69 protected:
70   explicit Hyperlink(const Glib::ConstructParams& construct_params);
71   explicit Hyperlink(AtkHyperlink* castitem);
72
73 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
74
75 public:
76   virtual ~Hyperlink();
77
78 #ifndef DOXYGEN_SHOULD_SKIP_THIS
79   static GType get_type()      G_GNUC_CONST;
80   static GType get_base_type() G_GNUC_CONST;
81 #endif
82
83   ///Provides access to the underlying C GObject.
84   AtkHyperlink*       gobj()       { return reinterpret_cast<AtkHyperlink*>(gobject_); }
85
86   ///Provides access to the underlying C GObject.
87   const AtkHyperlink* gobj() const { return reinterpret_cast<AtkHyperlink*>(gobject_); }
88
89   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
90   AtkHyperlink* gobj_copy();
91
92 private:
93
94   
95 protected:
96
97 public:
98
99   
100   /** Get a the URI associated with the anchor specified 
101    * by @a i  of @a link . 
102    * 
103    * Multiple anchors are primarily used by client-side image maps.
104    * @param i A (zero-index) integer specifying the desired anchor.
105    * @return A string specifying the URI.
106    */
107   Glib::ustring get_uri(int i) const;
108
109   
110   /** Returns the item associated with this hyperlinks nth anchor.
111    * For instance, the returned Atk::Object will implement Atk::Text
112    * if @a link  is a text hyperlink, Atk::Image if @a link  is an image
113    * hyperlink etc. 
114    * 
115    * Multiple anchors are primarily used by client-side image maps.
116    * @param i A (zero-index) integer specifying the desired anchor.
117    * @return An Atk::Object associated with this hyperlinks i-th anchor.
118    */
119   Glib::RefPtr<Atk::Object> get_object(int i);
120   
121   /** Returns the item associated with this hyperlinks nth anchor.
122    * For instance, the returned Atk::Object will implement Atk::Text
123    * if @a link  is a text hyperlink, Atk::Image if @a link  is an image
124    * hyperlink etc. 
125    * 
126    * Multiple anchors are primarily used by client-side image maps.
127    * @param i A (zero-index) integer specifying the desired anchor.
128    * @return An Atk::Object associated with this hyperlinks i-th anchor.
129    */
130   Glib::RefPtr<const Atk::Object> get_object(int i) const;
131   
132   
133   /** Gets the index with the hypertext document at which this link ends.
134    * @return The index with the hypertext document at which this link ends.
135    */
136   int get_end_index() const;
137
138   
139   /** Gets the index with the hypertext document at which this link begins.
140    * @return The index with the hypertext document at which this link begins.
141    */
142   int get_start_index() const;
143
144   
145   /** Since the document that a link is associated with may have changed
146    * this method returns <tt>true</tt> if the link is still valid (with
147    * respect to the document it references) and <tt>false</tt> otherwise.
148    * @return Whether or not this link is still valid.
149    */
150   bool is_valid() const;
151
152   
153   /** Indicates whether the link currently displays some or all of its
154    * content inline.  Ordinary HTML links will usually return
155    * <tt>false</tt>, but an inline &lt;src&gt; HTML element will return
156    * <tt>true</tt>.
157    * a *
158    * @return Whether or not this link displays its content inline.
159    */
160   bool is_inline() const;
161
162   
163   /** Gets the number of anchors associated with this hyperlink.
164    * @return The number of anchors associated with this hyperlink.
165    */
166   int get_n_anchors() const;
167   
168   /** Determines whether this AtkHyperlink is selected
169    * @return True is the AtkHyperlink is selected, False otherwise.
170    */
171   bool is_selected_link() const;
172
173   
174   /**
175    * @par Prototype:
176    * <tt>void on_my_%link_activated()</tt>
177    */
178
179   Glib::SignalProxy0< void > signal_link_activated();
180
181
182   #ifdef GLIBMM_PROPERTIES_ENABLED
183 /** Specifies whether the AtkHyperlink object is selected.
184    *
185    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
186    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
187    * the value of the property changes.
188    */
189   Glib::PropertyProxy_ReadOnly<bool> property_selected_link() const;
190 #endif //#GLIBMM_PROPERTIES_ENABLED
191
192
193   #ifdef GLIBMM_PROPERTIES_ENABLED
194 /** The number of anchors associated with the AtkHyperlink object.
195    *
196    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
197    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
198    * the value of the property changes.
199    */
200   Glib::PropertyProxy_ReadOnly<int> property_number_of_anchors() const;
201 #endif //#GLIBMM_PROPERTIES_ENABLED
202
203
204   #ifdef GLIBMM_PROPERTIES_ENABLED
205 /** The end index of the AtkHyperlink object.
206    *
207    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
208    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
209    * the value of the property changes.
210    */
211   Glib::PropertyProxy_ReadOnly<int> property_end_index() const;
212 #endif //#GLIBMM_PROPERTIES_ENABLED
213
214
215   #ifdef GLIBMM_PROPERTIES_ENABLED
216 /** The start index of the AtkHyperlink object.
217    *
218    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
219    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
220    * the value of the property changes.
221    */
222   Glib::PropertyProxy_ReadOnly<int> property_start_index() const;
223 #endif //#GLIBMM_PROPERTIES_ENABLED
224
225
226 protected:
227   #ifdef GLIBMM_VFUNCS_ENABLED
228   virtual gchar* get_uri_vfunc(int i) const;
229 #endif //GLIBMM_VFUNCS_ENABLED
230
231   #ifdef GLIBMM_VFUNCS_ENABLED
232   virtual Glib::RefPtr<Atk::Object> get_object_vfunc(int i);
233 #endif //GLIBMM_VFUNCS_ENABLED
234
235   #ifdef GLIBMM_VFUNCS_ENABLED
236   virtual int get_end_index_vfunc() const;
237 #endif //GLIBMM_VFUNCS_ENABLED
238
239   #ifdef GLIBMM_VFUNCS_ENABLED
240   virtual int get_start_index_vfunc() const;
241 #endif //GLIBMM_VFUNCS_ENABLED
242
243   #ifdef GLIBMM_VFUNCS_ENABLED
244   virtual bool is_valid_vfunc() const;
245 #endif //GLIBMM_VFUNCS_ENABLED
246
247   #ifdef GLIBMM_VFUNCS_ENABLED
248   virtual int get_n_anchors_vfunc() const;
249 #endif //GLIBMM_VFUNCS_ENABLED
250
251   #ifdef GLIBMM_VFUNCS_ENABLED
252   virtual guint link_state_vfunc() const;
253 #endif //GLIBMM_VFUNCS_ENABLED
254
255   #ifdef GLIBMM_VFUNCS_ENABLED
256   virtual bool is_selected_link_vfunc() const;
257 #endif //GLIBMM_VFUNCS_ENABLED
258  
259
260 public:
261
262 public:
263   //C++ methods used to invoke GTK+ virtual functions:
264 #ifdef GLIBMM_VFUNCS_ENABLED
265 #endif //GLIBMM_VFUNCS_ENABLED
266
267 protected:
268   //GTK+ Virtual Functions (override these to change behaviour):
269 #ifdef GLIBMM_VFUNCS_ENABLED
270 #endif //GLIBMM_VFUNCS_ENABLED
271
272   //Default Signal Handlers::
273 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
274   virtual void on_link_activated();
275 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
276
277
278 };
279
280 } // namespace Atk
281
282
283 namespace Glib
284 {
285   /** A Glib::wrap() method for this object.
286    * 
287    * @param object The C instance.
288    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
289    * @result A C++ instance that wraps this C instance.
290    *
291    * @relates Atk::Hyperlink
292    */
293   Glib::RefPtr<Atk::Hyperlink> wrap(AtkHyperlink* object, bool take_copy = false);
294 }
295
296
297 #endif /* _ATKMM_HYPERLINK_H */
298