![]() | InDesign SDK 20.5 |
#include <WEvent.h>

Public Member Functions | |
| WEvent (WinProcParam *) | |
| WEvent (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |
| virtual bool16 | LButtonDn () const |
| virtual bool16 | OptionAltKeyDown () const |
| virtual bool16 | CmdKeyDown () const |
| virtual bool16 | ShiftKeyDown () const |
| virtual bool16 | ShiftLockKeyDown () const |
| virtual bool16 | MacCtrlDown () const |
| virtual bool16 | LeftAltDown () const |
| virtual bool16 | RightAltDown () const |
| virtual bool16 | LeftControlDown () const |
| virtual bool16 | RightControlDown () const |
| virtual SysChar | GetChar () const |
| virtual void | SetChar (SysChar theChar) |
| virtual VirtualKey | GetVirtualKey () const |
| virtual SysEvent | GetSysEvent () |
| virtual void | SetSysEvent (SysEvent theEvent) |
| virtual bool16 | IsRepeatKey () const |
| virtual bool16 | IsAltGrChar () const |
| virtual GSysPoint | GlobalWhere () const |
| virtual PMPoint | GetMouseScrollDelta (ScrollUnits units=kLines) const |
| virtual PMReal | GetTime () const |
| virtual SysWindow | GetSysWindow () const |
| virtual void | SetSysWindow (const SysWindow targetWindow) |
| virtual IEventHandler * | GetTarget () const |
| virtual void | SetTarget (const IEventHandler *target) |
| virtual void | SetReturnValue (uintptr_t value) |
| virtual uintptr_t | GetReturnValue () const |
| virtual void | SetSystemHandledState (SystemHandledState state) |
| virtual SystemHandledState | GetSystemHandledState () const |
| virtual EventType | GetType () const |
| virtual void | SetType (const EventType theType) |
| virtual IPMUnknown * | QueryTargetWindowInterface (const PMIID &) const |
| virtual int16 | GetPartCode () const |
| virtual void | SetPartCode (const int16 pCode) |
| const WEvent & | operator= (const WEvent &e) |
Public Member Functions inherited from IEvent | |
| virtual void | SetUI_DoEventHandledState (UI_DoEventHandledState) |
| virtual UI_DoEventHandledState | GetUI_DoEventHandledState () const |
| virtual GestureType | GetGestureType () const |
| virtual float | GetRotationInDegrees () const |
| virtual float | GetMagnificationAmount () const |
| virtual SwipeDirection | GetSwipeDirection () const |
| virtual TabletAction | GetTabletAction () const |
Additional Inherited Members | |
Public Types inherited from IEvent | |
| enum | ScrollUnits { kLines, kPixels } |
| enum | BaseEventHandledState { kShouldCall, kDontCall, kHasCalled } |
| enum | IEventType { kFirstEventType = 1, kMouseMove = kFirstEventType, kMouseExit, kMouseDrag, kLButtonDn, kRButtonDn, kMButtonDn, kLButtonUp, kRButtonUp, kMButtonUp, kDoubleClick, kTripleClick, kQuadrupleClick, kQuintupleClick, kMouseWheel, kControlCmd, kKeyDown, kKey, kKeyUp, kTabletEvent, kGestureEvent, kMultiTouchEvent, kSuspend, kResume, kActivate, kDeactivate, kNull, kInvalid, kEndOfEventTypes } |
| enum | GestureType { kGestureNone = 0, kGestureBegin, kGestureEnd, kGestureRotation, kGestureMagnify, kGestureSwipe, kGesturePan, kEndOfGestureTypes } |
| enum | SwipeDirection { kSwipeDirectionNone = 0, kSwipeDirectionLeft, kSwipeDirectionRight, kSwipeDirectionUp, kSwipeDirectionDown } |
| enum | TabletAction { kTabletActionNone = 0, kTabletActionProximity, kTabletActionPen, kEndOfTabletActions } |
| typedef BaseEventHandledState | UI_DoEventHandledState |
| typedef enum IEvent::IEventType | EventType |
This is the Windows implementation of an Event. The only clients who need to use this class are those who need to create an event to pass around. This is fairly rare. Usually you can declare a PlatformEvent on the stack, set the sys event into it, run it through the event converter, and then pass it to the event dispatcher.
InterfacePtr<const IApplication> app( GetExecutionContextSession()->QueryApplication() );
InterfacePtr<IEventDispatcher> dispatcher(app, IID_IEVENTDISPATCHER); PlatformEvent myEvent;
myEvent.SetSysEvent(osLevelEvent);GetExecutionContextSession()->GetEventConverter()->ConvertIEvent(myEvent);
dispatcher->DispatchEvent(&myEvent);
| virtual |
Check if command key down (Ctrl on PC)
Implements IEvent.
| virtual |
Return the ASCII key associated with the event. Valid only for key-related events.
Implements IEvent.
| virtual |
Return the scroll data for the event. Only valid for mouse wheel events. Can contain an x and y scroll value on some devices (e.g. Apple's Mighty Mouse or some track pads).
Implements IEvent.
| virtual |
Returns the time of the event, in SECONDS since startup. On Win, this is a DWORD, so it'll roll over after ~47 days
Implements IEvent.
| virtual |
| virtual |
Return the virtual key associated with a kKeyDown event.@see KeyboardDefs.h for the various defines for virtual keys.
Implements IEvent.
| virtual |
Return the location associated with the event. The validity of the contents depends on the type of event;
for events containing a location, we return the location of the mouse, in global coordinates, at the time of the event.
Platform details: On Win, only mouse related events contain a location, and this method returns nonsense for non-mouse events. However on OS X any event can have a location, and we will return it, in particular keyboard events contain a location.
Implements IEvent.
| virtual |
Returns kTrue if the event generates a valid unicode character or kFalse if the keystroke doesn't map to a unicode character. This function is used to figure out if AltGR (right-alt on non-US keyboards) should be treated as a shortcut or as a special character. The result of this function is only valid during a KeyDown event. On Macintosh, this function always returns false.
Implements IEvent.
| virtual |
Returns kTrue if key event is an automatically repeating key (caused by holding a key down).
Implements IEvent.
| virtual |
Check if left mouse button down
Implements IEvent.
| virtual |
Check if the left Alt/Option key on keyboard is down. Works on mac and windows both.
Implements IEvent.
| virtual |
| virtual |
Check if the Control key on a Macintosh extended keyboard is down. Will always return false on Windows.
Implements IEvent.
| virtual |
Check if option key down (Alt on PC)
Implements IEvent.
| virtual |
Check if the right Alt/Option key on keyboard is down. Works on mac and windows both.
Implements IEvent.
| virtual |
| virtual |
Sets the ASCII key associated with the event. Valid only for key-related events.
Usually only done to indicate the event has been handled as a shortcut. Changing the char of a KeyDown cmd to 0 Prevents redispatching the event as a KeyCmd
| theChar | the new ascii character for this event. |
Implements IEvent.
| virtual |
Set the type of the event. Typically this is done by the EventConverter.
| the | event type |
Implements IEvent.
| virtual |
Check if shift key down
Implements IEvent.
| virtual |
Check if shift lock is on
Implements IEvent.