KaliVeda
Toolkit for HIC analysis
KVFileDialog.cpp
1 // @(#)root/gui:$Id: KVFileDialog.cxx 43842 2012-04-19 13:09:11Z bellenot $
2 // Author: Fons Rademakers 20/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 #include "KVFileDialog.h"
14 #include "TGLabel.h"
15 #include "TGButton.h"
16 #include "TGTextEntry.h"
17 #include "TGComboBox.h"
18 #include "TGListView.h"
19 #include "TGFSContainer.h"
20 #include "TGFSComboBox.h"
21 #include "TGMsgBox.h"
22 #include "TSystem.h"
23 #include "TGInputDialog.h"
24 #include "TObjString.h"
25 
26 #include <sys/stat.h>
27 
28 
30 
31 enum EFileFialog {
32  kIDF_CDUP,
34  kIDF_LIST,
37  kIDF_FSLB,
39  kIDF_OK,
41 };
42 
43 
44 
46 
47 static const char* gDefTypes[] = { "All files", "*",
48  "ROOT files", "*.root",
49  "ROOT macros", "*.C",
50  0, 0
51  };
52 
53 
54 static TGFileInfo gInfo;
55 
56 
58 
59 
60 
61 
66  EKVFileDialogMode dlg_type, TGFileInfo* file_info) :
67  TGTransientFrame(p, main, 10, 10, kVerticalFrame),
68  fSaveWorkingDirectory(gSystem->WorkingDirectory())
69 {
70  // Create a file selection dialog. Depending on the dlg_type it can be
71  // used for opening or saving a file or selecting a directory.
72 
73  fDlgMode = dlg_type;
74  SetCleanup(kDeepCleanup);
75  Connect("CloseWindow()", "KVFileDialog", this, "CloseWindow()");
76  DontCallClose();
77 
78  int i;
79 
80  if (!p && !main) {
81  MakeZombie();
82  return;
83  }
84  if (!file_info) {
85  Error("KVFileDialog", "file_info argument not set");
86  fFileInfo = &gInfo;
87  if (fFileInfo->fIniDir) {
88  delete [] fFileInfo->fIniDir;
89  fFileInfo->fIniDir = 0;
90  }
91  if (fFileInfo->fFilename) {
92  delete [] fFileInfo->fFilename;
93  fFileInfo->fFilename = 0;
94  }
95  fFileInfo->fFileTypeIdx = 0;
96  }
97  else
98  fFileInfo = file_info;
99 
100  if (!fFileInfo->fFileTypes)
101  fFileInfo->fFileTypes = gDefTypes;
102 
103  if (!fFileInfo->fIniDir)
104  fFileInfo->fIniDir = StrDup(".");
105 
106  TGHorizontalFrame* fHtop = new TGHorizontalFrame(this, 10, 10);
107 
108  //--- top toolbar elements
109  TGLabel* fLookin = new TGLabel(fHtop, new TGHotString((dlg_type == kKVFDSave)
110  ? "S&ave in:" : "&Look in:"));
111  fTreeLB = new TGFSComboBox(fHtop, kIDF_FSLB);
112  fTreeLB->Associate(this);
113 
114  fPcdup = fClient->GetPicture("tb_uplevel.xpm");
115  fPnewf = fClient->GetPicture("tb_newfolder.xpm");
116  fPlist = fClient->GetPicture("tb_list.xpm");
117  fPdetails = fClient->GetPicture("tb_details.xpm");
118 
119  if (!(fPcdup && fPnewf && fPlist && fPdetails))
120  Error("KVFileDialog", "missing toolbar pixmap(s).\n");
121 
122  fCdup = new TGPictureButton(fHtop, fPcdup, kIDF_CDUP);
123  fNewf = new TGPictureButton(fHtop, fPnewf, kIDF_NEW_FOLDER);
124  fList = new TGPictureButton(fHtop, fPlist, kIDF_LIST);
125  fDetails = new TGPictureButton(fHtop, fPdetails, kIDF_DETAILS);
126 
127  fCdup->SetStyle(gClient->GetStyle());
128  fNewf->SetStyle(gClient->GetStyle());
129  fList->SetStyle(gClient->GetStyle());
130  fDetails->SetStyle(gClient->GetStyle());
131 
132  fCdup->SetToolTipText("Up One Level");
133  fNewf->SetToolTipText("Create New Folder");
134  fList->SetToolTipText("List");
135  fDetails->SetToolTipText("Details");
136 
137  fCdup->Associate(this);
138  fNewf->Associate(this);
139  fList->Associate(this);
140  fDetails->Associate(this);
141 
142  fList->AllowStayDown(kTRUE);
143  fDetails->AllowStayDown(kTRUE);
144 
145  fTreeLB->Resize(200, fTreeLB->GetDefaultHeight());
146 
147  fHtop->AddFrame(fLookin, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2));
148  fHtop->AddFrame(fTreeLB, new TGLayoutHints(kLHintsLeft | kLHintsExpandY, 3, 0, 2, 2));
149  fHtop->AddFrame(fCdup, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 2, 2));
150  fHtop->AddFrame(fNewf, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 2, 2));
151  fHtop->AddFrame(fList, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 2, 2));
152  fHtop->AddFrame(fDetails, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 8, 2, 2));
153 
154  if (dlg_type == kKVFDSave) {
155  fCheckB = new TGCheckButton(fHtop, "&Overwrite", kIDF_CHECKB);
156  fCheckB->SetToolTipText("Overwrite a file without displaying a message if selected");
157  }
158  else {
159  fCheckB = new TGCheckButton(fHtop, "&Multiple files", kIDF_CHECKB);
160  fCheckB->SetToolTipText("Allows multiple file selection when SHIFT is pressed");
161  fCheckB->Connect("Toggled(Bool_t)", "TGFileInfo", fFileInfo, "SetMultipleSelection(Bool_t)");
162  }
163  fHtop->AddFrame(fCheckB, new TGLayoutHints(kLHintsLeft | kLHintsCenterY));
164  fCheckB->SetOn(fFileInfo->fMultipleSelection);
165  AddFrame(fHtop, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 4, 4, 3, 1));
166 
167  //--- file view
168 
169  fFv = new TGListView(this, 400, 161);
170 
171  fFc = new TGFileContainer(fFv->GetViewPort(),
172  10, 10, kHorizontalFrame, fgWhitePixel);
173  fFc->Associate(this);
174 
175  fFv->GetViewPort()->SetBackgroundColor(fgWhitePixel);
176  fFv->SetContainer(fFc);
177  fFv->SetViewMode(kLVList);
178  fFv->SetIncrements(1, 19); // set vertical scroll one line height at a time
179 
180  TGTextButton** buttons = fFv->GetHeaderButtons();
181  if (buttons) {
182  buttons[0]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByName)");
183  buttons[1]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByType)");
184  buttons[2]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortBySize)");
185  buttons[3]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByOwner)");
186  buttons[4]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByGroup)");
187  buttons[5]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByDate)");
188  }
189 
190  fFc->SetFilter(fFileInfo->fFileTypes[fFileInfo->fFileTypeIdx + 1]);
191  fFc->Sort(kSortByName);
192  fFc->ChangeDirectory(fFileInfo->fIniDir);
193  fFc->SetMultipleSelection(fFileInfo->fMultipleSelection);
194  fTreeLB->Update(fFc->GetDirectory());
195 
196  fList->SetState(kButtonEngaged);
197 
198  AddFrame(fFv, new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 4, 4, 3, 1));
199 
200  if (dlg_type == kKVFDOpen) {
201  fCheckB->Connect("Toggled(Bool_t)", "TGFileContainer", fFc, "SetMultipleSelection(Bool_t)");
202  fCheckB->Connect("Toggled(Bool_t)", "TGFileContainer", fFc, "UnSelectAll()");
203  }
204 
205  //--- file name and types
206 
207  TGHorizontalFrame* fHf = new TGHorizontalFrame(this, 10, 10);
208 
209  TGVerticalFrame* fVf = new TGVerticalFrame(fHf, 10, 10);
210 
211  TGHorizontalFrame* fHfname = new TGHorizontalFrame(fVf, 10, 10);
212 
213  TGLabel* fLfname = new TGLabel(fHfname, new TGHotString("File &name:"));
214  fTbfname = new TGTextBuffer(1034);
215  fName = new TGTextEntry(fHfname, fTbfname);
216  fName->Resize(230, fName->GetDefaultHeight());
217  fName->Associate(this);
218 
219  fHfname->AddFrame(fLfname, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2));
220  fHfname->AddFrame(fName, new TGLayoutHints(kLHintsRight | kLHintsCenterY, 0, 20, 2, 2));
221 
223 
224  TGHorizontalFrame* fHftype = new TGHorizontalFrame(fVf, 10, 10);
225 
226  TGLabel* fLftypes = new TGLabel(fHftype, new TGHotString("Files of &type:"));
227  fTypes = new TGComboBox(fHftype, kIDF_FTYPESLB);
228  fTypes->Associate(this);
229  fTypes->Resize(230, fName->GetDefaultHeight());
230 
231  TString s;
232  for (i = 0; fFileInfo->fFileTypes[i] != 0; i += 2) {
233  s.Form("%s (%s)", fFileInfo->fFileTypes[i], fFileInfo->fFileTypes[i + 1]);
234  fTypes->AddEntry(s.Data(), i);
235  }
236  fTypes->Select(fFileInfo->fFileTypeIdx);
237 
238  // Show all items in combobox without scrollbar
239  //TGDimension fw = fTypes->GetListBox()->GetContainer()->GetDefaultSize();
240  //fTypes->GetListBox()->Resize(fw.fWidth, fw.fHeight);
241 
242  if (fFileInfo->fFilename && fFileInfo->fFilename[0])
243  fTbfname->AddText(0, fFileInfo->fFilename);
244  else
245  fTbfname->Clear();
246 
247  fTypes->GetListBox()->Resize(230, 120);
248  fHftype->AddFrame(fLftypes, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2));
249  fHftype->AddFrame(fTypes, new TGLayoutHints(kLHintsRight | kLHintsCenterY, 0, 20, 2, 2));
250 
252 
254 
255  //--- Open/Save and Cancel buttons
256 
257  TGVerticalFrame* fVbf = new TGVerticalFrame(fHf, 10, 10, kFixedWidth);
258 
259  fOk = new TGTextButton(fVbf, new TGHotString((dlg_type == kKVFDSave)
260  ? "&Save" : "&Open"), kIDF_OK);
261  fCancel = new TGTextButton(fVbf, new TGHotString("Cancel"), kIDF_CANCEL);
262 
263  fOk->Associate(this);
264  fCancel->Associate(this);
265 
266  fVbf->AddFrame(fOk, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 2, 2));
267  fVbf->AddFrame(fCancel, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 2, 2));
268 
269  UInt_t width = TMath::Max(fOk->GetDefaultWidth(), fCancel->GetDefaultWidth()) + 20;
270  fVbf->Resize(width + 20, fVbf->GetDefaultHeight());
271 
273 
274  AddFrame(fHf, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 4, 4, 3, 1));
275  SetEditDisabled(kEditDisable);
276 
277  MapSubwindows();
278 
279  TGDimension size = GetDefaultSize();
280 
281  Resize(size);
282 
283  //---- position relative to the parent's window
284 
285  CenterOnParent();
286 
287  //---- make the message box non-resizable
288 
289  SetWMSize(size.fWidth, size.fHeight);
290  SetWMSizeHints(size.fWidth, size.fHeight, 10000, 10000, 1, 1);
291 
292  const char* wname = ((dlg_type == kKVFDSave) ? "Save As..." : (dlg_type == kKVFDOpen) ? "Open" : "Choose directory...");
293  SetWindowName(wname);
294  SetIconName(wname);
295  SetClassHints("FileDialog", "FileDialog");
296 
302 
303  MapWindow();
304  fFc->DisplayDirectory();
305  fClient->WaitFor(this);
306 }
307 
308 
309 
312 
314 {
315  // Delete file dialog.
316 
317  if (IsZombie()) return;
318  TString str = fCheckB->GetString();
319  if (str.Contains("Multiple"))
320  fCheckB->Disconnect("Toggled(Bool_t)");
325  delete fFc;
326 
327  // reset filesystem working directory
329 }
330 
331 
332 
336 
338 {
339  // Close file dialog.
340 
341  // reset filesystem working directory
343  if (fFileInfo->fFilename)
344  delete [] fFileInfo->fFilename;
345  fFileInfo->fFilename = 0;
346  if (fFileInfo->fFileNamesList != 0) {
349  }
350  DeleteWindow();
351 }
352 
353 
354 
357 
359 {
360  // Process messages generated by the user input in the file dialog.
361 
362  if (!fFc->GetDisplayStat()) return kTRUE; // Cancel button was pressed
363 
364  TGTreeLBEntry* e;
365  TGTextLBEntry* te;
366  TGFileItem* f;
367  void* p = 0;
368  TString txt;
369  TString sdir = gSystem->WorkingDirectory();
370 
371  switch (GET_MSG(msg)) {
372  case kC_COMMAND:
373  switch (GET_SUBMSG(msg)) {
374  case kCM_BUTTON:
375  switch (parm1) {
376  case kIDF_OK:
377  // same code as under kTE_ENTER
378  if ((fDlgMode != kKVFDDirectory) && (fTbfname->GetTextLength() == 0)) {
379  txt = "Please provide file name or use \"Cancel\"";
381  "Missing File Name", txt, kMBIconExclamation,
382  kMBOk);
383  return kTRUE;
384  }
386  !strcmp(fOk->GetTitle(), "Save") &&
387  (!(fCheckB->GetState() == kButtonDown))) {
388  Int_t ret;
389  txt = TString::Format("File name %s already exists, OK to overwrite it?",
390  fTbfname->GetString());
392  "File Name Exist", txt.Data(), kMBIconExclamation,
393  kMBYes | kMBNo, &ret);
394  if (ret == kMBNo)
395  return kTRUE;
396  }
398  if (fFileInfo->fFilename)
399  delete [] fFileInfo->fFilename;
400  fFileInfo->fFilename = 0;
401  }
402  else {
403  if (fFileInfo->fFilename)
404  delete [] fFileInfo->fFilename;
407  else
409  fTbfname->GetString());
411  }
412  if (fCheckB && (fCheckB->GetState() == kButtonDown))
414  else
416  DeleteWindow();
417  break;
418 
419  case kIDF_CANCEL:
420  if (fFileInfo->fFilename)
421  delete [] fFileInfo->fFilename;
422  fFileInfo->fFilename = 0;
423  if (fFc->GetDisplayStat())
425  if (fFileInfo->fFileNamesList != 0) {
428  }
429  DeleteWindow();
430  return kTRUE; //no need to redraw fFc
431  break;
432 
433  case kIDF_CDUP:
434  fFc->ChangeDirectory("..");
436  if (fFileInfo->fIniDir) delete [] fFileInfo->fIniDir;
438  if (strcmp(gSystem->WorkingDirectory(), fFc->GetDirectory())) {
439  gSystem->cd(fFc->GetDirectory());
440  }
441  break;
442 
443  case kIDF_NEW_FOLDER: {
444  char answer[128];
445  strlcpy(answer, "(empty)", sizeof(answer));
446  new TGInputDialog(gClient->GetRoot(), GetMainFrame(),
447  "Enter directory name:",
448  answer/*"(empty)"*/, answer);
449 
450  while (strcmp(answer, "(empty)") == 0) {
451  new TGMsgBox(gClient->GetRoot(), GetMainFrame(), "Error",
452  "Please enter a valid directory name.",
453  kMBIconStop, kMBOk);
454  new TGInputDialog(gClient->GetRoot(), GetMainFrame(),
455  "Enter directory name:",
456  answer, answer);
457  }
458  if (strcmp(answer, "") == 0) // Cancel button was pressed
459  break;
460 
461  if (strcmp(gSystem->WorkingDirectory(), fFc->GetDirectory())) {
462  gSystem->cd(fFc->GetDirectory());
463  }
464  if (gSystem->MakeDirectory(answer) != 0)
465  new TGMsgBox(gClient->GetRoot(), GetMainFrame(), "Error",
466  TString::Format("Directory name \'%s\' already exists!", answer),
467  kMBIconStop, kMBOk);
468  else {
470  }
471  gSystem->ChangeDirectory(sdir.Data());
472  break;
473  }
474 
475  case kIDF_LIST:
478  break;
479 
480  case kIDF_DETAILS:
483  break;
484  }
485  break;
486 
487  case kCM_COMBOBOX:
488  switch (parm1) {
489  case kIDF_FSLB:
491  if (e) {
492  fFc->ChangeDirectory(e->GetPath()->GetString());
494  if (fFileInfo->fIniDir) delete [] fFileInfo->fIniDir;
496  if (strcmp(gSystem->WorkingDirectory(), fFc->GetDirectory())) {
497  gSystem->cd(fFc->GetDirectory());
498  }
499  }
500  break;
501 
502  case kIDF_FTYPESLB:
504  if (te) {
505  //fTbfname->Clear();
506  //fTbfname->AddText(0, fFileInfo->fFileTypes[te->EntryId()+1]);
507  fFileInfo->fFileTypeIdx = te->EntryId();
511  }
512  break;
513  }
514  break;
515 
516  default:
517  break;
518  } // switch(GET_SUBMSG(msg))
519  break;
520 
521  case kC_CONTAINER:
522  switch (GET_SUBMSG(msg)) {
523  case kCT_ITEMCLICK:
524  if (parm1 == kButton1) {
525  if (fFc->NumSelected() > 0) {
528  if ((e2) && !R_ISDIR(((TGFileItem*)e2)->GetType())) {
529  fTbfname->Clear();
530  if (e2->GetItemName())
531  fTbfname->AddText(0, e2->GetItemName()->GetString());
533  }
534  }
535  else {
536  TString tmpString;
537  TList* tmp = fFc->GetSelectedItems();
538  TObjString* el;
539  TIter next(tmp);
540  if (fFileInfo->fFileNamesList != 0) {
542  }
543  else {
544  fFileInfo->fFileNamesList = new TList();
545  }
546  while ((el = (TObjString*) next())) {
547  char* s = gSystem->ConcatFileName(fFc->GetDirectory(),
548  el->GetString());
549  tmpString += "\"" + el->GetString() + "\" ";
551  delete [] s;
552  }
553  fTbfname->Clear();
554  fTbfname->AddText(0, tmpString);
556  }
557  }
558  }
559  break;
560 
561  case kCT_ITEMDBLCLICK:
562 
563  if (parm1 == kButton1) {
564  if (fFc->NumSelected() == 1) {
565  f = (TGFileItem*) fFc->GetNextSelected(&p);
566  if (f && R_ISDIR(f->GetType())) {
567  fFc->ChangeDirectory(f->GetItemName()->GetString());
569  if (fFileInfo->fIniDir) delete [] fFileInfo->fIniDir;
571  if (strcmp(gSystem->WorkingDirectory(), fFc->GetDirectory())) {
572  gSystem->cd(fFc->GetDirectory());
573  }
574  }
575  else {
576  if (!strcmp(fOk->GetTitle(), "Save") &&
577  (!(fCheckB->GetState() == kButtonDown))) {
578 
579  Int_t ret;
580  txt = TString::Format("File name %s already exists, OK to overwrite it?",
581  fTbfname->GetString());
583  "File Name Exist", txt.Data(), kMBIconExclamation,
584  kMBYes | kMBNo, &ret);
585  if (ret == kMBNo)
586  return kTRUE;
587  }
588  if (fFileInfo->fFilename)
589  delete [] fFileInfo->fFilename;
592  else
594  fTbfname->GetString());
596  if (fCheckB && (fCheckB->GetState() == kButtonDown))
598  else
600 
601  DeleteWindow();
602  }
603  }
604  }
605 
606  break;
607 
608  default:
609  break;
610 
611  } // switch(GET_SUBMSG(msg))
612  break;
613 
614  case kC_TEXTENTRY:
615  switch (GET_SUBMSG(msg)) {
616  case kTE_ENTER:
617  // same code as under kIDF_OK
618  if ((fDlgMode != kKVFDDirectory) && (fTbfname->GetTextLength() == 0)) {
619  const char* txt2 = "Please provide file name or use \"Cancel\"";
621  "Missing File Name", txt2, kMBIconExclamation,
622  kMBOk);
623  return kTRUE;
624  }
626  FileStat_t buf;
627  if (!gSystem->GetPathInfo(fTbfname->GetString(), buf) &&
628  R_ISDIR(buf.fMode)) {
631  if (strcmp(gSystem->WorkingDirectory(), fFc->GetDirectory())) {
632  gSystem->cd(fFc->GetDirectory());
633  }
634  fName->SetText("", kFALSE);
635  return kTRUE;
636  }
637  else if (!strcmp(fOk->GetTitle(), "Save") &&
638  (!(fCheckB->GetState() == kButtonDown))) {
639  Int_t ret;
640  txt = TString::Format("File name %s already exists, OK to overwrite it?",
641  fTbfname->GetString());
643  "File Name Exist", txt.Data(), kMBIconExclamation,
644  kMBYes | kMBNo, &ret);
645  if (ret == kMBNo)
646  return kTRUE;
647  }
648  }
649  if (fFileInfo->fFilename)
650  delete [] fFileInfo->fFilename;
652  fTbfname->GetString());
654  if (fCheckB && (fCheckB->GetState() == kButtonDown))
656  else
658  DeleteWindow();
659  break;
660 
661  default:
662  break;
663  }
664  break;
665 
666  default:
667  break;
668 
669  } // switch(GET_MSG(msg))
670 
672  return kTRUE;
673 }
674 
675 
int Int_t
unsigned int UInt_t
long Long_t
kFixedWidth
kHorizontalFrame
kButton1
#define f(i)
#define e(i)
size_t size(const MatrixT &matrix)
bool Bool_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
kButtonDown
kButtonUp
kButtonEngaged
#define gClient
kSortByName
EFileFialog
kIDF_OK
kIDF_FTYPESLB
kIDF_FSLB
kIDF_CDUP
kIDF_DETAILS
kIDF_NEW_FOLDER
kIDF_CHECKB
kIDF_LIST
kIDF_CANCEL
kMWMDecorResizeH
kMWMFuncAll
kMWMFuncResize
kMWMDecorMaximize
kMWMDecorMinimize
kMWMDecorMenu
kMWMDecorAll
kMWMFuncMaximize
kMWMInputModeless
kMWMFuncMinimize
kDeepCleanup
kLHintsRight
kLHintsExpandY
kLHintsLeft
kLHintsCenterY
kLHintsTop
kLHintsExpandX
kLVDetails
kLVList
kMBNo
kMBYes
kMBOk
kMBIconExclamation
kMBIconStop
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetMWMHints
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize MapSubwindows
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t SetWMSizeHints
Option_t Option_t width
char * StrDup(const char *str)
kFileExists
Bool_t R_ISDIR(Int_t mode)
R__EXTERN TSystem * gSystem
Int_t GET_MSG(Long_t val)
kCM_COMBOBOX
kTE_ENTER
kCT_ITEMCLICK
kC_COMMAND
kCM_BUTTON
kC_TEXTENTRY
kCT_ITEMDBLCLICK
kC_CONTAINER
Int_t GET_SUBMSG(Long_t val)
Modified version of TGFileDialog file selection dialog.
Definition: KVFileDialog.h:49
virtual ~KVFileDialog()
Delete file dialog.
TGPictureButton * fList
top toolbar button
Definition: KVFileDialog.h:58
const TGPicture * fPlist
picture for fList
Definition: KVFileDialog.h:64
TGTextBuffer * fTbfname
text buffer of file name
Definition: KVFileDialog.h:52
TGTextButton * fOk
ok button
Definition: KVFileDialog.h:66
TGCheckButton * fCheckB
Definition: KVFileDialog.h:60
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) override
Process messages generated by the user input in the file dialog.
TGTextEntry * fName
file name text entry
Definition: KVFileDialog.h:53
TGFileInfo * fFileInfo
file info passed to this dialog
Definition: KVFileDialog.h:70
EKVFileDialogMode fDlgMode
Definition: KVFileDialog.h:71
void CloseWindow() override
TGComboBox * fTypes
file type combo box
Definition: KVFileDialog.h:54
TGFSComboBox * fTreeLB
file system path combo box
Definition: KVFileDialog.h:55
TString fSaveWorkingDirectory
Definition: KVFileDialog.h:73
TGListView * fFv
file list view
Definition: KVFileDialog.h:68
TGPictureButton * fDetails
top toolbar button
Definition: KVFileDialog.h:59
const TGPicture * fPcdup
OR set on/off multiple file selection for SaveAs dialog.
Definition: KVFileDialog.h:62
TGFileContainer * fFc
file list view container (containing the files)
Definition: KVFileDialog.h:69
const TGPicture * fPdetails
picture for fDetails
Definition: KVFileDialog.h:65
const TGPicture * fPnewf
picture for fNewf
Definition: KVFileDialog.h:63
virtual EButtonState GetState() const
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
const TGWindow * GetRoot() const
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
void FreePicture(const TGPicture *pic)
virtual TGLBEntry * GetSelectedEntry() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
UInt_t GetDefaultHeight() const override
virtual const TGFrame * GetNextSelected(void **current)
virtual Int_t NumSelected() const
virtual void Update(const char *path)
virtual void SetDisplayStat(Bool_t stat=kTRUE)
virtual void ChangeDirectory(const char *path)
virtual void DisplayDirectory()
virtual void SetFilter(const char *filter)
Bool_t GetDisplayStat()
const char * GetDirectory() const
TList * fFileNamesList
char * fFilename
Int_t fFileTypeIdx
const char ** fFileTypes
char * fIniDir
Bool_t fOverwrite
Bool_t fMultipleSelection
virtual void Resize(TGDimension size)
virtual void DeleteWindow()
Int_t EntryId() const
TList * GetSelectedItems()
TGString * GetItemName() const
virtual void SetViewMode(EListViewMode viewMode)
TGClient * fClient
const char * GetString() const
void AddText(Int_t pos, const char *text)
const char * GetString() const
UInt_t GetTextLength() const
const char * GetTitle() const override
TString GetString() const
virtual void SetText(const char *text, Bool_t emit=kTRUE)
virtual const TGWindow * GetMainFrame() const
void Add(TObject *obj) override
void Delete(Option_t *option="") override
const TString & GetString() const
R__ALWAYS_INLINE Bool_t IsZombie() const
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
const char * Data() const
static TString Format(const char *fmt,...)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Bool_t cd(const char *path)
virtual char * ConcatFileName(const char *dir, const char *name)
virtual int MakeDirectory(const char *name)
virtual int GetPathInfo(const char *path, FileStat_t &buf)
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
virtual Bool_t ChangeDirectory(const char *path)
virtual const char * UnixPathName(const char *unixpathname)
virtual Bool_t IsAbsoluteFileName(const char *dir)
virtual char * ExpandPathName(const char *path)
virtual const char * WorkingDirectory()
int main(int argc, char **argv)
void Error(const char *location, const char *fmt,...)
Type GetType(const std::string &Name)
Double_t Max(Double_t a, Double_t b)
ClassImp(TPyArg)