OptionTreeDef.h
Upload User: kairuinn
Upload Date: 2009-02-07
Package Size: 2922k
Code Size: 9k
Category:

Graph program

Development Platform:

Visual C++

  1. // COptionTree
  2. //
  3. // License
  4. // -------
  5. // This code is provided "as is" with no expressed or implied warranty.
  6. // 
  7. // You may use this code in a commercial product with or without acknowledgement.
  8. // However you may not sell this code or any modification of this code, this includes 
  9. // commercial libraries and anything else for profit.
  10. //
  11. // I would appreciate a notification of any bugs or bug fixes to help the control grow.
  12. //
  13. // History:
  14. // --------
  15. // See License.txt for full history information.
  16. //
  17. //
  18. // Copyright (c) 1999-2002 
  19. // ComputerSmarts.net 
  20. // mattrmiller@computersmarts.net
  21. #ifndef OT_TREEDEF
  22. #define OT_TREEDEF
  23. // Option Definitions
  24. // -- Settings
  25. #define OT_INFOWINDOWHEIGHT 50 // Information window height
  26. #define OT_DEFHEIGHT 21 // Default height of an item
  27. #define OT_SPACE 5 // Default horizontal spacing
  28. #define OT_EXPANDBOX 9 // Size of the expand box
  29. #define OT_CHECKBOX 14 // Size of the check box
  30. #define OT_EXPANDCOLUMN 16 // Width of the expand column
  31. #define OT_PNINDENT 16 // Child level indent
  32. #define OT_COLRNG 5 // Width of splitter
  33. #define OT_EXPANDBOXHALF (OT_EXPANDBOX / 2) // Half of expand box
  34. #define OT_DEFLABEL _T("No Item Selected") // Default label for no selected item in the info window
  35. #define OT_DEFINFO _T("Select an item to see its description.") // Default info for no selected item in the info window
  36. #define OT_RESIZEBUFFER 25 // Resize limit for right and left of client so bar doesn't become invisible
  37. #define OT_TREELIST_ID 30000 // ID of the list tree
  38. #define OT_TIMER 1000 // The ID for a timer
  39. // -- Item Settings
  40. #define OT_ITEM_STATIC 1
  41. #define OT_ITEM_CHECKBOX 2
  42. #define OT_ITEM_COLOR 3
  43. #define OT_ITEM_COMBOBOX 4
  44. #define OT_ITEM_DATE 5
  45. #define OT_ITEM_EDIT 6
  46. #define OT_ITEM_IMAGE 7
  47. #define OT_ITEM_RADIO 8
  48. #define OT_ITEM_SPINNER 9
  49. #define OT_ITEM_FONT 10
  50. #define OT_ITEM_FILE 11
  51. #define OT_ITEM_IPADDRESS 12
  52. // -- Tree Items
  53. #define OT_OPTIONS_SHOWINFOWINDOW 0x0001 // Show information window
  54. #define OT_OPTIONS_NOTIFY 0x0002 // Send parent notifications
  55. #define OT_OPTIONS_DEFINFOTEXTNOSEL 0x0004 // Show default info text for no selected item, otherwise blank
  56. #define OT_OPTIONS_SHADEEXPANDCOLUMN 0x0008 // Shade the expand column
  57. #define OT_OPTIONS_SHADEROOTITEMS 0x0010 // Shade the root items
  58. // -- Edit Items
  59. #define OT_EDIT_MLHEIGHT 75 // Multiline height
  60. // -- Combo Box Items
  61. #define OT_COMBO_DROPDOWNHEIGHT 100 // Drop down default height
  62. // -- Check Box Items
  63. #define OT_CHECKBOX_DEFCHECKTEXT _T("Checked") // Default checked text
  64. #define OT_CHECKBOX_DEFUNCHECKTEXT _T("UnChecked") // Default un checked text
  65. #define OT_CHECKBOX_SIZE 14.2 // Size of the check box
  66. // -- Radio Items
  67. #define OT_RADIO_VSPACE 2 // Vertical space between radios
  68. #define OT_RADIO_SIZE 14.2 // Size of radio
  69. // -- Spinner Items
  70. #define OT_SPINNER_WIDTH 15 // Width of the spinner button
  71. // -- Color Items
  72. #define OT_COLOR_MORECOLORS _T("More Colors...") // Text for more colors
  73. #define OT_COLOR_AUTOMATIC _T("Automatic") // Text for more automatic
  74. #define OT_COLOR_SIZE 14.2 // The size for the color square
  75. // -- Image Items
  76. #define OT_IMAGE_MARGIN 10 // The margin for the popup window
  77. #define OT_IMAGE_IMAGESPACE 10 // The space between images in the popup window
  78. #define OT_IMAGE_NOSELECTION _T("No selection made.")// Text for no selection selected
  79. #define OT_IMAGE_MAXIMAGES 100 // The maximum number of images
  80. // -- File Items
  81. #define OT_FILE_NOSELECTION _T("No selection made.")// Text for no selection selected
  82. // NOTE: The following are highly important and should not need to be changed
  83. // --------------------------------------------------------------------------
  84. // Definitions
  85. // -- Hit test
  86. #define OT_HIT_LABEL (WM_USER + 1000) // Label
  87. #define OT_HIT_COLUMN (WM_USER + 1001) // Column
  88. #define OT_HIT_EXPAND (WM_USER + 1002) // Expand
  89. #define OT_HIT_ATTRIBUTE (WM_USER + 1003) // Attribute
  90. #define OT_HIT_CLIENT (WM_USER + 1004) // Client
  91. // -- Notification to user
  92. #define OT_NOTIFY_FIRST (0U-1100U)
  93. #define OT_NOTIFY_INSERTITEM (OT_NOTIFY_FIRST - 1) // Insert item
  94. #define OT_NOTIFY_DELETEITEM (OT_NOTIFY_FIRST - 2) // Delete item
  95. #define OT_NOTIFY_DELETEALLITEMS (OT_NOTIFY_FIRST - 3) // Delete all items
  96. #define OT_NOTIFY_ITEMCHANGED (OT_NOTIFY_FIRST - 5) // Item changed
  97. #define OT_NOTIFY_ITEMBUTTONCLICK (OT_NOTIFY_FIRST - 6) // Item button click
  98. #define OT_NOTIFY_SELCHANGE (OT_NOTIFY_FIRST - 7) // Selection changed
  99. #define OT_NOTIFY_ITEMEXPANDING (OT_NOTIFY_FIRST - 8) // Item expanding
  100. #define OT_NOTIFY_COLUMNCLICK (OT_NOTIFY_FIRST - 9) // Column click
  101. #define OT_NOTIFY_PROPCLICK (OT_NOTIFY_FIRST - 10) // Property click
  102. // -- Notication to controls
  103. #define OT_NOTIFY_COMMITCHANGES WM_USER + 0x0102 // Loosing focus
  104. #define OT_NOTIFY_FORCEREDRAW WM_USER + 0x0103 // Force redraw
  105. #define OT_NOTIFY_UP WM_USER + 0x0104 // Up key pressed
  106. #define OT_NOTIFY_DOWN WM_USER + 0x0105 // Down key pressed
  107. // -- Menu Definitions
  108. #define OT_MES_UNDO _T("&Undo") // Text for undo
  109. #define OT_MES_CUT _T("Cu&t") // Text for cut
  110. #define OT_MES_COPY _T("&Copy") // Text for copy
  111. #define OT_MES_PASTE _T("&Paste") // Text for paste
  112. #define OT_MES_DELETE _T("&Delete") // Text for delete
  113. #define OT_MES_SELECTALL _T("Select &All") // Text for select all
  114. #define OT_MES_NSELECTALL WM_USER + 0x7000 // Command for select all
  115. // -- Color  Items
  116. #define OT_COLOR_SELCHANGE WM_USER + 1001 // Color picker selection change
  117. #define OT_COLOR_DROPDOWN WM_USER + 1002 // Color picker drop down
  118. #define OT_COLOR_CLOSEUP WM_USER + 1003 // Color picker close up
  119. #define OT_COLOR_SELENDOK WM_USER + 1004 // Color picker end OK
  120. #define OT_COLOR_SELENDCANCEL WM_USER + 1005 // Color picker end (cancelled)
  121. #define OT_COLOR_DEFAULTBOXVALUE -3 // Default box value
  122. #define OT_COLOR_CUSTOMBOXVALUE -2 // Custom box value
  123. #define OT_COLOR_INVALIDCOLOR -1 // Invalid color value
  124. #define OT_COLOR_MAXCOLORS 100 // Maximum number of colors
  125. // -- Image  Items
  126. #define OT_IMAGE_CLOSE WM_USER + 1001 // Image picker window close
  127. // -- Font Selection Items
  128. #define OT_FS_NOTIFY_APPLY WM_USER + 1000 // Apply notification
  129. // -- IP Address
  130. #define OT_IPADDRESS_KILLFOCUS WM_USER + 1002 // Edit is loosing focus
  131. #define OT_IPADDRESS_NEXTEDIT WM_USER + 1003 // Edit needs to change focus to next edit
  132. // Options
  133. // -- Edit Items
  134. #define OT_EDIT_MULTILINE 0x00040000L // Multiline edit
  135. #define OT_EDIT_PASSWORD 0x00000400L // Password edit
  136. #define OT_EDIT_NUMERICAL 0x00000200L // Numerical edit
  137. // -- Check Box Items
  138. #define OT_CHECKBOX_SHOWTEXT 0x00040000L // Show check text
  139. #define OT_CHECKBOX_SHOWCHECK 0x00000400L // Show check box
  140. // -- Spinner Items
  141. #define OT_EDIT_WRAPAROUND 0x00040000L // Wrap around
  142. #define OT_EDIT_USEREDIT 0x00000400L // Allow user edit
  143. // -- Color Items
  144. #define OT_COLOR_SHOWHEX 0x00040000L // Show hex instead of RGB
  145. #define OT_COLOR_LIVEUPDATE 0x00000400L // Allow  smaple to show updates
  146. // -- Image Items
  147. #define OT_IMAGE_SHOWTEXT 0x00040000L // Show text in item sample
  148. // -- Font Selection Items
  149. #define OT_FS_TTONLY 0x00040000L // True type fonts only
  150. #define OT_FS_USEDEFAULT 0x00000400L // Default button
  151. #define OT_FS_USEAPPLY 0x00000200L // Apply button
  152. #define OT_FS_USECHARFORMAT 0x00000100L // Char format
  153. #define OT_FS_CUSTOMSAMPLE 0x00000800L // Custom sample
  154. #define OT_FS_FONTNAMESAMPLE 0x00001000L // Use font name sample
  155. #define OT_FS_NOTEXTCOLOR 0x00020000L // No text color
  156. #define OT_FS_NOEFFECTS 0x00008000L // No effects
  157. #define OT_FS_NOSTYLES 0x00800000L // No styles
  158. #define OT_FS_NOFACE 0x00080000L // No face
  159. // -- File Items
  160. #define OT_FILE_SHOWFULLPATH 0x00040000L // Show full paths in sample
  161. #define OT_FILE_SHOWFILENAME 0x00000400L // Show file name in sample
  162. #define OT_FILE_SHOWFILETITLE 0x00000200L // Show file title in sample
  163. #define OT_FILE_SHOWFILEEXT 0x00000100L // Show file extention in sample
  164. #define OT_FILE_SHOWFILEDIR 0x00000800L // Show file directory in sample
  165. #define OT_FILE_SHOWFILEDRIVE 0x00001000L // Show file drive in sample
  166. #define OT_FILE_OPENDIALOG 0x00020000L // Open file dialog
  167. #define OT_FILE_SELECTDIALOG 0x00008000L // Select folder
  168. // -- Hyperlink
  169. #define OT_HL_HOVER 0x00040000L // Use hover color
  170. #define OT_HL_VISITED 0x00000400L // Use visited color
  171. #define OT_HL_UNDERLINEHOVER 0x00000200L // Underline when mouse is hover
  172. #define OT_HL_UNDERLINE 0x00000100L // Underline always
  173. #endif // !OT_TREEDEF