home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ibase.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  10.6 KB  |  310 lines

  1.  
  2.  
  3. #ifndef _IBASE_
  4. #define _IBASE_
  5. /*******************************************************************************
  6. * FILE NAME: ibase.hpp                                                         *
  7. *                                                                              *
  8. * DESCRIPTION:                                                                 *
  9. *   Declaration of the classes:                                                *
  10. *     IBase                                                                    *
  11. *                                                                              *
  12. * COPYRIGHT:                                                                   *
  13. *   IBM Open Class Library                                                     *
  14. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  15. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  16. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  17. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  18. *                                                                              *
  19. *******************************************************************************/
  20. #include <iexcbase.hpp>
  21.  
  22. #pragma pack(4)
  23.  
  24. class ostream;
  25.  
  26.  
  27.  
  28. class IString;
  29.  
  30. class IBase {
  31. public:
  32.  
  33. /*--------------------------- Boolean Definitions ----------------------------*/
  34. typedef int
  35.   Boolean;
  36.  
  37. enum BooleanConstants {
  38.   false = 0,
  39.   true  = 1
  40.   };
  41.  
  42. /*--------------------------------- Messages ---------------------------------*/
  43. static char
  44.  *messageFile    ( );
  45.  
  46. static void
  47.   setMessageFile ( const char *msgFileName );
  48.  
  49. static IMessageText
  50.   messageText    ( unsigned long messageId,
  51.                    const char*   textInsert1 = 0,
  52.                    const char*   textInsert2 = 0,
  53.                    const char*   textInsert3 = 0,
  54.                    const char*   textInsert4 = 0,
  55.                    const char*   textInsert5 = 0,
  56.                    const char*   textInsert6 = 0,
  57.                    const char*   textInsert7 = 0,
  58.                    const char*   textInsert8 = 0,
  59.                    const char*   textInsert9 = 0 );
  60.  
  61. /*------------------------------- Diagnostics --------------------------------*/
  62. friend ostream
  63.  &operator <<    ( ostream     &aStream,
  64.                    const IBase &anObject );
  65.  
  66. IString
  67.   asString       ( ) const,
  68.   asDebugInfo    ( ) const;
  69.  
  70.  
  71.  
  72. struct Version   {
  73. unsigned short
  74.   major,
  75.   minor;
  76.   };
  77.  
  78.  
  79. static Version
  80.   version        ( );
  81.  
  82. protected:
  83. /*---------------------------- Exception Severity ----------------------------*/
  84. static const IException::Severity
  85.   IC_IMPORTB unrecoverable,
  86.   IC_IMPORTB recoverable;
  87.  
  88. private:
  89. /*--------------------------------- Private ----------------------------------*/
  90. static char
  91.  *msgFile;
  92.  
  93.  
  94.  
  95. }; // IBase
  96.  
  97.  
  98.  
  99.  
  100. /*-------------------------- Static Object Priority --------------------------*/
  101. #define IBASE_PRIORITY -2147483647 - 1 + 1024
  102.  
  103. // with NLS (wide char) support
  104. #define IC_NLS
  105.  
  106. // has restartable version
  107. #define IC_HAS_RESTARTABLE
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. /*----------------------------- Functions Excluded from Documentation --------*/
  115. #define IC_LIBRARYUSEONLY 1
  116.  
  117. /*----------------------------- Platform Macros ------------------------------*/
  118. #if ( !defined(IC_PM) && !defined(IC_MOTIF) && !defined(IC_WIN) )
  119.      #define IC_WIN
  120. #endif
  121.  
  122. #if defined(IC_WIN)
  123.   #define IC_PMWIN
  124.   #define IC_MOTIFWIN
  125. #endif
  126.  
  127. #if defined(IC_WIN_FLAGNOP)
  128.   #define IC_PMWIN_FLAGNOP
  129.   #define IC_MOTIFWIN_FLAGNOP
  130. #endif
  131.  
  132. /*------------------------------ Version Levels ------------------------------*/
  133. #ifdef IC_WIN
  134.   #define IC_MAJOR_VERSION 320
  135. #endif
  136.  
  137. #define IC_MINOR_VERSION 1
  138.  
  139. #define IC_OBSOLETE_1    310
  140. #define IC_OBSOLETE_2    400
  141.  
  142. /*----------------------------- Obsolete Levels ------------------------------*/
  143. #ifndef IC_OBSOLETE
  144.  #ifdef IC_WIN
  145.    #define IC_OBSOLETE  320
  146.  #endif
  147. #endif
  148.  
  149. extern "C" {
  150.  
  151. #ifdef IC_WIN
  152.  
  153. typedef void * (__stdcall
  154.   IWinProc)( void *, unsigned long, void *, void * );
  155.  
  156. #endif
  157.  
  158. #ifndef IC_WIN
  159.  
  160. typedef void * _System
  161.   IWinProc ( unsigned long, unsigned long, void *, void * );
  162.  
  163. #endif
  164. }
  165.  
  166. #ifndef IC_RUNTIME
  167.   #define IC_RUNTIME
  168. #endif
  169.  
  170. #define IC_TRACE_RUNTIME
  171.  
  172. #ifdef IC_DEVELOP
  173.   #define IC_TRACE_DEVELOP
  174. #endif
  175.  
  176. #ifdef IC_TRACE_ALL
  177.   #define IC_TRACE_DEVELOP
  178. #endif
  179.  
  180. /***********************************************************/
  181. /* The User's Guide documents the private message range as */
  182. /* 0xF000 and above.  IC_UM_BASE still defined as 0xFF00   */
  183. /* so as not to change the value of existing messages      */
  184. /* for compatability with existing applications.           */
  185. /***********************************************************/
  186. /* CCL messages are in the range (0xF000) to (0xF0BF) */
  187. #define IC_UM_BASE            ( 0xFF00 )
  188. #ifdef IC_WIN
  189. /*----------------Begin Drag and Drop Support---------------------------------*/
  190. #define DM_RENDERPREPARE          ( IC_UM_BASE + 0xB0 )
  191. #define DM_RENDERCOMPLETE         ( IC_UM_BASE + 0xB1 )
  192. #define DM_RENDER                 ( IC_UM_BASE + 0xB2 )
  193. #define DM_ENDCONVERSATION        ( IC_UM_BASE + 0xB3 )
  194. #define DM_DISCARDOBJECT          ( IC_UM_BASE + 0xB4 )
  195. #define DM_PRINTOBJECT            ( IC_UM_BASE + 0xB5 )
  196. #define DM_DRAGOVER               ( IC_UM_BASE + 0xB6 )
  197. #define DM_DROPHELP               ( IC_UM_BASE + 0xB7 )
  198. #define DM_DRAGLEAVE              ( IC_UM_BASE + 0xB8 )
  199. #define DM_DROP                   ( IC_UM_BASE + 0xB9 )
  200. #define DM_REGISTER               ( IC_UM_BASE + 0xBA )
  201. /*----------------End Drag and Drop Support-----------------------------------*/
  202. #define IC_UM_CONTEXT_HELP        ( IC_UM_BASE + 0xC7 )
  203. #define IC_UM_LN_SELECT           ( IC_UM_BASE + 0xC8 )
  204. #define IC_UM_QUERY_HELP_WINDOW   ( IC_UM_BASE + 0xC9 )
  205. #define IC_UM_REQUEST_CANVASFONT  ( IC_UM_BASE + 0xCA )
  206. #define IC_UM_LBUTTONDBLCLK       ( IC_UM_BASE + 0xCB )
  207. #define HM_HELPSUBITEM_NOT_FOUND  ( IC_UM_BASE + 0xCC )
  208. #define WM_MENUEND                ( IC_UM_BASE + 0xCD )
  209. #define IC_UM_COMMAND             ( IC_UM_BASE + 0xCE )
  210. #define IC_UM_SYSCOMMAND          ( IC_UM_BASE + 0xCF )
  211. #define WM_CONTROL                ( IC_UM_BASE + 0xD0 )
  212. #define WM_MATCHMNEMONIC          ( IC_UM_BASE + 0xD1 )
  213. #define IC_UM_QUERYFRAMECTLCOUNT  ( IC_UM_BASE + 0xD2 )
  214. #define IC_UM_FORMATFRAME         ( IC_UM_BASE + 0xD3 )
  215. #define IC_UM_UPDATEFRAME         ( IC_UM_BASE + 0xD4 )
  216. #define IC_UM_CALCFRAMERECT       ( IC_UM_BASE + 0xD5 )
  217. #define WM_QUERYFOCUSCHAIN        ( IC_UM_BASE + 0xD6 )
  218. #define IC_UM_32TO16              ( IC_UM_BASE + 0xD7 )
  219. #define WM_BUTTON1CLICK           ( IC_UM_BASE + 0xD8 )
  220. #define WM_BUTTON2CLICK           ( IC_UM_BASE + 0xD9 )
  221. #define WM_BUTTON3CLICK           ( IC_UM_BASE + 0xDA )
  222. #define WM_TRACKFRAME             ( IC_UM_BASE + 0xDB )
  223. #define IC_SBM_SETPOS_WIN32S      ( IC_UM_BASE + 0xDC )
  224. #define IC_UM_SLIDER_SCROLL       ( IC_UM_BASE + 0xDD )
  225. #define WM_BEGINDRAG              ( IC_UM_BASE + 0xDE )
  226. #define IC_UM_VSCROLL             ( IC_UM_BASE + 0xDF )
  227. #define IC_UM_QUIT                ( IC_UM_BASE + 0xE0 )
  228. #endif
  229. #define IC_UM_DRAGDROP_RENDER     ( IC_UM_BASE + 0xE1 )
  230. #define IC_UM_CANVAS_SETFOCUS     ( IC_UM_BASE + 0xE2 )
  231. #define IC_UM_CANVAS_PAINT        ( IC_UM_BASE + 0xE3 )
  232. #define IC_UM_CREATED             ( IC_UM_BASE + 0xE4 )
  233. #define IC_UM_DESTROY_MENU        ( IC_UM_BASE + 0xE5 )
  234. #define IC_UM_UNLATCH             ( IC_UM_BASE + 0xE6 )
  235. #define IC_UM_BMP_VIEW            ( IC_UM_BASE + 0xE7 )
  236. #define IC_UM_TXT_VIEW            ( IC_UM_BASE + 0xE8 )
  237. #define IC_UM_BMP_TXT_VIEW        ( IC_UM_BASE + 0xE9 )
  238. #define IC_UM_QRY_BMP_VISIBLE     ( IC_UM_BASE + 0xEA )
  239. #define IC_UM_QRY_TXT_VISIBLE     ( IC_UM_BASE + 0xEB )
  240. #define IC_UM_FLY_PAINT           ( IC_UM_BASE + 0xEC )
  241. #define IC_UM_TOOLBAR             ( IC_UM_BASE + 0xED )
  242. #define IC_UM_DRAW_DOWN           ( IC_UM_BASE + 0xEE )
  243. #define IC_UM_QRY_PREVENTUPDATE   ( IC_UM_BASE + 0xEF )
  244. #define IC_UM_WINDOWPOSCHANGED    ( IC_UM_BASE + 0xF0 )
  245. #define IC_UM_DELAYNOTIFY         ( IC_UM_BASE + 0xF1 )
  246. #define IC_UM_CLOSE               ( IC_UM_BASE + 0xF2 )
  247. #define IC_UM_BIDI_CHANGE         ( IC_UM_BASE + 0xF3 )
  248. #define IC_UM_DLG_APPLY_PRESSED   ( IC_UM_BASE + 0xF4 )
  249. #define IC_UM_MEDIA_LOADED        ( IC_UM_BASE + 0xF5 )
  250. #define IC_UM_MEDIA_UNLOADED      ( IC_UM_BASE + 0xF6 )
  251. #define IC_UM_MM_MCI_CMDNOTIFY    ( IC_UM_BASE + 0xF7 )
  252. #define IC_UM_CBN_ENTER           ( IC_UM_BASE + 0xF8 )
  253. #define IC_UM_CBN_EFCHANGE        ( IC_UM_BASE + 0xF9 )
  254. #define IC_UM_DESTROY_FRAME       ( IC_UM_BASE + 0xFA )
  255. #define IC_UM_MM_MCI_POSITIONCHANGE ( IC_UM_BASE + 0xFB )
  256. #define IC_UM_IS_AGGREGATE_CTRL   ( IC_UM_BASE + 0xFC )
  257. #define IC_UM_TCM_SIZE            ( IC_UM_BASE + 0xFD )
  258.  
  259.  
  260. #ifndef IC_ID_BASE
  261.   #define IC_ID_BASE            ( 0x7000 )
  262. #endif
  263.  
  264. #define IC_RESERVED_TIMERS         1000
  265.  
  266. /*-------------------------- Notification Delay Ids --------------------------*/
  267. #define IC_NOTDEL_SETBT_SELECT    ( IC_ID_BASE + 0xF00 )
  268. #define IC_NOTDEL_PUSHBT_SELECT   ( IC_ID_BASE + 0xF01 )
  269. #define IC_NOTDEL_EF_DATAUPD      ( IC_ID_BASE + 0xF02 )
  270. #define IC_NOTDEL_EF_LIMIT        ( IC_ID_BASE + 0xF03 )
  271. #define IC_NOTDEL_MLE_DATAUPD     ( IC_ID_BASE + 0xF04 )
  272. #define IC_NOTDEL_MLE_LIMIT       ( IC_ID_BASE + 0xF05 )
  273. #define IC_NOTDEL_SCRL_POS        ( IC_ID_BASE + 0xF06 )
  274. #define IC_NOTDEL_BOOK_COLOR      ( IC_ID_BASE + 0xF07 )
  275. #define IC_NOTDEL_TITLE_COLOR     ( IC_ID_BASE + 0xF08 )
  276. #define IC_NOTDEL_MENU_COLOR      ( IC_ID_BASE + 0xF09 )
  277. #define IC_NOTDEL_CNR_TITLE       ( IC_ID_BASE + 0xF0A )
  278. #define IC_NOTDEL_FRAME_ACTIVE    ( IC_ID_BASE + 0xF0B )
  279. #define IC_NOTDEL_WINDOW_FONT     ( IC_ID_BASE + 0xF0C )
  280.  
  281. /*------------------------------- Alias Names --------------------------------*/
  282. #define IContainerObject           ICnrObj
  283. #define IContainerControl          ICnrCtl
  284. #define IDDEClientAcknowledgeEvent IDDECAckEvt
  285. #define IDDEServerAcknowledgeEvent IDDESAckEvt
  286. #define IDDEServerConversation     IDDESConv
  287. #define IDDEServerHotLink          IDDESHotLnk
  288. #define IDDEServerHotLinkItem      IDDESHLItem
  289. #define IDDEActiveServer           IDDEActServ
  290. #define IDDEClientHotLinkEvent     IDDECHLEvt
  291. #define IDDEClosedConversation     IDDEClsConv
  292. #define IRowColumnCanvas           IRCCv
  293. #define AlignmentTag               Tag
  294. #define RowColumn                  RCol
  295.  
  296. #pragma pack()
  297.  
  298. #ifndef _ISYNONYM_
  299.   #include <isynonym.hpp>
  300. #endif
  301.  
  302. #ifndef __MULTI__
  303.  #error Error: Use of IBM Open Class Library requires the /Gm+ compiler option.
  304.  #error Check the makefile (or its profile) for a missing /Gm+ option.
  305. #endif
  306.  
  307. #endif /* _IBASE_ */
  308.  
  309.  
  310.