i would like to have LsBoxMouseIn and LsBoxMouseOut.
many modules have it, so should lsbox.dll ... well, would be nice :)
All modules should have mouse in/out
All modules should have left/right/middle/up/down instead of clicks
...but currently we always have done with the matter we have.
Actually it may not work with lsbox, but you can try.
I already heard about subclass, but it doesn't have
- up !action
- down !action
instead of clicks
Why would you want up/down instead of clicks?
down/up is more funner for the themer :D
There is a trend of our gracious coders adding better mouse events support to modules (among them include wheel and drag n' drop), and this just another thing we want.
The obvious need for button-down is that you could have actions that execute on button down instead of on the release as most clicks do it. This would practically save you milliseconds of time as long as you clicked the intended target. =D
Less anal but more clumsy, I'd like to try some of that simulated dragging that you can do with this down/up support; at least for now you can interactively move and resize modules' windows so long as they provide !move and !size bangs (most do). There should be more uses than just these.
Also with down/up, you can have 'hold' actions (hold the button for a duration).
As Smurth implies, consistency is good and much desired. A lack of standardised module behaviour limits our [themers'] plans.
The reality is not ideal as we'd like, so we're just hacking away alternative fixes in the meantime.
Sure, I could see some uses for for up/down events in addition to the click ones; but Smurth said we should replace click events with up/down. I didn't understand why he would want to do that.
In addition to mouse enter/leave events, I'd also like to see hover.
OnLeftUp !bang = OnLeftClick !bang (the greatest part of the times)
OnLeftDown... draging/resizing/making sliders... (see tnl)
I know the way modules handles MouseUp actions can be weird and I think the question is not "shall we implemente mouse up/down events ?" but "how shall we do that ?". If there's no question about MouseDown...
1. should MouseUp react when simply mousing Up over the module ?
2. should MouseUp react only when mousing Up (over the module) happens after mousing down ?
3. after a MouseDown (over the module), should MouseUp react even if the mouse is outside the module's area ?
whoa... too much word "mouse" in one post! :D
Maduin: subclass can do "hover". You can specify an interval in milliseconds:
*[instance]Hover [modifiers (optional)]+[enter|leave|interval] [action]
I've gotten request for up/down since the day it was released, but haven't found the time to add them properly.
Smurth: I think the mouse up should be thought of as a release from where it was pressed down; it would correspond to where it was clicked, so it would be (3). Although having something like (1) is nice for adjacent shortcut regions (e.g. winamp2's main window playback buttons)...
Depending on the effect you're going for, you're going to want different OnButtonUp and OnClick actions. The behavior I settled on was:
button pressed inside - OnDown fires
button pressed inside and released anywhere - OnUp fires
button pressed inside and released inside - OnUp and OnClick fire
I don't remember what exactly I considered, but I think you need events like this to easily simulate OS-native buttons. (OnUp is for visual effects/mouse tracking, OnClick is for execution)
Real communication is so good :)