Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
UInformationView.cp
// UInformationView.cp |
// Copyright © 1991-92 by Apple Computer, Inc. All rights reserved. |
// Kent Sandvik DTS |
// This file contains all the TInformationView member functions, used |
// for drawing information in the TInformationView view. |
// |
// <1> khs 1.0 First final version |
#ifndef __UINFORMATIONVIEW__ |
#include "UInformationView.h" |
#endif |
// Empty constructor - for avoiding ptabs in global data space |
#undef Inherited |
#define Inherited TView |
#pragma segment ARes |
DefineClass(TInformationView, TView); |
TInformationView::TInformationView() |
{ |
fHasGestaltInfo = FALSE; |
fLabel1 = "........."; |
fLabel2 = "........."; |
fLabel3 = "........."; |
fLabel4 = "........."; |
fLabel5 = "........."; |
fLabel6 = "........."; |
fLabel7 = "........."; |
fLabel8 = "........."; |
fLabel9 = "........."; |
fLabel10 = "........."; |
fLabel11 = "........."; |
fLabel12 = "........."; |
} |
// draw the contents of the drawing object to screen |
#pragma segment ARes |
void TInformationView::Draw(const VRect& area) |
{ |
Inherited::Draw(area); |
// draw the real thing! |
this->DrawInformation(); |
} |
#pragma segment ARes |
void TInformationView::DrawInformation() |
{ |
// Set font and font size |
PenNormal(); |
TextFont(geneva); |
TextSize(9); |
TextFace(bold); |
// Draw Labels |
MoveTo(kHorizontStart, kVerticalStart); |
DrawString(fLabel1); |
MoveTo(kHorizontStart, kVerticalStart + kVerticalOffset); |
DrawString(fLabel2); |
MoveTo(kHorizontStart, kVerticalStart + 2 * kVerticalOffset); |
DrawString(fLabel3); |
MoveTo(kHorizontStart, kVerticalStart + 3 * kVerticalOffset); |
DrawString(fLabel4); |
MoveTo(kHorizontStart, kVerticalStart + 4 * kVerticalOffset); |
DrawString(fLabel5); |
MoveTo(kHorizontStart, kVerticalStart + 5 * kVerticalOffset); |
DrawString(fLabel6); |
MoveTo(kHorizontStart, kVerticalStart + 6 * kVerticalOffset); |
DrawString(fLabel7); |
MoveTo(kHorizontStart, kVerticalStart + 7 * kVerticalOffset); |
DrawString(fLabel8); |
MoveTo(kHorizontStart, kVerticalStart + 8 * kVerticalOffset); |
DrawString(fLabel9); |
MoveTo(kHorizontStart, kVerticalStart + 9 * kVerticalOffset); |
DrawString(fLabel10); |
MoveTo(kHorizontStart, kVerticalStart + 10 * kVerticalOffset); |
DrawString(fLabel11); |
MoveTo(kHorizontStart, kVerticalStart + 11 * kVerticalOffset); |
DrawString(fLabel12); |
// restore pen |
PenNormal(); |
} |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14