1Prima::InputLine(3)   User Contributed Perl Documentation  Prima::InputLine(3)
2
3
4

NAME

6       Prima::InputLine - standard input line widget
7

DESCRIPTION

9       The class provides basic functionality of an input line, including
10       hidden input, read-only state, selection, and clipboard operations. The
11       input line text data is contained in text property.
12

API

14   Events
15       Change
16           The notification is called when the text property is changed,
17           either interactively or as a result of direct call.
18
19   Properties
20       alignment INTEGER
21           One of the following "ta::" constants, defining the text alignment:
22
23                   ta::Left
24                   ta::Right
25                   ta::Center
26
27           Default value: "ta::Left"
28
29       autoHeight BOOLEAN
30           If 1, adjusts the height of the widget automatically when its font
31           changes.
32
33           Default value: 1
34
35       autoSelect BOOLEAN
36           If 1, all the text is selected when the widget becomes focused.
37
38           Default value: 1
39
40       autoTab BOOLEAN
41           If 1, the keyboard "kb::Left" and "kb::Right" commands, if received
42           when the cursor is at the beginning or at the end of text, and
43           cannot be mover farther, not processed. The result of this is that
44           the default handler moves focus to a neighbor widget, in a way as
45           if the Tab key was pressed.
46
47           Default value: 0
48
49       borderWidth INTEGER
50           Width of 3d-shade border around the widget.
51
52           Default value: 2
53
54       charOffset INTEGER
55           Selects the position of the cursor in characters starting from the
56           beginning of visual text.
57
58       firstChar
59           Selects the first visible character of text
60
61       insertMode BOOLEAN
62           Governs the typing mode - if 1, the typed text is inserted, if 0,
63           the text overwrites the old text. When "insertMode" is 0, the
64           cursor shape is thick and covers the whole character; when 1, it is
65           of default width.
66
67           Default toggle key: Insert
68
69       maxLen INTEGER
70           The maximal length of the text, that can be stored into text or
71           typed by the user.
72
73           Default value: 256
74
75       passwordChar CHARACTER
76           A character to be shown instead of the text letters when writeOnly
77           property value is 1.
78
79           Default value: '*'
80
81       readOnly BOOLEAN
82           If 1, the text cannot be edited by the user.
83
84           Default value: 0
85
86       selection START, END
87           Two integers, specifying the beginning and the end of the selected
88           text.  A case with no selection is when START equals END.
89
90       selStart INTEGER
91           Selects the start of text selection.
92
93       selEnd INTEGER
94           Selects the end of text selection.
95
96       textDirection BOOLEAN.
97           If set, indicates RTL text input.
98
99       wordDelimiters STRING
100           Contains string of character that are used for locating a word
101           break.  Default STRING value consists of punctuation marks, space
102           and tab characters, and "\xff" character.
103
104       writeOnly BOOLEAN
105           If 1, the input is not shown but mapped to passwordChar characters.
106           Useful for a password entry.
107
108           Default value: 0
109
110   Methods
111       copy
112           Copies the selected text, if any, to the clipboard.
113
114           Default key: Ctrl+Insert
115
116       cut Cuts the selected text into the clipboard.
117
118           Default key: Shift+Delete
119
120       delete
121           Removes the selected text.
122
123           Default key: Delete
124
125       paste
126           Copies text from the clipboard and inserts it in the cursor
127           position.
128
129           Default key: Shift+Insert
130
131       select_all
132           Selects all text
133
134   Bi-directional input and output
135       When bidi is enabled, methods "firstChar", "charOffset", "selection"
136       etc change their meaning, so that these cannot be used to calculate
137       text offsets f.ex. via "substr".  Also, selection ranges of bidi text
138       are not straighforward.  Use the following methods whenever text
139       manipulations are needed:
140
141       has_bidi_data
142           Returns 1 if visual layout does not correspond to storage layout.
143
144       char_at OFFSET
145           Returns character at OFFSET
146
147       offset2strpos
148           Converts visual offset to storage offset
149
150       char_offset_strpos
151           Returns the character offset in storage directly under the cursor.
152
153       selection_strpos
154           Returns range of characters covered by the selection.
155

AUTHOR

157       Dmitry Karasik, <dmitry@karasik.eu.org>.
158

SEE ALSO

160       Prima, Prima::Widget, Prima::Bidi, examples/edit.pl.
161
162
163
164perl v5.28.0                      2017-02-28               Prima::InputLine(3)
Impressum