1 // Generated by gmmproc 2.56.0 -- DO NOT MODIFY! 2 #ifndef _ATKMM_HYPERLINK_H 3 #define _ATKMM_HYPERLINK_H 4 5 6 #include <glibmm/ustring.h> 7 #include <sigc++/sigc++.h> 8 9 /* Copyright (C) 2003 The gtkmm Development Team 10 * 11 * This library is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU Lesser General Public 13 * License as published by the Free Software Foundation; either 14 * version 2.1 of the License, or (at your option) any later version. 15 * 16 * This library is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 * Lesser General Public License for more details. 20 * 21 * You should have received a copy of the GNU Lesser General Public 22 * License along with this library; if not, write to the Free 23 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 */ 25 26 #include <atkmm/action.h> 27 28 29 #ifndef DOXYGEN_SHOULD_SKIP_THIS 30 using AtkHyperlink = struct _AtkHyperlink; 31 using AtkHyperlinkClass = struct _AtkHyperlinkClass; 32 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 33 34 35 #ifndef DOXYGEN_SHOULD_SKIP_THIS 36 namespace Atk 37 { class Hyperlink_Class; } // namespace Atk 38 #endif //DOXYGEN_SHOULD_SKIP_THIS 39 40 namespace Atk 41 { 42 43 class Object; 44 45 /** Encapsulates a link or set of links in a hypertext document. 46 */ 47 48 class Hyperlink : public Glib::Object, public Atk::Action 49 { 50 51 #ifndef DOXYGEN_SHOULD_SKIP_THIS 52 53 public: 54 using CppObjectType = Hyperlink; 55 using CppClassType = Hyperlink_Class; 56 using BaseObjectType = AtkHyperlink; 57 using BaseClassType = AtkHyperlinkClass; 58 59 // noncopyable 60 Hyperlink(const Hyperlink&) = delete; 61 Hyperlink& operator=(const Hyperlink&) = delete; 62 63 private: friend class Hyperlink_Class; 64 static CppClassType hyperlink_class_; 65 66 protected: 67 explicit Hyperlink(const Glib::ConstructParams& construct_params); 68 explicit Hyperlink(AtkHyperlink* castitem); 69 70 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 71 72 public: 73 74 Hyperlink(Hyperlink&& src) noexcept; 75 Hyperlink& operator=(Hyperlink&& src) noexcept; 76 77 ~Hyperlink() noexcept override; 78 79 /** Get the GType for this class, for use with the underlying GObject type system. 80 */ 81 static GType get_type() G_GNUC_CONST; 82 83 #ifndef DOXYGEN_SHOULD_SKIP_THIS 84 85 86 static GType get_base_type() G_GNUC_CONST; 87 #endif 88 89 ///Provides access to the underlying C GObject. gobj()90 AtkHyperlink* gobj() { return reinterpret_cast<AtkHyperlink*>(gobject_); } 91 92 ///Provides access to the underlying C GObject. gobj()93 const AtkHyperlink* gobj() const { return reinterpret_cast<AtkHyperlink*>(gobject_); } 94 95 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. 96 AtkHyperlink* gobj_copy(); 97 98 private: 99 100 101 public: 102 103 /** Get a the URI associated with the anchor specified 104 * by @a i of @a link. 105 * 106 * Multiple anchors are primarily used by client-side image maps. 107 * 108 * @param i A (zero-index) integer specifying the desired anchor. 109 * @return A string specifying the URI. 110 */ 111 Glib::ustring get_uri(int i) const; 112 113 114 /** Returns the item associated with this hyperlinks nth anchor. 115 * For instance, the returned Atk::Object will implement Atk::Text 116 * if @a link is a text hyperlink, Atk::Image if @a link is an image 117 * hyperlink etc. 118 * 119 * Multiple anchors are primarily used by client-side image maps. 120 * 121 * @param i A (zero-index) integer specifying the desired anchor. 122 * @return An Atk::Object associated with this hyperlinks 123 * i-th anchor. 124 */ 125 Glib::RefPtr<Atk::Object> get_object(int i); 126 127 /** Returns the item associated with this hyperlinks nth anchor. 128 * For instance, the returned Atk::Object will implement Atk::Text 129 * if @a link is a text hyperlink, Atk::Image if @a link is an image 130 * hyperlink etc. 131 * 132 * Multiple anchors are primarily used by client-side image maps. 133 * 134 * @param i A (zero-index) integer specifying the desired anchor. 135 * @return An Atk::Object associated with this hyperlinks 136 * i-th anchor. 137 */ 138 Glib::RefPtr<const Atk::Object> get_object(int i) const; 139 140 141 /** Gets the index with the hypertext document at which this link ends. 142 * 143 * @return The index with the hypertext document at which this link ends. 144 */ 145 int get_end_index() const; 146 147 /** Gets the index with the hypertext document at which this link begins. 148 * 149 * @return The index with the hypertext document at which this link begins. 150 */ 151 int get_start_index() const; 152 153 154 /** Since the document that a link is associated with may have changed 155 * this method returns <tt>true</tt> if the link is still valid (with 156 * respect to the document it references) and <tt>false</tt> otherwise. 157 * 158 * @return Whether or not this link is still valid. 159 */ 160 bool is_valid() const; 161 162 /** Indicates whether the link currently displays some or all of its 163 * content inline. Ordinary HTML links will usually return 164 * <tt>false</tt>, but an inline <src> HTML element will return 165 * <tt>true</tt>. 166 * 167 * @return Whether or not this link displays its content inline. 168 */ 169 bool is_inline() const; 170 171 172 /** Gets the number of anchors associated with this hyperlink. 173 * 174 * @return The number of anchors associated with this hyperlink. 175 */ 176 int get_n_anchors() const; 177 // deprecated 178 179 /** 180 * @par Slot Prototype: 181 * <tt>void on_my_%link_activated()</tt> 182 * 183 * Flags: Run Last 184 * 185 * The signal link-activated is emitted when a link is activated. 186 */ 187 188 Glib::SignalProxy< void > signal_link_activated(); 189 190 191 /** Specifies whether the AtkHyperlink object is selected. 192 * 193 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 194 * or receive notification when the value of the property changes. 195 */ 196 Glib::PropertyProxy_ReadOnly< bool > property_selected_link() const; 197 198 199 /** The number of anchors associated with the AtkHyperlink object. 200 * 201 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 202 * or receive notification when the value of the property changes. 203 */ 204 Glib::PropertyProxy_ReadOnly< int > property_number_of_anchors() const; 205 206 207 /** The end index of the AtkHyperlink object. 208 * 209 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 210 * or receive notification when the value of the property changes. 211 */ 212 Glib::PropertyProxy_ReadOnly< int > property_end_index() const; 213 214 215 /** The start index of the AtkHyperlink object. 216 * 217 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 218 * or receive notification when the value of the property changes. 219 */ 220 Glib::PropertyProxy_ReadOnly< int > property_start_index() const; 221 222 223 protected: 224 virtual gchar* get_uri_vfunc(int i) const; 225 226 virtual Glib::RefPtr<Atk::Object> get_object_vfunc(int i); 227 228 virtual int get_end_index_vfunc() const; 229 230 virtual int get_start_index_vfunc() const; 231 232 virtual bool is_valid_vfunc() const; 233 234 virtual int get_n_anchors_vfunc() const; 235 236 virtual guint link_state_vfunc() const; 237 238 virtual bool is_selected_link_vfunc() const; 239 240 241 public: 242 243 public: 244 //C++ methods used to invoke GTK+ virtual functions: 245 246 protected: 247 //GTK+ Virtual Functions (override these to change behaviour): 248 249 //Default Signal Handlers:: 250 /// This is a default handler for the signal signal_link_activated(). 251 virtual void on_link_activated(); 252 253 254 }; 255 256 } // namespace Atk 257 258 259 namespace Glib 260 { 261 /** A Glib::wrap() method for this object. 262 * 263 * @param object The C instance. 264 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. 265 * @result A C++ instance that wraps this C instance. 266 * 267 * @relates Atk::Hyperlink 268 */ 269 Glib::RefPtr<Atk::Hyperlink> wrap(AtkHyperlink* object, bool take_copy = false); 270 } 271 272 273 #endif /* _ATKMM_HYPERLINK_H */ 274 275