GuiDesigner Convenience Functions

convenience functions
In addition to a complete set of GUI development functions, GuiDesigner contains a small set of convenience functions that:

  create and operate modal windows with minimal code
  provide simplified GUI development methods for non-modal windows

The GuiDesigner convenience functions are :

  XuiMessage ( message$ )
  XuiDialog ( message$, default$, @kid, @reply$ )
  XuiGetResponse ( gridType$, title$, message$, grid$, @v0, @v1, @kid, @reply$ )
  XuiGetReply ( grid, title$, message$, grids$, @v0, @v1, @kid, @reply$ )

  XuiCreateWindow ( @grid, gridType$, x, y, width, height, winType, display$ )
  XuiSendStringMessage ( grid, message$, v0, v1, v2, v3, kid, r1 )
  XuiQueueCallbacks ( grid, message, v0, v1, v2, v3, kid, r1 )
  XuiGetNextCallback ( @grid, @message$, @v0, @v1, @v2, @v3, @kid, @r1$ )

simple input / output
The two simplest modal convenience functions are essentially one-liner GUI equivalents of the PRINT statement and the INLINE$() intrinsic.

To display text:

  PRINT "Hello Programmer" ' console I/O
  XuiMessage (@"Hello Programmer") ' GUI equivalent

To display a prompt and input text:

  reply$ = INLINE$ ("Input Your Name : ") ' console I/O
  XuiDialog (@"Input Your Name", "", @kid, @reply$) ' GUI equivalent

The final one-liner modal convenience function, XuiGetResponse() , will build and operate a modal window around any grid type.

sophisticated GUI programs
Add the other functions and you can create sophisticated GUI programs with any mix of modal and non-modal windows - with only 8 functions!

With the GuiDesigner convenience functions, you can develop programs with GUIs without designing your own windows.  That's because the convenience functions will build a window around any grid type, whether from the standard toolkit, an accessory grid library, or any library your program IMPORTs.

The modal convenience functions will also build windows around grids defined by grid functions in your program. Those are windows you design interactively and have GuiDesigner convert to functions.

Convenience function based GUI programs have few limitations, so you can develop capable GUI programs with nothing but convenience functions.  The programs in the second part of this manual, plus sample programs aquick.x and aeditors.x are programs created with only convenience functions.