Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

Graphic User Interface
[LUA extensions]


Detailed Description

graphic user interface.

dcplaya graphic user interface (gui) are applications . Generally these applications display something on a box. GUI must have required fields, have a look to the gui structure definition for more information

Z space organization
Each gui application have a Z space from 0 to 200. This space is divided in two parts. The first from 0 to 100 is the application Z space. The second (obviously) from 100 to 200 is reserved for its children. The whole stuff is managed by a system of sub-display-list directly. The gui_child_autoplacement() does all the tricks and must be call when application focus changes. This is done by the gui_dialog_basic_handle() function, so the simpliest thing to do is to call this function in the gui application handler. Technically these functions creates a display-list (_dl) which application display-list (dl) becomes and sublist and all suitable transforation are performed in the _dl display-list so that the [0..100] coordinates in the dl display-list match the application reserved Z.

Event translation
The dialog box handle function take care of translating a few events :

These translated events are sent ONLY to the focused widget into the dialog. So if you want to react only when you are focused, check for these translated events, if you want to react in any cases, then check for the untranslated events. (Because untranslated events are STILL sent to all child of the dialog with usual convention (first to focused child, then to the dialog itsef, and at last to other children)
Since:
04/03/2003
See also:
dcplaya_lua_app

dcplaya_lua_event

Author:
penne vincent


Files

file  box3d.lua
 Draw a box with 3D border.

file  fileselector.lua
 fileselector gui

file  gui.lua
 gui lua library on top of evt system

file  menu.lua
 Menu GUI.

file  plugin_info.lua
 hyper text viewer gui

file  style.lua
 gui styles.

file  textviewer.lua
 hyper text viewer gui.

file  vmu_select.lua
 VMU selector gui.


Modules

group Color Picker GUI
 color picker gui

group File Selector
 file selector

group LUA source colorizer
 creates preformatted colorized zml for lua source viewer

group Menu GUI
 menu browser .

group Tagged Text
 tagged text aka zml

group Text-List
 text list (graphic browser).

group Text Viewer
 text viewer


Data Structures

struct  gui
 gui application. More...


plugin viewer

 plugin_viewer_build (var texts, var plugin, var text_name)
 Create a plugin info tagged text.

 plugin_viewer_make_list (var plugin_name)
 Create a plugin info tagged text.

 plugin_viewer (var owner, var plugin, var box, var label, var mode)
 Create a plugin info application.


Styles

 style_add (var style)
 Add a new style.

 style_remove (var style)
 Remove existing style.

 style_get (var name)
 Get a style.

 style_name_to_index (var name)
 Add a new style.

 style_create (var name, var color_o, var color_x, var color_y, var color_xy)
 Create and add a style.

 style_get_color (var style, var x, var y)
 Default style get_color method.

 style_get_prop (var style, var prop)
 Get a style properties.


Functions

 gui_orphanguess_z (var z)
 gui_guess_z (var owner, var z)
 gui_child_autoplacement (var app)
 gui_new_focus (var app, var f)
 gui_is_focus (var f)
 gui_less (var b1, var b2, var i)
 gui_more (var b1, var b2, var i)
 gui_boxdist (var b1, var b2)
 gui_closest (var app, var box, var coef, var cond, var condi)
 gui_minimal_handle (var app, var evt)
 gui_dialog_shutdown (var app)
 gui_dialog_basic_handle (var app, var evt)
 gui_dialog_handle (var app, var evt)
 gui_dialog_update (var app, var frametime)
 gui_dialog_box_draw (var dl, var box, var z, var bcolor, var color1, var color2, var transparent)
 gui_button_box_draw (var dl, var box, var z, var bcolor, var color1, var color2)
 gui_input_box_draw (var dl, var box, var z, var bcolor, var color, var transparent)
 gui_new_dialog (var owner, var box, var z, var dlsize, var text, var mode, var name, var flags)
 gui_button_shutdown (var app)
 gui_button_handle (var app, var evt)
 gui_new_button (var owner, var box, var text, var mode, var z, var name)
 gui_input_shutdown (var app)
 Input GUI shutdown.

 gui_input_handle (var app, var evt)
 Input GUI event handler.

 gui_input_display_text (var app)
 gui_input_set (var app, var string, var col)
 gui_input_insert (var app, var string, var col)
 gui_new_input (var owner, var box, var text, var mode, var string, var z)
 gui_text_set (var app, var text)
 gui_destroy_text (var app)
 gui_new_text (var owner, var box, var text, var mode, var z)
 gui_new_children (var owner, var name, var handle, var box, var mode, var z)
 gui_justify (var dl, var box, var z, var color, var text, var mode)
 gui_ask (var question, var answers, var width, var label)
 ask a question (given as a tagged text) and propose given answers (array of tagged text), with given optional box width (default to 300) and dialog box label

 gui_yesno (var question, var width, var label, var yes, var no)
 Ask a question with two possible answers (default is yes/no) with value 1 and 2.

 gui_label (var app, var text, var mode)
 gui_scrolltext (var dl, var msg, var txtcolor, var bkgcolor, var z)
 scrolling message in a box

 gui_shutdown ()
 Shutdown the GUI.

 gui_init ()
 Initialize the GUI.


Function Documentation

plugin_viewer_build var  texts,
var  plugin,
var  text_name
 

Create a plugin info tagged text.

Parameters:
texts table where text is stored (created if nil)
plugin either a plugin or a table of [table of ...] plugin
text_name prefix of index in texts table.
Returns:
texts table

style_add var  style  ) 
 

Add a new style.

Parameters:
style style object.
See also:
style_remove()

style_create()

plugin_viewer_make_list var  plugin_name  ) 
 

Create a plugin info tagged text.

Parameters:
texts table where text is stored (created if nil)
plugin either a plugin or a table of [table of ...] plugin
text_name prefix of index in texts table.
Returns:
texts table

plugin_viewer var  owner,
var  plugin,
var  box,
var  label,
var  mode
 

Create a plugin info application.

Parameters:
owner owner applciation (default is desktop)
plugin either a plugin or a table of [table of ...] plugin or a string (type/name). type and name could be replaced by '*' for wildcard search
dialog label (optionnal)
Returns:
dialog application

style_remove var  style  ) 
 

Remove existing style.

Parameters:
style Style object or style name to remove.
See also:
style_add()

style_get var  name  ) 
 

Get a style.

Parameters:
name Style name or style, default:current style.
Returns:
style

style_name_to_index var  name  ) 
 

Add a new style.

Parameters:
style style object.
See also:
style_remove()

style_create()

style_create var  name,
var  color_o,
var  color_x,
var  color_y,
var  color_xy
 

Create and add a style.

Parameters:
name style name
color_o Origine color (default: {1,0,0,0})
color_x Color on X-axis (default: {1,1,1,1})
color_y Color on Y-axis (default: color_x)
color_xy Color on X/Y-axis (default: (color_x+color_y) * 0.5)
See also:
style_add()

style_get_prop var  style,
var  prop
 

Get a style properties.

Parameters:
style style object
prop properties name
Returns:
properties value for a given style.


dcplaya documentation version 2.0 Generated on November 2004 by doxygen 1.3.6