Logo ROOT   6.14/05
Reference Guide
TGFSComboBox.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 19/01/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGFSComboBox
13 #define ROOT_TGFSComboBox
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGFSComboBox, TGTreeLBEntry //
19 // //
20 // This is a combo box that is used in the File Selection dialog box. //
21 // It will allow the file path selection. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TGComboBox.h"
26 
27 
28 
29 class TGPicture;
30 class TGSelectedPicture;
31 
32 
33 class TGTreeLBEntry : public TGLBEntry {
34 
35 protected:
36  TGString *fText; // entry description
37  TGString *fPath; // entry path
38  const TGPicture *fPic; // entry picture
39  TGSelectedPicture *fSelPic; // selected picture
40  UInt_t fTWidth; // width of entry text
41  UInt_t fTHeight; // height of entry text
42  Bool_t fActive; // true if active
43  GContext_t fNormGC; // entry drawing context
45 
46  virtual void DoRedraw();
47 
48  static const TGFont *fgDefaultFont;
49  static TGGC *fgDefaultGC;
50 
51 public:
53  static const TGGC &GetDefaultGC();
54 
55  TGTreeLBEntry(const TGWindow *p = 0, TGString *text = 0, const TGPicture *pic = 0,
56  Int_t id = -1, TGString *path = 0, GContext_t norm = GetDefaultGC()(),
58  UInt_t options = kHorizontalFrame, Pixel_t back = GetWhitePixel());
59  virtual ~TGTreeLBEntry();
60 
61  const TGString *GetText() const { return fText; }
62  const TGPicture *GetPicture() const { return fPic; }
63  const TGString *GetPath() const { return fPath; }
64 
65  virtual TGDimension GetDefaultSize() const;
66 
67  virtual void Activate(Bool_t a);
68  virtual void Update(TGLBEntry *e);
69  virtual void DrawCopy(Handle_t id, Int_t x, Int_t y);
70 
71  ClassDef(TGTreeLBEntry,0) // TGFSComboBox entry
72 };
73 
74 
75 class TGFSComboBox : public TGComboBox {
76 
77 public:
78  TGFSComboBox(const TGWindow *p = 0, Int_t id = -1,
81 
82  virtual void Update(const char *path);
83  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
84 
85  ClassDef(TGFSComboBox,0) // Combo box widget for file system path
86 };
87 
88 #endif
const TGString * GetPath() const
Definition: TGFSComboBox.h:63
Handle_t FontStruct_t
Definition: GuiTypes.h:38
UInt_t fTHeight
Definition: TGFSComboBox.h:41
static TGGC * fgDefaultGC
Definition: TGFSComboBox.h:49
const char Option_t
Definition: RtypesCore.h:62
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition: TGFrame.cxx:691
static const TGFont * fgDefaultFont
Definition: TGFSComboBox.h:48
Handle_t GContext_t
Definition: GuiTypes.h:37
static FontStruct_t GetDefaultFontStruct()
Return default font structure.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Redraw the tree listbox entry on pixmap/window.
const TGString * GetText() const
Definition: TGFSComboBox.h:61
virtual ~TGTreeLBEntry()
Delete tree listbox entry.
virtual TGDimension GetDefaultSize() const
Return default size of tree listbox entry.
const TGPicture * GetPicture() const
Definition: TGFSComboBox.h:62
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:320
ULong_t Pixel_t
Definition: GuiTypes.h:39
UInt_t fTWidth
Definition: TGFSComboBox.h:40
virtual void Activate(Bool_t a)
Make entry active (highlight picture).
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
Definition: TGFrame.cxx:3187
auto * a
Definition: textangle.C:12
unsigned int UInt_t
Definition: RtypesCore.h:42
TGString * fText
Definition: TGFSComboBox.h:36
virtual void DoRedraw()
Redraw the tree listbox entry.
const TGPicture * fPic
Definition: TGFSComboBox.h:38
TText * text
Definition: TGFont.h:149
Double_t y[n]
Definition: legend1.C:17
virtual void Update(TGLBEntry *e)
Update text and picture of a listbox entry.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Definition: TRolke.cxx:630
TGSelectedPicture * fSelPic
Definition: TGFSComboBox.h:39
static const TGGC & GetDefaultGC()
Return default graphics context.
Bool_t fActive
Definition: TGFSComboBox.h:42
FontStruct_t fFontStruct
Definition: TGFSComboBox.h:44
TGString * fPath
Definition: TGFSComboBox.h:37
Definition: TGGC.h:31
GContext_t fNormGC
Definition: TGFSComboBox.h:43
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())
Create a tree (i.e.
ULong_t Handle_t
Definition: GuiTypes.h:25