Skip to content
doyousketch2 edited this page Sep 6, 2019 · 21 revisions

Browser:

Corresponds to: Fl_Browser

Inherits from: Browser_, Widget

Constructors

  • fl.Browser( int X, int Y, int W, int H, *str label ) ==> userdata Widget
  • fl.Browser{ table entries } ==> userdata Widget (table constructor syntax)

Functions

  • methods defined for Browser_ userdata type
  • methods defined for Widget userdata type
  • obj:add( *str newtext )
  • obj:clear()
  • obj:displayed( int line# ) ==> bool showing (1 visible, 0 if not)
  • obj:hide() (hide entire browser)
  • obj:hide( int line# ) (hide line)
  • obj:insert( int line#, *str newtext )
  • obj:load( str filename ) ==> bool, *str (1 if OK, 0 on error w/ reason)
  • obj:make_visible( int line# )
  • obj:move( int to, int from )
  • obj:remove( int line# )
  • obj:select( int line# ) ==> bool state change (1 if state changed, 0 if not)
  • obj:selected( int line# ) ==> bool status (1 if item selected, 0 if not)
  • obj:show() (show entire browser)
  • obj:show( int line# ) (show line)
  • obj:size( int W, int H )
  • obj:swap( int line#A, int line#B )
  • obj:text( int line# ) ==> *str label
  • obj:text( int line#, str newtext )
  • obj:line_visible( int line# ) ==> bool (corresponds to Fl_Browser::visible(int line#))

Properties

  • properties defined for Browser_ userdata type
  • properties defined for Widget userdata type
  • obj.value ==> int line# get
  • obj.value = int line# set
  • obj.nitems ==> int lines (corresponds to Fl_Browser::size())
  • obj.topline ==> int line# get
  • obj.topline = int line# set
  • obj.bottomline ==> int line# get
  • obj.bottomline = int line# set
  • obj.middleline ==> int line# get
  • obj.middleline = int line# set
  • obj.column_char ==> str get (default '\t' tab)
  • obj.column_char = str set
  • obj.format_char ==> str get (default @)
  • obj.format_char = str set
  • obj.column_widths ==> table get
  • obj.column_widths = table set
  • obj.type ==> str mode get (see below)
  • obj.type = str mode set (see below)

(note: Browser does not inherit methods and properties of Group, although Fl_Browser is implemented as a sub-class of Fl_Group!)

Different behavior for the browser can be selected by setting its type property / mode to one of:

  • "FL_NORMAL_BROWSER" (default)
  • "FL_SELECT_BROWSER"
  • "FL_HOLD_BROWSER"
  • "FL_MULTI_BROWSER"
Clone this wiki locally