home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 August / PCWorld_2000-08_cd.bin / Software / TemaCD / xbasic / xbpro.exe / xb / xxx / property.xyz < prev    next >
Text File  |  1999-05-22  |  6KB  |  113 lines

  1. '
  2. ' property.xxx is the default name of this file
  3. ' property.xyz is the original contents of property.xxx
  4. '
  5. ' property.xxx is the name of the default property database,
  6. ' automatically loaded at startup time.  If no property.xxx
  7. ' file exists, then all grids have the nominal properties.
  8. '
  9. ' This file contains a series of one line entries of the following form.
  10. '
  11. '    program        gridtype        XuiSendMessage (gridname, message, v0, v1, v2, v3, kid, r1)
  12. '
  13. ' program    - name of the program in the PROGRAM statement
  14. ' gridtype   - name of a gridtype or * to match any gridtype
  15. ' gridname   - name of a grid or * to match any gridname
  16. ' message    - message to send to grid to modify one or more properties
  17. ' v0 to r1   - message arguments appropriate for the message
  18. '
  19. ' Programs can get and set the current property database with:
  20. '
  21. '   XuiGetPropertyDatabase (@text$[])
  22. '   XuiSetPropertyDatabase (@text$[])
  23. '
  24. ' At the very end of the create subroutine in most grid functions
  25. ' is XuiSendMessage (grid, #SetGridProperties, 0, 0, 0, 0, 0, 0).
  26. ' This ends up calling the XuiSetGridProperties() function that
  27. ' calls XuiGetGridProperties() to get those entries of the grid
  28. ' property database that apply to the specified grid.  Then it
  29. ' sets those properties of the grid, as if the same lines were
  30. ' executed in the program at that point.
  31. '
  32. ' This gives users a way to "customize" the grids in a program,
  33. ' either "individually" by grid name, or "generally" by grid type.
  34. ' Not every change is reasonable to be sure, and some may even
  35. ' cause programs to malfunction or become unreadable or unusable.
  36. ' Users should be warned of these possibilities and perhaps the
  37. ' most common reasonable entries should be put in the database
  38. ' and commented out.  Users can then simply choose which lines
  39. ' to enable by removing the ' comment character.
  40. '
  41. ' A ' character at the start of a line disables that entry.
  42. ' A line with improper form is almost always ignored.
  43. '
  44. ' An * asterisk in the "program", "gridtype", or "gridname"
  45. ' field means match with any program, gridtype, or gridname.
  46. ' An * asterisk can appear in any mix of these three fields.
  47. ' The first three entries are separated by one or more tabs,
  48. ' while commas separate the XuiSendMessage() arguments.
  49. '
  50. ' Not every property can be set, especially string and array
  51. ' properties.  #SetTextString and #SetTextArray message will
  52. ' set the TextString and TextArray properties, however, but
  53. ' the final argument in the #SetTextArray message must be a
  54. ' literal string.  The literal string is converted into a
  55. ' text array before the message is sent, so "\n" newline
  56. ' characters in the string separate elements in the array.
  57. ' Just as in normal programs, the TextString property may
  58. ' begin with "\xFF\xFF", in which case everything after the
  59. ' "\xFF\xFF" is taken as a filename to load and replace the
  60. ' contents of the literal string.
  61. '
  62. ' The program name is set by XstSetProgramName(@program$).
  63. ' All GuiDesigner programs generated by GuiDesigner have
  64. ' the following code in the InitGui() function to set the
  65. ' program name automatically.
  66. '
  67. ' program$ = PROGRAM$(0)
  68. ' XstSetProgramName (@program$)
  69. '
  70. ' xb is the name of the program development environment.
  71. '
  72. '
  73. ' The following are some (not necessarily reasonable) examples:
  74. '
  75. ' The first three lines would have the same effect, though the
  76. ' first two make sure the change applies only to the environment.
  77. ' The last example changes the color scheme of ALL XuiLabel grids
  78. ' in all programs.  In general it is best to only specify changes
  79. ' to specific grids in specific programs.
  80. '
  81. '    program        gridtype                    XuiSendMessage (gridname, message, v0, v1, v2, v3, kid, r1)
  82. '
  83. '    xb                Toolkit                        XuiSendMessage (*, #SetBorder, $$BorderNone, $$BorderNone, $$BorderNone, $$BorderNone, 0, 0)
  84. '    xb                *                                    XuiSendMessage (Toolkit, #SetBorder, $$BorderNone, $$BorderNone, $$BorderNone, $$BorderNone, 0, 0)
  85. '    *                    *                                    XuiSendMessage (Toolkit, #SetBorder, $$BorderNone, $$BorderNone, $$BorderNone, $$BorderNone, 0, 0)
  86. '    *                    *                                    XuiSendMessage (Toolkit, #SetBorder, $$BorderResize, $$BorderNone, $$BorderNone, $$BorderNone, 0, 0)
  87. '    *                    *                                    XuiSendMessage (Toolkit, #SetColor, $$Cyan, -1, -1, -1, 0, 0)
  88. '    *                    XuiLabel                    XuiSendMessage (*, #SetColor, $$BrightCyan, $$Black, $$Black, $$White, 0, 0)
  89. '    *                    XuiCheckBox                XuiSendMessage (*, #SetColor, $$BrightGreen, $$Black, $$Black, $$White, 0, 0)
  90. '    *                    XuiTextArea                XuiSendMessage (*, #SetColor, $$Cyan, $$LightGreen, $$Black, $$White, 0, 0)
  91. '    *                    XuiTextArea                XuiSendMessage (*, #SetColorExtra, $$White, -1, -1, -1, 0, 0)
  92. '    *                    XuiTextLine                XuiSendMessage (*, #SetColor, $$Blue, $$LightGreen, $$Black, $$White, 0, 0)
  93. '    *                    XuiTextLine                XuiSendMessage (*, #SetColorExtra, $$LightYellow, -1, -1, -1, 0, 0)
  94. '    myprog        XuiPushButton            XuiSendMessage (*, #SetBorder, $$BorderNone, -1, -1, -1, 0, 0)
  95. '    myprog        XuiPushButton            XuiSendMessage (TouchedButton, #SetBorder, $$BorderNone, -1, -1, -1, 0, 0)
  96. '    xb                XuiTextArea                XuiSendMessage (*, #SetFont, 0, 0, 0, 0, 0, @"Fixedsys")
  97. '    xb                XuiTextArea                XuiSendMessage (TextUpper, #SetFont, 0, 0, 0, 0, 0, @"System")
  98. '    *                    XuiTextArea                XuiSendMessage (*, #SetColor, $$Black, $$LightGreen, -1, -1, 0, 0)
  99. '    *                    XuiTextArea                XuiSendMessage (*, #SetColorExtra, $$LightYellow, $$LightCyan, -1, -1, 0, 0)
  100. '    xb                XuiToggleButton        XuiSendMessage (*, #SetFont, 260, 600, 0, 0, 0, @"Comic Sans MS")
  101. '    xb                XuiRadioButton        XuiSendMessage (*, #SetFont, 260, 600, 0, 0, 0, @"Comic Sans MS")
  102. '    xb                XuiPressButton        XuiSendMessage (*, #SetFont, 260, 600, 0, 0, 0, @"Comic Sans MS")
  103. '    xb                XuiPushButton            XuiSendMessage (*, #SetFont, 260, 600, 0, 0, 0, @"Comic Sans MS")
  104. '    xb                XuiRadioBox                XuiSendMessage (*, #SetFont, 260, 600, 0, 0, 0, @"Comic Sans MS")
  105. '    xb                XuiCheckBox                XuiSendMessage (*, #SetFont, 260, 600, 0, 0, 0, @"Comic Sans MS")
  106. '    xb                XuiLabel                    XuiSendMessage (*, #SetFont, 260, 600, 0, 0, 0, @"Comic Sans MS")
  107. '    xb                XuiLabel          XuiSendMessage (Message, #SetFont, 260, 600, 0, 0, @"Comic Sans MS")
  108. '    xb                XuiLabel                    XuiSendMessage (*, #SetColor, 0x0060C000, -1, -1, -1, 0, 0)
  109. '    xb                XuiPushButton            XuiSendMessage (*, #SetColor, 0xFFA0A000, -1, -1, -1, 0, 0)
  110. '    xb                XuiLabel                    XuiSendMessage (FileLabel, #SetColor, 0xE0604000, -1, -1, -1, 0, 0)
  111. '    xb                XuiMenu                        XuiSendMessage (*, #SetFont, 240, 400, 0, 0, 0, @"MS Sans Serif")
  112. '    xb                XuiMenu                        XuiSendMessage (*, #SetFont, 240, 400, 0, 0, 0, @"Comic Sans MS")
  113.