Ignore:
Timestamp:
08/19/06 22:42:34 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtools/MCalendar.h

    r7451 r7893  
    1414#include <Gtypes.h>
    1515#endif
     16
     17/*
     18#include <TAttLine.h>
     19#include <TAttFill.h>
     20#include <TAttText.h>
     21*/
    1622
    1723class TEnv;
     
    2632class MTime;
    2733
    28 class MCalendar : public TObject
     34class MCalendar : public TObject//, public TAttLine, public TAttText, public TAttFill
    2935{
    3036private:
     37    /*
     38    enum {
     39        kMoonPhase,
     40        kMoonPeriod,
     41        kMagicPeriod
     42    };*/
     43
     44    /*
     45    Int_t  fAlign;
     46    Bool_t fActive;
     47    Bool_t fUpdate;
     48    Int_t  fDay;
     49    */
    3150    MEnv    *fEnv;
    3251    MEnv    *fEnvHolidays;
    3352
    3453    Bool_t   fOrientation;
     54    Bool_t   fRotation;
    3555
    3656    Int_t    fYear;
     
    7898    // Paint text
    7999    void PaintLatex(TAttText &att, Int_t align, Double_t x[2], Double_t y[2], Double_t ratio[2], /*Double_t height,*/ TString str);
     100    void PaintClock(Double_t x[2], Double_t y[2], Double_t r[2], Int_t fill, char dir);
    80101
    81102    // GUI interactions
     
    105126    Float_t     GetMoonRadius() const { return fMoonRadius; }
    106127    TString     GetStringFmt(const char *fmt="%B", Int_t day=1, Int_t h=12, Int_t m=0, Int_t s=0) const;
     128    Bool_t      IsRotated() const { return fRotation; }
     129    Bool_t      IsVertical() const { return fOrientation; }
    107130
    108131
     
    113136    void SetLayout(Byte_t NumberOfBlocks, Double_t MarginX, Double_t MarginY, Double_t CellSpace, Double_t BlockSpace) { fNumBlocks=NumberOfBlocks, fMarginX=MarginX; fMarginY=MarginY; fCellSpace=CellSpace; fBlockSpace=BlockSpace; } //*MENU* *ARGS={NumberOfBlocks=>fNumBlocks,MarginX=>fMarginX,MarginY=>fMarginY,CellSpace=>fCellSpace,BlockSpace=>fBlockSpace}
    114137
    115     void ResetLayout();   //*MENU
     138    void ResetLayout(Int_t num);
     139    void ResetLayout() { ResetLayout(-1); } //*MENU
    116140    void ResetHolidays(); //*MENU
    117141
    118     void SetDefaultLayout();   //*MENU
     142    void SetDefaultLayout(Int_t num);
     143    void SetDefaultLayout() { SetDefaultLayout(-1); } //*MENU
    119144    void SetDefaultHolidays(); //*MENU
    120145
     
    141166
    142167    //    void ToggleOrientation() { fOrientation = !fOrientation; } //*MENU
     168    void SetRotated(Bool_t b=kTRUE) { fRotation = b; } // *TOGGLE* *GETTER=IsRotated
     169    void SetVertical(Bool_t b=kTRUE) { fOrientation = b; } // *TOGGLE* *GETTER=IsVertical
    143170
    144171    void PrintEnv() const; //*MENU
     
    146173    void RemoveEnv(const char *VariableName) const;//*MENU
    147174
    148 
    149175    void SetMoonGraf(Int_t Align, Float_t Radius) { fMoonAlignGraf=Align; fMoonRadius=Radius; } //*MENU* *ARGS={Align>=fMoonAlignGraf,Radius=>fMoonRadius}
    150176    void SetMoonText(Int_t Align, Int_t Type, Int_t Continous) { fMoonAlignText=Align; fMoonTextType=Type; fMoonTextCont=Continous; } //*MENU* *ARGS={Align>=fMoonAlignText,Type=>fMoonTextType,Continous=>fMoonTextCont}
    151177
    152178    // Calendar sheet interface
    153     TASImage *DrawImage(const TASImage &img, Float_t x1, Float_t y1, Float_t x2, Float_t y2) const;
    154     TASImage *GetImage(TEnv *env=NULL);
     179    TASImage *DrawImage(const TASImage &img, Float_t x1, Float_t y1, Float_t x2, Float_t y2, Bool_t rot=kFALSE) const;
     180    TASImage *GetImage(TEnv *env=NULL, const char *path="");
    155181    void      DrawLatex(Float_t x, Float_t y, const char *text, const TAttText &att);
    156182    void      DrawDate(Float_t x, Float_t y, const char *text, const TAttText &att)
     
    168194    }
    169195    TASImage *DrawTTF(Float_t x1, Float_t x2, Float_t y1, Float_t y2,
    170                       const char *text, Int_t size, const char *font);
     196                      const char *text, Float_t size, const char *font);
    171197    TASImage *DrawTTFDate(Float_t x1, Float_t x2, Float_t y1, Float_t y2,
    172                           const char *text, Int_t size, const char *font)
     198                          const char *text, Float_t size, const char *font)
    173199    {
    174200        return DrawTTF(x1, y1, x2, y2, GetStringFmt(text), size, font);
     
    183209    void Paint(Option_t *o="");
    184210
     211    /*
     212     void Update();
     213     void SetLineAttributes() {}
     214     void SetFillAttributes() {}
     215     void SetTextAttributes() {}
     216     void SetTextAngle(Float_t) {}
     217     void Selected(TVirtualPad*,TObject*,Int_t);
     218     */
     219     //void SetAttributes(); //*MENU
     220
    185221    ClassDef(MCalendar, 1)
    186222};
Note: See TracChangeset for help on using the changeset viewer.