FloatRectangle formClientBounds(0.0f, 0.0f, 0.0f, 0.0f);
FloatRectangle panelAbsoulteBounds(0.0f, 0.0f, 0.0f, 0.0f);
bool commandButtonExist = false;
+ bool formExist = false;
+ bool panelExist = false;
FloatRectangle cursorRect = GetCursorBoundsF(true);
float contextMenuHeight = 0.0f;
}
GET_SHAPE_CONFIG(EDIT::COPYPASTE_HANDLER_HEIGHT, orientation, handlerHeight);
-
GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ITEM_HEIGHT, orientation, contextMenuHeight);
GET_SHAPE_CONFIG(CONTEXTMENU::GRID_TOP_MARGIN, orientation, contextMenuTopMargin);
GET_SHAPE_CONFIG(CONTEXTMENU::GRID_BOTTOM_MARGIN, orientation, contextMenuBottomMargin);
if (pForm)
{
formClientBounds = pForm->GetClientBoundsF();
+ formExist = true;
}
_ScrollPanel* pPanel = __pEditPresenter->GetParentPanel();
if (pPanel)
{
panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(true);
+ panelExist = true;
}
__pEdit->GetKeypadBounds(keypadBounds);
editShowAreaAbsRect.height = textObjectBounds.height;
}
}
+ if (editShowAreaAbsRect.y < 0.0f)
+ {
+ editShowAreaAbsRect.height += editShowAreaAbsRect.y;
+ editShowAreaAbsRect.y = 0.0f;
+ }
if (commandButtonExist)
{
editShowAreaAbsRect.height -= (editShowAreaAbsRect.y + editShowAreaAbsRect.height - keypadBounds.y);
}
}
- if (editShowAreaAbsRect.y < formClientBounds.y)
+ if (formExist)
{
- editShowAreaAbsRect.y = formClientBounds.y;
- editShowAreaAbsRect.height -= formClientBounds.y;
+ if (editShowAreaAbsRect.y < formClientBounds.y)
+ {
+ editShowAreaAbsRect.y = formClientBounds.y;
+ editShowAreaAbsRect.height -= formClientBounds.y;
+ }
}
- if (editShowAreaAbsRect.y < panelAbsoulteBounds.y)
+ if (panelExist)
{
- editShowAreaAbsRect.y = panelAbsoulteBounds.y;
- editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y);
+ if (editShowAreaAbsRect.y < panelAbsoulteBounds.y)
+ {
+ editShowAreaAbsRect.y = panelAbsoulteBounds.y;
+ editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y);
+ }
}
__editVisibleArea = CoordinateSystem::AlignToDevice(editShowAreaAbsRect);
}