本文整理汇总了C++中IFWL_Widget::GetClassID方法的典型用法代码示例。如果您正苦于以下问题:C++ IFWL_Widget::GetClassID方法的具体用法?C++ IFWL_Widget::GetClassID怎么用?C++ IFWL_Widget::GetClassID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFWL_Widget
的用法示例。
在下文中一共展示了IFWL_Widget::GetClassID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoMouseEx
FX_BOOL CFWL_NoteDriver::DoMouseEx(CFWL_MsgMouse* pMsg,
IFWL_Widget* pMessageForm) {
CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr());
if (!pWidgetMgr)
return FALSE;
IFWL_Widget* pTarget = NULL;
if (m_pGrab)
pTarget = m_pGrab;
if (!pTarget) {
pTarget =
pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy);
while (pTarget && pTarget->GetClassID() == FWL_CLASSHASH_Grid) {
pTarget = pTarget->GetParent();
}
}
if (pTarget) {
if (pMessageForm != pTarget) {
pMessageForm->TransformTo(pTarget, pMsg->m_fx, pMsg->m_fy);
}
}
if (!pTarget)
return FALSE;
pMsg->m_pDstTarget = pTarget;
return TRUE;
}
示例2: MouseSecondary
void CFWL_NoteDriver::MouseSecondary(CFWL_MsgMouse* pMsg) {
IFWL_Widget* pTarget = pMsg->m_pDstTarget;
if (pTarget == m_pHover) {
return;
}
if (m_pHover) {
CFWL_MsgMouse msLeave;
msLeave.m_pDstTarget = m_pHover;
msLeave.m_fx = pMsg->m_fx;
msLeave.m_fy = pMsg->m_fy;
pTarget->TransformTo(m_pHover, msLeave.m_fx, msLeave.m_fy);
msLeave.m_dwFlags = 0;
msLeave.m_dwCmd = FWL_MSGMOUSECMD_MouseLeave;
DispatchMessage(&msLeave, NULL);
}
if (pTarget->GetClassID() == FWL_CLASSHASH_Form) {
m_pHover = NULL;
return;
}
m_pHover = pTarget;
CFWL_MsgMouse msHover;
msHover.m_pDstTarget = pTarget;
msHover.m_fx = pMsg->m_fx;
msHover.m_fy = pMsg->m_fy;
msHover.m_dwFlags = 0;
msHover.m_dwCmd = FWL_MSGMOUSECMD_MouseHover;
DispatchMessage(&msHover, NULL);
}
示例3: DoWheel
FX_BOOL CFWL_NoteDriver::DoWheel(CFWL_MsgMouseWheel* pMsg,
IFWL_Widget* pMessageForm) {
CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr());
if (!pWidgetMgr)
return FALSE;
IFWL_Widget* pDst =
pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy);
if (!pDst)
return FALSE;
while (pDst && pDst->GetClassID() == FWL_CLASSHASH_Grid) {
pDst = pDst->GetParent();
}
pMessageForm->TransformTo(pDst, pMsg->m_fx, pMsg->m_fy);
pMsg->m_pDstTarget = pDst;
return TRUE;
}
示例4: GetDefaultButton
IFWL_Widget* CFWL_WidgetMgr::GetDefaultButton(IFWL_Widget* pParent) {
if ((pParent->GetClassID() == FWL_Type::PushButton) &&
(pParent->GetStates() & (1 << (FWL_WGTSTATE_MAX + 2)))) {
return pParent;
}
IFWL_Widget* child =
CFWL_WidgetMgr::GetInstance()->GetFirstChildWidget(pParent);
while (child) {
if ((child->GetClassID() == FWL_Type::PushButton) &&
(child->GetStates() & (1 << (FWL_WGTSTATE_MAX + 2)))) {
return child;
}
IFWL_Widget* find = GetDefaultButton(child);
if (find) {
return find;
}
child = CFWL_WidgetMgr::GetInstance()->GetNextSiblingWidget(child);
}
return nullptr;
}