FWL_ERR CFWL_DateTimePickerImp::DisForm_GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { rect = m_pProperties->m_rtWidget; if (DisForm_IsNeedShowButton()) { rect.width += m_fBtn; } return FWL_ERR_Succeeded; }
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); }
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; }
FWL_WidgetHit IFWL_DateTimePicker::DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) const { CFX_RectF rect; rect.Set(0, 0, m_pProperties->m_rtWidget.width, m_pProperties->m_rtWidget.height); if (rect.Contains(fx, fy)) return FWL_WidgetHit::Edit; if (DisForm_IsNeedShowButton()) rect.width += m_fBtn; if (rect.Contains(fx, fy)) return FWL_WidgetHit::Client; if (IsMonthCalendarVisible()) { m_pMonthCal->GetWidgetRect(rect); if (rect.Contains(fx, fy)) return FWL_WidgetHit::Client; } return FWL_WidgetHit::Unknown; }
FX_DWORD CFWL_DateTimePickerImp::DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy) { CFX_RectF rect; rect.Set(0, 0, m_pProperties->m_rtWidget.width, m_pProperties->m_rtWidget.height); if (rect.Contains(fx, fy)) { return FWL_WGTHITTEST_Edit; } if (DisForm_IsNeedShowButton()) { rect.width += m_fBtn; } if (rect.Contains(fx, fy)) { return FWL_WGTHITTEST_Client; } if (IsMonthCalendarShowed()) { m_pMonthCal->GetWidgetRect(rect); if (rect.Contains(fx, fy)) { return FWL_WGTHITTEST_Client; } } return FWL_WGTHITTEST_Unknown; }
void IFWL_DateTimePicker::DisForm_GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { rect = m_pProperties->m_rtWidget; if (DisForm_IsNeedShowButton()) rect.width += m_fBtn; }