amiga-mui / thebar

Next generation MUI buttons bar custom class (TheBar.mcc) which provides application programmers with an advanced, high-level Toolbar-alike class.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for on mouse over notification

afalkenhahn opened this issue · comments

Is there an attribute that is set whenever the mouse pointer is over a toolbar button? I see that there is MUIA_TheBar_MouseOver but it only works with the "Raised" and "Sunny" styles. I'd like to have an attribute that works with all styles. Practical use: I want to display extended help information in a status bar for every toolbar button. I know there is tooltip help for the individual buttons but I'd like to display help texts in the status bar too so I need to find a way to get notified when the mouse pointer is over a toolbar button.

Thanks. I've just tested this and I'd need a few more extensions if possible:

  1. When listening to MUIA_TheBar_MouseOver I don't get a notification when the mouse hasn't been moved over another button and is then moved over the first button. I guess there is no notification because MUIA_TheBar_MouseOver is initially set to 0. That's why it doesn't trigger when moving the mouse over the first button (without any other button having been active before)
  2. I'd also need a way to find out when the mouse isn't over any button. MUIA_TheBar_MouseOver only records the last button that the mouse was over. I'd also need a way to get notified when the mouse is moved to an area where there is no button. I guess MUIA_TheBar_MouseOver could be set to -1 then but that'll probably break compatibility. So maybe a new attribute could be introduced for this purpose? BTW: Setting MUIA_TheBar_MouseOver to -1 when the mouse isn't over a button would also solve the first problem...
  3. I'd also need to be able to get mouse over notifications for disabled buttons. Maybe a new tag could be introduced for this as well.

Thanks!

MUIA_TheBar_MouseOver is not suitable for this purpose as its internal implementation is bound too tightly to its documented purpose.
I will implemented a new attribute MUIA_TheBar_HoveredButton which gets triggered upon every hovered button change.

Binaries for AmigaOS3 and AmigaOS4.
thebar_test_os3.zip
thebar_test_os4.zip