Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003

    enabling move/drag events in Symbian 6.0 Crystal

    How do I enable Move and Drag events when using a Virtual Cursor in Crystal? These events are disabled by default.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003

    RE: enabling move/drag events in Symbian 6.0 Crystal

    Setting up Virtual Cursor:

    CEikonEnv* env = CEikonEnv::Static();

    // get the virtual cursor
    iVirtualCursor = &(env->VirtualCursor());
    // and turn it on
    iVirtualCursor->SetCursorStateL(TEikVirtualCursor::EOn, *env);

    By default, move and drag events are not delivered to the client. They can be enabled by setting the event filter with RWindowBase::PointerFilter(). E.g. when using a window-owning control object (derived from CCoeControl):

    Window().PointerFilter(EPointerFilterMove|EPointerFilterDrag, 0);

    This enables move and drag events for window owned by the control. Events of type TPointerEvent::EMove and TPointerEvent::EDrag and delivered to the client, and can be handled in the control's HandlePointerEventL() function.
    The control must also claim a pointer grab. Without pointer grab, pointer events are delivered to it only between EButton1Down (within that control) and EButton1Up events.

    If virtual cursor with move/drag events does not match your needs, it is possible to use pointer cursor and drive it with keyboard events. Diagonal movement can be achieved by checking the status of multiple keys and handling key events of type EEventKeyUp and EEventKeyDown.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts