home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.4 KB | 110 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWUnknow.cpp
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWUNKNOW_H
- #include "FWUnknow.h"
- #endif
-
- #ifndef FWCONTXT_H
- #include "FWContxt.h"
- #endif
-
- #ifndef FWRECSHP_H
- #include "FWRecShp.h"
- #endif
-
- #ifndef FWTXTBOX_H
- #include "FWTxtBox.h"
- #endif
-
- //========================================================================================
- // Runtime Information
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment fwgadgts
- #endif
-
- //========================================================================================
- // Class FW_CUnknownView
- //========================================================================================
-
- FW_DEFINE_AUTO(FW_CUnknownView)
-
- //----------------------------------------------------------------------------------------
- // FW_CUnknownView::FW_CUnknownView
- //----------------------------------------------------------------------------------------
-
- FW_CUnknownView::FW_CUnknownView(Environment* ev,
- FW_CSuperView* container,
- ODID viewID,
- FW_CRect& bounds,
- FW_CString& className) :
- FW_CSuperView(ev, container, bounds, viewID, bounds.Size(), FW_kNoScrolling),
- fClassName(className)
- {
- // Overrides FW_CSuperView default bindings to keep fixed bounds
- SetBindings(ev, FW_kFixedBounds);
- SetResizeInvalidates(ev, true);
-
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CUnknownView::FW_CUnknownView
- //----------------------------------------------------------------------------------------
-
- FW_CUnknownView::FW_CUnknownView(Environment* ev,
- FW_CSuperView* container,
- ODID viewID,
- FW_CRect& bounds,
- FW_CPoint& extent,
- FW_EScrollingDirection scrollDir,
- FW_CString& className) :
- FW_CSuperView(ev, container, bounds, viewID, extent, scrollDir),
- fClassName(className)
- {
- // Overrides FW_CSuperView default bindings to keep fixed bounds
- SetBindings(ev, FW_kFixedBounds);
- SetResizeInvalidates(ev, true);
-
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CUnknownView::~FW_CUnknownView
- //----------------------------------------------------------------------------------------
-
- FW_CUnknownView::~FW_CUnknownView()
- {
- FW_START_DESTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CUnknownView::Draw
- //----------------------------------------------------------------------------------------
-
- void FW_CUnknownView::Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape)
- {
- FW_CViewContext vc(ev, this, odFacet, invalidShape);
-
- FW_CRect viewRect(FW_kZeroPoint, GetSize(ev));
-
- // Draw a pink rectangle
- FW_CRectShape::RenderRect(vc, viewRect, FW_kFill, FW_CColor(255, 204, 204));
- if (IsScrolling(ev) == false)
- FW_CRectShape::RenderRect(vc, viewRect, FW_kFrame, FW_kRGBRed);
-
- // Write the classId in the top left corner
- FW_CTextBoxShape::RenderTextBox(vc, fClassName, viewRect,
- FW_CFont(FW_GetDefaultFontName(), FW_kPlain, FW_IntToFixed(10)));
-
- }
-
-