Logo ROOT   6.16/01
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
29class TGPicture;
31
32
33class TGTreeLBEntry : public TGLBEntry {
34
35protected:
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;
50
51public:
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
75class TGFSComboBox : public TGComboBox {
76
77public:
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
ULong_t Handle_t
Definition: GuiTypes.h:25
Handle_t GContext_t
Definition: GuiTypes.h:37
Handle_t FontStruct_t
Definition: GuiTypes.h:38
ULong_t Pixel_t
Definition: GuiTypes.h:39
#define e(i)
Definition: RSha256.hxx:103
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
bool Bool_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
@ kSunkenFrame
Definition: TGFrame.h:61
@ kDoubleBorder
Definition: TGFrame.h:63
@ kHorizontalFrame
Definition: TGFrame.h:60
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a file system combo box as a C++ statement(s) on output stream out.
TGFSComboBox(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame|kSunkenFrame|kDoubleBorder, Pixel_t back=GetWhitePixel())
Create a file system combobox showing system directories.
virtual void Update(const char *path)
Update file system combo box.
Definition: TGFont.h:149
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition: TGFrame.cxx:691
Definition: TGGC.h:31
virtual void Activate(Bool_t a)
Make entry active (highlight picture).
const TGString * GetPath() const
Definition: TGFSComboBox.h:63
static const TGFont * fgDefaultFont
Definition: TGFSComboBox.h:48
virtual ~TGTreeLBEntry()
Delete tree listbox entry.
static TGGC * fgDefaultGC
Definition: TGFSComboBox.h:49
virtual TGDimension GetDefaultSize() const
Return default size of tree listbox entry.
UInt_t fTWidth
Definition: TGFSComboBox.h:40
virtual void DoRedraw()
Redraw the tree listbox entry.
const TGPicture * GetPicture() const
Definition: TGFSComboBox.h:62
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.
const TGPicture * fPic
Definition: TGFSComboBox.h:38
Bool_t fActive
Definition: TGFSComboBox.h:42
FontStruct_t fFontStruct
Definition: TGFSComboBox.h:44
UInt_t fTHeight
Definition: TGFSComboBox.h:41
TGString * fPath
Definition: TGFSComboBox.h:37
virtual void Update(TGLBEntry *e)
Update text and picture of a listbox entry.
static const TGGC & GetDefaultGC()
Return default graphics context.
const TGString * GetText() const
Definition: TGFSComboBox.h:61
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Redraw the tree listbox entry on pixmap/window.
GContext_t fNormGC
Definition: TGFSComboBox.h:43
TGSelectedPicture * fSelPic
Definition: TGFSComboBox.h:39
TGString * fText
Definition: TGFSComboBox.h:36
static FontStruct_t GetDefaultFontStruct()
Return default font structure.
TText * text
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
auto * a
Definition: textangle.C:12