00001 /* 00002 * $Header$ 00003 * $Log$ 00004 */ 00005 00006 #ifndef __XSPERIODIC_TABLE_H 00007 #define __XSPERIODIC_TABLE_H 00008 00009 #include <TGLabel.h> 00010 #include <TGFrame.h> 00011 #include <TGButton.h> 00012 #include <TGToolTip.h> 00013 00014 /* =========== XSTblElement ============== */ 00015 class XSTblElement : public TGButton 00016 { 00017 friend class TGClient; 00018 00019 private: 00020 Int_t Z; 00021 TGLabel *lZ; 00022 TGToolTip *tpZ; 00023 TGLabel *lName; 00024 TGToolTip *tpName; 00025 00026 public: 00027 XSTblElement( const TGWindow *p, Int_t z, UInt_t color); 00028 ~XSTblElement(); 00029 virtual void Layout(); 00030 virtual TGDimension GetDefaultSize() const 00031 { return TGDimension(20,20); } 00032 00033 virtual void SetState(EButtonState state, Bool_t emit = kFALSE); 00034 00035 Int_t GetZ() const { return Z; } 00036 virtual void ChangeBackground( ULong_t color ); 00037 00038 //ClassDef(XSTblElement,1) 00039 }; // XSTblElement 00040 00041 ////////////////////////////////////////////////////////////// 00042 00043 #define XSPTBL_ROWS 12 00044 #define XSPTBL_COLS 20 00045 00046 /* ================== XSPeriodicTable ===================== */ 00047 class XSPeriodicTable : public TGCompositeFrame 00048 { 00049 private: 00050 Int_t width, height; 00051 TGFrame *elem[XSPTBL_ROWS][XSPTBL_COLS]; 00052 00053 public: 00054 XSPeriodicTable(const TGWindow *msgWnd, const TGWindow* p, 00055 UInt_t w, UInt_t h); 00056 virtual ~XSPeriodicTable(); 00057 00058 virtual void SelectZ( ULong_t Z ); 00059 virtual void Layout(); 00060 virtual TGDimension GetDefaultSize() const 00061 { return TGDimension(width,height); } 00062 00063 //ClassDef(XSPeriodicTable,1) 00064 }; // XSPeriodicTable 00065 00066 #endif