home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / src / simple / iodsimpl.h < prev    next >
C/C++ Source or Header  |  1997-04-02  |  6KB  |  147 lines

  1. /*====START_GENERATED_PROLOG======================================
  2.  */
  3. /*
  4.  *   COMPONENT_NAME: odsimplepart
  5.  *
  6.  *   CLASSES: none
  7.  *
  8.  *   ORIGINS: 82,27
  9.  *
  10.  *
  11.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12.  *   All Rights Reserved
  13.  *   Licensed Materials - Property of IBM
  14.  *   US Government Users Restricted Rights - Use, duplication or
  15.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16.  *       
  17.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23.  *   OR PERFORMANCE OF THIS SOFTWARE.
  24.  */
  25. /*====END_GENERATED_PROLOG========================================
  26.  */
  27. // @(#)Z 1.10 com/src/samples/simple/iodsimpl.h, odsimplepart, od96os2, odos29712d 97/03/21 17:45:33 (97/02/14 11:53:25)
  28. //====START_GENERATED_PROLOG======================================
  29. //
  30. //
  31. //       
  32. //   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  33. //   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  34. //   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  35. //   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  36. //   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  37. //   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  38. //   OR PERFORMANCE OF THIS SOFTWARE.
  39. //
  40. //====END_GENERATED_PROLOG========================================
  41.  
  42. #ifndef _SIMPLPRT_
  43. #define _SIMPLPRT_
  44.  
  45. // ----------------------------------------------------------
  46. // NLS Message constants used in SimplePart --> InstallMenus
  47. //
  48. //   The SP_MSG_SET and SPMSG_* messages must conform to what
  49. //   is shown in the XPG/4 Message catalog file IODSIMPL.MSG
  50. // ----------------------------------------------------------
  51.  
  52. #include <locale.h>
  53. #include <wchar.h>
  54. #include <iodsmple.h>                   // message catalog includes.
  55.  
  56. #define SP_MSG_CATALOG  "iodsmple.cat"  // SimplePart Messages are stored in IODSIMPL.MSG
  57.  
  58. // Default messages
  59. #define SP_DEFMSG_HELPMENU       "Simple Part help"
  60. #define SP_DEFMSG_INFOMENU       "Simple Part information"
  61. #define SP_DEFMSG_INFOTITLE      "Simple Part Information"
  62. #define SP_DEFMSG_INFO   "Simple Part Version 1.0\n\
  63. Copyright of International Business Machines Corporation 1996,1997. \
  64. All rights reserved."
  65.  
  66. // SimplePart's Menu Item IDs
  67. #define CMD_Offset                               MENUID_ACTIVEPART_USER
  68. #define kSimplePartMenuSeparator                 CMD_Offset
  69. #define kSimplePartHelpMenu                     (CMD_Offset + 1)
  70. #define kSimplePartInfoMenu                     (CMD_Offset + 2)
  71. #define CMD_Offset_Subclass                     (CMD_Offset+100)
  72.  
  73. // Help related constants
  74. #define SP_HELP_FILE     "iodsimpl.hlp"  // SimplePart help file
  75. #define SP_HELP_PANEL    100
  76.  
  77. // Constant used in drawing diagonal lines
  78. #define DELTA 32
  79.  
  80. #ifdef _PLATFORM_UNIX_
  81.  
  82. // UNIX Definition of SimplePart's large icon
  83. #define simpl32_width 32
  84. #define simpl32_height 32
  85. static char simpl32_bits[] = {
  86.    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07,
  87.    0xfc, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0x2f, 0xfc, 0xff, 0xff, 0x17,
  88.    0xfc, 0xff, 0xff, 0x2f, 0xfc, 0xff, 0xff, 0x17, 0xfc, 0xff, 0xff, 0x2f,
  89.    0xfc, 0xff, 0xff, 0x17, 0xfc, 0xff, 0xff, 0x2f, 0xfc, 0xff, 0xff, 0x17,
  90.    0xfc, 0xff, 0xff, 0x2f, 0xfc, 0xff, 0xff, 0x17, 0xfc, 0xff, 0xff, 0x2f,
  91.    0xfc, 0xff, 0xff, 0x17, 0xfc, 0xff, 0xff, 0x2f, 0xfc, 0xff, 0xff, 0x17,
  92.    0xfc, 0xff, 0xff, 0x2f, 0xfc, 0xff, 0xff, 0x17, 0xfc, 0xff, 0xff, 0x2f,
  93.    0xfc, 0xff, 0xff, 0x17, 0xfc, 0xff, 0xff, 0x2f, 0xfc, 0xff, 0xff, 0x17,
  94.    0xfc, 0xff, 0xff, 0x2f, 0xfc, 0xff, 0xff, 0x17, 0xfc, 0xff, 0xff, 0x2f,
  95.    0x50, 0x55, 0x55, 0x15, 0xa0, 0xaa, 0xaa, 0x2a, 0x50, 0x55, 0x55, 0x15,
  96.    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  97.  
  98. // UNIX Definition of SimplePart's small icon
  99. #define simpl16_width 16
  100. #define simpl16_height 16
  101. static char simpl16_bits[] = {
  102.    0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0xfc, 0x5f, 0xfc, 0x3f, 0xfc, 0x5f,
  103.    0xfc, 0x3f, 0xfc, 0x5f, 0xfc, 0x3f, 0xfc, 0x5f, 0xfc, 0x3f, 0xfc, 0x5f,
  104.    0xfc, 0x3f, 0x50, 0x55, 0xa8, 0x2a, 0x00, 0x00};
  105.  
  106. #endif // UNIX
  107.  
  108. #ifdef _PLATFORM_OS2_
  109. #include <ODos2.h>
  110. #endif
  111.  
  112. #include "ODTypes.h"       // for ODBoolean, ODRect, Rect
  113.  
  114. #ifdef _PLATFORM_OS2_
  115. typedef HPS HDraw;
  116. typedef HBITMAP HIconView;
  117. typedef HBITMAP HThumbView;
  118. typedef HMODULE HResModule;
  119.  
  120. #elif defined(_PLATFORM_WIN32_)
  121. typedef HDC HDraw;
  122. typedef HICON HIconView;
  123. typedef HBITMAP HThumbView;
  124. typedef HINSTANCE HResModule;
  125.  
  126. #elif defined(_PLATFORM_UNIX_)
  127. typedef GC HDraw;
  128. typedef int HIconView;
  129. typedef int HThumbView;
  130. typedef int HResModule;
  131. #endif
  132.  
  133. typedef struct {
  134.    ODBoolean  fIsActive;                // Does this frame have its focus set?
  135.    ODBoolean  fNeedsActivating;         // should this be activated when its window is activated?
  136.    ODBoolean  fIsPopupMenu;             // Is this a popup menu ?
  137.    ODBoolean  fIsSelected;              // Is this the selected frame?
  138.    void*      pOther;                   // reserved for subclass use
  139. } PartInfoRec;
  140.  
  141. class ODFrame;
  142. class ODTransform;
  143.  
  144. typedef enum {SmallIconView, LargeIconView, ThumbnailView, FrameView} ViewTypeEnum;
  145.  
  146. #endif // _SIMPLPRT_
  147.