home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / pkg / en_US / iodgraph.odz / iodgraph.hpp < prev    next >
Text File  |  1997-04-02  |  10KB  |  172 lines

  1. // @(#) 1.26 com/src/samples/grafpart/iodgraph.hpp, odgrafpart, od96os2, odos29712d 2/7/97 17:42:03 [3/21/97 17:45:36]
  2. /*====START_GENERATED_PROLOG======================================
  3.  */
  4. /*
  5.  *   COMPONENT_NAME: odgrafpart
  6.  *
  7.  *   CLASSES: none
  8.  *
  9.  *   ORIGINS: 27
  10.  *
  11.  *
  12.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13.  *   All Rights Reserved
  14.  *   Licensed Materials - Property of IBM
  15.  *   US Government Users Restricted Rights - Use, duplication or
  16.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17.  *
  18.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24.  *   OR PERFORMANCE OF THIS SOFTWARE.
  25.  */
  26. /*====END_GENERATED_PROLOG========================================
  27.  */
  28.  
  29. // *********************************************************************
  30. //  File:      iodgraph.hpp
  31. //  Contains:  Constant definitions for a 2D-Drawing Container Part
  32. // ************************************************************************
  33.  
  34. #ifndef _IODGRAPH_HPP_
  35. #define _IODGRAPH_HPP_
  36.  
  37. // get the generated message symbol map
  38. #ifndef _H_IODGRAPH_MSG
  39.     #include <iodgraph.h>
  40. #endif  // _H_IODGRAPH_MSG
  41.  
  42. // ==========================================================
  43. //
  44. //  Locally-defined constants
  45. //
  46. // ==========================================================
  47.  
  48. // ----------------------------------------------------------
  49. //
  50. // Property constants used in GrafPart --> Initialize
  51. //
  52. // ----------------------------------------------------------
  53. static const   ODType  kGrafPartPresNormal           = "GrafPart:Presentation:Normal";
  54. static const   ODType  kGrafPartPresPalette          = "GrafPart:Presentation:Palette";
  55. static const   ODType  kGrafPartDisplayName          = "Graphics Part";
  56. static const   ODType  kGrafPartPartKind             = "GraphicsPart";
  57. static const   ODType  kGrafPartPartKindDisplayName  = "Graphics Part Kind";
  58. static const   ODType  kGrafPartfilenameFilters      = "";
  59. static const   ODType  kGrafPartfilenameTypes        = "";
  60. static const   ODType  kGrafPartHandlerName          = "GrafPart";
  61. static const   ODType  kGrafPartHandlerDisplayName   = "Graphics Part Handler";
  62. static const   ODType  kGrafPartCategory             = "OpenDoc:Category:Sample";
  63. static const   ODType  kGrafPartCategoryDisplayName  = "Sample";
  64. static const   ODType  kGrafPartobjectID             = "";
  65. static const   ODType  kGrafPartOLE2ClassId          = "{9c93c670-e725-11cf-a634-08005a886bbf}";
  66. static const   ODType  kGrafPartWindowsIconFileName  = "iodgraed.ico";
  67.  
  68.  
  69. // ----------------------------------------------------------
  70. //
  71. //  Value constants used in GrafPart
  72. //
  73. // ----------------------------------------------------------
  74. // coordinate plus/minus value for screen selection
  75. #if   defined(_PLATFORM_WIN32_)
  76.     static const SHORT    kODXSelectionThreshold = GetSystemMetrics(SM_CXDOUBLECLK);
  77.     static const SHORT    kODYSelectionThreshold = GetSystemMetrics(SM_CYDOUBLECLK);
  78. #elif defined(_PLATFORM_OS2_)
  79.     static const SHORT    kODXSelectionThreshold = WinQuerySysValue(HWND_DESKTOP,SV_CXDBLCLK);
  80.     static const SHORT    kODYSelectionThreshold = WinQuerySysValue(HWND_DESKTOP,SV_CYDBLCLK);
  81. #endif  // PLATFORM SPECIFIC
  82.  
  83.  
  84. // ----------------------------------------------------------
  85. //
  86. //  Value constants used in ContentGrafPartFigr and its subclasses (figures)
  87. //
  88. //      -> CMD_Offset is set to the MENUID_ACTIVEPART_USER as defined in CMDDEFS.XH
  89. //          This is an area reserved for USER defined menuitems.
  90. // ----------------------------------------------------------
  91. static const ODULong  COBJ_GRAFPART_FIGR =  1; // objType constant for ContentGrafPartFigr (figure)
  92. static const ODULong  COBJ_GRAFPART_POIN =  2; // objType constant for ContentGrafPartPoin (point)
  93. static const ODULong  COBJ_GRAFPART_LINE =  3; // objType constant for ContentGrafPartLine (line segment)
  94. static const ODULong  COBJ_GRAFPART_RECT =  4; // objType constant for ContentGrafPartRect (rectangle)
  95. static const ODULong  COBJ_GRAFPART_TEXT =  5; // objType constant for ContentGrafPartText (text)
  96. /*
  97. static const ODULong  COBJ_GRAFPART_ELLI =  6; // objType constant for ContentGrafPartElli (ellipse)
  98. static const ODULong  COBJ_GRAFPART_CIRC =  7; // objType constant for ContentGrafPartCirc (circle)
  99. static const ODULong  COBJ_GRAFPART_PLIN =  8; // objType constant for ContentGrafPartPlin (polyline)
  100. static const ODULong  COBJ_GRAFPART_PGON =  9; // objType constant for ContentGrafPartPgon (polygon)
  101. static const ODULong  COBJ_GRAFPART_FREE = 10; // objType constant for ContentGrafPartFree (freehand)
  102. static const ODULong  COBJ_GRAFPART_IMAG = 11; // objType constant for ContentGrafPartImag (image)
  103. */
  104. // The following indicates the end of the range of GrafPart intrinsic types for comparisons.
  105. // As new types are implemented, their objType values must be contigious, and the following
  106. // line must be updated to contain the name of last defined objtype value.
  107. static const ODULong  COBJ_GRAFPART_LAST = COBJ_GRAFPART_TEXT;  // the last defined objType constant
  108.  
  109.  
  110. // ----------------------------------------------------------
  111. // NLS Message constants used in GrafPart
  112. //
  113. //      ->  The GRAFPART_MSG_SET and GRAFPART_* messages must conform to what
  114. //              is shown in the XPG/4 Message catalog file IODGRAPH.MSG
  115. //      ->  The GP_MSG_* cpp symbols are defined in "iodgraph.h", which is generated
  116. //              from the "iodgraph.msg" file in the locale subdirectories,
  117. //              and shipped to samples/include
  118. // ----------------------------------------------------------
  119. static const char*  GRAFPART_NLS_CATALOG     =  "iodgraph.cat";     // messages are stored in GRAFPART.MSG
  120.  
  121. static const SHORT  GRAFPART_MSG_SET         =  GP_MSG_SET_ONE;     // message set #1
  122.  
  123. static const SHORT  GRAFPART_DASH            =  GP_MSG_DASH;        // message "--------"
  124. static const SHORT  GRAFPART_ADD             =  GP_MSG_ADD;         // message "Add Mode"
  125. static const SHORT  GRAFPART_SELECT          =  GP_MSG_SELECT;      // message "Select Mode"
  126. static const SHORT  GRAFPART_EDIT            =  GP_MSG_EDIT;        // message "Edit Mode"
  127. static const SHORT  GRAFPART_REFRESH         =  GP_MSG_REFRESH;     // message "Refresh Screen"
  128. static const SHORT  GRAFPART_MB_WARNING      =  GP_MSG_MB_WARNING;  // warning messages "Don't know how to handle..."
  129. static const SHORT  GRAFPART_ADD_POIN        =  GP_MSG_ADD_POIN;    // message "Point"
  130. static const SHORT  GRAFPART_ADD_LINE        =  GP_MSG_ADD_LINE;    // message "Line"
  131. static const SHORT  GRAFPART_ADD_RECT        =  GP_MSG_ADD_RECT;    // message "Rectangle"
  132. static const SHORT  GRAFPART_ADD_TEXT        =  GP_MSG_ADD_TEXT;    // message "Text"
  133. /*
  134. static const SHORT  GRAFPART_ADD_ELLI        =  GP_MSG_ADD_ELLI;    // message "Ellipse"
  135. static const SHORT  GRAFPART_ADD_CIRC        =  GP_MSG_ADD_CIRC;    // message "Circle"
  136. static const SHORT  GRAFPART_ADD_PLIN        =  GP_MSG_ADD_PLIN;    // message "Polyline"
  137. static const SHORT  GRAFPART_ADD_PGON        =  GP_MSG_ADD_PGON;    // message "Polygon"
  138. static const SHORT  GRAFPART_ADD_FREE        =  GP_MSG_ADD_FREE;    // message "Freehand"
  139. static const SHORT  GRAFPART_ADD_IMAG        =  GP_MSG_ADD_IMAG;    // message "Image"
  140. */
  141.  
  142.  
  143. // ----------------------------------------------------------
  144. //
  145. //  Command constants used in GrafPart
  146. //
  147. //      -> CMD_Offset is set to the MENUID_ACTIVEPART_USER as defined in CMDDEFS.XH
  148. //          This is an area reserved for USER defined menuitems.
  149. // ----------------------------------------------------------
  150. static const SHORT  kODCommandGrafPartDash    = ( CMD_Offset_Subclass + GRAFPART_DASH );
  151. static const SHORT  kODCommandGrafPartAdd     = ( CMD_Offset_Subclass + GRAFPART_ADD );
  152. static const SHORT  kODCommandGrafPartSelect  = ( CMD_Offset_Subclass + GRAFPART_SELECT );
  153. static const SHORT  kODCommandGrafPartEdit    = ( CMD_Offset_Subclass + GRAFPART_EDIT );
  154. static const SHORT  kODCommandGrafPartRefresh = ( CMD_Offset_Subclass + GRAFPART_REFRESH );
  155. static const SHORT  kODCommandGrafPartMenuWarn= ( CMD_Offset_Subclass + GRAFPART_MB_WARNING );
  156. static const SHORT  kODCommandGrafPartAddPoin = ( CMD_Offset_Subclass + GRAFPART_ADD_POIN );
  157. static const SHORT  kODCommandGrafPartAddLine = ( CMD_Offset_Subclass + GRAFPART_ADD_LINE );
  158. static const SHORT  kODCommandGrafPartAddRect = ( CMD_Offset_Subclass + GRAFPART_ADD_RECT );
  159. static const SHORT  kODCommandGrafPartAddText = ( CMD_Offset_Subclass + GRAFPART_ADD_TEXT );
  160. /*
  161. static const SHORT  kODCommandGrafPartAddElli = ( CMD_Offset_Subclass + GRAFPART_ADD_ELLI );
  162. static const SHORT  kODCommandGrafPartAddCirc = ( CMD_Offset_Subclass + GRAFPART_ADD_CIRC );
  163. static const SHORT  kODCommandGrafPartAddPlin = ( CMD_Offset_Subclass + GRAFPART_ADD_PLIN );
  164. static const SHORT  kODCommandGrafPartAddPgon = ( CMD_Offset_Subclass + GRAFPART_ADD_PGON );
  165. static const SHORT  kODCommandGrafPartAddFree = ( CMD_Offset_Subclass + GRAFPART_ADD_FREE );
  166. static const SHORT  kODCommandGrafPartAddImag = ( CMD_Offset_Subclass + GRAFPART_ADD_IMAG );
  167. */
  168.  
  169. #endif  // _IODGRAPH_HPP_
  170.  
  171. // end of file ************************************************************
  172.