示例#1
0
INLINE
void  wxeReturn::add(wxMouseState val) {
    addAtom("wxMouseState");
    // TODO not int?
    addUint(val.GetX());
    addUint(val.GetY());
    addBool(val.LeftDown());
    addBool(val.MiddleDown());
    addBool(val.RightDown());
    addBool(val.ControlDown());
    addBool(val.ShiftDown());
    addBool(val.AltDown());
    addBool(val.MetaDown());
    addBool(val.CmdDown());
    addTupleCount(11);     
}
示例#2
0
HitTestPreview WaveTrackVZoomHandle::HitPreview(const wxMouseState &state)
{
   static auto zoomInCursor =
      ::MakeCursor(wxCURSOR_MAGNIFIER, ZoomInCursorXpm, 19, 15);
   static auto zoomOutCursor =
      ::MakeCursor(wxCURSOR_MAGNIFIER, ZoomOutCursorXpm, 19, 15);
   static  wxCursor arrowCursor{ wxCURSOR_ARROW };
   bool bVZoom;
   gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false);
   bVZoom &= !state.RightIsDown();
   const auto message = bVZoom ? 
      _("Click to vertically zoom in. Shift-click to zoom out. Drag to specify a zoom region.") :
      _("Right-click for menu.");

   return {
      message,
      bVZoom ? (state.ShiftDown() ? &*zoomOutCursor : &*zoomInCursor) : &arrowCursor
      // , message
   };
}