示例#1
0
    void PreviousItem()
    {
        if (GetSelItemIdx() != 0) {
			SetSelItemByIdx(GetSelItemIdx()-1);
			if (GetScrollPosition() > GetSelItemIdx())
				ScrollPageUp();
		}
    }
示例#2
0
LRESULT CHexView::OnKeyDown (UINT uMsg, WPARAM wParam, 
	LPARAM lParam, BOOL &bHandled)
{

	//
	// If up key
	//

	if (wParam == VK_UP)
	{
		ScrollLineUp ();
	}
	else if (wParam == VK_DOWN)
	{
		ScrollLineDown ();
	}
	else if (wParam == VK_LEFT)
	{
		ScrollLineLeft ();
	}
	else if (wParam == VK_RIGHT)
	{
		ScrollLineRight ();
	}
	else if (wParam == VK_PRIOR)
	{
		ScrollPageUp ();
	}
	else if (wParam == VK_NEXT)
	{
		ScrollPageDown ();
	}
	else if (wParam == VK_HOME)
	{
		ScrollTop ();
	}
	else if (wParam == VK_END)
	{
		ScrollBottom ();
	}
	bHandled = FALSE;
	return 0;
}
示例#3
0
    MouseResult Button(IInputProvider* pprovider, const Point& point, int button, bool bCaptured, bool bInside, bool bDown)
    {
        if (point.X() < m_pBlankPane->GetSize().X())
            {
            if (button == 0 || button == 1) // TE: Allowed rightclicks to trigger button event
            {
                if (bDown) 
                    {
                    int iItem = PointToIdx(point);
                    if (iItem < m_vItems.GetCount())
                        {
                        m_bMouseSel = true; 
						
						if (button == 0)
						{	// If leftclicked and doubleclicked
							if (pprovider->IsDoubleClick())
								InvestItemByIdx(iItem);		// invest
							else
								SetSelItemByIdx(iItem);		// select if single-left clicked
						}
						else if (button == 1)	// if rightclicked, partial invest!
							PartialInvestItemByIdx(iItem);

                        ScrollToItemByIdx(iItem);
                        m_bMouseSel = false;
                        }
                    }
                }
            }
        
		//Imago 8/14/09 mouse wheel #286 backing out Spunky
        if (button == 8 && bDown) { 
            ScrollPageDown(); 
        } else if (button == 9 && bDown) { 
            ScrollPageUp();
        }
	

        return Pane::Button(pprovider, point, button, bCaptured, bInside, bDown);
    }