home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / ocfinc.pak / OCOBJECT.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  4KB  |  187 lines

  1. //
  2. //----------------------------------------------------------------------------
  3. // ObjectComponents
  4. // (C) Copyright 1994 by Borland International, All Rights Reserved
  5. //
  6. //   Various general OC enums and structs
  7. //----------------------------------------------------------------------------
  8. #if !defined(OCF_OCOBJECT_H)
  9. #define OCF_OCOBJECT_H
  10.  
  11. #if !defined(OCF_OCDEFS_H)
  12. # include <ocf/ocdefs.h>
  13. #endif
  14. #if !defined(OCF_OCREG_H)
  15. # include <ocf/ocreg.h>
  16. #endif
  17. class _ICLASS IBContainer; // forward references
  18. class TOcVerb;
  19.  
  20. enum TOcDialogHelp {
  21.   dhBrowse,
  22.   dhBrowseClipboard,
  23.   dhConvert,
  24.   dhBrowseLinks,
  25.   dhChangeIcon,
  26.   dhFileOpen,
  27.   dhSourceSet,
  28.   dhIconFileOpen
  29. };
  30.  
  31. enum TOcDropAction {
  32.   daDropNone = 0,
  33.   daDropCopy = 1,
  34.   daDropMove = 2,
  35.   daDropLink = 4
  36. };
  37.  
  38. enum TOcMouseAction {
  39.   maEnter     = 1,
  40.   maContained = 2,
  41.   maExit      = 3
  42. };
  43.  
  44. enum TOcScrollDir {
  45.   sdScrollUp    = 1,
  46.   sdScrollDown  = 2,
  47.   sdScrollLeft  = 4,
  48.   sdScrollRight = 8
  49. };
  50.  
  51. enum TOcInvalidate {
  52.   invData = 1,
  53.   invView = 2
  54. };
  55.  
  56. enum TOcAspect {
  57.   asContent   = 1,
  58.   asThumbnail = 2,
  59.   asIcon      = 4,
  60.   asDocPrint  = 8,
  61.   asDefault   = 16,
  62.   asMaintain  = 32
  63. };
  64.  
  65. struct far TOcScaleInfo {
  66.   ulong  xN;      // numerator in x direction
  67.   ulong  xD;      // denominator in x direction
  68.   ulong  yN;      // numerator in y direction
  69.   ulong  yD;      // denominator in y direction
  70. };
  71.  
  72. enum TOcDraw {
  73.   drNone        = 0,
  74.   drShadingOnly = 1,
  75.   drShowObjects = 2
  76. };
  77.  
  78. enum TOcPartName {
  79.   pnLong  = 1,
  80.   pnShort = 2,
  81.   pnApp   = 3
  82. };
  83.  
  84. enum TOcInitHow {
  85.   ihLink,
  86.   ihEmbed,
  87.   ihMetafile,
  88.   ihBitmap,
  89. };
  90.  
  91. enum TOcInitWhere {
  92.   iwFile,
  93.   iwStorage,
  94.   iwDataObject,
  95.   iwNew,
  96.   iwHandle
  97. };
  98.  
  99. class TOcInitInfo {
  100.   public:
  101.     TOcInitInfo(IBContainer far* container);
  102.     TOcInitInfo(TOcInitHow how, TOcInitWhere where, IBContainer far* container);
  103.  
  104.     uint32 ReleaseDataObject() {
  105.       return ((Where==iwDataObject) && Data) ? ((IUnknown*)Data)->Release() : 0;
  106.     }
  107.  
  108.   private:
  109.   public:
  110.     TOcInitHow       How;
  111.     TOcInitWhere     Where;
  112.     IBContainer far* Container;
  113.     HICON            HIcon;
  114.     IStorage far*    Storage;
  115.     union {
  116.       LPCOLESTR    Path;      // where == iwFile
  117.       IDataObject* Data;      // where == iwDataObject
  118.       uint32       CId;       // where == iwNew
  119.       struct {                // where == iwHandle
  120.         HANDLE       Data;
  121.         uint         DataFormat;
  122.       } Handle;
  123.     };
  124. };
  125.  
  126. struct TOcMenuWidths {
  127.   long   Width[6];
  128. };
  129.  
  130. struct TOcMenuDescr {
  131.   HMENU  HMenu;
  132.   int    Width[6];
  133. };
  134.  
  135. enum TOcMenuEnable {
  136.   meEnablePaste           = 1,
  137.   meEnablePasteLink       = 2,
  138.   meEnableBrowseClipboard = 4,
  139.   meEnableBrowseLinks     = 8,
  140. };
  141.  
  142. enum TOcHelp {
  143.   hlpExit,
  144.   hlpEnter,
  145.   hlpGet
  146. };
  147.  
  148. enum TOcConvertAction {
  149.   caConvertToClsid  = 1,
  150.   caConvertToFormat = 2,
  151.   caActivateAsClsid = 4,
  152.   caAspectToIcon    = 8,
  153.   caAspectToContent = 16
  154. };
  155.  
  156. struct far TOcConvertInfo {
  157.   TOcConvertAction Action;
  158.   union {
  159.     struct {
  160.       CLSID Current;
  161.       CLSID New;
  162.     } Clsid;
  163.     struct {
  164.       uint ClipFormat;
  165.     } Format;
  166.     struct {
  167.       HICON hIcon;
  168.     } SwitchToIcon;
  169.   };
  170. };
  171.  
  172. enum TOcLinkUpdate {
  173.   luUpdateAuto   = 1,
  174.   luUpdateManual = 3
  175. };
  176.  
  177. struct TOcFormatInfo {
  178.   uint      Id;
  179.   OLECHAR   Name[32];
  180.   OLECHAR   ResultName[32];
  181.   ocrMedium Medium;              // BOleMedium
  182.   BOOL      IsLinkable;
  183. };
  184.  
  185. #endif  // OCF_OCOBJECT_H
  186.  
  187.