-
Notifications
You must be signed in to change notification settings - Fork 5
Input
doyousketch2 edited this page Sep 12, 2019
·
7 revisions
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
Widgetuserdata 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
Widgetuserdata type -
obj.mark ==> int indexget ( index in text ) -
obj.mark = int indexset ( index in text ) -
obj.wrap ==> int statusget -
obj.wrap = int statusset ( only for multi-line input ) -
obj.value ==> str textget -
obj.value = str textset -
obj.tab_nav ==> bool valget ( 1 advance focus (default). 0 insert tab char ) -
obj.tab_nav = bool valset ( 1 advance focus (default). 0 insert tab char ) -
obj.readonly ==> bool valget ( non-zero if widget is read-only ) -
obj.readonly = bool valget ( 0 = editable ) -
obj.shortcut ==> userdata keyget ( shortcut key for widget ) -
obj.shortcut = int|str|userdata keyset -
obj.textfont ==> str indexget ( Fl_Font index ) -
obj.textfont = int|str fontset ( Fl_Font index or name ) -
obj.textsize ==> int sizeget ( in pixels ) -
obj.textsize = int sizeset ( in pixels ) -
obj.textcolor ==> userdata colorget ( Fl_color ) -
obj.textcolor = int|userdata colorset ( Fl_color ) -
obj.value_size ==> int bytesget ( corresponds toFl_Input_::size()) -
obj.cursor_color ==> userdata colorget ( Fl_color ) -
obj.cursor_color = int|userdata colorset ( Fl_color ) -
obj.maximum_size ==> int maxget ( maximum length of input field in chars ) -
obj.maximum_size = int maxset ( maximum length of input field in chars ) -
obj.cursor_position ==> int indexget ( position of cursor, corresponds toFl_Input_::position()) -
obj.cursor_position = int indexset ( position of cursor, corresponds toFl_Input_::position( i )) -
obj.type ==> str modeget ( see below ) -
obj.type = str modeset ( see below )
The type property / mode of input widgets can be set to one of the following values:
-
"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"