home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a530 / 1.ddi / OVSMP.PAK / CHOICE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-30  |  9.4 KB  |  246 lines

  1. // Borland ObjectVision -- (C) Copyright 1991 by Borland International
  2.  
  3. // The callback functions ObjectVision passes to you will fit one of these:
  4. typedef LPSTR FAR PASCAL OVCALLBACK_GET           ( LPSTR );
  5. typedef void  FAR PASCAL OVCALLBACK_RESET         ( LPSTR );
  6. typedef void  FAR PASCAL OVCALLBACK_PUT           ( LPSTR, LPSTR );
  7. typedef int   FAR PASCAL OVCALLBACK_ISCOLUMN      ( LPSTR );
  8. typedef void  FAR PASCAL OVCALLBACK_SETCURRENTROW ( int, int );
  9. typedef int   FAR PASCAL OVCALLBACK_GETCURRENTROW ( int );
  10. typedef void  FAR PASCAL OVCALLBACK_SETLINKROW    ( int, int );
  11. typedef int   FAR PASCAL OVCALLBACK_GETLASTROW    ( int );
  12. typedef LPSTR FAR PASCAL OVCALLBACK_NEXTCOL       ( int, LPSTR );
  13. typedef LPSTR FAR PASCAL OVCALLBACK_EXECUTESTRING ( LPSTR, LPSTR, unsigned,
  14.     unsigned );
  15.  
  16. // The description of each OV callback functions follows:
  17.  
  18. /******************************************************************************
  19. *
  20. * name          DllCallBack_Get -- Fetch the value of an OV field
  21. *
  22. * description   Call this function to get the string form of an OV
  23. *               field's value.
  24. *
  25. *               The memory pointed to by the return pointer is
  26. *               deallocated when you return to OV so make yourself a
  27. *               copy if you need the value to persist.
  28. *
  29. * arg letter    x
  30. *
  31. * prototype     LPSTR FAR PASCAL _export DllCallBack_Get( LPSTR );
  32. *
  33. * arguments     1.  LPSTR lpszFieldName -- the name of the field (any case)
  34. *
  35. * return        Value of the field, or NULL if field does not exists
  36. *
  37. ******************************************************************************/
  38.  
  39. /******************************************************************************
  40. *
  41. * name          DllCallBack_Put -- Assign a value to an OV field
  42. *
  43. * description   Call this function to assign a value to an OV field.
  44. *               Truth maintenance is done (the values of dependent
  45. *               fields will change) before OV returns to you.  Automatic
  46. *               data type conversion is done, e.g., numbers and dates
  47. *               are recognized and converted to the appropriate data
  48. *               type.  If the field doesn't exists, nothing happens.
  49. *
  50. * arg letter    w
  51. *
  52. * prototype     void FAR PASCAL _export DllCallBack_Put( LPSTR, LPSTR );
  53. *
  54. * arguments     1.  LPSTR lpszFieldName -- the name of the field (any case)
  55. *               2.  LPSTR lpszValue -- the value to assign to the field
  56. *
  57. * return        None
  58. *
  59. ******************************************************************************/
  60.  
  61. /******************************************************************************
  62. *
  63. * name          DllCallBack_ResetOverride -- Reset a field's override bit
  64. *
  65. * description   Call this function to reset a field's override bit.  If
  66. *               the field doesn't exists, nothing happens.
  67. *
  68. * arg letter    v
  69. *
  70. * prototype     void FAR PASCAL _export DllCallBack_ResetOverride( LPSTR );
  71. *
  72. * arguments 1.  LPSTR lpszFieldName -- the name of the field (any case)
  73. *
  74. * return        None
  75. *
  76. ******************************************************************************/
  77.  
  78. /******************************************************************************
  79. *
  80. * name          DllCallBack_ResetCalculated -- Reset a field's calculated bit
  81. *
  82. * description   Call this function to reset a field's calculated bit.
  83. *               If the field doesn't exists, nothing happens.
  84. *
  85. * arg letter    u
  86. *
  87. * prototype     void FAR PASCAL _export DllCallBack_ResetCalculated( LPSTR );
  88. *
  89. * arguments     1.  LPSTR lpszFieldName -- the name of the field (any case)
  90. *
  91. * return        None
  92. *
  93. ******************************************************************************/
  94.  
  95. /******************************************************************************
  96. *
  97. * name          DllCallBack_ExecuteString -- Execute an OV expression
  98. *
  99. * description   Call this function to execute an OV expression.  If the
  100. *               expression is a multi-line expression, include each line
  101. *               in square brackets.  The result of a multi-line
  102. *               expression is the result of the execution of the last
  103. *               line.  If you don't care what the result is just pass a
  104. *               NULL as the place for the answer.  If you don't want
  105. *               link errors to be reported during execution of the
  106. *               expression, pass a non-zero value as
  107. *               uDisableErrorReports.
  108. *
  109. * arg letter    n
  110. *
  111. * prototype     LPSTR FAR PASCAL _export DllCallBack_ExecuteString( LPSTR,
  112. *                   LPSTR, unsigned, unsigned );
  113. *
  114. * arguments     1.  LPSTR lpszString -- the expression to execute
  115. *               2.  LPSTR lpBuf -- place for the answer, or NULL
  116. *               3.  unsigned uBufSize -- size of the answer place
  117. *               4.  unsigned uDisableErrorReports -- suppress error reporting
  118. *
  119. * return        The string form of the result.
  120. *
  121. ******************************************************************************/
  122.  
  123. /******************************************************************************
  124. *
  125. * name          DllCallBack_IsColumn -- Fetch a handle for a col's table
  126. *
  127. * description   If lpszColumnName names a column, return a handle to its
  128. *               table, otherwise return 0.  This is perhaps a little
  129. *               haphazard semantically, ie., IsColumn() suggests a
  130. *               boolean, however, I want to create as few callback
  131. *               functions as possible.  Doing it this way allows this
  132. *               method to serve both as a boolean test and as a means
  133. *               for the DLL to obtain a handle to the table that owns
  134. *               the column, for half the price.
  135. *
  136. * arg letter    r
  137. *
  138. * prototype     int  FAR PASCAL _export DllCallBack_IsColumn( LPSTR );
  139. *
  140. * arguments     1.  LPSTR lpszColumnName -- the name of the column (any
  141. *                                           case)
  142. *
  143. * return        A table's handle, or 0
  144. *
  145. ******************************************************************************/
  146.  
  147. /******************************************************************************
  148. *
  149. * name          DllCallBack_SetCurrentRow -- Set currency
  150. *
  151. * description   Given a table handle set the currency row of the table.
  152. *
  153. *               The currency row indicates the current value of the
  154. *               column.  A column has 1 and only 1 value at a time which
  155. *               is indicated by currency.  USE WITH CAUTION.
  156. *
  157. * arg letter    s
  158. *
  159. * prototype     void FAR PASCAL _export DllCallBack_SetCurrentRow( int, int );
  160. *
  161. * arguments     1.  int iHandle -- a table's handle
  162. *               2.  int iRow -- the row
  163. *
  164. * return        None
  165. *
  166. ******************************************************************************/
  167.  
  168. /******************************************************************************
  169. *
  170. * name          DllCallBack_GetCurrentRow -- Fetch a table's currency row
  171. *
  172. * description   Given a table handle return the currency row of the
  173. *               table.  A return value of 0 indicates error, ie.,
  174. *               invalid table handle.  Also, a table's currency row
  175. *               should never be 0, the first row is 1.
  176. *
  177. * arg letter    o
  178. *
  179. * prototype     int  FAR PASCAL _export DllCallBack_GetCurrentRow( int );
  180. *
  181. * arguments     1.  int iHandle -- the table's handle
  182. *
  183. * return        The currency row
  184. *
  185. ******************************************************************************/
  186.  
  187. /******************************************************************************
  188. *
  189. * name          DllCallBack_SetLinkRow -- Set a table's currency row
  190. *
  191. * description   Given a table handle set the link row of the table.
  192. *               This is a reserved callback.  DO NOT USE.
  193. *
  194. *               NOTE:  0 is a legal value.  It means the link is not
  195. *               listening.
  196. *
  197. * arg letter    t
  198. *
  199. * prototype     void FAR PASCAL _export DllCallBack_SetLinkRow( int, int );
  200. *
  201. * arguments     1.  int iHandle -- the table's handle
  202. *               2.  int iRow -- the row
  203. *
  204. * return        None
  205. *
  206. ******************************************************************************/
  207.  
  208. /******************************************************************************
  209. *
  210. * name          DllCallBack_GetLastRow -- Get the last row of the table
  211. *
  212. * description   Given a table handle get the last row of the table.
  213. *
  214. *               If the table has a data source, (ie., link), then the
  215. *               last row is the linkRow.  If there is not a data source,
  216. *               then last row is the last physical row in the table.
  217. *
  218. * arg letter    q
  219. *
  220. * prototype     int  FAR PASCAL _export DllCallBack_GetLastRow( int );
  221. *
  222. * arguments     1.  int iHandle -- the table's handle
  223. *
  224. * return        The last row
  225. *
  226. ******************************************************************************/
  227.  
  228. /******************************************************************************
  229. *
  230. * name          DllCallBack_NextCol -- Get name of next column
  231. *
  232. * description   Given a table handle and a column name return the name
  233. *               of the next column.
  234. *
  235. * arg letter    p
  236. *
  237. * prototype     LPSTR FAR PASCAL _export DllCallBack_NextCol( int, LPSTR );
  238. *
  239. * arguments     1.  int iHandle
  240. *               2.  LPSTR lpszColName
  241. *
  242. * return        Name of the next column, or NULL
  243. *
  244. ******************************************************************************/
  245.  
  246.