1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module atk.HypertextIF;
26 
27 private import atk.Hyperlink;
28 private import atk.c.functions;
29 public  import atk.c.types;
30 private import gobject.ObjectG;
31 private import gobject.Signals;
32 public  import gtkc.atktypes;
33 private import std.algorithm;
34 
35 
36 /**
37  * An interface used for objects which implement linking between
38  * multiple resource or content locations, or multiple 'markers'
39  * within a single document.  A Hypertext instance is associated with
40  * one or more Hyperlinks, which are associated with particular
41  * offsets within the Hypertext's included content.  While this
42  * interface is derived from Text, there is no requirement that
43  * Hypertext instances have textual content; they may implement Image
44  * as well, and Hyperlinks need not have non-zero text offsets.
45  */
46 public interface HypertextIF{
47 	/** Get the main Gtk struct */
48 	public AtkHypertext* getHypertextStruct(bool transferOwnership = false);
49 
50 	/** the main Gtk struct as a void* */
51 	protected void* getStruct();
52 
53 
54 	/** */
55 	public static GType getType()
56 	{
57 		return atk_hypertext_get_type();
58 	}
59 
60 	/**
61 	 * Gets the link in this hypertext document at index
62 	 * @link_index
63 	 *
64 	 * Params:
65 	 *     linkIndex = an integer specifying the desired link
66 	 *
67 	 * Returns: the link in this hypertext document at
68 	 *     index @link_index
69 	 */
70 	public Hyperlink getLink(int linkIndex);
71 
72 	/**
73 	 * Gets the index into the array of hyperlinks that is associated with
74 	 * the character specified by @char_index.
75 	 *
76 	 * Params:
77 	 *     charIndex = a character index
78 	 *
79 	 * Returns: an index into the array of hyperlinks in @hypertext,
80 	 *     or -1 if there is no hyperlink associated with this character.
81 	 */
82 	public int getLinkIndex(int charIndex);
83 
84 	/**
85 	 * Gets the number of links within this hypertext document.
86 	 *
87 	 * Returns: the number of links within this hypertext document
88 	 */
89 	public int getNLinks();
90 
91 	/**
92 	 * The "link-selected" signal is emitted by an AtkHyperText
93 	 * object when one of the hyperlinks associated with the object
94 	 * is selected.
95 	 *
96 	 * Params:
97 	 *     arg1 = the index of the hyperlink which is selected
98 	 */
99 	gulong addOnLinkSelected(void delegate(int, HypertextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
100 }