ROOT logo
// @(#)root/gui:$Id: TGFSComboBox.h 23115 2008-04-10 13:35:37Z rdm $
// Author: Fons Rademakers   19/01/98

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGFSComboBox
#define ROOT_TGFSComboBox


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGFSComboBox, TGTreeLBEntry                                          //
//                                                                      //
// This is a combo box that is used in the File Selection dialog box.   //
// It will allow the file path selection.                               //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TGComboBox
#include "TGComboBox.h"
#endif



class TGPicture;
class TGSelectedPicture;


class TGTreeLBEntry : public TGLBEntry {

protected:
   TGString           *fText;        // entry description
   TGString           *fPath;        // entry path
   const TGPicture    *fPic;         // entry picture
   TGSelectedPicture  *fSelPic;      // selected picture
   UInt_t              fTWidth;      // width of entry text
   UInt_t              fTHeight;     // height of entry text
   Bool_t              fActive;      // true if active
   GContext_t          fNormGC;      // entry drawing context
   FontStruct_t        fFontStruct;  // font

   virtual void DoRedraw();

   static const TGFont *fgDefaultFont;
   static TGGC         *fgDefaultGC;

public:
   static FontStruct_t  GetDefaultFontStruct();
   static const TGGC   &GetDefaultGC();

   TGTreeLBEntry(const TGWindow *p = 0, TGString *text = 0, const TGPicture *pic = 0,
                 Int_t id = -1, TGString *path = 0, GContext_t norm = GetDefaultGC()(),
                 FontStruct_t font = GetDefaultFontStruct(),
                 UInt_t options = kHorizontalFrame, Pixel_t back = GetWhitePixel());
   virtual ~TGTreeLBEntry();

   const TGString  *GetText() const { return fText; }
   const TGPicture *GetPicture() const { return fPic; }
   const TGString  *GetPath() const { return fPath; }

   virtual TGDimension GetDefaultSize() const;

   virtual void Activate(Bool_t a);
   virtual void Update(TGLBEntry *e);
   virtual void DrawCopy(Handle_t id, Int_t x, Int_t y);

   ClassDef(TGTreeLBEntry,0)  // TGFSComboBox entry
};


class TGFSComboBox : public TGComboBox {

public:
   TGFSComboBox(const TGWindow *p = 0, Int_t id = -1,
                UInt_t options = kHorizontalFrame | kSunkenFrame | 
                kDoubleBorder, Pixel_t back = GetWhitePixel());

   virtual void Update(const char *path);
   virtual void SavePrimitive(ostream &out, Option_t *option = "");

   ClassDef(TGFSComboBox,0)  // Combo box widget for file system path
};

#endif
 TGFSComboBox.h:1
 TGFSComboBox.h:2
 TGFSComboBox.h:3
 TGFSComboBox.h:4
 TGFSComboBox.h:5
 TGFSComboBox.h:6
 TGFSComboBox.h:7
 TGFSComboBox.h:8
 TGFSComboBox.h:9
 TGFSComboBox.h:10
 TGFSComboBox.h:11
 TGFSComboBox.h:12
 TGFSComboBox.h:13
 TGFSComboBox.h:14
 TGFSComboBox.h:15
 TGFSComboBox.h:16
 TGFSComboBox.h:17
 TGFSComboBox.h:18
 TGFSComboBox.h:19
 TGFSComboBox.h:20
 TGFSComboBox.h:21
 TGFSComboBox.h:22
 TGFSComboBox.h:23
 TGFSComboBox.h:24
 TGFSComboBox.h:25
 TGFSComboBox.h:26
 TGFSComboBox.h:27
 TGFSComboBox.h:28
 TGFSComboBox.h:29
 TGFSComboBox.h:30
 TGFSComboBox.h:31
 TGFSComboBox.h:32
 TGFSComboBox.h:33
 TGFSComboBox.h:34
 TGFSComboBox.h:35
 TGFSComboBox.h:36
 TGFSComboBox.h:37
 TGFSComboBox.h:38
 TGFSComboBox.h:39
 TGFSComboBox.h:40
 TGFSComboBox.h:41
 TGFSComboBox.h:42
 TGFSComboBox.h:43
 TGFSComboBox.h:44
 TGFSComboBox.h:45
 TGFSComboBox.h:46
 TGFSComboBox.h:47
 TGFSComboBox.h:48
 TGFSComboBox.h:49
 TGFSComboBox.h:50
 TGFSComboBox.h:51
 TGFSComboBox.h:52
 TGFSComboBox.h:53
 TGFSComboBox.h:54
 TGFSComboBox.h:55
 TGFSComboBox.h:56
 TGFSComboBox.h:57
 TGFSComboBox.h:58
 TGFSComboBox.h:59
 TGFSComboBox.h:60
 TGFSComboBox.h:61
 TGFSComboBox.h:62
 TGFSComboBox.h:63
 TGFSComboBox.h:64
 TGFSComboBox.h:65
 TGFSComboBox.h:66
 TGFSComboBox.h:67
 TGFSComboBox.h:68
 TGFSComboBox.h:69
 TGFSComboBox.h:70
 TGFSComboBox.h:71
 TGFSComboBox.h:72
 TGFSComboBox.h:73
 TGFSComboBox.h:74
 TGFSComboBox.h:75
 TGFSComboBox.h:76
 TGFSComboBox.h:77
 TGFSComboBox.h:78
 TGFSComboBox.h:79
 TGFSComboBox.h:80
 TGFSComboBox.h:81
 TGFSComboBox.h:82
 TGFSComboBox.h:83
 TGFSComboBox.h:84
 TGFSComboBox.h:85
 TGFSComboBox.h:86
 TGFSComboBox.h:87
 TGFSComboBox.h:88
 TGFSComboBox.h:89
 TGFSComboBox.h:90