home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / OS / FWGraphx / Sources / FWWinGDI.cpp < prev   
Encoding:
Text File  |  1994-04-21  |  3.0 KB  |  101 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWWinGDI.cpp
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Creation Date:        3/28/94
  7. //
  8. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifdef FW_BUILD_WIN
  13.  
  14. #ifndef FWWINGDI_H
  15. #include "FWWinGDI.h"
  16. #endif
  17.  
  18. FW_CWinGDIObjectList FW_CWinGDIObject::fGDIObjectsList;
  19.  
  20. //==============================================================================
  21. //    •• CLASS FW_CWinGDIObject
  22. //==============================================================================
  23.  
  24. //------------------------------------------------------------------------------
  25. //    FW_CWinGDIObject::FW_CWinGDIObject
  26. //------------------------------------------------------------------------------
  27.  
  28. FW_CWinGDIObject::FW_CWinGDIObject() :
  29.     FW_CGraphicObjectPtr()
  30. {
  31. }
  32.  
  33. //------------------------------------------------------------------------------
  34. //    FW_CWinGDIObject::FW_CWinGDIObject
  35. //------------------------------------------------------------------------------
  36.  
  37. FW_CWinGDIObject::FW_CWinGDIObject(const FW_CWinGDIObject& other) :
  38.     FW_CGraphicObjectPtr(other)
  39. {
  40. }
  41.  
  42. //------------------------------------------------------------------------------
  43. //    FW_CWinGDIObject::FW_CWinGDIObject
  44. //------------------------------------------------------------------------------
  45.  
  46. FW_CWinGDIObject::FW_CWinGDIObject(FW_CWinGDIObjectRep* rep) :
  47.     FW_CGraphicObjectPtr(rep)
  48. {
  49. }
  50.  
  51. //==============================================================================
  52. //    •• CLASS FW_CWinGDIObjectRep
  53. //==============================================================================
  54.  
  55. //------------------------------------------------------------------------------
  56. //    FW_CWinGDIObjectRep::FW_CWinGDIObjectRep
  57. //------------------------------------------------------------------------------
  58.  
  59. FW_CWinGDIObjectRep::FW_CWinGDIObjectRep() :
  60.     fSelectCount(FALSE),
  61.     fIsTemporary(FALSE),
  62.     fGDIObject(NULL)
  63. {
  64. }
  65.  
  66. //------------------------------------------------------------------------------
  67. //    FW_CWinGDIObjectRep::FW_CWinGDIObjectRep
  68. //------------------------------------------------------------------------------
  69.  
  70. FW_CWinGDIObjectRep::FW_CWinGDIObjectRep(HGDIOBJECT hGDIObject, FW_Boolean stockObject) :
  71.     fSelectCount(FALSE),
  72.     fIsTemporary(stockObject)
  73.     fGDIObject(hGDIObject)
  74. {
  75. }
  76.  
  77. //------------------------------------------------------------------------------
  78. //    FW_CWinGDIObjectRep::FW_CWinGDIObjectRep
  79. //------------------------------------------------------------------------------
  80.  
  81. FW_CWinGDIObjectRep::~FW_CWinGDIObjectRep()
  82. {
  83.     if (fGDIObject && !fIsTemporary)
  84.     {
  85.         
  86.         ::DeleteObject(fGDIObject);
  87.         fGDIObject = NULL;
  88.     }
  89. }
  90.  
  91. //------------------------------------------------------------------------------
  92. //    FW_CWinGDIObjectRep::Select
  93. //------------------------------------------------------------------------------
  94.  
  95. void FW_CWinGDIObjectRep::SelectObject(FW_CGraphicContext* gc)
  96. {
  97.     fPreviousObject = gc->SelectObject(this);
  98.     fSelected = TRUE;
  99. }
  100.  
  101. #endif