home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / r / ril.zip / demos / basic.ril next >
Text File  |  1992-09-08  |  1KB  |  48 lines

  1. #
  2. # The very most basic ril features presented in as few lines as possible
  3. #
  4.  
  5. #
  6. # You should have 1 (or more) Widget commands that name the application
  7. # as it will be invoked.  Note there is no * preceding the app name
  8. Widget basic {
  9.     wcChildren: main
  10. }
  11.  
  12. # The first child of the application shell, usually some sort of manager
  13. # widget.  Note that the \ is used to continue lines of a resource spec.
  14. Widget *main {
  15.     wcClassName: XmpTable
  16.     wcChildren: btn1 btn2
  17.     layout:\
  18.         btn1    0 0 1 1 ;\
  19.         btn2    1 0 1 1 ;
  20. }
  21.  
  22. # Optional Feature: use RilParent to prepend components to the name
  23. # the resources are defined for.
  24. # All Widget and Resource commands following the "push" will have
  25. # *main prepended to the name.  The corresponding "pop" removes the
  26. # last component pushed.
  27. RilParent push *main
  28. RilParent pop
  29.  
  30. # Optional Feature: Use  RilSource to include another ril source file.
  31. # This can be used in conjunction with RilParent to create multiple
  32. # different named widget heirarchies with identical structure.
  33. # In this case, load a file which specifies certain resource values
  34. # that we always use, as a common "style".
  35. RilSource "style1.ril"
  36.  
  37. # A Widget command to create a push button widget.
  38. Widget *btn1 {
  39.     wcClassName: XmPushButton
  40.     activateCallback: WcTraceCB(foo)
  41. }
  42.  
  43. # And another...
  44. Widget *btn2 {
  45.     wcClassName: XmPushButton
  46.     activateCallback: WcTraceCB(baz)
  47. }
  48.