Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

glgui-widget-add adds a widget to a GUI object.

Parameter Description
g Graphical User Interface (GUI) for this widget
args Optional: Set of parameters such as 'x, 'y, 'w, 'h, 'callback, 'font, 'image, and 'color

Example

Example 1: This example demonstrates the use of (glgui-widget-add) in a procedure definition of (glgui-box g x y w h c)

(define (glgui-box g x y w h c)
  (glgui-widget-add g
   'x x
   'y y
   'w w
   'h h
   'rounded #f
   'callback #f
   'color c
   'hidden #f
   'armed #f
   'draw-handle  glgui:box-draw
   'input-handle glgui:box-input
))
Clone this wiki locally