Logo ROOT   6.08/07
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 #ifndef ROOT_TGComboBox
26 #include "TGComboBox.h"
27 #endif
28 
29 
30 
31 class TGPicture;
32 class TGSelectedPicture;
33 
34 
35 class TGTreeLBEntry : public TGLBEntry {
36 
37 protected:
38  TGString *fText; // entry description
39  TGString *fPath; // entry path
40  const TGPicture *fPic; // entry picture
41  TGSelectedPicture *fSelPic; // selected picture
42  UInt_t fTWidth; // width of entry text
43  UInt_t fTHeight; // height of entry text
44  Bool_t fActive; // true if active
45  GContext_t fNormGC; // entry drawing context
47 
48  virtual void DoRedraw();
49 
50  static const TGFont *fgDefaultFont;
51  static TGGC *fgDefaultGC;
52 
53 public:
55  static const TGGC &GetDefaultGC();
56 
57  TGTreeLBEntry(const TGWindow *p = 0, TGString *text = 0, const TGPicture *pic = 0,
58  Int_t id = -1, TGString *path = 0, GContext_t norm = GetDefaultGC()(),
60  UInt_t options = kHorizontalFrame, Pixel_t back = GetWhitePixel());
61  virtual ~TGTreeLBEntry();
62 
63  const TGString *GetText() const { return fText; }
64  const TGPicture *GetPicture() const { return fPic; }
65  const TGString *GetPath() const { return fPath; }
66 
67  virtual TGDimension GetDefaultSize() const;
68 
69  virtual void Activate(Bool_t a);
70  virtual void Update(TGLBEntry *e);
71  virtual void DrawCopy(Handle_t id, Int_t x, Int_t y);
72 
73  ClassDef(TGTreeLBEntry,0) // TGFSComboBox entry
74 };
75 
76 
77 class TGFSComboBox : public TGComboBox {
78 
79 public:
80  TGFSComboBox(const TGWindow *p = 0, Int_t id = -1,
83 
84  virtual void Update(const char *path);
85  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
86 
87  ClassDef(TGFSComboBox,0) // Combo box widget for file system path
88 };
89 
90 #endif
const TGString * GetPath() const
Definition: TGFSComboBox.h:65
Handle_t FontStruct_t
Definition: GuiTypes.h:40
UInt_t fTHeight
Definition: TGFSComboBox.h:43
static TGGC * fgDefaultGC
Definition: TGFSComboBox.h:51
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:50
Handle_t GContext_t
Definition: GuiTypes.h:39
static FontStruct_t GetDefaultFontStruct()
Return default font structure.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TArc * a
Definition: textangle.C:12
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:63
virtual ~TGTreeLBEntry()
Delete tree listbox entry.
virtual TGDimension GetDefaultSize() const
Return default size of tree listbox entry.
const TGPicture * GetPicture() const
Definition: TGFSComboBox.h:64
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
UInt_t fTWidth
Definition: TGFSComboBox.h:42
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:3188
unsigned int UInt_t
Definition: RtypesCore.h:42
TGString * fText
Definition: TGFSComboBox.h:38
virtual void DoRedraw()
Redraw the tree listbox entry.
const TGPicture * fPic
Definition: TGFSComboBox.h:40
TText * text
Definition: TGFont.h:155
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:41
static const TGGC & GetDefaultGC()
Return default graphics context.
Bool_t fActive
Definition: TGFSComboBox.h:44
FontStruct_t fFontStruct
Definition: TGFSComboBox.h:46
TGString * fPath
Definition: TGFSComboBox.h:39
double norm(double *x, double *p)
Definition: unuranDistr.cxx:40
Definition: TGGC.h:35
GContext_t fNormGC
Definition: TGFSComboBox.h:45
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:27