summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/cfwl_widget.cpp')
-rw-r--r--xfa/fwl/cfwl_widget.cpp94
1 files changed, 0 insertions, 94 deletions
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index b9b04cf1f4..c8d0db682a 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -379,100 +379,6 @@ void CFWL_Widget::SetGrab(bool bSet) {
pDriver->SetGrab(this, bSet);
}
-void CFWL_Widget::GetPopupPos(float fMinHeight,
- float fMaxHeight,
- const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup) {
- if (GetClassID() == FWL_Type::ComboBox) {
- if (m_pWidgetMgr->IsFormDisabled()) {
- m_pWidgetMgr->GetAdapterPopupPos(this, fMinHeight, fMaxHeight, rtAnchor,
- rtPopup);
- return;
- }
- GetPopupPosComboBox(fMinHeight, fMaxHeight, rtAnchor, rtPopup);
- return;
- }
- if (GetClassID() == FWL_Type::DateTimePicker &&
- m_pWidgetMgr->IsFormDisabled()) {
- m_pWidgetMgr->GetAdapterPopupPos(this, fMinHeight, fMaxHeight, rtAnchor,
- rtPopup);
- return;
- }
- GetPopupPosGeneral(fMinHeight, fMaxHeight, rtAnchor, rtPopup);
-}
-
-bool CFWL_Widget::GetPopupPosMenu(float fMinHeight,
- float fMaxHeight,
- const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup) {
- if (GetStylesEx() & FWL_STYLEEXT_MNU_Vert) {
- bool bLeft = m_pProperties->m_rtWidget.left < 0;
- float fRight = rtAnchor.right() + rtPopup.width;
- CFX_PointF point = TransformTo(nullptr, CFX_PointF());
- if (fRight + point.x > 0.0f || bLeft) {
- rtPopup = CFX_RectF(rtAnchor.left - rtPopup.width, rtAnchor.top,
- rtPopup.width, rtPopup.height);
- } else {
- rtPopup = CFX_RectF(rtAnchor.right(), rtAnchor.top, rtPopup.width,
- rtPopup.height);
- }
- rtPopup.Offset(point.x, point.y);
- return true;
- }
-
- float fBottom = rtAnchor.bottom() + rtPopup.height;
- CFX_PointF point = TransformTo(nullptr, point);
- if (fBottom + point.y > 0.0f) {
- rtPopup = CFX_RectF(rtAnchor.left, rtAnchor.top - rtPopup.height,
- rtPopup.width, rtPopup.height);
- } else {
- rtPopup = CFX_RectF(rtAnchor.left, rtAnchor.bottom(), rtPopup.width,
- rtPopup.height);
- }
- rtPopup.Offset(point.x, point.y);
- return true;
-}
-
-bool CFWL_Widget::GetPopupPosComboBox(float fMinHeight,
- float fMaxHeight,
- const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup) {
- float fPopHeight = rtPopup.height;
- if (rtPopup.height > fMaxHeight)
- fPopHeight = fMaxHeight;
- else if (rtPopup.height < fMinHeight)
- fPopHeight = fMinHeight;
-
- float fWidth = std::max(rtAnchor.width, rtPopup.width);
- float fBottom = rtAnchor.bottom() + fPopHeight;
- CFX_PointF point = TransformTo(nullptr, CFX_PointF());
- if (fBottom + point.y > 0.0f) {
- rtPopup =
- CFX_RectF(rtAnchor.left, rtAnchor.top - fPopHeight, fWidth, fPopHeight);
- } else {
- rtPopup = CFX_RectF(rtAnchor.left, rtAnchor.bottom(), fWidth, fPopHeight);
- }
-
- rtPopup.Offset(point.x, point.y);
- return true;
-}
-
-bool CFWL_Widget::GetPopupPosGeneral(float fMinHeight,
- float fMaxHeight,
- const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup) {
- CFX_PointF point = TransformTo(nullptr, CFX_PointF());
- if (rtAnchor.bottom() + point.y > 0.0f) {
- rtPopup = CFX_RectF(rtAnchor.left, rtAnchor.top - rtPopup.height,
- rtPopup.width, rtPopup.height);
- } else {
- rtPopup = CFX_RectF(rtAnchor.left, rtAnchor.bottom(), rtPopup.width,
- rtPopup.height);
- }
- rtPopup.Offset(point.x, point.y);
- return true;
-}
-
void CFWL_Widget::RegisterEventTarget(CFWL_Widget* pEventSource) {
const CFWL_App* pApp = GetOwnerApp();
if (!pApp)