This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathclickText.xml
More file actions
50 lines (50 loc) · 4.53 KB
/
Copy pathclickText.xml
File metadata and controls
50 lines (50 loc) · 4.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<doc>
<legacy_id>2450</legacy_id>
<name>clickText</name>
<type>function</type>
<syntax>
<example>the clickText</example>
<example>clickText()</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>User Interaction</category>
</classification>
<references>
<function tag="clickChar">clickChar Function</function>
<function tag="clickChunk">clickChunk Function</function>
<function tag="foundText">foundText Function</function>
<function tag="clickCharChunk">clickCharChunk Function</function>
<function tag="mouseText">mouseText Function</function>
<function tag="selectedText">selectedText Function</function>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<web/>
<mobile/>
</classes>
<security>
</security>
<summary><glossary tag="return">Returns</glossary> the <keyword tag="word">word</keyword> or <glossary tag="grouped text">text group</glossary> the user last clicked.</summary>
<examples>
<example>the clickText</example>
<example>if the clickText contains "*" then goToFootnote (the clickText)</example>
</examples>
<description>
<p>Use the <b>clickText</b> <control_st tag="function">function</control_st> within a <message tag="mouseDown">mouseDown</message>, <message tag="mouseUp">mouseUp</message>, or <message tag="selectionChanged">selectionChanged</message> <glossary tag="handler">handler</glossary> to determine which <keyword tag="word">word</keyword> or <glossary tag="grouped text">text group</glossary> the user clicked, in order to provide <glossary tag="hypertext">hypertext</glossary> (clickable text) or take some action based on the click.</p><p/><p><b>Value:</b></p><p>The <b>clickText</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> the text that the user clicked.</p><p/><p><b>Comments:</b></p><p>The <b>clickText</b> <control_st tag="function">function</control_st> is cleared at the next mouse click, as well as after some editing actions such as deleting text. If the user has clicked anywhere since clicking the <keyword tag="field">field</keyword>, the <b>clickText</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> empty.</p><p/><p>The returned value contains the word the user clicked. If the <b>textStyle</b> of the clicked text is "link", the <glossary tag="return value">returned value</glossary> contains the entire <glossary tag="grouped text">text group</glossary>.</p><p/><p><img src="202653"/> <b>Important!</b> Words are defined a little differently by the <b>clickText</b> <control_st tag="function">function</control_st> than the way they are used in <glossary tag="chunk expression">chunk expressions</glossary>. A word, for purposes of the <b>clickText</b>, is any text delimited by spaces, tabs, returns, or punctuation. If you click a punctuation <keyword tag="character">character</keyword>, only that <keyword tag="character">character</keyword> is returned. This means that, for example, clicking a hyphenated word only returns the part of the word that was clicked.</p><p/><p>The returned value indicates the text that the mouse pointer was over when the mouse was clicked. Moving the mouse before the mouse button is released does not affect the value returned by the <b>clickText</b>.</p><p/><p>If the field is locked, the <b>clickText</b> function is most useful within a <glossary tag="handler">handler</glossary> (such as <message tag="mouseDown">mouseDown</message> or <message tag="mouseUp">mouseUp</message>) that is <glossary tag="trigger">triggered</glossary> by the mouse click.</p><p/><p>If the field is unlocked, <b>mouseDown</b> and <message tag="mouseUp">mouseUp</message> <glossary tag="message">messages</glossary> are not sent when the user clicks in the <keyword tag="field">field</keyword> (unless the user right-clicks or holds down the Control key while clicking). Use the <b>clickText</b> <control_st tag="function">function</control_st> within a <message tag="selectionChanged">selectionChanged</message> <glossary tag="handler">handler</glossary> to determine what text the user is editing in an <glossary tag="unlock">unlocked</glossary> <keyword tag="field">field</keyword>.</p><p/><p>To get the location of the word or text group clicked, use the <b>clickChunk</b> <control_st tag="function">function</control_st>.</p>
</description>
</doc>