-
Notifications
You must be signed in to change notification settings - Fork 5
Input
Corresponds to:
Fl_Input
,
Fl_Input_
Inherits from:
Widget
Constructors
fl.Input( int X, int Y, int W, int H, *str label ) ==> userdata Widget
-
fl.Input{ table entries } ==> userdata Widget
( table constructor syntax )
Functions
- methods defined for
Widget
userdata type -
obj:copy( int from ) ==> bool success
( 0 selection, 1 clipboard. returns 1 if copied )
-
obj:copy_cuts() ==> bool success
( 0 if no change ) -
obj:cut() ==> bool success
( Delete current selection. return 0 )
-
obj:cut( int bytes ) ==> bool success
( delete bytes after cursor. return 0 )
-
obj:cut( int begin, int end ) ==> bool success
( del chars between begin & end. return 0 )
-
obj:index( int i ) ==> int char
( Return char at index i )
-
obj:insert( str text ) ==> bool success
( insert text at cursor. return 0 )
-
obj:replace( int begin, int end, *str text ) ==> bool success
( delete from begin to end, then insert text. return 0 )
-
obj:size( int W, int H )
set( width & height of widget )
-
obj:undo()
( undo changes to text buffer )
Properties
- properties defined for
Widget
userdata type -
obj.mark ==> int index
getobj.mark = int index
set
( index in text ) -
obj.wrap ==> int status
getobj.wrap = int status
set
( only for multi-line input ) -
obj.value ==> str text
getobj.value = str text
set -
obj.tab_nav ==> bool val
getobj.tab_nav = bool val
set
( default 1 advance focus. 0 insert tab char ) -
obj.readonly ==> bool val
getobj.readonly = bool val
set
( 0 = editable ) -
obj.shortcut ==> userdata key
getobj.shortcut = int|str|userdata key
set
( shortcut key for widget, see Lua vs Cpp for adding key combos ) -
obj.textfont ==> str index
getobj.textfont = int|str font
set
( Fl_Font index or name ) -
obj.textsize ==> int size
getobj.textsize = int size
set
( in pixels ) -
obj.textcolor ==> userdata color
getobj.textcolor = int|userdata color
set
( Fl_color ) -
obj.value_size ==> int bytes
get ( corresponds toFl_Input_::size()
) -
obj.cursor_color ==> userdata color
getobj.cursor_color = int|userdata color
set
( Fl_color ) -
obj.maximum_size ==> int max
getobj.maximum_size = int max
set
( max length of input field in chars ) -
obj.cursor_position ==> int index
getobj.cursor_position = int index
set
( corresponds toFl_Input_::position( i )
) -
obj.type ==> str mode
getobj.type = str mode
set-
"FL_NORMAL_INPUT"
(default) "FL_FLOAT_INPUT"
"FL_INT_INPUT"
"FL_HIDDEN_INPUT"
"FL_MULTILINE_INPUT"
"FL_SECRET_INPUT"
"FL_NORMAL_OUTPUT"
"FL_MULTILINE_OUTPUT"
"FL_MULTILINE_INPUT_WRAP"
"FL_MULTILINE_OUTPUT_WRAP"
-