NAME
Curses::Toolkit::Widget::Entry - base class for focus events
VERSION
version 0.203
DESCRIPTION
This widget consists of an entry
Appearence
[entry text____]
CONSTRUCTOR
new
input : none
output : a Curses::Toolkit::Widget::Entry object
new_with_text
This creates an entry with text in it.
input : STRING, some text
output : a Curses::Toolkit::Widget::Entry object
METHODS
set_text
Set the text of the entry
input : STRING, the text
output : the entry object
get_text
Get the text of the Entry
input : none
output : STRING, the Entry text
set_edit_mode
Set the entry to be in edit mode or not
input : true or false output : the entry widget
get_edit_mode
Returns true if the entry is in edit mode, false otherwise
input : none output : true or false
set_cursor_position
Set absolute position of the cursor
input : the cursor position
output : the entry widget;
get_cursor_position
Returns the absolute position of the cursor
input : none
output : the cursor position
move_cursor_position
Set the position of the cursor, relatively
input : cursor deplacement (can be positive or negative)
output : the entry widget
draw
get_desired_space
Given a coordinate representing the available space, returns the space desired The Entry desires 12x1
input : a Curses::Toolkit::Object::Coordinates object
output : a Curses::Toolkit::Object::Coordinates object
get_minimum_space
Given a coordinate representing the available space, returns the minimum space needed to properly display itself. The Entry requires 3x1 minimum
input : a Curses::Toolkit::Object::Coordinates object
output : a Curses::Toolkit::Object::Coordinates object
possible_signals
my @signals = keys $button->possible_signals();
returns the possible signals that can be used on this widget. See Curses::Toolkit::Widget::signal_connect to bind signals to actions
input : none
output : HASH, keys are signal names, values are signal classes
Theme related properties
To set/get a theme properties, you should do :
$entry->set_theme_property(property_name => $property_value); $value = $entry->get_theme_property('property_name')
Here is the list of properties related to the entry, that can be changed in the associated theme. See the Curses::Toolkit::Theme class used for the default (default class to look at is Curses::Toolkit::Theme::Default)
Don't forget to look at properties from the parent class, as these are also inherited of !
default_width
Sets the value of the width of the entry by default.
left_enclosing
The string to be displayed at the left of the button. Usually some enclosing characters.
Example : # set left enclosing $entry->set_theme_property(left_enclosing => '< ' ); $entry->set_theme_property(left_enclosing => '[ ' );
right_enclosing
The string to be displayed at the right of the button. Usually some enclosing characters.
Example : # set left enclosing $entry->set_theme_property(left_enclosing => ' >' ); $entry->set_theme_property(left_enclosing => ' ]' );
AUTHOR
Damien "dams" Krotkine
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Damien "dams" Krotkine.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.