[ROOT] How to implement behavior of TBrowser? Re: TRootBrowser: Browse OS directory

From: cstrato (aon.912121399@aon.at)
Date: Wed Jun 25 2003 - 00:03:21 MEST


Dear Fons, dear Rooters

Sorrowly, I am still confused:
What do I need to do in order to implement both TGListTree and
TRootIconBox of TRootBrowser as frames embedded in my own
GUI application?

a) Is it possible to  create the following class:
    class TBrowseFrame: public TGCompositeFrame, public TBrowserImp
Can I then embed this class in my own application?
Does TBrowserImp then call my class TBrowseFrame or does
it always call TRootBrowser?

b) Since all objects which inherit from TObject have a method:
TObject::Browse(TBrowser *b), is it possible to overwrite class
TBrowser with the following class:
    class MyBrowser: public TBrowser
Will then class MyBrowser be called?
If I do this, how can I avoid that the constructor of TBrowser
calls: fImp = gGuiFactory->CreateBrowserImp(this, title, w, h);

Thank you in advance for your help

Best regards
Christian


 
Fons Rademakers wrote:

>Hi Christian,
>
>
>On Sun, 2003-06-22 at 22:32, cstrato wrote:
>  
>
>>Dear Rooters
>>
>>Since TRootBrowser is able to browse the system directories, I am
>>trying to extract the code for  TGListTree in my own app.
>>
>>I have already managed to display a system directory in TGListTree,
>>but double-clicking does not show the contents.
>>
>>    
>>
>
>there is a cooperation between TSystemFile and TSystemDirectory and the
>TRootBrowser to browse system file directories.
>
>  
>
>>It is not quite clear to me if some of the needed code is in other
>>classes such as TBrowserImp, TBrowser, TGuiFactory??
>>
>>    
>>
>TBrowserImp is not needed, it is just an abstract interface to
>TRootBrowser, TGuiFactory just creates a TRootBrowser for the TBrowser
>and TBrowser delegates most of its work to the actual TRootBrowser,
>except for the timer refreshing the browser.
>
>You will have to look at TSystemFile and TSystemDirectory.
>
>Cheers, Fons.
>
>
>  
>



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET