Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Toobar question for Hyatt

1 view
Skip to first unread message

Bryce Harrington

unread,
Apr 14, 1998, 3:00:00 AM4/14/98
to mozilla-ui

In working through the toolbar code, I notice that there is support for
"hidden buttons". David, could you explain to me why this was done? Is
it still necessary?

In toolbar2.cpp there are two arrays of buttons:
m_pButtonArray[] and
m_pHidddenButtons (a CPtrArray)

Secondly, why is the first list implemented as a CToolbarButton**
(manual) list, but the second is a CPtrArray? Wouldn't it be more
consistent to implement both lists the same way? Alternately, would it
be better or worse to simply implement both lists in one, with each
button carring a flag to indicate whether it was "present" or "hiddden"?

For those of you who haven't looked through the toolbar code, there's a
lot of good stuff - lot's of potential. Most of the code for toolbar
customization is already there waiting to be hooked up. Lots of
potential...

Bryce Harrington
bryce @ alumni.caltech.edu

David W Hyatt

unread,
Apr 14, 1998, 3:00:00 AM4/14/98
to

Bryce Harrington wrote:

> In working through the toolbar code, I notice that there is support for
> "hidden buttons". David, could you explain to me why this was done? Is
> it still necessary?
>

Yes, it's still necessary, although this code is only used with a single
button on the navigation toolbar. Check out the HideButtonByCommand and
ShowButtonByCommand functions in toolbar2.cpp. That's how you say which
button you want to hide or show.

This is used with the Images button on the navigation toolbar. If you go
into your Advanced preferences and deselect Automatically Load Images,
you'll see a new Images button pop onto the navigation toolbar. If you
subsequently reselect the pref, the Images button will be hidden once more.

> In toolbar2.cpp there are two arrays of buttons:
> m_pButtonArray[] and
> m_pHidddenButtons (a CPtrArray)
>
> Secondly, why is the first list implemented as a CToolbarButton**
> (manual) list, but the second is a CPtrArray? Wouldn't it be more
> consistent to implement both lists the same way?

Someone had a violent reaction to MFC. This happens from time to time. :)

Dave


0 new messages