[openbeos] Re: I'm new here

  • From: "François Revol" <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Fri, 06 Apr 2007 17:02:44 +0200 CEST

> Hi Waldemar,
> 
> Am 06.04.2007 um 15:06 schrieb Waldemar Kornewald:
> 
> > On 4/6/07, Michael Pfeiffer <michael.pfeiffer@xxxxxxxxx> wrote:
> >>    - needs a "real" toolbar with icons and text, should be  
> >> configurable
> >> whether text and/or icon should be displayed
> >
> > IMHO, it only needs to be configurable if it would otherwise take 
> > up
> > too much space and limit the user too much (like in an office 
> > suite),
> > but if you only have a few buttons then bigger ones with text
> > underneath shouldn't be a problem, so they IMHO don't need any
> > configuration. At least, I wouldn't see a use for that, then.
> 
> I don't insist on the configurability, personally I like it, though,  
> but this can wait for R2.

However a real system-wide toolbar class is really missing...

Having to write your own, not having the same look in every app is 
against consistency IMO.

As for me I'd reuse (subclass) BMenuBar... I actually tried and it 
seems to work quite well. But it would be harder to add stuff like 
combo boxes and such as buttons (not sure it's sane anyway), because 
buttons aren't BViews.
I can put the small test code online for reference.
Maybe someone can make a list of existing classes and their pros/cons, 
so the UI team can decide which one to pick up and impose.

I'd vote for the one I wrote for XEmacs :D
http://revolf.free.fr/beos/shots/shot_beos_googlefs_xemacs_native_gnus.png
http://revolf.free.fr/beos/shots/shot_xemacs_beos_native_toolbars.png
(the green is just here to spot the bad placement)

Actually let me check (bad neuron found on device /dev/brain)... 
yes this one I also wrote as a public BMenuBar :)
So you can see it's working (You can even change the look to plain 
instead of raised buttons by changing the Menu^WToolbarItem type... I 
didn't draw the borders myself).

IIRC the only trick was to trap AttachedToWindow() to save the default 
menubar, call BMenuBar's, and put back the existing one as it can't be 
teh default mb because it isn't an mb strictly speaking :)

I'd say it makes sense... a toolbar is merely a menu of tools.

François.


Other related posts: