(index ("init!" 0) ("main" 120) ("uninit!" 307) ("quit!" 387) ("handler-set!" 470) ("margined?" 1979) ("margined?" 1979) ("padded?" 2395) ("padded?" 2395) ("new-window" 2796) ("window-child-set!" 3135) ("window-margined?-set!" 3292) ("new-button" 3520) ("button-text" 3657) ("button-text-set!" 3657) ("set!" 3657) ("new-horizontal-box" 3897) ("new-vertical-box" 4023) ("box-append!" 4143) ("box-padded?-set!" 4413) ("new-checkbox" 4621) ("new-entry" 4764) ("new-password-entry" 4863) ("new-search-entry" 4989) ("entry-text" 5109) ("entry-text-set!" 5109) ("set!" 5109) ("entry-read-only?-set!" 5340) ("new-label" 5579) ("new-tab" 5713) ("tab-append!" 5806) ("tab-pages-length" 5974) ("tab-margined?-set!" 6103) ("new-group" 6361) ("group-child-set!" 6495) ("group-margined?-set!" 6648) ("new-spinbox" 6872) ("spinbox-value" 7044) ("spinbox-value-set!" 7044) ("set!" 7044) ("new-slider" 7301) ("slider-value" 7466) ("slider-value-set!" 7466) ("set!" 7466) ("new-progress-bar" 7714) ("progress-bar-value" 7965) ("progress-bar-value-set!" 7965) ("set!" 7965) ("new-horizontal-separator" 8267) ("new-vertical-separator" 8411) ("new-combobox" 8549) ("combobox-append!" 8657) ("new-editable-combobox" 8819) ("editable-combobox-append!" 8954) ("new-radio-buttons" 9162) ("radio-buttons-append!" 9285) ("new-date-time-picker" 9472) ("new-date-picker" 9604) ("new-time-picker" 9721) ("new-multiline-entry" 9838) ("new-non-wrapping-multiline-entry" 9967) ("multiline-entry-append!" 10135) ("multiline-entry-read-only?-set!" 10314) ("new-area" 10593) ("area-queue-redraw-all!" 10783) ("new-area-handler" 10972) ("mouse-event-x" 11988) ("mouse-event-y" 12156) ("mouse-event-area-width" 12324) ("mouse-event-area-height" 12509) ("draw-params-context" 12697) ("draw-params-area-width" 12866) ("draw-params-area-height" 13044) ("new-font-button" 13225) ("new-color-button" 13342) ("color-button-color" 13462) ("color-button-color-set!" 13462) ("set!" 13462) ("new-form" 13862) ("form-append!" 13958) ("form-padded?-set!" 14267) ("new-grid" 14479) ("grid-append!" 14575) ("grid-padded?-set!" 15404) ("->control" 15616) ("control-destroy!" 15767) ("control-show!" 15901) ("open-file" 16005) ("save-file" 16185) ("message-box" 16365) ("message-box-error" 16623) ("widgets" 16899) ("widget-by-id" 19018) ("new-solid-brush" 19270) ("brush-r" 19510) ("brush-r-set!" 19510) ("set!" 19510) ("brush-g" 19729) ("brush-g-set!" 19729) ("set!" 19729) ("brush-b" 19950) ("brush-b-set!" 19950) ("set!" 19950) ("brush-a" 20170) ("brush-a-set!" 20170) ("set!" 20170) ("new-stroke-params" 20391) ("new-matrix" 21235) ("matrix-identity-set!" 21330) ("matrix-translate!" 21465) ("transform!" 21614) ("new-path" 21877) ("path-free!" 22109) ("path-new-figure!" 22366) ("path-new-figure-with-arc!" 22530) ("path-line-to!" 23100) ("path-close-figure!" 23270) ("path-add-rectangle!" 23398) ("path-end!" 23642) ("stroke!" 23787) ("fill!" 23973))
(def (sig (procedure "(init!)" (id init!))) (p "Initializes the library.  This must be used before creating widgets."))
(def (sig (procedure "(main)" (id main))) (p "Enters the main event loop.  Note that all widgets must have been set up and displayed before this point, otherwise they will not appear."))
(def (sig (procedure "(uninit!)" (id uninit!))) (p "Frees all GUI resources."))
(def (sig (procedure "(quit!)" (id quit!))) (p "Terminates the main event loop."))
(def (sig (procedure "(handler-set! WIDGET TYPE PROC [ARGS ...])" (id handler-set!))) (p "Sets " (tt "PROC") " as handler for " (tt "WIDGET") " and the event " (tt "TYPE") ".  If " (tt "ARGS") " is specified, the given arguments will be passed to " (tt "PROC") " when firing the handler.  The following table describes the valid widget-type combinations and corresponding handlers:") (table (tr (th "Procedure signature") (th "Handler signature") (th "Description")) "\n" (tr (td (tt "(handler-set! #f 'should-quit PROC [ARGS ...])")) (td (tt "(should-quit [ARGS ...])")) (td "Fired on quit by menu item.  Return " (tt "#t") " to allow quit, otherwise " (tt "#f"))) "\n" (tr (td (tt "(handler-set WINDOW 'closing PROC [ARGS ...])")) (td (tt "(window-closing WINDOW [ARGS ...])")) (td "Fired on window close.  Return " (tt "#t") " to allow window closing, otherwise " (tt "#f"))) "\n" (tr (td (tt "(handler-set BUTTON 'clicked PROC [ARGS ...])")) (td (tt "(button-clicked BUTTON [ARGS ...])")) (td "Fired on button click")) "\n" (tr (td (tt "(handler-set SPINBOX 'changed PROC [ARGS ...])")) (td (tt "(spinbox-changed SPINBOX [ARGS ...])")) (td "Fired on spinbox value changes")) "\n" (tr (td (tt "(handler-set SLIDER 'changed PROC [ARGS ...])")) (td (tt "(slider-changed SLIDER [ARGS ...])")) (td "Fired on slider value changes")) "\n" (tr (td (tt "(handler-set COLOR-BUTTON 'changed PROC [ARGS ...])")) (td (tt "(color-button-changed COLOR-BUTTON [ARGS ...])")) (td "Fired on color button value changes"))))
(def (sig (parameter "(margined?)" (id margined?)) (parameter "(margined? MARGINED?)" (id margined?))) (p "Parameter describing whether margins are enabled for widgets by default.  Defaults to " (tt "#f") ".  Affected widgets are windows, tabs and groups.  Note that the default can be overridden by either using the widget-specific procedure or specifying a " (tt "margined?") " attribute in the SXML interface."))
(def (sig (parameter "(padded?)" (id padded?)) (parameter "(padded? PADDED?)" (id padded?))) (p "Parameter describing whether padding is enabled for widgets by default.  Defaults to " (tt "#f") ".  Affected widgets are boxes, forms and grids.  Note that the default can be overridden by either using the widget-specific procedure or specifying a " (tt "padded?") " attribute in the SXML interface."))
(def (sig (procedure "(new-window TITLE WIDTH HEIGHT [MENUBAR?])" (id new-window))) (p "Creates and returns a new window widget with " (tt "TITLE") " as title and the dimensions " (tt "WIDTH") " and " (tt "HEIGHT") ".  Note that the optional " (tt "MENUBAR?") " argument doesn't have any effect yet as menu items cannot be created yet."))
(def (sig (procedure "(window-child-set! WINDOW CONTROL)" (id window-child-set!))) (p "Sets " (tt "WINDOW") " to contain " (tt "CONTROL") " as its child."))
(def (sig (procedure "(window-margined?-set! WINDOW MARGINED?)" (id window-margined?-set!))) (p "Enables or disables margins for " (tt "WINDOW") ", depending on whether " (tt "MARGINED?") " is " (tt "#t") " or " (tt "#f") "."))
(def (sig (procedure "(new-button TEXT)" (id new-button))) (p "Creates and returns a new button widget with " (tt "TEXT") " as label."))
(def (sig (procedure "(button-text BUTTON)" (id button-text)) (procedure "(button-text-set! BUTTON TEXT)" (id button-text-set!)) (setter "(set! (button-text BUTTON) TEXT)" (id set!))) (p "Retrieves or sets the text of " (tt "BUTTON") "."))
(def (sig (procedure "(new-horizontal-box)" (id new-horizontal-box))) (p "Creates and returns a new horizontal box widget."))
(def (sig (procedure "(new-vertical-box)" (id new-vertical-box))) (p "Creates and returns a new vertical box widget."))
(def (sig (procedure "(box-append! BOX CONTROL [STRETCHY?])" (id box-append!))) (p "Appends " (tt "CONTROL") " to " (tt "BOX") ".  If " (tt "STRETCHY?") " is " (tt "#t") ", the appended control will expand as much as possible instead of adhering to its natural size."))
(def (sig (procedure "(box-padded?-set! BOX PADDED?)" (id box-padded?-set!))) (p "Enables or disables padding for " (tt "BOX") ", depending on whether " (tt "PADDED?") " is " (tt "#t") " or " (tt "#f") "."))
(def (sig (procedure "(new-checkbox TEXT)" (id new-checkbox))) (p "Creates and returns a new checkbox widget with " (tt "TEXT") " as label."))
(def (sig (procedure "(new-entry)" (id new-entry))) (p "Creates and returns a new entry widget."))
(def (sig (procedure "(new-password-entry)" (id new-password-entry))) (p "Creates and returns a new password entry widget."))
(def (sig (procedure "(new-search-entry)" (id new-search-entry))) (p "Creates and returns a new search entry widget."))
(def (sig (procedure "(entry-text ENTRY)" (id entry-text)) (procedure "(entry-text-set! ENTRY TEXT)" (id entry-text-set!)) (setter "(set! (entry-text ENTRY) TEXT)" (id set!))) (p "Retrieves or sets the text of " (tt "ENTRY") "."))
(def (sig (procedure "(entry-read-only?-set! ENTRY READ-ONLY?)" (id entry-read-only?-set!))) (p "Enables or disables the read-only state of " (tt "ENTRY") ", depending on whether " (tt "READ-ONLY?") " is " (tt "#t") " or " (tt "#f") "."))
(def (sig (procedure "(new-label TEXT)" (id new-label))) (p "Creates and returns a new label widget with " (tt "TEXT") " as label."))
(def (sig (procedure "(new-tab)" (id new-tab))) (p "Creates and returns a new tab widget."))
(def (sig (procedure "(tab-append! TAB TEXT CONTROL)" (id tab-append!))) (p "Appends " (tt "CONTROL") " as tab page to " (tt "TAB") " with " (tt "TEXT") " as label."))
(def (sig (procedure "(tab-pages-length TAB)" (id tab-pages-length))) (p "Returns the number of tab pages for " (tt "TAB") "."))
(def (sig (procedure "(tab-margined?-set! TAB INDEX MARGINED?)" (id tab-margined?-set!))) (p "Enables or disables margins for the tab page at " (tt "INDEX") " on " (tt "TAB") ", depending on whether " (tt "MARGINED?") " is " (tt "#t") " or " (tt "#f") "."))
(def (sig (procedure "(new-group TEXT)" (id new-group))) (p "Creates and returns a new group widget with " (tt "TEXT") " as label."))
(def (sig (procedure "(group-child-set! GROUP CONTROL)" (id group-child-set!))) (p "Sets " (tt "GROUP") " to contain " (tt "CONTROL") " as its child."))
(def (sig (procedure "(group-margined?-set! GROUP MARGINED?)" (id group-margined?-set!))) (p "Enables or disables margins for " (tt "GROUP") ", depending on whether " (tt "MARGINED?") " is " (tt "#t") " or " (tt "#f") "."))
(def (sig (procedure "(new-spinbox MIN MAX)" (id new-spinbox))) (p "Creates and returns a new spinbox widget with " (tt "MIN") " and " (tt "MAX") " as input boundaries."))
(def (sig (procedure "(spinbox-value SPINBOX)" (id spinbox-value)) (procedure "(spinbox-value-set! SPINBOX VALUE)" (id spinbox-value-set!)) (setter "(set! (spinbox-value SPINBOX) VALUE)" (id set!))) (p "Retrieves or sets the value of " (tt "SPINBOX") "."))
(def (sig (procedure "(new-slider MIN MAX)" (id new-slider))) (p "Creates and returns a slider widget with " (tt "MIN") " and " (tt "MAX") " as input boundaries."))
(def (sig (procedure "(slider-value SLIDER)" (id slider-value)) (procedure "(slider-value-set! SLIDER VALUE)" (id slider-value-set!)) (setter "(set! (slider-value SLIDER) VALUE)" (id set!))) (p "Retrieves or sets the value of " (tt "SLIDER") "."))
(def (sig (procedure "(new-progress-bar)" (id new-progress-bar))) (p "Creates and returns a new progress bar widget.  The input boundaries are 0 and 100.  Note that the value -1 is interpreted specially and will result in a pulsating progress bar."))
(def (sig (procedure "(progress-bar-value PROGRESS-BAR)" (id progress-bar-value)) (procedure "(progress-bar-value-set! PROGRESS-BAR VALUE)" (id progress-bar-value-set!)) (setter "(set! (progress-bar-value PROGRESS-BAR) VALUE)" (id set!))) (p "Retrieves or sets the value of " (tt "PROGRESS-BAR") "."))
(def (sig (procedure "(new-horizontal-separator)" (id new-horizontal-separator))) (p "Creates and returns a new horizontal separator widget."))
(def (sig (procedure "(new-vertical-separator)" (id new-vertical-separator))) (p "Creates and returns a new vertical separator widget."))
(def (sig (procedure "(new-combobox)" (id new-combobox))) (p "Creates and returns a new combobox widget."))
(def (sig (procedure "(combobox-append! COMBOBOX TEXT)" (id combobox-append!))) (p "Appends a combobox item containing " (tt "TEXT") " to " (tt "COMBOBOX") "."))
(def (sig (procedure "(new-editable-combobox)" (id new-editable-combobox))) (p "Creates and returns a new editable combobox widget."))
(def (sig (procedure "(editable-combobox-append! EDITABLE-COMBOBOX TEXT)" (id editable-combobox-append!))) (p "Appends an editable combobox item containing " (tt "TEXT") " to " (tt "EDITABLE-COMBOBOX") "."))
(def (sig (procedure "(new-radio-buttons)" (id new-radio-buttons))) (p "Creates and returns a new radio buttons widget."))
(def (sig (procedure "(radio-buttons-append! RADIO-BUTTONS TEXT)" (id radio-buttons-append!))) (p "Appends an radio button item containing " (tt "TEXT") " to " (tt "RADIO-BUTTONS") "."))
(def (sig (procedure "(new-date-time-picker)" (id new-date-time-picker))) (p "Creates and returns a new date time picker widget."))
(def (sig (procedure "(new-date-picker)" (id new-date-picker))) (p "Creates and returns a new date picker widget."))
(def (sig (procedure "(new-time-picker)" (id new-time-picker))) (p "Creates and returns a new time picker widget."))
(def (sig (procedure "(new-multiline-entry)" (id new-multiline-entry))) (p "Creates and returns a new multiline entry widget."))
(def (sig (procedure "(new-non-wrapping-multiline-entry)" (id new-non-wrapping-multiline-entry))) (p "Creates and returns a new non-wrapping multiline entry widget."))
(def (sig (procedure "(multiline-entry-append! MULTILINE-ENTRY TEXT)" (id multiline-entry-append!))) (p "Appends " (tt "TEXT") " to the contents of " (tt "MULTILINE-ENTRY") "."))
(def (sig (procedure "(multiline-entry-read-only?-set! MULTILINE-ENTRY READ-ONLY?)" (id multiline-entry-read-only?-set!))) (p "Enables or disables the read-only state of " (tt "MULTILINE-ENTRY") ", depending on whether " (tt "READ-ONLY?") " is " (tt "#t") " or " (tt "#f") "."))
(def (sig (procedure "(new-area AREA-HANDLER)" (id new-area))) (p "Creates and returns a new area widget.  " (tt "AREA-HANDLER") " is a record as returned by " (tt "new-area-handler") "."))
(def (sig (procedure "(area-queue-redraw-all! AREA)" (id area-queue-redraw-all!))) (p "Triggers the " (tt "AREA") " widget to redraw itself with its drawing handler as soon as possible."))
(def (sig (procedure "(new-area-handler DRAW-HANDLER MOUSE-EVENT-HANDLER MOUSE-CROSSED-HANDLER DRAG-BROKEN-HANDLER KEY-EVENT-HANDLER)" (id new-area-handler))) (p "Creates a handler suitable for creating an area widget.  The arguments to this procedure are procedures with the following signatures:") (dl (dt "(draw-handler AREA-HANDLER AREA DRAW-PARAMS)") (dd "Run when the area widget is redrawn.  " (tt "DRAW-PARAMS") " contains the current drawing parameters.") (dt "(mouse-event-handler AREA-HANDLER AREA MOUSE-EVENT)") (dd "Run on mouse events with " (tt "MOUSE-EVENT") " as argument.") (dt "(mouse-crossed-handler AREA-HANDLER AREA LEFT?)") (dd "Run when the mouse enters or leaves the area widget.  " (tt "LEFT?") " is " (tt "#t") " if the mouse left it, otherwise " (tt "#f") ".") (dt "(drag-broken-handler AREA-HANDLER AREA)") (dd "Run when dragging has been cancelled by the system.") (dt "(key-event-handler AREA-HANDLER AREA KEY-EVENT)") (dd "Run on key events with " (tt "KEY-EVENT") " as argument.")))
(def (sig (procedure "(mouse-event-x MOUSE-EVENT)" (id mouse-event-x))) (p "Retrieves the x component of " (tt "MOUSE-EVENT") " as emitted by a mouse event handler."))
(def (sig (procedure "(mouse-event-y MOUSE-EVENT)" (id mouse-event-y))) (p "Retrieves the y component of " (tt "MOUSE-EVENT") " as emitted by a mouse event handler."))
(def (sig (procedure "(mouse-event-area-width MOUSE-EVENT)" (id mouse-event-area-width))) (p "Retrieves the area width of " (tt "MOUSE-EVENT") " as emitted by a mouse event handler."))
(def (sig (procedure "(mouse-event-area-height MOUSE-EVENT)" (id mouse-event-area-height))) (p "Retrieves the area height of " (tt "MOUSE-EVENT") " as emitted by a mouse event handler."))
(def (sig (procedure "(draw-params-context DRAW-PARAMS)" (id draw-params-context))) (p "Retrieves the context of " (tt "DRAW-PARAMS") " as emitted by a draw handler."))
(def (sig (procedure "(draw-params-area-width DRAW-PARAMS)" (id draw-params-area-width))) (p "Retrieves the area width of " (tt "DRAW-PARAMS") " as emitted by a draw handler."))
(def (sig (procedure "(draw-params-area-height DRAW-PARAMS)" (id draw-params-area-height))) (p "Retrieves the area height of " (tt "DRAW-PARAMS") " as emitted by a draw handler."))
(def (sig (procedure "(new-font-button)" (id new-font-button))) (p "Creates and returns a new font button widget."))
(def (sig (procedure "(new-color-button)" (id new-color-button))) (p "Creates and returns a new color button widget."))
(def (sig (procedure "(color-button-color COLOR-BUTTON)" (id color-button-color)) (procedure "(color-button-color-set! COLOR-BUTTON R G B A)" (id color-button-color-set!)) (setter "(set! (color-button-color COLOR-BUTTON) R G B A)" (id set!))) (p "Retrieves or sets the color of " (tt "COLOR-BUTTON") ".  Its value is a list of the red, green, blue and alpha components as flonums between 0 and 1."))
(def (sig (procedure "(new-form)" (id new-form))) (p "Creates and returns a new form widget."))
(def (sig (procedure "(form-append! FORM TEXT CONTROL [STRETCHY?])" (id form-append!))) (p "Appends " (tt "CONTROL") " to " (tt "FORM") " with " (tt "TEXT") " as label.  If " (tt "STRETCHY?") " is " (tt "#t") ", the appended control will expand as much as possible instead of adhering to its natural size."))
(def (sig (procedure "(form-padded?-set! FORM PADDED?)" (id form-padded?-set!))) (p "Enables or disables padding for " (tt "FORM") ", depending on whether " (tt "PADDED?") " is " (tt "#t") " or " (tt "#f") "."))
(def (sig (procedure "(new-grid)" (id new-grid))) (p "Creates and returns a new grid widget."))
(def (sig (procedure "(grid-append! GRID CONTROL LEFT TOP [XSPAN YSPAN HEXPAND HALIGN VEXPAND VALIGN])" (id grid-append!))) (p "Appends " (tt "CONTROL") " to " (tt "GRID") ".  " (tt "LEFT") " and " (tt "TOP") " are integer positions in the grid with 0 and 0 referring to the upper left corner.  " (tt "XSPAN") " and " (tt "YSPAN") " control over how many cells the appended control will span and default to 1.  If " (tt "HEXPAND") " or " (tt "HALIGN") " is " (tt "#t") ", the control will expand to the entire cell size instead of its natural size.  " (tt "HALIGN") " and " (tt "VALIGN") " control the alignment and must be one of " (tt "(fill start center end)") ", with " (tt "fill") " being the default.  See " (link "https://developer.gnome.org/gtk3/unstable/ch30s02.html" "the GTK3 documentation") " for further details."))
(def (sig (procedure "(grid-padded?-set! GRID PADDED?)" (id grid-padded?-set!))) (p "Enables or disables padding for " (tt "GRID") ", depending on whether " (tt "PADDED?") " is " (tt "#t") " or " (tt "#f") "."))
(def (sig (procedure "(->control WIDGET)" (id ->control))) (p "Casts " (tt "WIDGET") " to a control record.  Used in procedures accepting controls."))
(def (sig (procedure "(control-destroy! CONTROL)" (id control-destroy!))) (p "Destroys " (tt "CONTROL") " and frees its resources."))
(def (sig (procedure "(control-show! CONTROL)" (id control-show!))) (p "Displays " (tt "CONTROL") "."))
(def (sig (procedure "(open-file PARENT)" (id open-file))) (p "Opens an \"Open File\" dialog.  " (tt "PARENT") " is the widget the dialog belongs to, typically the main window."))
(def (sig (procedure "(save-file PARENT)" (id save-file))) (p "Opens an \"Save File\" dialog.  " (tt "PARENT") " is the widget the dialog belongs to, typically the main window."))
(def (sig (procedure "(message-box PARENT TITLE DESCRIPTION)" (id message-box))) (p "Opens a message box dialog with " (tt "TITLE") " and " (tt "DESCRIPTION") " as labels.  " (tt "PARENT") " is the widget the dialog belongs to, typically the main window."))
(def (sig (procedure "(message-box-error PARENT TITLE DESCRIPTION)" (id message-box-error))) (p "Opens a message box error dialog with " (tt "TITLE") " and " (tt "DESCRIPTION") " as labels.  " (tt "PARENT") " is the widget the dialog belongs to, typically the main window."))
(def (sig (procedure "(widgets SXML)" (id widgets))) (p "Creates widgets as specified by " (tt "SXML") ".  Returns the created root widget of " (tt "SXML") ".  The tag name is equal to the widget type, the attributes are mapped to widget-specific procedure calls mutating these and the children are added to the widget if possible.  Refer to the individual widget creation and setter procedures to know which attributes are mandatory and which are optional.") (p "The following definition list describes the allowed attributes of all widgets not accepting children:") (dl (dt "button") (dd (tt "(text)")) (dt "font-button") (dd "None") (dt "color-button") (dd (tt "(color)")) (dt "checkbox") (dd (tt "(text)")) (dt "entry, password-entry, search-entry") (dd (tt "(text read-only?)")) (dt "multiline-entry, non-wrapping-multiline-entry") (dd (tt "(read-only?)")) (dt "label") (dd (tt "(text)")) (dt "spinbox, slider") (dd (tt "(min max value)")) (dt "progress-bar") (dd (tt "(value)")) (dt "horizontal-separator, vertical-separator") (dd "None") (dt "date-picker, time-picker, date-time-picker") (dd "None")) (p "The remaining widgets can contain a child or children.") (dl (dt "window") (dd (tt "(title width height menubar? margined?)")) (dt "window child") (dd "None") (dt "combobox, editable-combobox, radio-buttons") (dd "None") (dt "combobox, editable-combobox, radio-buttons children") (dd "Must be strings") (dt "hbox, vbox") (dd (tt "(padded?)")) (dt "hbox, vbox children") (dd (tt "(stretchy?)")) (dt "tab") (dd "None") (dt "tab children") (dd (tt "(text margined?)")) (dt "group") (dd (tt "(text margined?)")) (dt "group child") (dd "None") (dt "form") (dd (tt "(padded?)")) (dt "form children") (dd (tt "(text stretchy?)")) (dt "grid") (dd (tt "(padded?)")) (dt "grid children") (dd (tt "(left top xspan yspan hexpand halign vexpand valign)"))) (p "Additionally to that, one can use handler symbols as described in the documentation of " (tt "handler-set!") " and a procedure to add a handler and the special " (tt "id") " attribute on any widget to look it up with the " (tt "widget-by-id") " procedure."))
(def (sig (procedure "(widget-by-id ID)" (id widget-by-id))) (p "Returns a widget that has been previously defined with the " (tt "widgets") " procedure and an " (tt "id") " attribute equal to " (tt "ID") " or " (tt "#f") " if it couldn't be found."))
(def (sig (procedure "(new-solid-brush R G B A)" (id new-solid-brush))) (p "Creates a new solid brush from the color components " (tt "R") ", " (tt "G") ", " (tt "B") " and " (tt "A") ".  Each component must be a flonum between 0 and 1."))
(def (sig (procedure "(brush-r BRUSH)" (id brush-r)) (procedure "(brush-r-set! BRUSH R)" (id brush-r-set!)) (setter "(set! (brush-r BRUSH) R)" (id set!))) (p "Retrieves or sets the red component of " (tt "BRUSH") "."))
(def (sig (procedure "(brush-g BRUSH)" (id brush-g)) (procedure "(brush-g-set! BRUSH G)" (id brush-g-set!)) (setter "(set! (brush-g BRUSH) G)" (id set!))) (p "Retrieves or sets the green component of " (tt "BRUSH") "."))
(def (sig (procedure "(brush-b BRUSH)" (id brush-b)) (procedure "(brush-b-set! BRUSH B)" (id brush-b-set!)) (setter "(set! (brush-b BRUSH) B)" (id set!))) (p "Retrieves or sets the blue component of " (tt "BRUSH") "."))
(def (sig (procedure "(brush-a BRUSH)" (id brush-a)) (procedure "(brush-a-set! BRUSH A)" (id brush-a-set!)) (setter "(set! (brush-a BRUSH) A)" (id set!))) (p "Retrieves or sets the alpha component of " (tt "BRUSH") "."))
(def (sig (procedure "(new-stroke-params #!key (cap: 'flat) (join: 'miter) (thickness: 2) (miter-limit: 10) (dashes: '()) (offset: 0))" (id new-stroke-params))) (p "Creates new stroke parameters for use with " (tt "stroke!") ".  " (tt "cap") " describes the shape of line ends and must be one of " (tt "(flat round square)") ", " (tt "join") " the join style used between path segments and must be one of " (tt "(miter round bevel)") ".  " (tt "thickness") " is the line thickness, " (tt "miter-limit") " a treshold for deciding whether to use bevel or miter joins for the miter join type.  See " (link "https://www.cairographics.org/manual/cairo-cairo-t.html" "the Cairo documentation") " for further information.  Note that dashes are currently unimplemented, therefore the " (tt "dashes") " and " (tt "offset") " keywords have no effect."))
(def (sig (procedure "(new-matrix)" (id new-matrix))) (p "Creates and returns a new matrix."))
(def (sig (procedure "(matrix-identity-set! MATRIX)" (id matrix-identity-set!))) (p "Sets " (tt "MATRIX") " to the identity matrix."))
(def (sig (procedure "(matrix-translate! MATRIX X Y)" (id matrix-translate!))) (p "Translates " (tt "MATRIX") " by " (tt "X") " and " (tt "Y") "."))
(def (sig (procedure "(transform! CONTEXT MATRIX)" (id transform!))) (p "Applies " (tt "MATRIX") " to " (tt "CONTEXT") ".  In other words, after this operation all drawing operations on " (tt "CONTEXT") " will be transformed as specified by " (tt "MATRIX") "."))
(def (sig (procedure "(new-path [ALTERNATE?])" (id new-path))) (p "Creates and returns a new path.  If " (tt "ALTERNATE?") " is " (tt "#t") ", filling depends on the number of path intersections, otherwise on the path's winding."))
(def (sig (procedure "(path-free! PATH)" (id path-free!))) (p "Release the resources associated with " (tt "PATH") ".  This doesn't need to be called after having dealt with " (tt "PATH") " as it is run by a finalizer, but can help reducing GC pressure."))
(def (sig (procedure "(path-new-figure! PATH X Y)" (id path-new-figure!))) (p "Starts a new figure to draw at " (tt "X") " and " (tt "Y") " for " (tt "PATH") "."))
(def (sig (procedure "(path-new-figure-with-arc! PATH XCENTER YCENTER RADIUS START-ANGLE SWEEP [NEGATIVE?])" (id path-new-figure-with-arc!))) (p "Starts a new figure that starts with an arc segment at " (tt "XCENTER") " and " (tt "YCENTER") " with " (tt "RADIUS") " for " (tt "PATH") ".  " (tt "START-ANGLE") " and " (tt "SWEEP") " describe what angle to start from and the angular length of the arc in radians.  If " (tt "NEGATIVE?") " is " (tt "#t") ", the arc will be drawn counter-clockwise, otherwise clockwise.  Note that this is commonly used to draw circles."))
(def (sig (procedure "(path-line-to! PATH X Y)" (id path-line-to!))) (p "Adds a line to the current figure of " (tt "PATH") " ending at " (tt "X") " and " (tt "Y") "."))
(def (sig (procedure "(path-close-figure! PATH)" (id path-close-figure!))) (p "Closes the current figure of " (tt "PATH") "."))
(def (sig (procedure "(path-add-rectangle! PATH X Y WIDTH HEIGHT)" (id path-add-rectangle!))) (p "Creates a new rectangle figure on " (tt "PATH") " at " (tt "X") " and " (tt "Y") " with the dimensions " (tt "WIDTH") " and " (tt "HEIGHT") "."))
(def (sig (procedure "(path-end! PATH)" (id path-end!))) (p "Ends " (tt "PATH") " and inhibits adding any further figures or changes to them."))
(def (sig (procedure "(stroke! CONTEXT PATH BRUSH STROKE-PARAMS)" (id stroke!))) (p "Strokes " (tt "PATH") " on " (tt "CONTEXT") " with " (tt "BRUSH") " and " (tt "STROKE-PARAMS") "."))
(def (sig (procedure "(fill! CONTEXT PATH BRUSH)" (id fill!))) (p "Fills " (tt "PATH") " on " (tt "CONTEXT") " with " (tt "BRUSH") "."))
