21#include "RConfigure.h"
134struct DefaultIcon_t {
135 const char *fPicnamePrefix;
140static DefaultIcon_t gDefaultIcon[] = {
141 {
"folder", { 0, 0 } },
144 {
"slink", { 0, 0 } },
145 {
"histo", { 0, 0 } },
146 {
"object", { 0, 0 } }
155 {
"",
"",
kFALSE, -1, 0 },
160 {
"",
"",
kFALSE, -1, 0 },
164 {
"",
"",
kFALSE, -1, 0 },
166 {
"",
"",
kFALSE, -1, 0 },
181class TRootBrowserHistoryCursor :
public TObject {
191class TRootBrowserHistory :
public TList {
194 TRootBrowserHistoryCursor *cur;
197 while ((cur = (TRootBrowserHistoryCursor*)next())) {
198 if (cur->fItem->GetUserData() == obj) {
206 TRootBrowserHistoryCursor *cur;
209 while ((cur = (TRootBrowserHistoryCursor*)next())) {
210 if (cur->fItem == item) {
220class TRootBrowserCursorSwitcher {
229 ~TRootBrowserCursorSwitcher() {
236class TIconBoxThumb :
public TObject {
248 const char *
GetName()
const {
return fName.
Data(); }
264 if (fObj->IsA() == TKey::Class())
265 object = ((
TKey *)fObj)->ReadObj();
274 fDNDData.fDataType =
gVirtualX->InternAtom(
"application/root",
kFALSE);
295 TGFileItem(p, bpic, 0, spic, 0,
name, 0, 0, 0, 0, 0, viewMode)
299 fDNDData.fDataLength = 0;
302 for (
Int_t i = 0; fSubnames[i] != 0; ++i)
delete fSubnames[i];
311 if (obj->IsA()->HasDefaultConstructor()) {
314 if ((obj->IsA() == TFolder::Class()) ||
315 (obj->IsA() == TClass::Class())) {
320 for (i = 0; fSubnames[i] != 0; ++i)
323 for (i = 0; fSubnames[i] != 0; ++i)
324 fCtw[i] =
gVirtualX->TextWidth(fFontStruct, fSubnames[i]->GetString(),
325 fSubnames[i]->GetLength());
330class TRootIconList :
public TList {
333 TRootIconBox *fIconBox;
337 TRootIconList(TRootIconBox*
box = 0);
338 virtual ~TRootIconList();
340 const char *
GetTitle()
const {
return "ListView Container"; }
343 const TGPicture *GetPicture()
const {
return fPic; }
349TRootIconList::TRootIconList(TRootIconBox*
box)
359TRootIconList::~TRootIconList()
367void TRootIconList::UpdateName()
369 if (!First())
return;
372 fName = First()->GetName();
376 fName = First()->GetName();
378 fName += Last()->GetName();
385friend class TRootIconList;
390 TRootIconList *fCurrentList;
391 TRootObjItem *fCurrentItem;
410 void RemoveGarbage();
417 virtual ~TRootIconBox();
422 void SetObjHeaders();
425 void SetGroupSize(
Int_t siz) { fGroupSize = siz; }
426 Int_t GetGroupSize()
const {
return fGroupSize; }
428 Bool_t WasGrouped()
const {
return fWasGrouped; }
440 fCheckHeaders =
kTRUE;
442 fGarbage =
new TList();
458 fAutoThumbnail =
kTRUE;
464TRootIconBox::~TRootIconBox()
485 Bool_t xpm = xpm_magic ==
"/* ";
486 const char *iconname = xpm ? obj->
GetName() :
name;
492 if (fCachedPicName == iconname) {
493 *pic = fLargeCachedPic;
494 *spic = fSmallCachedPic;
500 if (!(*pic) && xpm) {
520 fLargeCachedPic = *pic;
530 fSmallCachedPic = *spic;
531 fCachedPicName = iconname;
537void TRootIconBox::RemoveGarbage()
539 TIter next(fGarbage);
542 while ((li=(
TList *)next())) {
543 li->
Clear(
"nodelete");
567 isSystemFile =
kTRUE;
570 if (isSystemFile || obj->IsA() == TSystemFile::Class() ||
571 obj->IsA() == TSystemDirectory::Class()) {
590 TIconBoxThumb *thumb = 0;
597 spic = thumb->fSmall;
603 fi = AddRemoteFile(obj, spic, pic);
605 fi = AddFile(
name, spic, pic);
608 if (obj->IsA() == TSystemFile::Class()) {
627 fCurrentList =
new TRootIconList(
this);
628 fGarbage->
Add(fCurrentList);
631 fCurrentList->Add(obj);
632 fCurrentList->UpdateName();
639 if (
f->GetUserData() == obj) {
644 if (fGrouped && fCurrentItem && (fCurrentList->GetSize()>1)) {
645 fCurrentName->
SetString(fCurrentList->GetName());
650 if ((fCurrentList->GetSize() < fGroupSize) && !fGrouped) {
651 GetObjPictures(&pic, &spic, obj, obj->
GetIconName() ?
661 fi =
new TRootObjItem(
this, pic, spic,
new TGString(
name), obj, cl, view);
668 if (fGrouped && (fCurrentList->GetSize()==1)) {
669 fCurrentName =
new TGString(fCurrentList->GetName());
670 fCurrentItem =
new TRootObjItem(
this, fCurrentList->GetPicture(), fCurrentList->GetPicture(),
671 fCurrentName,fCurrentList, TList::Class(), view);
672 fCurrentItem->SetUserData(fCurrentList);
673 AddItem(fCurrentItem);
678 if ((fCurrentList->GetSize()==fGroupSize) && !fGrouped) {
692 fCurrentName =
new TGString(fCurrentList->GetName());
693 fi =
new TRootObjItem(
this, fCurrentList->GetPicture(), fCurrentList->GetPicture(),
694 fCurrentName, fCurrentList, TList::Class(), view);
698 fCurrentList =
new TRootIconList(
this);
699 fGarbage->
Add(fCurrentList);
704 if ((fCurrentList->GetSize()==fGroupSize) && fGrouped) {
705 fCurrentList =
new TRootIconList(
this);
706 fGarbage->
Add(fCurrentList);
714void TRootIconList::Browse(
TBrowser *)
733 if (obj->IsA() == TKey::Class()) {
736 }
else if (obj->IsA() == TKeyMapFile::Class()) {
748 if (key && obj->IsA() == TKey::Class()) {
787 if (
name.IsNull())
return 0;
794 fLastDir = direction;
795 fLastCase = caseSensitive;
817 li = (
TList*)
lv->GetUserData();
821 while ((obj=next())) {
851void TRootIconBox::SetObjHeaders()
862void TRootIconBox::Refresh()
877void TRootIconBox::RemoveAll()
879 if (fIsEmpty)
return;
881 fCheckHeaders =
kTRUE;
1184 fIconBox->fAutoThumbnail = (str ==
"yes") || atoi(str.
Data());
1203 int parts[] = { 26, 74 };
1237 printf(
"\n You are using the old ROOT browser! A new version is available. To use it:\n");
1238 printf(
" Select the \"New Browser\" entry from the \"File\" menu in the browser, or change\n");
1239 printf(
" \"Browser.Name:\" from \"TRootBrowserLite\" to \"TRootBrowser\" in system.rootrc\n\n");
1241 Connect(
fLt,
"Checked(TObject*, Bool_t)",
"TRootBrowserLite",
1242 this,
"Checked(TObject *,Bool_t)");
1253 gVirtualX->LookupString(event, input,
sizeof(input), keysym);
1264 switch ((
EKeySym)keysym & ~0x20) {
1300 if (
f->GetUserData() == obj) {
1301 f->SetCheckedEntry(check);
1308 if (
name[0] ==
'.' && ((
name[1] ==
'\0') || (
name[1] ==
'.' &&
name[2] ==
'\0')))
1332 if (
f->GetUserData() == obj) {
1333 f->SetCheckedEntry(check);
1355 if (
f->GetUserData() == obj) {
1356 f->SetCheckedEntry(check);
1379 if (
f->GetUserData() == obj) {
1399 if (obj->IsA() == TKey::Class())
1401 else if (obj->IsA() == TKeyMapFile::Class())
1412 objClass = obj->IsA();
1429 if (
name[0] ==
'.' &&
name[1] ==
'.')
1430 Info(
"AddToTree",
"up one level %s",
name);
1460 Long64_t bsize, fsize, objsize = 0;
1466 objsize = objinfo.
Atoll();
1469 bsize = fsize = objsize;
1589 fmt =
"%d Object%s, %d selected.";
1591 fmt =
"%d Object%s.";
1602 char *p, path[1024];
1606 while (*p && *(p+1) ==
'/') ++p;
1616 while (*p && *(p+1) ==
'/') ++p;
1625 Bool_t disableUp = dirname ==
"/";
1628 if (disableUp && (obj) && (obj->IsA() == TSystemDirectory::Class())) {
1629 disableUp = strlen(p) == 1;
1643 TRootBrowserCursorSwitcher cursorSwitcher(
fIconBox,
fLt);
1650 if (obj->IsA() == TSystemFile::Class() ||
1660 if (act[0] ==
'!') {
1669 Emit(
"ExecuteDefaultAction(TObject*)", (
Long_t)obj);
1674 TRootBrowserCursorSwitcher cursorSwitcher2(
fIconBox,
fLt);
1702 if (
fIconBox->fAutoThumbnail && nowp && (nowp != wasp)) {
1715 TIconBoxThumb *thumb = (TIconBoxThumb*)
fIconBox->fThumbnails->FindObject(path.
Data());
1718 spic = thumb->fSmall;
1719 pic = thumb->fLarge;
1730 static const UInt_t sz = 72;
1738 h = (imgh*sz) / (imgw > 0 ? imgw : 1);
1740 w = (imgw*sz) / (imgh > 0 ? imgh : 1);
1743 w = (w < 54) ? 54 : w;
1744 h = (
h < 54) ? 54 :
h;
1747 img->
Merge(img,
"tint");
1748 img->
DrawBox(0, 0, w,
h,
"#ffff00", 1);
1754 thumb =
new TIconBoxThumb(path.
Data(), spic, pic);
1772 TRootBrowserCursorSwitcher *cursorSwitcher = 0;
1777 cursorSwitcher =
new TRootBrowserCursorSwitcher(
fIconBox,
fLt);
1798 new TBrowser(
"Browser",
"ROOT Object Browser");
1806 gROOT->MakeDefCanvas();
1901 printf(
"Currently the browser always shows all cycles\n");
1977 sprintf(str,
"About ROOT %s...",
gROOT->GetVersion());
1996 hd =
new TRootHelpDialog(
this,
"Help on Graphics Editor...", 600, 400);
2028 const char *dirname =
e->GetPath()->GetString();
2122 if (
fIconBox->NumSelected() == 1) {
2152 if (
fIconBox->NumSelected() == 1) {
2160 if (obj2->IsA() == TKey::Class()) {
2172 Error(
"ProcessMessage",
"do not support non TObject (like %s) yet",
2197 if (
fIconBox->NumSelected() == 1) {
2206 delete cursorSwitcher;
2225 delete cursorSwitcher;
2242 if (obj->IsA() == TDirectoryFile::Class()) {
2246 if (obj->IsA() == TFile::Class()) {
2250 if (obj->IsA() == TKey::Class()) {
2251 if (strcmp(((
TKey*)obj)->GetClassName(),
"TDirectoryFile") == 0) {
2283 (item == ((TRootBrowserHistoryCursor*)
fHistoryCursor)->fItem)))
return;
2285 TRootBrowserHistoryCursor *cur = (TRootBrowserHistoryCursor*)
fHistoryCursor;
2292 cur =
new TRootBrowserHistoryCursor(item);
2387 ((TRootBrowserHistory*)
fHistory)->DeleteItem(item);
2400 if (obj->IsA() == TKey::Class()) {
2414 }
else if (obj->
InheritsFrom(TDirectoryFile::Class())) {
2434 while ( probj && strcmp(probj->
GetClassName(),
"TFile")) {
2442 TString::Format(
"((TApplicationServer *)gApplication)->BrowseFile(\"%s\");",
2457 else if (!strcmp(item->
GetText(),
"ROOT Files")) {
2471 if (topobj && topobj->
InheritsFrom(
"TApplicationRemote")) {
2485 Getlinem(kInit,
"\nroot [0]");
2509 if (obj && (obj->IsA() == TSystemDirectory::Class())) {
2518 gROOT->GetListOfBrowsables()->Remove(old);
2520 gROOT->GetListOfBrowsables()->Add(obj);
2556 Emit(
"DoubleClicked(TObject*)", (
Long_t)obj);
2569 Emit(
"Checked(TObject*,Bool_t)", args);
2580 TRootBrowserCursorSwitcher cursorSwitcher(
fIconBox,
fLt);
2584 if (obj->IsA()->GetMethodWithPrototype(
"Browse",
"TBrowser*"))
2603 TKey *key =
dynamic_cast<TKey*
>(obj);
2608 if (obj->IsA() == TSystemDirectory::Class()) {
2612 if (t ==
".")
goto out;
2689 if (kobj && kobj->IsA() == TKey::Class()) {
2719 if (obj && obj->IsA() != TSystemFile::Class()) {
2773 if ( (refresh || force) && !
fIconBox->WasGrouped()
2776 TRootBrowserCursorSwitcher cursorSwitcher(
fIconBox,
fLt);
2778 UInt_t curr =
gROOT->GetListOfBrowsables()->GetSize();
2779 if (!prev) prev = curr;
2844 if (!strcasecmp(opt,
"big"))
2846 else if (!strcasecmp(opt,
"small"))
2848 else if (!strcasecmp(opt,
"list"))
2850 else if (!strcasecmp(opt,
"details"))
2860 if (!strcasecmp(opt,
"name"))
2862 else if (!strcasecmp(opt,
"type"))
2864 else if (!strcasecmp(opt,
"size"))
2866 else if (!strcasecmp(opt,
"date"))
2912 for (i = 2; i <= 5; ++i)
2919 buttons[0]->
Connect(
"Clicked()",
"TRootBrowserLite",
this,
2921 buttons[1]->
Connect(
"Clicked()",
"TRootBrowserLite",
this,
2923 buttons[2]->
Connect(
"Clicked()",
"TRootBrowserLite",
this,
2925 buttons[5]->
Connect(
"Clicked()",
"TRootBrowserLite",
this,
2981 for (
int i = 0; i < len; i++) {
2983 if (((
c < 32) || (
c > 126)) && (
c !=
'\t') && (
c !=
'\r') && (
c !=
'\n')) {
3025 const int bufferSize = 1024;
3026 char buffer[bufferSize];
3028 FILE *fd = fopen(
file,
"rb");
3035 int sz = fread(buffer, 1, bufferSize, fd);
3038 if ((sz > 0) &&
isBinary(buffer, sz)) {
3053 fTextEdit,
"Search(char *,Bool_t,Bool_t)");
3057 savbtn->
Connect(
"Released()",
"TGTextEdit",
fTextEdit,
"SaveFile(=0,kTRUE)");
3101 gROOT->Macro(tmpfile);
3136 bt1->
Connect(
"Pressed()",
"TRootBrowserLite",
this,
"ExecMacro()");
3137 bt2->
Connect(
"Pressed()",
"TRootBrowserLite",
this,
"InterruptMacro()");
const Mask_t kKeyMod1Mask
typically the Alt key
EMouseButton
Button names.
R__EXTERN const char gHelpObjects[]
R__EXTERN const char gHelpPullDownMenus[]
R__EXTERN const char gHelpRemote[]
R__EXTERN const char gHelpAbout[]
R__EXTERN const char gHelpGraphicsEditor[]
R__EXTERN const char gHelpCanvas[]
R__EXTERN const char gHelpBrowserLite[]
R__EXTERN const char gHelpPostscript[]
R__EXTERN TApplication * gApplication
include TDocParser_001 C image html pict1_TDocParser_001 png width
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
R__EXTERN TGDNDManager * gDNDManager
static unsigned int total
static Bool_t isBinary(const char *str, int len)
test
static ToolBarData_t gToolBarData[]
static const char * gOpenTypes[]
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
TApplication * GetAppRemote() const
virtual const char * ApplicationName() const
virtual Long_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=0)
Process a single command line, either a C++ statement or an interpreter command starting with a "....
ABC describing GUI independent browser implementation protocol.
TBrowser * fBrowser
TBrowser associated with this implementation.
Using a TBrowser one can browse all ROOT objects.
void SetDrawOption(Option_t *option="")
Set drawing option for object.
void SetRefreshFlag(Bool_t flag)
TContextMenu * GetContextMenu() const
Bool_t GetRefreshFlag() const
void SetBrowserImp(TBrowserImp *i)
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
void WriteObject(const TObject *obj, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
The color creation and management class.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
ULong_t GetPixel() const
Return pixel value corresponding to this color.
Describe directory structure in memory.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
Set the value of a resource or create a new resource.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
TGMimeTypes * GetMimeTypeList() const
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
TGPicturePool * GetPicturePool() const
virtual TGLBEntry * GetSelectedEntry() const
virtual TGTextEntry * GetTextEntry() const
virtual void AddEntry(TGString *s, Int_t id)
virtual TGListBox * GetListBox() const
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...
virtual Int_t GetNumberOfEntries() const
virtual TList * GetList() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual UInt_t GetDefaultWidth() const
virtual void Layout()
Layout the elements of the composite frame.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual UInt_t GetDefaultHeight() const
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual void RemoveAll()
Remove all frames from composite frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
virtual void Associate(const TGWindow *w)
virtual void ClearViewPort()
Clear view port and redraw full content.
virtual TGFrameElement * FindFrame(Int_t x, Int_t y, Bool_t exclude=kTRUE)
Find frame located int container at position x,y.
virtual void RemoveAll()
Remove all items from the container.
virtual void * FindItem(const TString &name, Bool_t direction=kTRUE, Bool_t caseSensitive=kTRUE, Bool_t subString=kFALSE)
Bool_t IsDragging() const
Bool_t EndDrag()
End dragging.
virtual void Update(const char *path)
Update file system combo box.
Bool_t fMultipleSelection
void SetIniDir(const char *inidir)
Set directory name.
void SetDNDData(TDNDData *data)
Set drag and drop data.
virtual Bool_t HandleDNDFinished()
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual void DeleteWindow()
Delete window.
void SetDNDSource(Bool_t onoff)
virtual TDNDData * GetDNDData(Atom_t)
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
virtual void MapWindow()
map window
static Pixel_t fgWhitePixel
virtual void UnmapWindow()
unmap window
void * GetUserData() const
void SetUserData(void *userData)
virtual void SetText(TGString *newText)
Set new text in label.
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual TGFrame * GetContainer() const
TGListTreeItem * GetFirstChild() const
void Rename(const char *new_name)
virtual Bool_t IsActive() const =0
virtual const char * GetText() const =0
TGListTreeItem * GetNextSibling() const
TGListTreeItem * GetParent() const
virtual void SetTipText(const char *)
virtual Bool_t IsOpen() const
virtual void * GetUserData() const =0
virtual void SetUserData(void *, Bool_t=kFALSE)
TGListTreeItem * FindItemByObj(TGListTreeItem *item, void *ptr)
Find item with fUserData == ptr.
void ClearHighlighted()
Un highlight items.
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
void CheckItem(TGListTreeItem *item, Bool_t check=kTRUE)
Set check button state for the node 'item'.
void SetAutoTips(Bool_t on=kTRUE)
void SetCheckBox(TGListTreeItem *item, Bool_t on=kTRUE)
Set check button state for the node 'item'.
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
TGListTreeItem * GetSelected() const
Int_t RecursiveDeleteItem(TGListTreeItem *item, void *userData)
Delete item with fUserData == ptr.
Int_t DeleteItem(TGListTreeItem *item)
Delete item from list tree.
TGListTreeItem * GetFirstItem() const
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
void AdjustPosition(TGListTreeItem *item)
Move content to position of item.
void HighlightItem(TGListTreeItem *item)
Highlight item.
TGListTreeItem * FindItemByPathname(const char *path)
Find item by pathname.
TGListTreeItem * FindChildByData(TGListTreeItem *item, void *userData)
Find child of item by userData.
void SetToolTipItem(TGListTreeItem *item, const char *string)
Set tooltip text for this item.
void GetPathnameFromItem(TGListTreeItem *item, char *path, Int_t depth=0)
Get pathname from item.
virtual void AdjustHeaders()
virtual void Layout()
Layout list view components (container and contents of container).
virtual void SetHeader(const char *s, Int_t hmode, Int_t cmode, Int_t idx)
Set header button idx [0-fNColumns>, hmode is the x text alignmode (ETextJustification) for the heade...
virtual void SetIncrements(Int_t hInc, Int_t vInc)
Set horizontal and vertical scrollbar increments.
EListViewMode GetViewMode() const
TGTextButton ** GetHeaderButtons()
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode.
virtual void SetHeaders(Int_t ncolumns)
Set number of headers, i.e.
virtual void SetDefaultHeaders()
Default headers are: Name, Attributes, Size, Owner, Group, Modified.
virtual void LayoutHeader(TGFrame *head)
Layout list view components (container and contents of container).
virtual const char * GetHeader(Int_t idx) const
Returns name of header idx.
virtual void SendCloseMessage()
Send close message to self.
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
void AddType(const char *type, const char *pat, const char *icon, const char *sicon, const char *action)
Add a mime type to the list of mime types.
const TGPicture * GetIcon(const char *filename, Bool_t small_icon)
Return icon belonging to mime type of filename.
Bool_t GetAction(const char *filename, char *action)
Return in action the mime action string belonging to filename.
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
Pixmap_t GetPicture() const
static TGSearchDialog *& SearchDialog()
Return global search dialog.
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
virtual void SetString(const char *s)
const char * GetString() const
virtual Bool_t SaveFile(const char *fname, Bool_t saveas=kFALSE)
Save file.
virtual Bool_t Search(const char *string, Bool_t direction=kTRUE, Bool_t caseSensitive=kFALSE)
Search for string in the specified direction.
const char * GetText() const
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
const TGString * GetText() const
virtual Bool_t LoadFile(const char *fname, long startpos=0, long length=-1)
Load a file in the text view widget.
virtual void SetReadOnly(Bool_t on=kTRUE)
virtual void SetBackgroundColor(Pixel_t)
Set background color of the canvas frame.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void DestroyWindow()
destroy window
const TGWindow * GetParent() const
static TGuiBuilder * Instance()
return an instance of TGuiBuilder object
THashTable implements a hash table to store TObject's.
TObject * FindObject(const char *name) const
Find object using its name.
An abstract interface to image processing library.
virtual void FromPad(TVirtualPad *, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
virtual UInt_t GetWidth() const
virtual void DrawBox(Int_t, Int_t, Int_t, Int_t, const char *="#000000", UInt_t=1, Int_t=0)
static TImage * Create()
Create an image.
virtual Bool_t SetImageBuffer(char **, EImageFileTypes=TImage::kPng)
virtual Bool_t IsValid() const
virtual void Scale(UInt_t, UInt_t)
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
virtual Pixmap_t GetPixmap()
virtual Pixmap_t GetMask()
virtual UInt_t GetHeight() const
Utility class for browsing TMapFile objects.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
Short_t GetCycle() const
Return cycle number associated to this key.
virtual void Add(TObject *obj)
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
virtual const char * GetName() const
Returns name of object.
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
Collectable string class.
const TString & GetString() const
Mother of all ROOT objects.
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
virtual const char * GetName() const
Returns name of object.
virtual void Browse(TBrowser *b)
Browse object. May be overridden for another default action.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * GetIconName() const
Returns mime type name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual const char * GetTitle() const
Returns title of object.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
virtual ULong_t Hash() const
Return hash value for this object.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
The TRemoteObject class provides protocol for browsing ROOT objects from a remote ROOT session.
const char * GetClassName() const
const char * GetKeyClassName() const
TGCompositeFrame * fTreeHdr
TGPopupMenu * fOptionMenu
friend class TRootIconBox
Bool_t HistoryBackward()
go to the past
void SetStatusText(const char *txt, Int_t col) override
Set text in column col in status bar.
void SetViewMode(Int_t new_mode, Bool_t force=kFALSE)
Set iconbox's view mode and update menu and toolbar buttons accordingly.
void Refresh(Bool_t force=kFALSE) override
Refresh the browser contents.
TGLayoutHints * fMenuBarHelpLayout
void ListTreeHighlight(TGListTreeItem *item)
Open tree item and list in iconbox its contents.
TGFileContainer * GetIconBox() const
returns pointer to fIconBox object
void SetSortMode(Int_t new_mode)
Set iconbox's sort mode and update menu radio buttons accordingly.
void ClearHistory()
clear navigation history
TGListTreeItem * fListLevel
TGLayoutHints * fExpandLayout
void RecursiveRemove(TObject *obj) override
Recursively remove object from browser.
void BrowseTextFile(const char *file)
browse text file
Option_t * GetDrawOption() const override
returns drawing option
void ReallyDelete() override
Really delete the browser and the this GUI.
virtual void DoubleClicked(TObject *obj)
Emits signal when double clicking on icon.
TGLayoutHints * fComboLayout
void Chdir(TGListTreeItem *item)
Make object associated with item the current directory.
void ExecMacro()
executed browsed text macro
virtual void ShowToolBar(Bool_t show=kTRUE)
Show or hide toolbar.
void HighlightListLevel()
helper method to track history
Bool_t HistoryForward()
go to the future
static TBrowserImp * NewBrowser(TBrowser *b=nullptr, const char *title="ROOT Browser", UInt_t width=800, UInt_t height=500, Option_t *opt="")
Interface method to the old browser.
TGLayoutHints * fMenuBarLayout
virtual void AddToTree(TObject *obj, const char *name, Int_t check=-1)
Add items to the current TGListTree of the browser.
const TGPicture * fIconPic
void AddToHistory(TGListTreeItem *item)
helper method to track history
TGLayoutHints * fBarLayout
void BrowseObj(TObject *obj) override
Browse object.
virtual void Checked(TObject *obj, Bool_t check)
Emits signal when double clicking on icon.
void DisplayTotal(Int_t total, Int_t selected)
Display in statusbar total number of objects and number of selected objects in IconBox.
void CloseWindow() override
In case window is closed via WM we get here.
void IconBoxAction(TObject *obj)
Default action when double clicking on icon.
TGLayoutHints * fMenuBarItemLayout
void HideTextEdit()
hide text edit
TGStatusBar * GetStatusBar() const
void DisplayDirectory()
Display current directory in second label, fLbl2.
void ShowMacroButtons(Bool_t show=kTRUE)
show/hide macro buttons
virtual void AddToBox(TObject *obj, const char *name)
Add items to the iconbox of the browser.
virtual void ShowStatusBar(Bool_t show=kTRUE)
Show or hide statusbar.
TRootBrowserLite(const TRootBrowserLite &)=delete
void Search()
starts serach dialog
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) override
Handle menu and other command generated by the user.
void CheckObjectItem(TObject *obj, Bool_t check=kFALSE) override
Check / uncheck the TGListTreeItem corresponding to this object and add a checkmark on TGLVEntry if c...
Bool_t HandleKey(Event_t *event) override
handle keys
virtual void SetDefaults(const char *iconStyle=nullptr, const char *sortBy=nullptr)
Set defaults depending on settings in the user's .rootrc.
TGFSComboBox * fFSComboBox
void InterruptMacro()
interrupt browsed macro execution
void SetDrawOption(Option_t *option="") override
sets drawing option
virtual ~TRootBrowserLite()
Browser destructor.
TGCompositeFrame * fListHdr
void UpdateDrawOption()
add new draw option to the "history"
void CreateBrowser(const char *name)
Create the actual browser.
void ToSystemDirectory(const char *dirname)
display directory
void ExecuteDefaultAction(TObject *obj) override
Execute default action for selected object (action is specified in the $HOME/.root....
void AddCheckBox(TObject *obj, Bool_t check=kFALSE) override
Add a checkbox in the TGListTreeItem corresponding to obj and a checkmark on TGLVEntry if check = kTR...
void Add(TObject *obj, const char *name=nullptr, Int_t check=-1) override
Add items to the browser.
void DeleteListTreeItem(TGListTreeItem *item)
delete list tree item, remove it from history
TGHorizontal3DLine * fToolBarSep
void RemoveCheckBox(TObject *obj) override
Remove checkbox from TGListTree and checkmark from TGListView.
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
void Popup()
Show help dialog.
void ToLower()
Change string to lower-case.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Prepend(const char *cs)
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Long64_t Atoll() const
Return long long value of string.
Describes an Operating System directory for the browser.
A TSystemFile describes an operating system file.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
virtual const char * WorkingDirectory()
Return working directory.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
virtual int Unlink(const char *name)
Unlink, i.e.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual void Modified(Bool_t flag=1)=0
virtual TCanvas * GetCanvas() const =0
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
EGEventType fType
of event (see EGEventType)
UInt_t fState
key or button mask