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

  1. #ifndef _IVBDEFS_
  2.   #define _IVBDEFS_
  3.  
  4. /*******************************************************************************
  5. * FILE NAME: ivbdefs.h                                                         *
  6. *                                                                              *
  7. * DESCRIPTION:                                                                 *
  8. *   Declaration of the defines and macros for the Visual Builder.              *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM(R) VisualAge(TM) for C++                                               *
  12. *   (C) Copyright International Business Machines Corporation 1991, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *******************************************************************************/
  17. #ifndef IVB_IMPORT
  18.   #if defined(__WINDOWS__) && defined(__IMPORTLIB__)
  19.     #define IVB_IMPORT  _Import
  20.   #else
  21.     #define IVB_IMPORT
  22.   #endif
  23. #endif
  24.  
  25.  
  26. #ifndef VBINITIALIZEID
  27.   #define VBINITIALIZEID 0
  28. #endif
  29.  
  30. #ifndef VBBASEWINDOWID
  31.   #define VBBASEWINDOWID 15000
  32. #endif
  33.  
  34. #ifndef VBINFOAREATEXTOFFSET
  35.   #define VBINFOAREATEXTOFFSET 0
  36. #endif
  37.  
  38. #ifndef VBSHORTFLYTEXTOFFSET
  39.   #define VBSHORTFLYTEXTOFFSET 5000
  40. #endif
  41.  
  42. #ifndef VBLONGFLYTEXTOFFSET
  43.   #define VBLONGFLYTEXTOFFSET 10000
  44. #endif
  45.  
  46. #ifndef VBPOINT
  47. #define VBPOINT( pmX , pmY , winX , winY )\
  48.   ((ICoordinateSystem::applicationOrientation() == ICoordinateSystem::originLowerLeft)\
  49.      ? IPoint(pmX, pmY) : IPoint(winX, winY))
  50. #endif
  51.  
  52. #ifndef VBSTRINGRC
  53. #define VBSTRINGRC( resourceId )\
  54.   IApplication::current().userResourceLibrary().tryToLoadString( resourceId )
  55. #endif
  56.  
  57. #ifndef VBINTVALUEFROMTEXT
  58. #define VBINTVALUEFROMTEXT()\
  59.   text().asInt()
  60. #endif
  61.  
  62. #ifndef VBUNSIGNEDVALUEFROMTEXT
  63. #define VBUNSIGNEDVALUEFROMTEXT()\
  64.   text().asUnsigned()
  65. #endif
  66.  
  67. #ifndef VBDOUBLEVALUEFROMTEXT
  68. #define VBDOUBLEVALUEFROMTEXT()\
  69.   text().asDouble()
  70. #endif
  71.  
  72. #ifndef VBISDIGITSFROMTEXT
  73. #define VBISDIGITSFROMTEXT()\
  74.   text().isDigits()
  75. #endif
  76.  
  77. #ifndef VBLENGTHFROMTEXT
  78. #define VBLENGTHFROMTEXT()\
  79.   text().length()
  80. #endif
  81.  
  82. #ifndef VBSETTEXTFROMVALUE
  83. #define VBSETTEXTFROMVALUE( newValue )\
  84.   setText(IString(newValue))
  85. #endif
  86.  
  87. #ifndef VBSELECTIONTEXT
  88. #define VBSELECTIONTEXT()\
  89.   itemText(source->selection())
  90. #endif
  91.  
  92. #ifndef FOCUSTRUEID
  93.   #define FOCUSTRUEID focusId && ((Boolean)anEvent.eventData())
  94. #endif
  95.  
  96. #ifndef FOCUSFALSEID
  97.   #define FOCUSFALSEID focusId && (!((Boolean)anEvent.eventData()))
  98. #endif
  99.  
  100. #ifndef ENABLETRUEID
  101.   #define ENABLETRUEID enableId && ((Boolean)anEvent.eventData())
  102. #endif
  103.  
  104. #ifndef ENABLEFALSEID
  105.   #define ENABLEFALSEID enableId && (!((Boolean)anEvent.eventData()))
  106. #endif
  107.  
  108. #ifndef VISIBLETRUEID
  109.   #define VISIBLETRUEID visibleId && ((Boolean)anEvent.eventData())
  110. #endif
  111.  
  112. #ifndef VISIBLEFALSEID
  113.   #define VISIBLEFALSEID visibleId && (!((Boolean)anEvent.eventData()))
  114. #endif
  115.  
  116. #ifndef VALUETRUEID
  117.   #define VALUETRUEID valueId && ((Boolean)anEvent.eventData())
  118. #endif
  119.  
  120. #ifndef VALUEFALSEID
  121.   #define VALUEFALSEID valueId && (!((Boolean)anEvent.eventData()))
  122. #endif
  123.  
  124. #ifdef __OS2__
  125.   #ifndef VBXLATEMNEMONIC
  126.     #define VBXLATEMNEMONIC(string) (string)
  127.   #endif
  128. #endif
  129. #ifdef __WINDOWS__
  130.   #ifndef VBXLATEMNEMONIC
  131.     #define VBXLATEMNEMONIC(string) (IVBMnemonicString::translateMnemonic(string))
  132.   #endif
  133. #endif
  134.  
  135. #endif
  136.