Esempio n. 1
0
void TopWindow::processEvent( EvtScroll &rEvtScroll )
{
    // Raise the windows
    raise();

    // Get the control hit by the mouse
    CtrlGeneric *pNewHitControl = findHitControl( rEvtScroll.getXPos(),
                                                  rEvtScroll.getYPos());
    setLastHit( pNewHitControl );

    // send a mouse event to the right control when scrollable
    // if none, send it directly to the vlc core
    CtrlGeneric *pHitControl = m_pCapturingControl ?
                               m_pCapturingControl : pNewHitControl;

    if( pHitControl && pHitControl->isScrollable() )
    {
        pHitControl->handleEvent( rEvtScroll );
    }
    else
    {
        // Treat the scroll event as a hotkey plus current modifiers
        int i = (rEvtScroll.getDirection() == EvtScroll::kUp ?
                 KEY_MOUSEWHEELUP : KEY_MOUSEWHEELDOWN) | m_currModifier;

        var_SetInteger( getIntf()->p_libvlc, "key-pressed", i );
    }
}
Esempio n. 2
0
void VoutWindow::processEvent( EvtScroll &rEvtScroll )
{
    int i = (rEvtScroll.getDirection() == EvtScroll::kUp ?
            KEY_MOUSEWHEELUP : KEY_MOUSEWHEELDOWN) | rEvtScroll.getMod();

    getIntf()->p_sys->p_dialogs->sendKey( i );
}
Esempio n. 3
0
void TopWindow::processEvent( EvtScroll &rEvtScroll )
{
    // Raise the windows
    raise();

    // Get the control hit by the mouse
    CtrlGeneric *pNewHitControl = findHitControl( rEvtScroll.getXPos(),
                                                  rEvtScroll.getYPos());
    setLastHit( pNewHitControl );

    // Send a mouse event to the hit control, or to the control
    // that captured the mouse, if any
    CtrlGeneric *pActiveControl = pNewHitControl;

    if( m_pCapturingControl )
    {
        pActiveControl = m_pCapturingControl;
    }
    if( pActiveControl )
    {
        pActiveControl->handleEvent( rEvtScroll );
    }
    else
    {
        // Treat the scroll event as a hotkey plus current modifiers
        int i = (rEvtScroll.getDirection() == EvtScroll::kUp ?
                 KEY_MOUSEWHEELUP : KEY_MOUSEWHEELDOWN) | m_currModifier;

        var_SetInteger( getIntf()->p_libvlc, "key-pressed", i );
    }
}
    virtual void processEvent( EvtScroll &rEvtScroll )
    {
        // scroll events sent to core as hotkeys
        int i_vlck = 0;
        i_vlck |= rEvtScroll.getMod();
        i_vlck |= ( rEvtScroll.getDirection() == EvtScroll::kUp ) ?
                  KEY_MOUSEWHEELUP : KEY_MOUSEWHEELDOWN;

        var_SetInteger( getIntf()->p_libvlc, "key-pressed", i_vlck );
    }
Esempio n. 5
0
    virtual void processEvent( EvtScroll &rEvtScroll )
    {
        // scroll events sent to core as hotkeys
        int i_vlck = 0;
        i_vlck |= rEvtScroll.getMod();
        i_vlck |= ( rEvtScroll.getDirection() == EvtScroll::kUp ) ?
                  KEY_MOUSEWHEELUP : KEY_MOUSEWHEELDOWN;

        getIntf()->p_sys->p_dialogs->sendKey( i_vlck );
    }
Esempio n. 6
0
void CtrlSliderCursor::CmdScroll::execute()
{
    EvtScroll *pEvtScroll = (EvtScroll*)m_pParent->m_pEvt;

    int direction = pEvtScroll->getDirection();

    float percentage = m_pParent->m_rVariable.get();
    if( direction == EvtScroll::kUp )
    {
        percentage += SCROLL_STEP;
    }
    else
    {
        percentage -= SCROLL_STEP;
    }

    m_pParent->m_rVariable.set( percentage );
}
Esempio n. 7
0
void CtrlSliderCursor::transScroll( SkinObject *pCtrl )
{
    CtrlSliderCursor *pThis = (CtrlSliderCursor*)pCtrl;
    EvtScroll *pEvtScroll = (EvtScroll*)pThis->m_pEvt;

    int direction = pEvtScroll->getDirection();

    float percentage = pThis->m_rVariable.get();
    if( direction == EvtScroll::kUp )
    {
        percentage += SCROLL_STEP;
    }
    else
    {
        percentage -= SCROLL_STEP;
    }

    pThis->m_rVariable.set( percentage );
}
Esempio n. 8
0
void TopWindow::processEvent( EvtScroll &rEvtScroll )
{
    // Raise the windows
    raise();

    // Get the control hit by the mouse
    CtrlGeneric *pNewHitControl = findHitControl( rEvtScroll.getXPos(),
                                                  rEvtScroll.getYPos());
    setLastHit( pNewHitControl );

    // Send a mouse event to the hit control, or to the control
    // that captured the mouse, if any
    CtrlGeneric *pActiveControl = pNewHitControl;

    if( m_pCapturingControl )
    {
        pActiveControl = m_pCapturingControl;
    }
    if( pActiveControl )
    {
        pActiveControl->handleEvent( rEvtScroll );
    }
    else
    {
        // Treat the scroll event as a hotkey
        vlc_value_t val;
        if( rEvtScroll.getDirection() == EvtScroll::kUp )
        {
            val.i_int = KEY_MOUSEWHEELUP;
        }
        else
        {
            val.i_int = KEY_MOUSEWHEELDOWN;
        }
        // Add the modifiers
        val.i_int |= m_currModifier;

        var_Set( getIntf()->p_vlc, "key-pressed", val );
    }
}