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 pathclickChunk.xml
More file actions
49 lines (49 loc) · 4.77 KB
/
Copy pathclickChunk.xml
File metadata and controls
49 lines (49 loc) · 4.77 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
<doc>
<legacy_id>1566</legacy_id>
<name>clickChunk</name>
<type>function</type>
<syntax>
<example>the clickChunk</example>
<example>clickChunk()</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>User Interaction</category>
</classification>
<references>
<function tag="clickStack">clickStack Function</function>
<function tag="selectedChunk">selectedChunk Function</function>
<function tag="dropChunk">dropChunk Function</function>
<function tag="clickChar">clickChar Function</function>
<function tag="clickText">clickText 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 position of the <keyword tag="word">word</keyword> or <glossary tag="grouped text">grouped text</glossary> that the user last clicked.</summary>
<examples>
<example>the clickChunk</example>
<example>select the clickChunk</example>
</examples>
<description>
<p>Use the <b>clickChunk</b> function 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>clickChunk</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a <glossary tag="chunk expression">chunk expression</glossary> of the form char <i>startChar</i> to <i>endChar</i> of field <i>fieldNumber</i>.</p><p/><p><b>Comments:</b></p><p>The <b>clickChunk</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 last click was not in a <keyword tag="field">field</keyword>, the <b>clickChunk</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> empty.</p><p/><p>The returned value reports the word the user clicked: the <i>startChar</i> is the first <keyword tag="character">character</keyword> of the <keyword tag="word">word</keyword>, and the <i>endChar</i> is the last <keyword tag="character">character</keyword>. If the <property tag="textStyle">textStyle</property> of the clicked text is "link", the <glossary tag="return value">returned value</glossary> specifies 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>clickChunk</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>clickChunk</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>clickChunk</b>.</p><p/><p>If the field is locked, the <b>clickChunk</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>clickChunk</b> <control_st tag="function">function</control_st> within a <message tag="selectionChanged">selectionChanged</message> <glossary tag="handler">handler</glossary> to determine what <keyword tag="characters">characters</keyword> the user is editing in an <glossary tag="unlock">unlocked</glossary> <keyword tag="field">field</keyword>.</p><p/><p>To get the text of the word or text group clicked, use the <b>clickText</b> <control_st tag="function">function</control_st>.</p>
</description>
</doc>