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 "TVirtualX.h"
40#include <stdlib.h>
41
44
45//--- this is temp here...
46
47struct Lbc_t {
48 const char *fName; // root prefix name
49 const char *fPath; // path
50 const char *fPixmap; // picture file
51 Int_t fId; // widget id
52 Int_t fIndent; // identification level
53 Int_t fFlags; // flag
54};
55
56static struct Lbc_t gLbc[32];
57
60
61////////////////////////////////////////////////////////////////////////////////
62/// Create a tree (i.e. entry can be indented) listbox entry.
63/// The strings text and path are adopted by the entry.
64
66 const TGPicture *pic, Int_t id, TGString *path,
67 GContext_t norm, FontStruct_t font, UInt_t options,
68 ULong_t back) :
69 TGLBEntry(p, id, options, back)
70{
71 if (text && !pic)
72 Error("TGTreeLBEntry", "icon not found for entry %s", text->GetString());
73
74 fPic = pic;
75 fSelPic = 0;
76 fTWidth = 0;
77 fText = text;
78 fPath = path;
79
80 fNormGC = norm;
81 fFontStruct = font;
82
84
85 int max_ascent, max_descent;
86 if (fText)
88 gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
89 fTHeight = max_ascent + max_descent;
91}
92
93////////////////////////////////////////////////////////////////////////////////
94/// Delete tree listbox entry.
95
97{
98 delete fText;
99 delete fPath;
100 delete fSelPic;
101}
102
103////////////////////////////////////////////////////////////////////////////////
104/// Make entry active (highlight picture).
105
107{
108 if (fActive == a) return;
109 fActive = a;
110
111 if (fActive) {
113 } else {
114 if (fSelPic) delete fSelPic;
115 fSelPic = 0;
116 }
117 DoRedraw();
118}
119
120////////////////////////////////////////////////////////////////////////////////
121/// Redraw the tree listbox entry on pixmap/window.
122
124{
125 int ix, iy, lx, ly;
126
127 ix = x;
128 iy = y + ((fHeight - fPic->GetHeight()) >> 1);
129 lx = x + (int)(fPic->GetWidth() + 4);
130 ly = y + (int)((fHeight - (fTHeight+1)) >> 1);
131
132 if (fActive) {
133 if (fSelPic) fSelPic->Draw(id, fNormGC, ix, iy);
135 gVirtualX->FillRectangle(id, fNormGC, lx-2, ly, fWidth-(lx-x), fTHeight+1);
137 } else {
138 fPic->Draw(id, fNormGC, ix, iy);
139 gVirtualX->SetForeground(fNormGC, fgWhitePixel);
140 gVirtualX->FillRectangle(id, fNormGC, lx-2, ly, fWidth-(lx-x), fTHeight+1);
141 gVirtualX->SetForeground(fNormGC, fgBlackPixel);
142 }
143
144 int max_ascent, max_descent;
145 gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
146
147 fText->Draw(id, fNormGC, lx, ly + max_ascent);
148}
149
150////////////////////////////////////////////////////////////////////////////////
151/// Redraw the tree listbox entry.
152
154{
155 DrawCopy(fId, 0, 0);
156}
157
158////////////////////////////////////////////////////////////////////////////////
159/// Return default size of tree listbox entry.
160
162{
163 TGDimension isize(fPic->GetWidth(), fPic->GetHeight());
164 TGDimension lsize(fTWidth, fTHeight+1);
165
166 return TGDimension(isize.fWidth + lsize.fWidth + 4,
167 TMath::Max(isize.fHeight, lsize.fHeight) + 2);
168}
169
170////////////////////////////////////////////////////////////////////////////////
171/// Update text and picture of a listbox entry.
172
174{
175 TGTreeLBEntry *te = (TGTreeLBEntry *) e;
176
177 if (fText) delete fText;
178 fText = new TGString(te->GetText());
179 fPic = te->GetPicture();
181 gVirtualX->ClearWindow(fId);
182 fClient->NeedRedraw(this);
183}
184
185////////////////////////////////////////////////////////////////////////////////
186/// Return default font structure.
187
189{
190 if (!fgDefaultFont)
191 fgDefaultFont = gClient->GetResourcePool()->GetDefaultFont();
193}
194
195////////////////////////////////////////////////////////////////////////////////
196/// Return default graphics context.
197
199{
200 if (!fgDefaultGC)
201 fgDefaultGC = new TGGC(*gClient->GetResourcePool()->GetFrameGC());
202 return *fgDefaultGC;
203}
204
205
206////////////////////////////////////////////////////////////////////////////////
207/// Create a file system combobox showing system directories.
208
210 ULong_t back) :
211 TGComboBox(parent, id, options | kOwnBackground, back)
212{
213 int i, indent;
214 const TGPicture *pic;
215 char *p;
216
217 SetTopEntry(new TGTreeLBEntry(this, new TGString("Current dir"),
218 fClient->GetPicture("folder_t.xpm"), 0),
219 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 4, 0, 0, 0));
220
223
224 //--- first check for the existence of some directories...
225
226 const char *homeDir = gSystem->HomeDirectory();
227#ifndef ROOTPREFIX
228 const char *rootSys = gSystem->Getenv("ROOTSYS");
229#else
230 // const char *rootSys = ROOTPREFIX;
231#endif
232
233 Int_t idx = 0;
234 TList *volumes = gSystem->GetVolumes("all");
235 TList *curvol = gSystem->GetVolumes("cur");
236 TString infos;
237 const char *curdrive = "";
238 if (volumes && curvol) {
239 TNamed *named = (TNamed *)curvol->At(0);
240 if (named) {
241 curdrive = named->GetName();
242 infos = named->GetTitle();
243 gLbc[idx].fName = StrDup(infos.Data());
244 gLbc[idx].fPath = StrDup(Form("%s\\", curdrive));
245 if (infos.Contains("Removable"))
246 gLbc[idx].fPixmap = StrDup("fdisk_t.xpm");
247 else if (infos.Contains("Local"))
248 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
249 else if (infos.Contains("CD"))
250 gLbc[idx].fPixmap = StrDup("cdrom_t.xpm");
251 else if (infos.Contains("Network"))
252 gLbc[idx].fPixmap = StrDup("netdisk_t.xpm");
253 else
254 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
255 gLbc[idx].fId = 1000;
256 gLbc[idx].fIndent = 0;
257 gLbc[idx].fFlags = 0;
258 ++idx;
259 }
260 else {
261 gLbc[idx].fName = StrDup("Root");
262 gLbc[idx].fPath = StrDup("/");
263 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
264 gLbc[idx].fId = 1000;
265 gLbc[idx].fIndent = 1;
266 gLbc[idx].fFlags = 0;
267 ++idx;
268 }
269 }
270 else {
271 gLbc[idx].fName = StrDup("Root");
272 gLbc[idx].fPath = StrDup("/");
273 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
274 gLbc[idx].fId = 1000;
275 gLbc[idx].fIndent = 1;
276 gLbc[idx].fFlags = 0;
277 ++idx;
278 gLbc[idx].fName = StrDup("Floppy");
279 gLbc[idx].fPath = StrDup("/floppy");
280 gLbc[idx].fPixmap = StrDup("fdisk_t.xpm");
281 gLbc[idx].fId = 2000;
282 gLbc[idx].fIndent = 1;
283 gLbc[idx].fFlags = 0;
284 ++idx;
285 gLbc[idx].fName = StrDup("CD-ROM");
286 gLbc[idx].fPath = StrDup("/cdrom");
287 gLbc[idx].fPixmap = StrDup("cdrom_t.xpm");
288 gLbc[idx].fId = 3000;
289 gLbc[idx].fIndent = 1;
290 gLbc[idx].fFlags = 0;
291 ++idx;
292 }
293 gLbc[idx].fName = StrDup("Home");
294 gLbc[idx].fPath = StrDup("$HOME");
295 gLbc[idx].fPixmap = StrDup("home_t.xpm");
296 gLbc[idx].fId = (idx+1) * 1000;
297 gLbc[idx].fIndent = 1;
298 gLbc[idx].fFlags = 0;
299 ++idx;
300#ifndef ROOTPREFIX
301 gLbc[idx].fName = StrDup("RootSys");
302 gLbc[idx].fPath = StrDup("$ROOTSYS");
303#else
304 gLbc[idx].fName = StrDup(ROOTPREFIX);
305 gLbc[idx].fPath = StrDup(ROOTPREFIX);
306#endif
307 gLbc[idx].fPixmap = StrDup("root_t.xpm");
308 gLbc[idx].fId = (idx+1) * 1000;
309 gLbc[idx].fIndent = 1;
310 gLbc[idx].fFlags = 0;
311 ++idx;
312
313 if (volumes && curvol) {
314 TIter next(volumes);
315 TNamed *drive;
316 while ((drive = (TNamed *)next())) {
317 if (!strcmp(drive->GetName(), curdrive))
318 continue;
319 infos = drive->GetTitle();
320 gLbc[idx].fName = StrDup(drive->GetTitle());
321 gLbc[idx].fPath = StrDup(Form("%s\\", drive->GetName()));
322 if (infos.Contains("Removable"))
323 gLbc[idx].fPixmap = StrDup("fdisk_t.xpm");
324 else if (infos.Contains("Local"))
325 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
326 else if (infos.Contains("CD"))
327 gLbc[idx].fPixmap = StrDup("cdrom_t.xpm");
328 else if (infos.Contains("Network"))
329 gLbc[idx].fPixmap = StrDup("netdisk_t.xpm");
330 else
331 gLbc[idx].fPixmap = StrDup("hdisk_t.xpm");
332 gLbc[idx].fId = (idx+1) * 1000;
333 gLbc[idx].fIndent = 0;
334 gLbc[idx].fFlags = 0;
335 ++idx;
336 }
337 delete volumes;
338 delete curvol;
339 }
340 gLbc[idx].fName = 0;
341 gLbc[idx].fPath = 0;
342 gLbc[idx].fPixmap = 0;
343 gLbc[idx].fId = (idx+1) * 1000;
344 gLbc[idx].fIndent = 0;
345 gLbc[idx].fFlags = 0;
346
347 for (i = 0; gLbc[i].fPath != 0; ++i) {
348 if (strstr(gLbc[i].fPath, "$HOME") != 0) {
349 if (homeDir) {
350 int hlen = strlen(homeDir);
351 int blen = hlen + strlen(gLbc[i].fPath) - 3;
352 p = new char[blen];
353 strlcpy(p, homeDir, blen);
354 strlcat(p, &gLbc[i].fPath[5], blen-strlen(&gLbc[i].fPath[5]));
355 delete [] gLbc[i].fPath;
356 gLbc[i].fPath = p;
357 } else {
358 gLbc[i].fFlags = 0;
359 }
360 }
361#ifndef ROOTPREFIX
362 // Below should _only_ be called if the prefix isn't set at build
363 // time. The code below expands the occurance of `$ROOTSYS' in
364 // the table above. However, in the case of prefix being set at
365 // build time, we do not need to expand the prefix, as it is
366 // already known, so the entries in the table above are actually
367 // fully expanded.
368 if (strstr(gLbc[i].fPath, "$ROOTSYS") != 0) {
369 // Get the size of the prefix template
370 const int plen = 8;
371 if (rootSys) {
372 int hlen = strlen(rootSys);
373 // Allocate enough memory to hold prefix (hlen), and
374 // what's in the path (strlen(gLbc[i].fPath)) minus the
375 // prefix template size, and one character for terminating
376 // null.
377 int blen = hlen + strlen(gLbc[i].fPath) - plen + 1;
378 p = new char[blen];
379 strlcpy(p, rootSys, blen);
380 strlcat(p, &(gLbc[i].fPath[plen]), blen-strlen(&gLbc[i].fPath[plen]));
381 // Figure out where to put the terminating NULL
382 int npos = hlen + strlen(&(gLbc[i].fPath[plen]));
383 p[npos] = '\0';
384 delete [] gLbc[i].fPath;
385 gLbc[i].fPath = p;
386 } else {
387 gLbc[i].fFlags = 0;
388 }
389 }
390#endif
391 if (gSystem->AccessPathName(gLbc[i].fPath, kFileExists) == 0)
392 gLbc[i].fFlags = 1;
393 }
394
395 //--- then init the contents...
396
397 for (i = 0; gLbc[i].fName != 0; ++i) {
398 if (gLbc[i].fFlags) {
399 indent = 4 + (gLbc[i].fIndent * 10);
400 pic = fClient->GetPicture(gLbc[i].fPixmap);
401 if (!pic) Error("TGFSComboBox", "pixmap not found: %s", gLbc[i].fPixmap);
403 new TGString(gLbc[i].fName), pic, gLbc[i].fId,
404 new TGString(gLbc[i].fPath)),
406 }
407 }
409}
410
411////////////////////////////////////////////////////////////////////////////////
412/// Update file system combo box.
413
414void TGFSComboBox::Update(const char *path)
415{
416 char dirname[1024], mpath[1024];
417 const char *tailpath = 0;
418 int i, indent_lvl = 0, afterID = -1, sel = -1;
419
420 if (!path) return;
421
422 for (i = 0; gLbc[i].fPath != 0; ++i)
423 RemoveEntries(gLbc[i].fId+1, gLbc[i+1].fId-1);
424
425 int len = 0;
426 for (i = 0; gLbc[i].fName != 0; ++i) {
427 if (gLbc[i].fFlags) {
428 int slen = strlen(gLbc[i].fPath);
429 if (strncmp(path, gLbc[i].fPath, slen) == 0) {
430 if (slen > len) {
431 sel = afterID = gLbc[i].fId;
432 indent_lvl = gLbc[i].fIndent + 1;
433 if ((len > 0) && ((path[slen] == '\\') || (path[slen] == '/') ||
434 (path[slen] == 0)))
435 tailpath = path + slen;
436 strlcpy(mpath, gLbc[i].fPath, 1024);
437 len = slen;
438 }
439 }
440 }
441 }
442
443 if (tailpath && *tailpath) {
444 if ((*tailpath == '/') || (*tailpath == '\\')) ++tailpath;
445 if (*tailpath)
446 while (1) {
447 const char *picname;
448 const char *semi = strchr(tailpath, '/');
449 if (semi == 0) semi = strchr(tailpath, '\\');
450 if (semi == 0) {
451 strlcpy(dirname, tailpath, 1024);
452 picname = "ofolder_t.xpm";
453 } else {
454 strlcpy(dirname, tailpath, (semi-tailpath)+1);
455 picname = "folder_t.xpm";
456 }
457 if ((mpath[strlen(mpath)-1] != '/') &&
458 (mpath[strlen(mpath)-1] != '\\')) {
459 strlcat(mpath, "/", 1024-strlen(mpath));
460 }
461 strlcat(mpath, dirname, 1024-strlen(mpath));
462 int indent = 4 + (indent_lvl * 10);
463 const TGPicture *pic = fClient->GetPicture(picname);
464 if (!pic) Error("Update", "pixmap not found: %s", picname);
466 new TGString(dirname), pic, afterID+1,
467 new TGString(mpath)),
469 indent, 0, 0, 0),
470 afterID);
471 sel = ++afterID;
472 ++indent_lvl;
473 if (semi == 0) break;
474 tailpath = ++semi;
475 }
476 }
477 if (sel > 0) Select(sel);
478}
479
480////////////////////////////////////////////////////////////////////////////////
481/// Save a file system combo box as a C++ statement(s) on output stream out.
482
483void TGFSComboBox::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
484{
485 if (fBackground != GetWhitePixel()) SaveUserColor(out, option);
486
487 out << std::endl << " // file system combo box" << std::endl;
488 out << " TGFSComboBox *";
489 out << GetName() << " = new TGFSComboBox(" << fParent->GetName()
490 << "," << fWidgetId;
491 if (fBackground == GetWhitePixel()) {
493 out <<");" << std::endl;
494 } else {
495 out << "," << GetOptionString() <<");" << std::endl;
496 }
497 } else {
498 out << "," << GetOptionString() << ",ucolor);" << std::endl;
499 }
500 if (option && strstr(option, "keep_names"))
501 out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
502
503 out << " " << GetName() << "->Resize(" << GetWidth() << ","
504 << GetHeight() << ");" << std::endl;
505 out << " " << GetName() << "->Select(" << GetSelected() << ");" << std::endl;
506
507}
unsigned int fFlags
ULong_t Handle_t
Definition: GuiTypes.h:25
const Mask_t kButtonPressMask
Definition: GuiTypes.h:160
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:162
@ kSunkenFrame
Definition: GuiTypes.h:383
@ kDoubleBorder
Definition: GuiTypes.h:385
@ kHorizontalFrame
Definition: GuiTypes.h:382
@ kOwnBackground
Definition: GuiTypes.h:391
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:43
const Bool_t kFALSE
Definition: RtypesCore.h:90
unsigned long ULong_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:64
#define ClassImp(name)
Definition: Rtypes.h:361
static void indent(ostringstream &buf, int indent_level)
#define gClient
Definition: TGClient.h:166
static struct Lbc_t gLbc[32]
@ 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:43
R__EXTERN TSystem * gSystem
Definition: TSystem.h:556
#define gVirtualX
Definition: TVirtualX.h:338
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:433
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:451
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:323
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition: TGFrame.cxx:693
UInt_t fHeight
Definition: TGFrame.h:113
static Pixel_t fgDefaultSelectedBackground
Definition: TGFrame.h:127
virtual UInt_t GetOptions() const
Definition: TGFrame.h:222
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition: TGFrame.cxx:2464
UInt_t fWidth
Definition: TGFrame.h:112
UInt_t GetHeight() const
Definition: TGFrame.h:250
static Pixel_t fgWhitePixel
Definition: TGFrame.h:128
UInt_t GetWidth() const
Definition: TGFrame.h:249
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition: TGFrame.cxx:2437
Pixel_t fBackground
Definition: TGFrame.h:120
static Pixel_t fgBlackPixel
Definition: TGFrame.h:129
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:119
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:326
const TGWindow * fParent
Definition: TGWindow.h:36
TString fName
Definition: TGWindow.h:38
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:356
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:891
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:1658
virtual TList * GetVolumes(Option_t *) const
Definition: TSystem.h:451
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:1291
virtual const char * HomeDirectory(const char *userName=nullptr)
Return the user's home directory.
Definition: TSystem.cxx:883
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