Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

prima::keyselector(3) [debian man page]

Prima::KeySelector(3)					User Contributed Perl Documentation				     Prima::KeySelector(3)

NAME
Prima::KeySelector - key combination widget and routines DESCRIPTION
The module provides a standard widget for selecting a user-defined key combination. The widget class allows import, export, and modification of key combinations. The module provides a set of routines, useful for conversion of a key combination between representations. SYNOPSIS
my $ks = Prima::KeySelector-> create( ); $ks-> key( km::Alt | ord('X')); print Prima::KeySelector::describe( $ks-> key ); API
Properties key INTEGER Selects a key combination in integer format. The format is described in "Hot key" in Prima::Menu, and is a combination of "km::XXX" key modifiers and either a "kb::XXX" virtual key, or a character code value. The property allows almost, but not all possible combinations of key constants. Only "km::Ctrl", "km::Alt", and "km::Shift" modifiers are allowed. Methods All methods here can ( and must ) be called without the object syntax; - the first parameter must not be neither package nor widget. describe KEY Accepts KEY in integer format, and returns string description of the key combination in human readable format. Useful for supplying an accelerator text to a menu. print describe( km::Shift|km::Ctrl|km::F10); Ctrl+Shift+F10 export KEY Accepts KEY in integer format, and returns string with a perl-evaluable expression, which after evaluation resolves to the original KEY value. Useful for storing a key into text config files, where value must be both human readable and easily passed to a program. print export( km::Shift|km::Ctrl|km::F10); km::Shift|km::Ctrl|km::F10 shortcut KEY Converts KEY from integer format to a string, acceptable by "Prima::AbstractMenu" input methods. print shortcut( km::Ctrl|ord('X')); ^X translate_codes KEY, [ USE_CTRL = 0 ] Converts KEY in integer format to three integers in the format accepted by "KeyDown" in Prima::Widget event: code, key, and modifier. USE_CTRL is only relevant when KEY first byte ( "KEY & 0xFF" ) is between 1 and 26, what means that the key is a combination of an alpha key with the control key. If USE_CTRL is 1, code result is unaltered, and is in range 1 - 26. Otherwise, code result is converted to the character code ( 1 to ord('A'), 2 to ord('B') etc ). AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>. SEE ALSO
Prima, Prima::Widget, Prima::Menu. perl v5.14.2 2009-02-24 Prima::KeySelector(3)

Check Out this Related Man Page

Prima::InputLine(3)					User Contributed Perl Documentation				       Prima::InputLine(3)

NAME
Prima::InputLine - standard input line widget DESCRIPTION
The class provides basic functionality of an input line, including hidden input, read-only state, selection, and clipboard operations. The input line text data is contained in text property. API
Events Change The notification is called when the text property is changed, either interactively or as a result of direct call. Properties alignment INTEGER One of the following "ta::" constants, defining the text alignment: ta::Left ta::Right ta::Center Default value: "ta::Left" autoHeight BOOLEAN If 1, adjusts the height of the widget automatically when its font changes. Default value: 1 autoSelect BOOLEAN If 1, all the text is selected when the widget becomes focused. Default value: 1 autoTab BOOLEAN If 1, the keyboard "kb::Left" and "kb::Right" commands, if received when the cursor is at the beginning or at the end of text, and cannot be mover farther, not processed. The result of this is that the default handler moves focus to a neighbor widget, in a way as if the Tab key was pressed. Default value: 0 borderWidth INTEGER Width of 3d-shade border around the widget. Default value: 2 charOffset INTEGER Selects the position of the cursor in characters starting from the beginning of text. firstChar Selects the first visible character of text insertMode BOOLEAN Governs the typing mode - if 1, the typed text is inserted, if 0, the text overwrites the old text. When "insertMode" is 0, the cursor shape is thick and covers the whole character; when 1, it is of default width. Default toggle key: Insert maxLen INTEGER The maximal length of the text, that can be stored into text or typed by the user. Default value: 256 passwordChar CHARACTER A character to be shown instead of the text letters when writeOnly property value is 1. Default value: '*' readOnly BOOLEAN If 1, the text cannot be edited by the user. Default value: 0 selection START, END Two integers, specifying the beginning and the end of the selected text. A case with no selection is when START equals END. selStart INTEGER Selects the start of text selection. selEnd INTEGER Selects the end of text selection. textRef SCALAR_REF If not undef, contains reference to the scalar that holds the text of the input line. All changes to ::text property are reflected there. The direct write access to the scalar is not recommended because it leaves internal structures inconsistent, and the only way to synchronize structures is to set-call either ::textRef or ::text after every such change. If undef, the internal text container is used. Default value: undef wordDelimiters STRING Contains string of character that are used for locating a word break. Default STRING value consists of punctuation marks, space and tab characters, and "xff" character. writeOnly BOOLEAN If 1, the input is not shown but mapped to passwordChar characters. Useful for a password entry. Default value: 0 Methods copy Copies the selected text, if any, to the clipboard. Default key: Ctrl+Insert cut Cuts the selected text into the clipboard. Default key: Shift+Delete delete Removes the selected text. Default key: Delete paste Copies text from the clipboard and inserts it in the cursor position. Default key: Shift+Insert select_all Selects all text AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>. SEE ALSO
Prima, Prima::Widget, examples/edit.pl. perl v5.14.2 2009-02-24 Prima::InputLine(3)
Man Page