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::Label(3) 					User Contributed Perl Documentation					   Prima::Label(3)

NAME
Prima::Label - static text widget DESCRIPTION
The class is designed for display of text, and assumes no user interaction. The text output capabilities include wrapping, horizontal and vertical alignment, and automatic widget resizing to match text extension. If text contains a tilde-escaped ( hot ) character, the label can explicitly focus the specified widget upon press of the character key, what feature is useful for dialog design. SYNOPSIS
my $label = Prima::Label-> create( text => 'Enter ~name:', focusLink => $name_inputline, alignment => ta::Center, ); API
Properties alignment INTEGER One of the following "ta::XXX" constants: ta::Left ta::Center ta::Right Selects the horizontal text alignment. Default value: "ta::Left" autoHeight BOOLEAN If 1, the widget height is automatically changed as text extensions change. Default value: 0 autoWidth BOOLEAN If 1, the widget width is automatically changed as text extensions change. Default value: 1 focusLink WIDGET Points to a widget, which is explicitly focused when the user presses the combination of a hot key with the "Alt" key. Prima::Label does not provide a separate property to access the hot key value, however it can be read from the "{accel}" variable. Default value: "undef". showAccelChar BOOLEAN If 0, the tilde ( ~ ) character is collapsed from the text, and the hot character is underlined. When the user presses combination of the escaped character with the "Alt" key, the "focusLink" widget is explicitly focused. If 1, the text is showed as is, and no hot character is underlined. Key combinations with "Alt" key are not recognized. Default value: 0 showPartial BOOLEAN Used to determine if the last line of text should be drawn if it can not be vertically fit in the widget interior. If 1, the last line is shown even if not visible in full. If 0, only full lines are drawn. Default value: 1 wordWrap BOOLEAN If 1, the text is wrapped if it can not be horizontally fit in the widget interior. If 0, the text is not wrapped unless new line characters are present in the text. New line characters signal line wrapping with no respect to "wordWrap" property value. Default value: 0 valignment INTEGER One of the following "ta::XXX" constants: ta::Top ta::Middle or ta::Center ta::Bottom Selects the vertical text alignment. NB: "ta::Middle" value is not equal to "ta::Center"'s, however the both constants produce equal effect here. Default value: "ta::Top" AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>. SEE ALSO
Prima, Prima::Widget, examples/label.pl perl v5.14.2 2009-02-24 Prima::Label(3)
Man Page