本文整理汇总了C++中CFX_RectF类的典型用法代码示例。如果您正苦于以下问题:C++ CFX_RectF类的具体用法?C++ CFX_RectF怎么用?C++ CFX_RectF使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CFX_RectF类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddInvalidateRect
void CXFA_FFDocView::AddInvalidateRect(CXFA_FFPageView* pPageView,
const CFX_RectF& rtInvalidate) {
if (m_mapPageInvalidate[pPageView]) {
m_mapPageInvalidate[pPageView]->Union(rtInvalidate);
return;
}
CFX_RectF* pRect = new CFX_RectF;
pRect->Set(rtInvalidate.left, rtInvalidate.top, rtInvalidate.width,
rtInvalidate.height);
m_mapPageInvalidate[pPageView].reset(pRect);
}
示例2: PtInActiveRect
FX_BOOL CXFA_FFField::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
return FALSE;
}
CFX_RectF rtWidget;
m_pNormalWidget->GetWidgetRect(rtWidget);
if (rtWidget.Contains(fx, fy)) {
return TRUE;
}
return FALSE;
}
示例3: PtInActiveRect
FX_BOOL CXFA_FFComboBox::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
return FALSE;
}
CFX_RectF rtWidget;
((CFWL_ComboBox*)m_pNormalWidget)->GetBBox(rtWidget);
if (rtWidget.Contains(fx, fy)) {
return TRUE;
}
return FALSE;
}
示例4: PtInActiveRect
bool CXFA_FFComboBox::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
return false;
}
CFX_RectF rtWidget;
((CFWL_ComboBox*)m_pNormalWidget)->GetBBox(rtWidget);
if (rtWidget.Contains(fx, fy)) {
return true;
}
return false;
}
示例5: PtInActiveRect
bool CXFA_FFDateTimeEdit::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
return false;
}
CFX_RectF rtWidget;
((CFWL_DateTimePicker*)m_pNormalWidget)->GetBBox(rtWidget);
if (rtWidget.Contains(fx, fy)) {
return true;
}
return false;
}
示例6: DrawMinMaxBoxCommon
void CFWL_FormTP::DrawMinimizeBox(CFX_Graphics* pGraphics,
const CFX_RectF* pRect,
FWLTHEME_STATE eState,
CFX_Matrix* pMatrix,
int32_t iActive) {
DrawMinMaxBoxCommon(pGraphics, pRect, eState, pMatrix);
CFX_RectF rtMin;
rtMin.Set(pRect->left + 5, pRect->top + 13, pRect->width - 14,
pRect->height - 18);
FillSoildRect(pGraphics, 0xFFFFFFFF, &rtMin, pMatrix);
}
示例7: AddInvalidateRect
void CXFA_FFDocView::AddInvalidateRect(IXFA_PageView* pPageView,
const CFX_RectF& rtInvalidate) {
CFX_RectF* pRect = (CFX_RectF*)m_mapPageInvalidate.GetValueAt(pPageView);
if (!pRect) {
pRect = new CFX_RectF;
pRect->Set(rtInvalidate.left, rtInvalidate.top, rtInvalidate.width,
rtInvalidate.height);
m_mapPageInvalidate.SetAt(pPageView, pRect);
} else {
pRect->Union(rtInvalidate);
}
}
示例8:
int32_t CFWL_CaretImp::CFWL_CaretTimer::Run(FWL_HTIMER hTimer) {
if (m_pCaret->GetStates() & FWL_STATE_CAT_HightLight) {
m_pCaret->SetStates(FWL_STATE_CAT_HightLight, FALSE);
} else {
m_pCaret->SetStates(FWL_STATE_CAT_HightLight);
}
CFX_RectF rt;
m_pCaret->GetWidgetRect(rt);
rt.Set(0, 0, rt.width + 1, rt.height);
m_pCaret->Repaint(&rt);
return 1;
}
示例9: DisForm_GetBBox
void IFWL_DateTimePicker::DisForm_GetBBox(CFX_RectF& rect) const {
rect = m_pProperties->m_rtWidget;
if (DisForm_IsNeedShowButton())
rect.width += m_fBtn;
if (!IsMonthCalendarVisible())
return;
CFX_RectF rtMonth;
m_pMonthCal->GetWidgetRect(rtMonth);
rtMonth.Offset(m_pProperties->m_rtWidget.left, m_pProperties->m_rtWidget.top);
rect.Union(rtMonth);
}
示例10: while
void CFWL_WidgetMgrDelegate::DrawChild(IFWL_Widget* parent,
const CFX_RectF& rtClip,
CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {
if (!parent)
return;
FX_BOOL bFormDisable = m_pWidgetMgr->IsFormDisabled();
IFWL_Widget* pNextChild = m_pWidgetMgr->GetFirstChildWidget(parent);
while (pNextChild) {
IFWL_Widget* child = pNextChild;
pNextChild = m_pWidgetMgr->GetNextSiblingWidget(child);
if (child->GetStates() & FWL_WGTSTATE_Invisible)
continue;
CFX_RectF rtWidget;
child->GetWidgetRect(rtWidget);
if (rtWidget.IsEmpty())
continue;
CFX_Matrix widgetMatrix;
CFX_RectF clipBounds(rtWidget);
if (!bFormDisable)
child->GetMatrix(widgetMatrix, TRUE);
if (pMatrix)
widgetMatrix.Concat(*pMatrix);
if (!bFormDisable) {
widgetMatrix.TransformPoint(clipBounds.left, clipBounds.top);
clipBounds.Intersect(rtClip);
if (clipBounds.IsEmpty())
continue;
pGraphics->SaveGraphState();
pGraphics->SetClipRect(clipBounds);
}
widgetMatrix.Translate(rtWidget.left, rtWidget.top, TRUE);
IFWL_WidgetDelegate* pDelegate = child->SetDelegate(nullptr);
if (pDelegate) {
if (m_pWidgetMgr->IsFormDisabled() ||
IsNeedRepaint(child, &widgetMatrix, rtClip)) {
pDelegate->OnDrawWidget(pGraphics, &widgetMatrix);
}
}
if (!bFormDisable)
pGraphics->RestoreGraphState();
DrawChild(child, clipBounds, pGraphics,
bFormDisable ? &widgetMatrix : pMatrix);
child = m_pWidgetMgr->GetNextSiblingWidget(child);
}
}
示例11: DisForm_OnLButtonUpEx
void CFWL_DateTimeCalendarImpDelegate::OnLButtonUpEx(CFWL_MsgMouse* pMsg) {
if (m_pOwner->m_pWidgetMgr->IsFormDisabled()) {
return DisForm_OnLButtonUpEx(pMsg);
}
if (m_pOwner->m_rtLBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_pOwner->m_iLBtnPartStates = 0;
m_pOwner->Repaint(&m_pOwner->m_rtLBtn);
return;
}
if (m_pOwner->m_rtRBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_pOwner->m_iRBtnPartStates = 0;
m_pOwner->Repaint(&m_pOwner->m_rtRBtn);
return;
}
if (m_pOwner->m_rtToday.Contains(pMsg->m_fx, pMsg->m_fy)) {
return;
}
int32_t iOldSel = 0;
if (m_pOwner->m_arrSelDays.GetSize() > 0) {
iOldSel = m_pOwner->m_arrSelDays[0];
}
int32_t iCurSel = m_pOwner->GetDayAtPoint(pMsg->m_fx, pMsg->m_fy);
CFX_RectF rt;
IFWL_DateTimePicker* pIPicker =
static_cast<IFWL_DateTimePicker*>(m_pOwner->m_pOuter);
CFWL_DateTimePickerImp* pPicker =
static_cast<CFWL_DateTimePickerImp*>(pIPicker->GetImpl());
pPicker->m_pForm->GetWidgetRect(rt);
rt.Set(0, 0, rt.width, rt.height);
if (iCurSel > 0) {
LPDATEINFO lpDatesInfo =
(LPDATEINFO)m_pOwner->m_arrDates.GetAt(iCurSel - 1);
CFX_RectF rtInvalidate(lpDatesInfo->rect);
if (iOldSel > 0 && iOldSel <= m_pOwner->m_arrDates.GetSize()) {
lpDatesInfo = (LPDATEINFO)m_pOwner->m_arrDates.GetAt(iOldSel - 1);
rtInvalidate.Union(lpDatesInfo->rect);
}
m_pOwner->AddSelDay(iCurSel);
if (!m_pOwner->m_pOuter)
return;
pPicker->ProcessSelChanged(m_pOwner->m_iCurYear, m_pOwner->m_iCurMonth,
iCurSel);
pPicker->ShowMonthCalendar(FALSE);
} else if (m_bFlag && (!rt.Contains(pMsg->m_fx, pMsg->m_fy))) {
IFWL_DateTimePicker* pIPicker =
static_cast<IFWL_DateTimePicker*>(m_pOwner->m_pOuter);
CFWL_DateTimePickerImp* pPicker =
static_cast<CFWL_DateTimePickerImp*>(pIPicker->GetImpl());
pPicker->ShowMonthCalendar(FALSE);
}
m_bFlag = 0;
}
示例12: DisForm_HitTest
FWL_WidgetHit IFWL_DateTimePicker::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
if (m_pWidgetMgr->IsFormDisabled())
return DisForm_HitTest(fx, fy);
if (m_rtClient.Contains(fx, fy))
return FWL_WidgetHit::Client;
if (IsMonthCalendarVisible()) {
CFX_RectF rect;
m_pMonthCal->GetWidgetRect(rect);
if (rect.Contains(fx, fy))
return FWL_WidgetHit::Client;
}
return FWL_WidgetHit::Unknown;
}
示例13: DrawFormBorder
void CFWL_FormTP::DrawFormBorder(CFX_Graphics* pGraphics,
const CFX_RectF* pRect,
FWLTHEME_STATE eState,
CFX_Matrix* pMatrix,
int32_t iActive) {
CFX_RectF rt;
rt.Set(pRect->left, pRect->top, 1, pRect->height);
FX_FLOAT fBottom, fRight;
fBottom = pRect->bottom();
fRight = pRect->right();
CFX_Path path;
path.Create();
CFX_Color clrLine;
path.Clear();
path.MoveTo(pRect->left, pRect->top);
path.LineTo(pRect->left, fBottom - 1);
path.LineTo(fRight - 1, fBottom - 1);
path.LineTo(fRight - 1, pRect->top);
clrLine = m_pThemeData->clrFormBorder[iActive][2];
pGraphics->SetStrokeColor(&clrLine);
pGraphics->StrokePath(&path, pMatrix);
path.Clear();
path.MoveTo(pRect->left + 1, pRect->top);
path.LineTo(pRect->left + 1, fBottom - 2);
path.LineTo(fRight - 2, fBottom - 2);
path.LineTo(fRight - 2, pRect->top);
clrLine = m_pThemeData->clrFormBorder[iActive][1];
pGraphics->SetStrokeColor(&clrLine);
pGraphics->StrokePath(&path, pMatrix);
path.Clear();
path.MoveTo(pRect->left + 2, pRect->top);
path.LineTo(pRect->left + 2, fBottom - 3);
path.LineTo(fRight - 3, fBottom - 3);
path.LineTo(fRight - 3, pRect->top);
clrLine = m_pThemeData->clrFormBorder[iActive][0];
pGraphics->SetStrokeColor(&clrLine);
pGraphics->StrokePath(&path, pMatrix);
path.Clear();
path.MoveTo(pRect->left + 3, pRect->top);
path.LineTo(pRect->left + 3, fBottom - 4);
path.LineTo(fRight - 4, fBottom - 4);
path.LineTo(fRight - 4, pRect->top);
clrLine = m_pThemeData->clrFormBorder[iActive][4];
pGraphics->SetStrokeColor(&clrLine);
pGraphics->StrokePath(&path, pMatrix);
m_rtDisLBorder.Set(pRect->left, pRect->top + 29, 4, pRect->height - 29);
m_rtDisRBorder.Set(pRect->right() - 4, pRect->top + 29, 4,
pRect->height - 29);
m_rtDisBBorder.Set(pRect->left, pRect->bottom() - 4, pRect->width, 4);
m_rtDisCaption.Set(pRect->left, pRect->top, pRect->width, 29);
}
示例14: DisForm_GetBBox
FWL_ERR CFWL_DateTimePickerImp::DisForm_GetBBox(CFX_RectF& rect) {
rect = m_pProperties->m_rtWidget;
if (DisForm_IsNeedShowButton()) {
rect.width += m_fBtn;
}
if (IsMonthCalendarShowed()) {
CFX_RectF rtMonth;
m_pMonthCal->GetWidgetRect(rtMonth);
rtMonth.Offset(m_pProperties->m_rtWidget.left,
m_pProperties->m_rtWidget.top);
rect.Union(rtMonth);
}
return FWL_ERR_Succeeded;
}
示例15: CalCloseBox
void CFWL_FormTP::CalCloseBox(IFWL_Widget* pWidget, CFX_RectF& rect) {
FX_DWORD dwStyles = pWidget->GetStyles();
CFX_RectF rtWidget;
pWidget->GetWidgetRect(rtWidget);
rtWidget.Offset(-rtWidget.left, -rtWidget.top);
if (dwStyles & FWL_WGTSTYLE_CloseBox) {
rect.Set(rtWidget.left + FWLTHEME_FORMBTN_Margin + FWLTHEME_FORMBTN_Span,
rtWidget.top + FWLTHEME_FORMBTN_Margin, FWLTHEME_FORMBTN_Size,
FWLTHEME_FORMBTN_Size);
} else {
rect.Set(rtWidget.left + FWLTHEME_FORMBTN_Margin + FWLTHEME_FORMBTN_Span,
rtWidget.top + FWLTHEME_FORMBTN_Margin, 0, 0);
}
}