[Top][All Lists]

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

Re: Reusing browser of GWorkspace

From: Enrico Sersale
Subject: Re: Reusing browser of GWorkspace
Date: Sat, 31 Jan 2004 16:34:15 +0200

On 2004-01-31 15:10:28 +0200 Nicolas SANCHEZ <address@hidden> wrote:

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 ?

BCell is a subclass of NSBrowserCell that adds icons and cuts its title adding 
"..." if it is too long. But, if you need dnd support, you need also BMatrix 
and BColumn.

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)

Discuss-gnustep mailing list

reply via email to

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