home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Draw / Sources / FloatFrm.cpp < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.8 KB  |  105 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FloatFrm.cpp
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #include "ODFDraw.hpp"
  13.  
  14. #ifndef FLOATFRM_H
  15. #include "FloatFrm.h"
  16. #endif
  17.  
  18. #ifndef DRAWPART_H
  19. #include "DrawPart.h"
  20. #endif
  21.  
  22. // ----- Part Layer -----
  23.  
  24. #ifndef FWUTIL_H
  25. #include "FWUtil.h"
  26. #endif
  27.  
  28. #ifndef FWCONTXT_H
  29. #include "FWContxt.h"
  30. #endif
  31.  
  32. // ----- OS Layer -----
  33.  
  34. #ifndef FWRECSHP_H
  35. #include "FWRecShp.h"
  36. #endif
  37.  
  38. #ifndef FWWINDOW_H
  39. #include "FWWindow.h"
  40. #endif
  41.  
  42. // ----- Foundation Layer -----
  43.  
  44. #ifndef FWDEBUG_H
  45. #include "FWDebug.h"
  46. #endif
  47.  
  48. //========================================================================================
  49. // Runtime Information
  50. //========================================================================================
  51.  
  52. #ifdef FW_BUILD_MAC
  53. #pragma segment odfdrawframes
  54. #endif
  55.  
  56. //========================================================================================
  57. // CLASS CFloatingWindowFrame
  58. //========================================================================================
  59.  
  60. //----------------------------------------------------------------------------------------
  61. // CFloatingWindowFrame::CFloatingWindowFrame
  62. //----------------------------------------------------------------------------------------
  63.  
  64. CFloatingWindowFrame::CFloatingWindowFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, FW_CPart* part) :
  65.     FW_CFrame(ev, odFrame, presentation, part),
  66.     fMapping(FW_kDevice)
  67. {
  68.     SetCanBeActiveFrame(ev, FALSE);
  69. }
  70.  
  71. //----------------------------------------------------------------------------------------
  72. // CFloatingWindowFrame::~CFloatingWindowFrame
  73. //----------------------------------------------------------------------------------------
  74.  
  75. CFloatingWindowFrame::~CFloatingWindowFrame()
  76. {
  77. }
  78.  
  79. //----------------------------------------------------------------------------------------
  80. // CFloatingWindowFrame::EraseBackground
  81. //----------------------------------------------------------------------------------------
  82.  
  83. void CFloatingWindowFrame::EraseBackground(Environment* ev, FW_CGraphicContext& gc)
  84. {    
  85. FW_UNUSED(ev);
  86.     FW_CRect rect;
  87.     gc.GetClipRect(rect);
  88.     FW_CInk ink(FW_kRGBLightGray);
  89.     FW_CRectShape::RenderRect(gc, rect, FW_kFill, ink);
  90. }
  91.  
  92. //----------------------------------------------------------------------------------------
  93. // CFloatingWindowFrame::HideShowFloating
  94. //----------------------------------------------------------------------------------------
  95.  
  96. void CFloatingWindowFrame::HideShowFloating(Environment* ev)
  97. {
  98.     FW_CWindow *window = GetWindow(ev);
  99.     
  100.     window->ShowHide(ev, !window->IsShown(ev));
  101. }
  102.  
  103.  
  104.  
  105.