discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reusing browser of GWorkspace


From: Nicolas SANCHEZ
Subject: Re: Reusing browser of GWorkspace
Date: Sat, 31 Jan 2004 14:10:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

I only need icons in the left of names. Then, isn't it easier to create a new NSBrowserCell subclass ? Is BCell a subclass for adding icons to the NSBrowserCell ?

Enrico Sersale wrote:
On 2004-01-31 13:28:43 +0200 Nicolas SANCHEZ <address@hidden> wrote:

The installation of GWorkspace adds a library with some header files, and one named browser2.h.

Is anyone knows what is the class browser2 ? Is it the main browser of GWorkspace ?


Yes. GWLib contains all browser classes, that is: Browser2, BCell, BMatrix, BColumn, BIcon, BIconLabel and BNameEditor. Browser2 was written (at the beginning) because some changes in NSBrowser's -tile didn't permit anymore to have fixed-width columns. Then, I've added many other features; In -initWithBasePath:visibleColumns:styleMask:delegate: you can choose if the browser must have or not the icons path, if the cells have or not an icon, if the columns accept dnd, etc. (see Preferences->Browser in GWorkspace). If you want to reuse it, you should take a look also in GWorkspace/ViewersWindow (the window that contains the browser and the shelf) and in GWorkspace/Shelf.

If you don't need things like icons in the browser cells, you could try to use the new browser I've written for GWNet. It is in GWNet/Viewers/Common/AsyncBrowser. The AsyncBrowser directory contains all you need to use it; no other class is needed, you must only write a delegate. (look in GWNet/Viewers/SMBViewer or FTPViewer for examples of delegate)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]