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

NAME

6       Prima::InputLine - standard input line widget
7
8   SYNOPSIS
9               use Prima qw(InputLine Application);
10               Prima::InputLine-> new( text => 'Hello world!');
11               run Prima;
12

DESCRIPTION

14       The class provides basic functionality of an input line, including
15       hidden input, read-only state, selection, and clipboard operations. The
16       input line text data is contained in text property.
17

API

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

AUTHOR

162       Dmitry Karasik, <dmitry@karasik.eu.org>.
163

SEE ALSO

165       Prima, Prima::Widget, Prima::Bidi, examples/edit.pl.
166
167
168
169perl v5.28.1                      2019-02-02               Prima::InputLine(3)
Impressum