本文整理汇总了C++中CLTGUICtrl::IsEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ CLTGUICtrl::IsEnabled方法的具体用法?C++ CLTGUICtrl::IsEnabled怎么用?C++ CLTGUICtrl::IsEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLTGUICtrl
的用法示例。
在下文中一共展示了CLTGUICtrl::IsEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnRButtonUp
LTBOOL CFolderDisplay::OnRButtonUp(int x, int y)
{
// Get the control that the click was on
int nControlIndex=0;
if (GetControlUnderPoint(x, y, &nControlIndex))
{
CLTGUICtrl* pCtrl = GetControl(nControlIndex);
if (m_pCaptureCtrl && pCtrl != m_pCaptureCtrl)
return LTFALSE;
// If the mouse is over the same control now as it was when the down message was called
// then send the "left" message to the control.
if (nControlIndex == m_nRMouseDownItemSel)
{
if (pCtrl->IsEnabled())
{
if (GetSelectedControl() == m_pRendererCtrl)
{
// Get the current resolution
FolderDisplayResolution currentResolution=GetCurrentSelectedResolution();
LTBOOL handled = pCtrl->OnRButtonUp(x,y);
if (handled)
{
SetupResolutionCtrl();
// Set the resolution for the control
SetCurrentCtrlResolution(currentResolution);
}
return handled;
}
else if (pCtrl == m_pHardwareCursor)
{
return OnLeft();
}
else
{
SetSelection(nControlIndex);
return CBaseFolder::OnRButtonUp(x,y);
}
}
}
}
else
{
m_nRMouseDownItemSel= kNoSelection;
}
return LTFALSE;
}
示例2: OnMouseMove
// Handles the mouse move message
LTBOOL CListCtrl::OnMouseMove(int x, int y)
{
x += g_pInterfaceResMgr->GetXOffset();
y += g_pInterfaceResMgr->GetYOffset();
int nControlUnderPoint=0;
CLTGUICtrl *pCtrl = GetControlUnderPoint(x, y, &nControlUnderPoint);
if (m_pUp && CanScrollUp())
m_pUp->Select(pCtrl == m_pUp);
if (m_pDown && CanScrollDown())
m_pDown->Select(pCtrl == m_pDown);
// If m_bEnableMouseMoveSelect is TRUE then select the item that the mouse is over
if (m_bEnableMouseMoveSelect)
{
if(pCtrl && nControlUnderPoint >= 0)
{
// Make sure we're enabled
if(!pCtrl->IsEnabled())
return LTFALSE;
if (GetSelectedItem() != nControlUnderPoint)
{
SelectItem(nControlUnderPoint);
return LTTRUE;
}
}
else
{
/*
//if not on anything select nothing
if ( m_nCurrentIndex < (int)m_controlArray.GetSize() )
{
m_controlArray[m_nCurrentIndex]->Select(FALSE);
}
m_nCurrentIndex = kNoSelection;
*/
}
}
return LTFALSE;
}
示例3: OnLButtonDblClick
LTBOOL CListCtrl::OnLButtonDblClick(int x, int y)
{
x += g_pInterfaceResMgr->GetXOffset();
y += g_pInterfaceResMgr->GetYOffset();
m_fNextScrollTime = -1.0f;
// Get the control that the click was on
int nControlIndex=0;
CLTGUICtrl *pCtrl = GetControlUnderPoint(x, y, &nControlIndex);
if(pCtrl)
{
// Make sure we're enabled
if(!pCtrl->IsEnabled())
return LTFALSE;
// If the mouse is over the same control now as it was when the down message was called
// then send the "enter" message to the control.
if (nControlIndex == m_nMouseDownItemSel)
{
if (nControlIndex == kUpSel)
{
return (!CanScrollUp() || ScrollUp());
}
else if (nControlIndex == kDownSel)
{
return (!CanScrollDown() || ScrollDown());
}
else
{
return m_controlArray[nControlIndex]->OnLButtonDblClick( x, y);
}
}
}
else
{
m_nMouseDownItemSel=kNoSelection;
}
return LTFALSE;
}
示例4: OnLButtonDown
// Handles the left button down message
LTBOOL CListCtrl::OnLButtonDown(int x, int y)
{
x += g_pInterfaceResMgr->GetXOffset();
y += g_pInterfaceResMgr->GetYOffset();
// Get the control that the click was on
int nControlIndex=0;
CLTGUICtrl *pCtrl = GetControlUnderPoint(x, y, &nControlIndex);
if(pCtrl)
{
// Make sure we're enabled
if(!pCtrl->IsEnabled())
return LTFALSE;
if (nControlIndex >= 0 && m_bEnableMouseClickSelect)
{
// Select the control
SelectItem(nControlIndex);
}
if ((nControlIndex == kUpSel && CanScrollUp())|| (nControlIndex == kDownSel && CanScrollDown()))
m_fNextScrollTime = g_pLTClient->GetTime()+m_fScrollFirstDelay;
// Record this control as the one being selected from the mouse click.
// If the mouse is still over it on the UP message, then the "enter" message will be sent.
m_nMouseDownItemSel=nControlIndex;
return LTTRUE;
}
else
{
// This clears the index for what item was selected from a mouse down message
m_nMouseDownItemSel=kNoSelection;
return LTFALSE;
}
}