Copyright © Taligent, Inc. 1995 class AMonthGraphic : public MGraphic { public: AMonthGraphic(); AMonthGraphic( const TGPoint& size, const TGregorianCalendar& newCalendar ); AMonthGraphic( const AMonthGraphic& source ); virtual ~AMonthGraphic(); MCollectibleDeclarationsMacro( AMonthGraphic ); AMonthGraphic& operator=( const AMonthGraphic& source ); virtual TStream& operator>>=( TStream& toStream ) const; virtual TStream& operator<<=( TStream& fromStream ); virtual void SetSize( const TGPoint& size ); void SetDate( const TGregorianCalendar& newCalendar ); void Invalidate(); virtual void Draw ( TGrafPort& port ) const; virtual void HandleDraw( TGrafPort& port ); // Tight bounds based on geometry only virtual TGRect GetGeometricBounds() const; // Bounds with bundle taken into account virtual TGRect GetLooseFitBounds() const; virtual void TransformBy( const TGrafMatrix& ); protected: virtual void Init(); virtual void CalibrateFontSizes( const long sizeIndex ); virtual void CalculateFontSizes(); virtual void CalculateDayLabels(); virtual void CalculateParameters(); virtual TTextDisplay* CreateDayLabel( const int column ); private: GCoordinate GridMargin; TGPoint GridTopLeft; TGPoint GridCellSize; TGPoint GridBottomRight; TGRect GridRect; // Size of the graphic TGPoint fSize; TGrafMatrix fTransform; char **fDayNameArray; long fSizeIndex; GCoordinate fMonthFontSize; GCoordinate fNumberFontSize; Boolean fImageNeedsUpdate; TModifiableImage* fOffscreenImage; TGrafPort* fOffscreenPort; Boolean fImageNeedsUpdate; // The Text labels TTextDisplay* fdateLabel; TTextDisplay* fColumn0Label; TTextDisplay* fColumn1Label; TTextDisplay* fColumn2Label; TTextDisplay* fColumn3Label; TTextDisplay* fColumn4Label; TTextDisplay* fColumn5Label; TTextDisplay* fColumn6Label; enum Versions {kOriginalVersion}; };