Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DRAWER.LUA(8)		  BSD System Manager's Manual		 DRAWER.LUA(8)

NAME
     drawer.lua	-- FreeBSD menu/screen drawer module

DESCRIPTION
     drawer.lua	contains functionality for drawing and manipulating the	menu,
     logo, and brand to	the screen.

     Before using the functionality provided by	drawer.lua, it must be in-
     cluded with a statement such as the following:

	   local drawer	= require("drawer")

   BRAND DEFINITIONS
     Brand definitions describe	a "brand", traditionally drawn above the menu.
     The exact position	may be controlled by using the loader.conf(5) vari-
     ables loader_brand_x and loader_brand_y.  The following keys may be de-
     fined for a brand definition:

	   graphic  A table of strings containing rows of text to be drawn to
		    the	screen.

   LOGO	DEFINITIONS
     Logo definitions describe a "logo", traditionally to the right of the
     menu.  The	exact position may be controlled by using the loader.conf(5)
     variables loader_logo_x and loader_logo_y.	 The following keys may	be de-
     fined for a logo definition:

	   requires_color  A boolean describing	whether	or not this logo defi-
			   nition requires color.  If it is chosen to be drawn
			   and it requires color on a color-disabled boot,
			   drawer.lua will elect to use	the default "orbbw"
			   logo	rather than the	chosen logo.

	   graphic	   A table of strings containing rows of text to be
			   drawn to the	screen.

	   shift	   A table describing the x and	y shift	that should be
			   applied to all elements should this logo be se-
			   lected.  This is typically used for shifting	the
			   menu	and brand if an	empty or minimal logo are se-
			   lected.

   CUSTOM BRANDS AND LOGOS
     The brand and logo	system is designed to allow brands and logos to	be
     easily plugged in.	 When an unrecognized loader_brand or loader_logo are
     encountered, drawer.lua will attempt to include brand-${loader_brand}.lua
     or	logo-${loader_logo}.lua	respectively.  These files are expected	to
     call either drawer.addBrand() or drawer.addLogo() to add the requested
     branddef or logodef.  drawer.lua will attempt to do another lookup	for
     the requested brand or logo before	falling	back to	one of the following:

	   drawer.default_brand		 The default brand to be used if the
					 requested brand cannot	be located.

	   drawer.default_color_logodef	 The default logodef to	be used	if an
					 invalid logodef is requested and
					 loader(8) has been configured to al-
					 low output of color.

	   drawer.default_bw_logodef	 The default logodef to	be used	if ei-
					 ther an invalid logodef has been re-
					 quested, or a logodef has been	re-
					 quested that requires color and
					 loader(8) has been configured to not
					 output	color.

   FRAME STYLES
     drawer.lua	contains the definitions for the different frame styles	that
     may be drawn around the menu.  Frame styles define	the characters drawn
     for horizontal lines, vertical aligns, and	each of	the four corner
     styles.  The following keys may be	defined	for a frame style:

     +o horizontal

     +o vertical

     +o top_left

     +o bottom_left

     +o top_right

     +o bottom_right
     Frame styles are currently	defined	in the table drawer.frame_styles in-
     dexed by the name used for	loader_menu_frame.  No API currently exists
     for manipulating this table indirectly.

   Exported functions
     The following functions are exported from drawer.lua:

	   drawer.addBrand(name, def)
			      Add the brand definition described by def	to the
			      table of known brand definitions,	indexed	by
			      name.

	   drawer.addLogo(name,	def)
			      Add the logo definition described	by def to the
			      table of known logo definitions, indexed by
			      name.

	   drawer.drawscreen(menudef)
			      Draws the	logo, brand, menu frame, and the cur-
			      rent menu	as described in	menudef, formatted as
			      defined by menu.lua(8).

SEE ALSO
     menu.lua(8)

AUTHORS
     The drawer.lua file was originally	written	by Pedro Souza
     <pedrosouza@FreeBSD.org>.	Later work and this manual page	was done by
     Kyle Evans	<kevans@FreeBSD.org>.

BSD				August 19, 2018				   BSD

NAME | DESCRIPTION | SEE ALSO | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=drawer.lua&sektion=8&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help