Bo Peng wrote:
Dear all,
The attached patch will be applied tomorrow morning if there is no
objection. The main design ideas are that
1. enable mouse tracking
2. get inset under mouse (done by editXY) and pass notifyMouseEnter
and notifyMouseLeave to it.
IIUC, this is not a signal but a call to process some mouse event so
'dispatchMouseEntered()' or 'processMouseEntered()' or even
mouseEnteredEvent() all seem more meaningful to me.
3. if an inset (currently insetcommand and insetcollapsable) decides
to respond to notifyMouseEnter, it returns true to the notify
functions to be redrawn.
OK.
4. button painter now paints hover-style buttons. I have changed some
default colors for this.
[...]
+bool InsetCollapsable::notifyMouseEnter()
+{
+ mouse_hover_ = true;
+ return true;
+}
+
+
+bool InsetCollapsable::notifyMouseLeave()
+{
+ mouse_hover_ = false;
+ return true;
+}
+
+
If there would be nothing more to it, I'd rather rename that one function:
bool InsetCollapsable::setMouseIn(bool mouse_in = true)
{
mouse_in_ = mouse_in;
return true;
}
The rest seems good to me. Good work!
Abdel.