TGFSComboBox.h

Go to the documentation of this file.
00001 // @(#)root/gui:$Id: TGFSComboBox.h 23115 2008-04-10 13:35:37Z rdm $
00002 // Author: Fons Rademakers   19/01/98
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGFSComboBox
00013 #define ROOT_TGFSComboBox
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TGFSComboBox, TGTreeLBEntry                                          //
00019 //                                                                      //
00020 // This is a combo box that is used in the File Selection dialog box.   //
00021 // It will allow the file path selection.                               //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TGComboBox
00026 #include "TGComboBox.h"
00027 #endif
00028 
00029 
00030 
00031 class TGPicture;
00032 class TGSelectedPicture;
00033 
00034 
00035 class TGTreeLBEntry : public TGLBEntry {
00036 
00037 protected:
00038    TGString           *fText;        // entry description
00039    TGString           *fPath;        // entry path
00040    const TGPicture    *fPic;         // entry picture
00041    TGSelectedPicture  *fSelPic;      // selected picture
00042    UInt_t              fTWidth;      // width of entry text
00043    UInt_t              fTHeight;     // height of entry text
00044    Bool_t              fActive;      // true if active
00045    GContext_t          fNormGC;      // entry drawing context
00046    FontStruct_t        fFontStruct;  // font
00047 
00048    virtual void DoRedraw();
00049 
00050    static const TGFont *fgDefaultFont;
00051    static TGGC         *fgDefaultGC;
00052 
00053 public:
00054    static FontStruct_t  GetDefaultFontStruct();
00055    static const TGGC   &GetDefaultGC();
00056 
00057    TGTreeLBEntry(const TGWindow *p = 0, TGString *text = 0, const TGPicture *pic = 0,
00058                  Int_t id = -1, TGString *path = 0, GContext_t norm = GetDefaultGC()(),
00059                  FontStruct_t font = GetDefaultFontStruct(),
00060                  UInt_t options = kHorizontalFrame, Pixel_t back = GetWhitePixel());
00061    virtual ~TGTreeLBEntry();
00062 
00063    const TGString  *GetText() const { return fText; }
00064    const TGPicture *GetPicture() const { return fPic; }
00065    const TGString  *GetPath() const { return fPath; }
00066 
00067    virtual TGDimension GetDefaultSize() const;
00068 
00069    virtual void Activate(Bool_t a);
00070    virtual void Update(TGLBEntry *e);
00071    virtual void DrawCopy(Handle_t id, Int_t x, Int_t y);
00072 
00073    ClassDef(TGTreeLBEntry,0)  // TGFSComboBox entry
00074 };
00075 
00076 
00077 class TGFSComboBox : public TGComboBox {
00078 
00079 public:
00080    TGFSComboBox(const TGWindow *p = 0, Int_t id = -1,
00081                 UInt_t options = kHorizontalFrame | kSunkenFrame | 
00082                 kDoubleBorder, Pixel_t back = GetWhitePixel());
00083 
00084    virtual void Update(const char *path);
00085    virtual void SavePrimitive(ostream &out, Option_t *option = "");
00086 
00087    ClassDef(TGFSComboBox,0)  // Combo box widget for file system path
00088 };
00089 
00090 #endif

Generated on Tue Jul 5 14:20:01 2011 for ROOT_528-00b_version by  doxygen 1.5.1