home *** CD-ROM | disk | FTP | other *** search
/ Point Programming 1 / PPROG1.ISO / c / actlib11 / tvtools / tvtools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-02  |  4.4 KB  |  204 lines

  1. /*  Copyright (C) 1993   Marc Stern  (internet: stern@mble.philips.be)  */
  2.  
  3. /***
  4.     Module      :   TVTOOLS
  5.  
  6.     Description :   Various tools and addings for TV
  7.  
  8.  ***/
  9.  
  10.  
  11. #ifndef __TVTOOLS_H_
  12. #define __TVTOOLS_H_
  13.  
  14. #pragma option -Vo-
  15. #if defined( __BCOPT__ )
  16. #pragma option -po-
  17. #endif
  18.  
  19. #define Uses_TButton
  20. #define Uses_TKeys
  21. #define Uses_TWindow
  22. #define Uses_TStreamableClass
  23.  
  24. #if defined(Uses_All)
  25. #define Uses_TOutErr
  26. #define Uses_TAsciiChart
  27. #define Uses_TCalendar
  28. #define Uses_TCalculator
  29. #define Uses_TClockView
  30. #define Uses_TGenCollection
  31. #define Uses_THeapView
  32. #define Uses_TInputHexa
  33. #define Uses_TInputKey
  34. #define Uses_TInputPasswd
  35. #define Uses_TInputInt
  36. #define Uses_TInputLong
  37. #define Uses_TInputDouble
  38. #define Uses_TInputDate
  39. #define Uses_TInputCalcul
  40. #define Uses_TFileView 
  41. #define Uses_TStaticInputLine
  42. #define Uses_TCombobox
  43. #define Uses_Event
  44. #define Uses_TStaticTextf
  45. #endif
  46.  
  47. #if defined(Uses_TOutErr)
  48. #define Uses_TApplication
  49. #endif
  50.  
  51. #if defined(Uses_TAsciiChart) || \
  52.     defined(Uses_TCalendar  ) || \
  53.     defined(Uses_TCalculator)
  54. #define Uses_TView
  55. #define Uses_TDialog
  56. #endif
  57.  
  58. #if defined(Uses_TClockView ) || \
  59.     defined(Uses_THeapView  )
  60. #define Uses_TView
  61. #define Uses_TRect
  62. #endif
  63.  
  64. #if defined(Uses_TComboBox)
  65. #define Uses_TEvent
  66. #define Uses_TInputLine
  67. #define Uses_TListViewer
  68. #define Uses_TPalette
  69. #define Uses_TScrollBar
  70. #define Uses_TWindow
  71. #define Uses_TGenCollection
  72. #endif
  73.  
  74. #if defined(Uses_TInputKey   ) || \
  75.     defined(Uses_TInputPasswd) || \
  76.     defined(Uses_TInputRegExp) || \
  77.     defined(Uses_TInputInt   ) || \
  78.     defined(Uses_TInputLong  ) || \
  79.     defined(Uses_TInputDouble) || \
  80.     defined(Uses_TInputHexa  ) || \
  81.     defined(Uses_TInputDate  ) || \
  82.     defined(Uses_TInputCalcul) || \
  83.     defined(Uses_TStaticInputLine)
  84. #define Uses_TInputLine
  85. #define Uses_TRect
  86. #define Uses_pstream
  87. #define __INPUT_INC
  88. #endif
  89.  
  90. #if defined(Uses_TInputInt   ) || \
  91.     defined(Uses_TInputLong  ) || \
  92.     defined(Uses_TInputDouble) || \
  93.     defined(Uses_TInputHexa  ) || \
  94.     defined(Uses_TInputDate  ) || \
  95.     defined(Uses_TInputCalcul)
  96. #define Uses_TInputRegExp
  97. #endif
  98.  
  99. #if defined(Uses_TStaticInputLine)
  100. #define Uses_TGenCollection
  101. #endif
  102.  
  103. #if defined(Uses_TGenCollection)
  104. #define Uses_TStringCollection
  105. #endif
  106.  
  107. #if defined(Uses_TStaticTextf)
  108. #define Uses_TStaticText
  109. #endif
  110.  
  111. #include <tv.h>
  112.  
  113. #include <string.h>
  114.  
  115. #if defined(Uses_TOutErr)
  116. #include "touterr.h"
  117. #endif
  118.  
  119. #if defined(Uses_TAsciiChart)
  120. #include "ascii.h"
  121. #endif
  122.  
  123. #if defined(Uses_TCalculator)
  124. #include "calcul.h"
  125. #endif
  126.  
  127. #if defined(Uses_TCalendar)
  128. #include "calendar.h"
  129. #endif
  130.  
  131. #if defined(Uses_TClockView)
  132. #include "clock.h"
  133. #endif
  134.  
  135. #if defined(Uses_TGenCollection)
  136. #include "gencoll.h"
  137. #endif
  138.  
  139. #if defined(__INPUT_INC)
  140. #include "input.h"
  141. #endif
  142.  
  143. #if defined(Uses_TComboBox)
  144. #include "combobox.h"
  145. #endif
  146.  
  147. #if defined(Uses_THeapView)
  148. #include "heap.h"
  149. #endif
  150.  
  151. #if defined(Uses_TFileView)
  152. #include "fileview.h"
  153. #endif
  154.  
  155. #if defined(Uses_TMenuItem)  || \
  156.     defined(Uses_TSItem)     || \
  157.     defined(Uses_TSubMenu)   || \
  158.     defined(Uses_TStatusDef) || \
  159.     defined(Uses_TStatusItem)
  160. #include "menu.h"
  161. #endif
  162.  
  163. #if defined(Uses_TStaticTextf)
  164. #include "textf.h"
  165. #endif
  166.  
  167.  
  168.  
  169. #define TInput1Line(x, y, max)   TInputLine( TRect((x),(y),(x)+(max)+2,(y)+1), (max) )
  170.  
  171. #define T1StaticText(x, y, string)     TStaticText( TRect((x),(y),(x)+strlen(string)+1,(y)+1), (string) )
  172.  
  173. #define T1Label(x, y, string, link)    TLabel( TRect((x),(y),(x)+strlen(string)+1,(y)+1), (string), (link) )
  174.  
  175.  
  176. #define putCommand( What, Cmd )     do { TEvent event; \
  177.                                          event.what = What; \
  178.                                          event.message.command = Cmd; \
  179.                                          putEvent( event ); \
  180.                                        } while (0)
  181.  
  182.  
  183. void appSystem( char *cmd );
  184.  
  185. void StatusBox( const char *message );
  186. void StatusBoxf( const char *fmt, ... );
  187. void RemoveStatusBox( void );
  188.  
  189. ushort execDialog( TWindow *d, void *data = 0 );
  190.  
  191. void TwoButtons( TWindow *, int );
  192. #define OKCancelButtons( window )     TwoButtons( window, 0 )
  193. #define YesNoButtons( window )        TwoButtons( window, 1 )
  194.  
  195. ushort formatFloppy( int floppy );
  196.  
  197.  
  198. #pragma option -Vo.
  199. #if defined( __BCOPT__ )
  200. #pragma option -po.
  201. #endif
  202.  
  203. #endif __TVTOOLS_H_
  204.