本文整理汇总了C++中CFX_RectF::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_RectF::Reset方法的具体用法?C++ CFX_RectF::Reset怎么用?C++ CFX_RectF::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_RectF
的用法示例。
在下文中一共展示了CFX_RectF::Reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ChangeSelected
void IFWL_ComboList::ChangeSelected(int32_t iSel) {
if (!m_pProperties->m_pDataProvider)
return;
IFWL_ListBoxDP* pData =
static_cast<IFWL_ListBoxDP*>(m_pProperties->m_pDataProvider);
CFWL_ListItem* hItem = pData->GetItem(this, iSel);
CFX_RectF rtInvalidate;
rtInvalidate.Reset();
CFWL_ListItem* hOld = GetSelItem(0);
int32_t iOld = pData->GetItemIndex(this, hOld);
if (iOld == iSel)
return;
if (iOld > -1) {
GetItemRect(iOld, rtInvalidate);
SetSelItem(hOld, false);
}
if (hItem) {
CFX_RectF rect;
GetItemRect(iSel, rect);
rtInvalidate.Union(rect);
CFWL_ListItem* hSel = pData->GetItem(this, iSel);
SetSelItem(hSel, true);
}
if (!rtInvalidate.IsEmpty())
Repaint(&rtInvalidate);
}
示例2: ProcessEnter
FX_BOOL CFWL_ToolTipContainer::ProcessEnter(CFWL_EvtMouse* pEvt,
IFWL_Widget* pOwner) {
if (HasToolTip(pEvt->m_pDstTarget)) {
if (NULL == m_pToolTipImp) {
CFWL_WidgetImpProperties prop;
prop.m_pDataProvider = m_ToolTipDp;
prop.m_pOwner = pOwner;
CFX_RectF rtTooltip;
rtTooltip.Set(150, 150, 100, 50);
prop.m_rtWidget = rtTooltip;
IFWL_ToolTip* pToolTip = IFWL_ToolTip::Create(prop, nullptr);
pToolTip->Initialize();
m_pToolTipImp = static_cast<CFWL_ToolTipImp*>(pToolTip->GetImpl());
m_pToolTipImp->ModifyStylesEx(FWL_STYLEEXT_TTP_Multiline, 0);
m_pToolTipImp->SetStates(FWL_WGTSTATE_Invisible, TRUE);
}
if (pCurTarget->IsShowed()) {
CFX_WideString wsCaption;
pCurTarget->GetCaption(wsCaption);
if (!wsCaption.IsEmpty()) {
m_ToolTipDp->m_wsCaption = wsCaption;
}
CFX_RectF rt;
rt.Reset();
CFX_SizeF sz;
sz.Reset();
pCurTarget->GetToolTipSize(sz);
if (sz.x > 0 && sz.y > 0) {
rt.width = sz.x;
rt.height = sz.y;
} else {
CFX_RectF r;
m_pToolTipImp->GetWidgetRect(r, TRUE);
rt.width = r.width;
rt.height = r.height;
}
CFX_PointF pt;
pt.Set(pEvt->m_fx, pEvt->m_fy);
if (pCurTarget->GetToolTipPos(pt) == FWL_ERR_Succeeded) {
rt.left = pt.x;
rt.top = pt.y;
m_pToolTipImp->ModifyStylesEx(FWL_STYLEEXT_TTP_NoAnchor, 0);
} else {
CFX_RectF rtAnchor;
pCurTarget->GetWidget()->GetClientRect(rtAnchor);
pCurTarget->GetWidget()->TransformTo(NULL, rtAnchor.left, rtAnchor.top);
m_pToolTipImp->SetAnchor(rtAnchor);
m_pToolTipImp->ModifyStylesEx(0, FWL_STYLEEXT_TTP_NoAnchor);
}
m_pToolTipImp->SetWidgetRect(rt);
m_pToolTipImp->Update();
m_pToolTipImp->Show();
}
return TRUE;
}
return FALSE;
}