Logo ROOT  
Reference Guide
TGFSComboBox.cxx
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
13 This source is based on Xclass95, a Win95-looking GUI toolkit.
14 Copyright (C) 1996, 1997 David Barth, Ricky Ralston, Hector Peraza.
15
16 Xclass95 is free software; you can redistribute it and/or
17 modify it under the terms of the GNU Library General Public
18 License as published by the Free Software Foundation; either
19 version 2 of the License, or (at your option) any later version.
20
21**************************************************************************/
22
23//////////////////////////////////////////////////////////////////////////
24// //
25// TGFSComboBox, TGTreeLBEntry //
26// //
27// This is a combo box that is used in the File Selection dialog box. //
28// It will allow the file path selection. //
29// //
30//////////////////////////////////////////////////////////////////////////
31
32#include "RConfigure.h"
33
34#include "TGFSComboBox.h"
35#include "TGResourcePool.h"
36#include "TGPicture.h"
37#include "TSystem.h"
38#include "Riostream.h"
39#include <stdlib.h>
40
43
44//--- this is temp here...
45
46struct Lbc_t {
47 const char *fName; // root prefix name
48 const char *fPath; // path
49 const char *fPixmap; // picture file
50 Int_t fId; // widget id
51 Int_t fIndent; // identification level
52 Int_t fFlags; // flag
53};
54
55static struct Lbc_t gLbc[32];
56
59
60////////////////////////////////////////////////////////////////////////////////
61/// Create a tree (i.e. entry can be indented) listbox entry.
62/// The strings text and path are adopted by the entry.
63
65 const TGPicture *pic, Int_t id, TGString *path,
66 GContext_t norm, FontStruct_t font, UInt_t options,
67 ULong_t back) :
68 TGLBEntry(p, id, options, back)
69{
70 if (text && !pic)
71 Error("TGTreeLBEntry", "icon not found for entry %s", text->GetString());
72
73 fPic = pic;
74 fSelPic = 0;
75 fTWidth = 0;
76 fText = text;
77 fPath = path;
78
79 fNormGC = norm;
80 fFontStruct = font;
81
83
84 int max_ascent, max_descent;
85 if (fText)
87 gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
88 fTHeight = max_ascent + max_descent;
90}
91
92////////////////////////////////////////////////////////////////////////////////
93/// Delete tree listbox entry.
94
96{
97 delete fText;
98 delete fPath;
99 delete fSelPic;
100}
101
102////////////////////////////////////////////////////////////////////////////////
103/// Make entry active (highlight picture).
104
106{
107 if (fActive == a) return;
108 fActive = a;
109
110 if (fActive) {
112 } else {
113 if (fSelPic) delete fSelPic;
114 fSelPic = 0;
115 }
116 DoRedraw();
117}
118
119////////////////////////////////////////////////////////////////////////////////
120/// Redraw the tree listbox entry on pixmap/window.
121
123{
124 int ix, iy, lx, ly;
125
126 ix = x;
127 iy = y + ((fHeight - fPic->GetHeight()) >> 1);
128 lx = x + (int)(fPic->GetWidth() + 4);
129 ly = y + (int)((fHeight - (fTHeight+1)) >> 1);
130
131 if (fActive) {
132 if (fSelPic) fSelPic->Draw(id, fNormGC, ix, iy);
134 gVirtualX->FillRectangle(id, fNormGC, lx-2, ly, fWidth-(lx-x), fTHeight+1);
136 } else {
137 fPic->Draw(id, fNormGC, ix, iy);
138 gVirtualX->SetForeground(fNormGC, fgWhitePixel);
139 gVirtualX->FillRectangle(id, fNormGC, lx-2, ly, fWidth-(lx-x), fTHeight+1);
140 gVirtualX->SetForeground(fNormGC, fgBlackPixel);
141 }
142
143 int max_ascent, max_descent;
144 gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
145
146 fText->Draw(id, fNormGC, lx, ly + max_ascent);
147}
148
149////////////////////////////////////////////////////////////////////////////////
150/// Redraw the tree listbox entry.
151
153{
154 DrawCopy(fId, 0, 0);
155}
156
157////////////////////////////////////////////////////////////////////////////////
158/// Return default size of tree listbox entry.
159
161{
162 TGDimension isize(fPic->GetWidth(), fPic->GetHeight());
163 TGDimension lsize(fTWidth, fTHeight+1);
164
165 return TGDimension(isize.fWidth + lsize.fWidth + 4,
166 TMath::Max(isize.fHeight, lsize.fHeight) + 2);
167}
168
169////////////////////////////////////////////////////////////////////////////////
170/// Update text and picture of a listbox entry.
171
173{
174 TGTreeLBEntry *te = (TGTreeLBEntry *) e;
175
176 if (fText) delete fText;
177 fText = new TGString(te->GetText());
178 fPic = te->GetPicture();
180 gVirtualX->ClearWindow(fId);
181 fClient->NeedRedraw(this);
182}
183
184////////////////////////////////////////////////////////////////////////////////
185/// Return default font structure.
186
188{
189 if (!fgDefaultFont)
190 fgDefaultFont = gClient->GetResourcePool()->GetDefaultFont();
192}
193
194////////////////////////////////////////////////////////////////////////////////
195/// Return default graphics context.
196
198{
199 if (!fgDefaultGC)
200 fgDefaultGC = new TGGC(*gClient->GetResourcePool()->GetFrameGC());
201 return *fgDefaultGC;
202}
203
204
205////////////////////////////////////////////////////////////////////////////////
206/// Create a file system combobox showing system directories.
207
209 ULong_t back) :
210 TGComboBox(parent, id, options | kOwnBackground, back)
211{
212 int i, indent;
213 const TGPicture *pic;
214 char *p;
215
216 SetTopEntry(new TGTreeLBEntry(this, new TGString("Current dir"),
217 fClient->GetPicture("folder_t.xpm"), 0),
218 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 4, 0, 0, 0));
219
222
223 //--- first check for the existence of some directories...
224
225 const char *homeDir = gSystem->HomeDirectory();
226#ifndef ROOTPREFIX
227 const char *rootSys = gSystem->Getenv("ROOTSYS");
228#else
229 // const char *rootSys = ROOTPREFIX;
230#endif
231
232 Int_t idx = 0;
233 TList *volumes = gSystem->GetVolumes("all");
234 TList *curvol = gSystem->GetVolumes("cur");
235 TString infos;
236 const char *curdrive = "";
237 if (volumes && curvol) {
238 TNamed *named = (TNamed *)curvol->At(0);
239 if (named) {
240 curdrive = named->GetName();
241 infos = named->GetTitle();
242 gLbc[idx].fName = StrDup(infos.Data());
243 gLbc[idx].fPath = StrDup(Form("%s\\", curdrive));
244 if (infos.Contains("Removable"))
245 gLbc[idx].fPixmap = StrDup("fdisk_t.xpm");
246 else if (infos.Contains("Local"))
247 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
248 else if (infos.Contains("CD"))
249 gLbc[idx].fPixmap = StrDup("cdrom_t.xpm");
250 else if (infos.Contains("Network"))
251 gLbc[idx].fPixmap = StrDup("netdisk_t.xpm");
252 else
253 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
254 gLbc[idx].fId = 1000;
255 gLbc[idx].fIndent = 0;
256 gLbc[idx].fFlags = 0;
257 ++idx;
258 }
259 else {
260 gLbc[idx].fName = StrDup("Root");
261 gLbc[idx].fPath = StrDup("/");
262 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
263 gLbc[idx].fId = 1000;
264 gLbc[idx].fIndent = 1;
265 gLbc[idx].fFlags = 0;
266 ++idx;
267 }
268 }
269 else {
270 gLbc[idx].fName = StrDup("Root");
271 gLbc[idx].fPath = StrDup("/");
272 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
273 gLbc[idx].fId = 1000;
274 gLbc[idx].fIndent = 1;
275 gLbc[idx].fFlags = 0;
276 ++idx;
277 gLbc[idx].fName = StrDup("Floppy");
278 gLbc[idx].fPath = StrDup("/floppy");
279 gLbc[idx].fPixmap = StrDup("fdisk_t.xpm");
280 gLbc[idx].fId = 2000;
281 gLbc[idx].fIndent = 1;
282 gLbc[idx].fFlags = 0;
283 ++idx;
284 gLbc[idx].fName = StrDup("CD-ROM");
285 gLbc[idx].fPath = StrDup("/cdrom");
286 gLbc[idx].fPixmap = StrDup("cdrom_t.xpm");
287 gLbc[idx].fId = 3000;
288 gLbc[idx].fIndent = 1;
289 gLbc[idx].fFlags = 0;
290 ++idx;
291 }
292 gLbc[idx].fName = StrDup("Home");
293 gLbc[idx].fPath = StrDup("$HOME");
294 gLbc[idx].fPixmap = StrDup("home_t.xpm");
295 gLbc[idx].fId = (idx+1) * 1000;
296 gLbc[idx].fIndent = 1;
297 gLbc[idx].fFlags = 0;
298 ++idx;
299#ifndef ROOTPREFIX
300 gLbc[idx].fName = StrDup("RootSys");
301 gLbc[idx].fPath = StrDup("$ROOTSYS");
302#else
303 gLbc[idx].fName = StrDup(ROOTPREFIX);
304 gLbc[idx].fPath = StrDup(ROOTPREFIX);
305#endif
306 gLbc[idx].fPixmap = StrDup("root_t.xpm");
307 gLbc[idx].fId = (idx+1) * 1000;
308 gLbc[idx].fIndent = 1;
309 gLbc[idx].fFlags = 0;
310 ++idx;
311
312 if (volumes && curvol) {
313 TIter next(volumes);
314 TNamed *drive;
315 while ((drive = (TNamed *)next())) {
316 if (!strcmp(drive->GetName(), curdrive))
317 continue;
318 infos = drive->GetTitle();
319 gLbc[idx].fName = StrDup(drive->GetTitle());
320 gLbc[idx].fPath = StrDup(Form("%s\\", drive->GetName()));
321 if (infos.Contains("Removable"))
322 gLbc[idx].fPixmap = StrDup("fdisk_t.xpm");
323 else if (infos.Contains("Local"))
324 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
325 else if (infos.Contains("CD"))
326 gLbc[idx].fPixmap = StrDup("cdrom_t.xpm");
327 else if (infos.Contains("Network"))
328 gLbc[idx].fPixmap = StrDup("netdisk_t.xpm");
329 else
330 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
331 gLbc[idx].fId = (idx+1) * 1000;
332 gLbc[idx].fIndent = 0;
333 gLbc[idx].fFlags = 0;
334 ++idx;
335 }
336 delete volumes;
337 delete curvol;
338 }
339 gLbc[idx].fName = 0;
340 gLbc[idx].fPath = 0;
341 gLbc[idx].fPixmap = 0;
342 gLbc[idx].fId = (idx+1) * 1000;
343 gLbc[idx].fIndent = 0;
344 gLbc[idx].fFlags = 0;
345
346 for (i = 0; gLbc[i].fPath != 0; ++i) {
347 if (strstr(gLbc[i].fPath, "$HOME") != 0) {
348 if (homeDir) {
349 int hlen = strlen(homeDir);
350 int blen = hlen + strlen(gLbc[i].fPath) - 3;
351 p = new char[blen];
352 strlcpy(p, homeDir, blen);
353 strlcat(p, &gLbc[i].fPath[5], blen-strlen(&gLbc[i].fPath[5]));
354 delete [] gLbc[i].fPath;
355 gLbc[i].fPath = p;
356 } else {
357 gLbc[i].fFlags = 0;
358 }
359 }
360#ifndef ROOTPREFIX
361 // Below should _only_ be called if the prefix isn't set at build
362 // time. The code below expands the occurance of `$ROOTSYS' in
363 // the table above. However, in the case of prefix being set at
364 // build time, we do not need to expand the prefix, as it is
365 // already known, so the entries in the table above are actually
366 // fully expanded.
367 if (strstr(gLbc[i].fPath, "$ROOTSYS") != 0) {
368 // Get the size of the prefix template
369 const int plen = 8;
370 if (rootSys) {
371 int hlen = strlen(rootSys);
372 // Allocate enough memory to hold prefix (hlen), and
373 // what's in the path (strlen(gLbc[i].fPath)) minus the
374 // prefix template size, and one character for terminating
375 // null.
376 int blen = hlen + strlen(gLbc[i].fPath) - plen + 1;
377 p = new char[blen];
378 strlcpy(p, rootSys, blen);
379 strlcat(p, &(gLbc[i].fPath[plen]), blen-strlen(&gLbc[i].fPath[plen]));
380 // Figure out where to put the terminating NULL
381 int npos = hlen + strlen(&(gLbc[i].fPath[plen]));
382 p[npos] = '\0';
383 delete [] gLbc[i].fPath;
384 gLbc[i].fPath = p;
385 } else {
386 gLbc[i].fFlags = 0;
387 }
388 }
389#endif
390 if (gSystem->AccessPathName(gLbc[i].fPath, kFileExists) == 0)
391 gLbc[i].fFlags = 1;
392 }
393
394 //--- then init the contents...
395
396 for (i = 0; gLbc[i].fName != 0; ++i) {
397 if (gLbc[i].fFlags) {
398 indent = 4 + (gLbc[i].fIndent * 10);
399 pic = fClient->GetPicture(gLbc[i].fPixmap);
400 if (!pic) Error("TGFSComboBox", "pixmap not found: %s", gLbc[i].fPixmap);
402 new TGString(gLbc[i].fName), pic, gLbc[i].fId,
403 new TGString(gLbc[i].fPath)),
405 }
406 }
408}
409
410////////////////////////////////////////////////////////////////////////////////
411/// Update file system combo box.
412
413void TGFSComboBox::Update(const char *path)
414{
415 char dirname[1024], mpath[1024];
416 const char *tailpath = 0;
417 int i, indent_lvl = 0, afterID = -1, sel = -1;
418
419 if (!path) return;
420
421 for (i = 0; gLbc[i].fPath != 0; ++i)
422 RemoveEntries(gLbc[i].fId+1, gLbc[i+1].fId-1);
423
424 int len = 0;
425 for (i = 0; gLbc[i].fName != 0; ++i) {
426 if (gLbc[i].fFlags) {
427 int slen = strlen(gLbc[i].fPath);
428 if (strncmp(path, gLbc[i].fPath, slen) == 0) {
429 if (slen > len) {
430 sel = afterID = gLbc[i].fId;
431 indent_lvl = gLbc[i].fIndent + 1;
432 if ((len > 0) && ((path[slen] == '\\') || (path[slen] == '/') ||
433 (path[slen] == 0)))
434 tailpath = path + slen;
435 strlcpy(mpath, gLbc[i].fPath, 1024);
436 len = slen;
437 }
438 }
439 }
440 }
441
442 if (tailpath && *tailpath) {
443 if ((*tailpath == '/') || (*tailpath == '\\')) ++tailpath;
444 if (*tailpath)
445 while (1) {
446 const char *picname;
447 const char *semi = strchr(tailpath, '/');
448 if (semi == 0) semi = strchr(tailpath, '\\');
449 if (semi == 0) {
450 strlcpy(dirname, tailpath, 1024);
451 picname = "ofolder_t.xpm";
452 } else {
453 strlcpy(dirname, tailpath, (semi-tailpath)+1);
454 picname = "folder_t.xpm";
455 }
456 if ((mpath[strlen(mpath)-1] != '/') &&
457 (mpath[strlen(mpath)-1] != '\\')) {
458 strlcat(mpath, "/", 1024-strlen(mpath));
459 }
460 strlcat(mpath, dirname, 1024-strlen(mpath));
461 int indent = 4 + (indent_lvl * 10);
462 const TGPicture *pic = fClient->GetPicture(picname);
463 if (!pic) Error("Update", "pixmap not found: %s", picname);
465 new TGString(dirname), pic, afterID+1,
466 new TGString(mpath)),
468 indent, 0, 0, 0),
469 afterID);
470 sel = ++afterID;
471 ++indent_lvl;
472 if (semi == 0) break;
473 tailpath = ++semi;
474 }
475 }
476 if (sel > 0) Select(sel);
477}
478
479////////////////////////////////////////////////////////////////////////////////
480/// Save a file system combo box as a C++ statement(s) on output stream out.
481
482void TGFSComboBox::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
483{
484 if (fBackground != GetWhitePixel()) SaveUserColor(out, option);
485
486 out << std::endl << " // file system combo box" << std::endl;
487 out << " TGFSComboBox *";
488 out << GetName() << " = new TGFSComboBox(" << fParent->GetName()
489 << "," << fWidgetId;
490 if (fBackground == GetWhitePixel()) {
492 out <<");" << std::endl;
493 } else {
494 out << "," << GetOptionString() <<");" << std::endl;
495 }
496 } else {
497 out << "," << GetOptionString() << ",ucolor);" << std::endl;
498 }
499 if (option && strstr(option, "keep_names"))
500 out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
501
502 out << " " << GetName() << "->Resize(" << GetWidth() << ","
503 << GetHeight() << ");" << std::endl;
504 out << " " << GetName() << "->Select(" << GetSelected() << ");" << std::endl;
505
506}
ULong_t Handle_t
Definition: GuiTypes.h:25
const Mask_t kButtonPressMask
Definition: GuiTypes.h:160
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:162
Handle_t GContext_t
Definition: GuiTypes.h:37
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:161
Handle_t FontStruct_t
Definition: GuiTypes.h:38
#define e(i)
Definition: RSha256.hxx:103
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
unsigned long ULong_t
Definition: RtypesCore.h:51
bool Bool_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:62
#define ClassImp(name)
Definition: Rtypes.h:365
static void indent(ostringstream &buf, int indent_level)
#define gClient
Definition: TGClient.h:166
static struct Lbc_t gLbc[32]
@ kSunkenFrame
Definition: TGFrame.h:61
@ kDoubleBorder
Definition: TGFrame.h:63
@ kHorizontalFrame
Definition: TGFrame.h:60
@ kOwnBackground
Definition: TGFrame.h:69
@ kLHintsExpandY
Definition: TGLayout.h:38
@ kLHintsTop
Definition: TGLayout.h:34
@ kLHintsExpandX
Definition: TGLayout.h:37
XFontStruct * id
Definition: TGX11.cxx:108
char * Form(const char *fmt,...)
char * StrDup(const char *str)
Duplicate the string str.
Definition: TString.cxx:2490
@ kFileExists
Definition: TSystem.h:45
R__EXTERN TSystem * gSystem
Definition: TSystem.h:560
#define gVirtualX
Definition: TVirtualX.h:345
const TGResourcePool * GetResourcePool() const
Definition: TGClient.h:133
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition: TGClient.cxx:289
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:372
virtual Int_t GetSelected() const
Definition: TGComboBox.h:134
virtual void AddEntry(TGString *s, Int_t id)
Definition: TGComboBox.h:106
TGListBox * fListBox
Definition: TGComboBox.h:78
virtual void SetTopEntry(TGLBEntry *e, TGLayoutHints *lh)
Set a new combo box value (normally update of text string in fSelEntry is done via fSelEntry::Update(...
Definition: TGComboBox.cxx:432
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Definition: TGComboBox.h:125
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
Definition: TGComboBox.cxx:450
virtual void InsertEntry(TGString *s, Int_t id, Int_t afterID)
Definition: TGComboBox.h:112
UInt_t fHeight
Definition: TGDimension.h:30
UInt_t fWidth
Definition: TGDimension.h:29
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
FontStruct_t GetFontStruct() const
Definition: TGFont.h:193
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:321
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition: TGFrame.cxx:691
UInt_t fHeight
Definition: TGFrame.h:135
static Pixel_t fgDefaultSelectedBackground
Definition: TGFrame.h:149
virtual UInt_t GetOptions() const
Definition: TGFrame.h:244
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition: TGFrame.cxx:2462
UInt_t fWidth
Definition: TGFrame.h:134
UInt_t GetHeight() const
Definition: TGFrame.h:272
static Pixel_t fgWhitePixel
Definition: TGFrame.h:150
UInt_t GetWidth() const
Definition: TGFrame.h:271
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition: TGFrame.cxx:2435
Pixel_t fBackground
Definition: TGFrame.h:142
static Pixel_t fgBlackPixel
Definition: TGFrame.h:151
Definition: TGGC.h:31
virtual TGFrame * GetContainer() const
Definition: TGListBox.h:335
TGClient * fClient
Definition: TGObject.h:37
Handle_t fId
Definition: TGObject.h:36
UInt_t GetHeight() const
Definition: TGPicture.h:64
void Draw(Option_t *="")
Default Draw method for all objects.
Definition: TGPicture.h:57
UInt_t GetWidth() const
Definition: TGPicture.h:63
Pixel_t GetSelectedFgndColor() const
Int_t GetLength() const
Definition: TGString.h:39
const char * GetString() const
Definition: TGString.h:40
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
Definition: TGString.cxx:51
virtual void Activate(Bool_t a)
Make entry active (highlight picture).
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.
Int_t fWidgetId
Definition: TGWidget.h:58
virtual void SetWindowName(const char *name=0)
Set window name.
Definition: TGWindow.cxx:118
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:221
const TGWindow * fParent
Definition: TGWindow.h:37
TString fName
Definition: TGWindow.h:39
A doubly linked list.
Definition: TList.h:44
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
Definition: TList.cxx:354
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:880
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:619
virtual const char * Getenv(const char *env)
Get environment variable.
Definition: TSystem.cxx:1653
virtual const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
Definition: TSystem.cxx:895
virtual TList * GetVolumes(Option_t *) const
Definition: TSystem.h:455
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition: TSystem.cxx:1287
TText * text
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:212
auto * a
Definition: textangle.C:12