, __itemFontSize(0.0f)
, __dividerHeight(0.0f)
, __bgPressedMargin(0.0f)
+ , __anchorPopupOverlap(0.0f)
{
}
GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ICON_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __itemBitmapHeight);
GET_SHAPE_CONFIG(CONTEXTMENU::GRID_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __dividerHeight);
GET_SHAPE_CONFIG(CONTEXTMENU::ITEM_BG_PRESSED_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bgPressedMargin);
+ GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_POPUP_OVERLAP, _CONTROL_ORIENTATION_PORTRAIT, __anchorPopupOverlap);
}
_ContextMenuItem*
windowRect.height = bodyRect.height + arrowRect.height;
bodyRect.x = 0.0f;
- bodyRect.y = __arrowTopMargin;
+ bodyRect.y = __arrowTopMargin - __anchorPopupOverlap;
// Set arrow position
arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x;
windowRect.height = bodyRect.height + arrowRect.height;
bodyRect.x = 0.0f;
- bodyRect.y = arrowRect.height - __arrowBottomMargin;
+ bodyRect.y = arrowRect.height - __arrowBottomMargin + __anchorPopupOverlap;
// Set arrow position
arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x;
windowRect.width = bodyRect.width + arrowRect.width;
windowRect.height = bodyRect.height;
- bodyRect.x = __arrowRightMargin;
+ bodyRect.x = __arrowRightMargin - __anchorPopupOverlap;
bodyRect.y = 0.0f;
// Set arrow position
}
// Set body position x
- bodyRect.x = anchorPosition.x + arrowRect.width;
+ bodyRect.x = anchorPosition.x;
// - Check left margin
if (bodyRect.x <= leftBoundary)
{
bodyRect.y = bottomBoundary - bodyRect.height;
}
- windowRect.x = bodyRect.x - arrowRect.width;
+ windowRect.x = bodyRect.x;
windowRect.y = bodyRect.y;
windowRect.width = bodyRect.width + arrowRect.width;
windowRect.height = bodyRect.height;
- bodyRect.x = arrowRect.width - __arrowLeftMargin;
+ bodyRect.x = arrowRect.width - __arrowLeftMargin + __anchorPopupOverlap;
bodyRect.y = 0.0f;
// Set arrow position
arrowRect.y = anchorPosition.y - (arrowRect.height / 2.0f) - windowRect.y;
}
- itemRect.x = bodyLeftMargin;
- itemRect.y = bodyTopMargin + bodyBottomMargin;
+ itemRect.x = bodyRect.x + bodyLeftMargin;
+ itemRect.y = bodyRect.y + bodyTopMargin;
itemRect.width = __layoutSize.width;
itemRect.height = __layoutSize.height;
_AccessibilityContainer* pContainer = __pContextMenu->GetAccessibilityContainer();
if (pContainer != null)
{
+ /* not confirmed yet
+ _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
+ if (pElement != null)
+ {
+ pElement->SetTrait(L"Contextual popup");
+ pElement->SetHint(L"double tap to close");
+ pElement->SetBounds(FloatRectangle(0.0f, 0.0f, __pContextMenu->GetBoundsF().width, __pContextMenu->GetBoundsF().height));
+ pContainer->AddElement(*pElement);
+ __pContextMenu->AddAccessibilityElement(*pElement);
+ }
+ */
+
int itemCount = __pModel->GetItemCount();
for (int i = 0; i < itemCount; i++)
{
_AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
if (pItem != null && pElement != null)
{
- pElement->SetLabel(pItem->GetText());
-// pElement->SetTrait(ACCESSIBILITY_TRAITS_CONTEXTMENU);
- pElement->SetTrait(ACCESSIBILITY_TRAITS_LIST); // not yet
- pElement->SetBounds(pItem->GetDrawRect());
- if (i == 0)
+ pElement->SetName(L"ContextMenuItem" + Integer::ToString(i));
+ if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
{
- pElement->SetHint(L"The first of Contextual popup");
+ pElement->SetLabel(L"icon");
}
- else if(i == itemCount - 1)
+ else
{
- pElement->SetHint(L"The last of Contextual popup");
+ pElement->SetLabel(pItem->GetText());
}
+
+ pElement->SetTrait(L"Contextual popup");
+ pElement->SetBounds(pItem->GetDrawRect());
pContainer->AddElement(*pElement);
__pContextMenu->AddAccessibilityElement(*pElement);
}
#include <FBaseSysLog.h>
#include <FGrp_BitmapImpl.h>
+#include "FUi_AccessibilityContainer.h"
+#include "FUi_AccessibilityElement.h"
#include "FUi_CoordinateSystemUtils.h"
#include "FUi_ResourceManager.h"
__pUpperDividerLineLabel->SetBackgroundColor(dividerLineColor);
__pUpperDividerLineLabel->Invalidate();
+
+ _AccessibilityContainer* pContainer = __pUpperDividerLineLabel->GetAccessibilityContainer();
+ if (pContainer)
+ {
+ pContainer->Activate(false);
+ }
}
void
BgBitmap = null;
__pBackgroundLabel->Invalidate();
+
+ _AccessibilityContainer* pContainer = __pBackgroundLabel->GetAccessibilityContainer();
+ if (pContainer)
+ {
+ pContainer->Activate(false);
+ }
}
void
__pLowerDividerLineLabel->SetBackgroundColor(dividerLineColor);
__pLowerDividerLineLabel->Invalidate();
+
+ _AccessibilityContainer* pContainer = __pLowerDividerLineLabel->GetAccessibilityContainer();
+ if (pContainer)
+ {
+ pContainer->Activate(false);
+ }
}
_UiTouchEventDelivery
, __itemBitmapHeight(0.0f)
, __itemFontSize(0.0f)
, __dividerHeight(0.0f)
+ , __anchorPopupOverlap(0.0f)
{
}
GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __itemFontSize);
GET_SHAPE_CONFIG(CONTEXTMENU::LIST_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __dividerHeight);
+ GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_POPUP_OVERLAP, _CONTROL_ORIENTATION_PORTRAIT, __anchorPopupOverlap);
__itemWidth = __itemMinWidth;
}
windowRect.height = bodyRect.height + arrowRect.height;
bodyRect.x = 0.0f;
- bodyRect.y = __arrowTopMargin;
+ bodyRect.y = __arrowTopMargin - __anchorPopupOverlap;
// Set arrow position
arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x;
windowRect.height = bodyRect.height + arrowRect.height;
bodyRect.x = 0.0f;
- bodyRect.y = arrowRect.height - __arrowBottomMargin;
+ bodyRect.y = arrowRect.height - __arrowBottomMargin + __anchorPopupOverlap;
// Set arrow position
arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x;
windowRect.width = bodyRect.width + arrowRect.width;
windowRect.height = bodyRect.height;
- bodyRect.x = __arrowRightMargin;
+ bodyRect.x = __arrowRightMargin - __anchorPopupOverlap;
bodyRect.y = 0.0f;
// Set arrow position
}
// Set body position x
- bodyRect.x = anchorPosition.x + arrowRect.width;
+ bodyRect.x = anchorPosition.x;
// - Check left margin
if (bodyRect.x <= leftBoundary)
{
bodyRect.y = bottomBoundary - bodyRect.height;
}
- windowRect.x = bodyRect.x - arrowRect.width;
+ windowRect.x = bodyRect.x;
windowRect.y = bodyRect.y;
windowRect.width = bodyRect.width + arrowRect.width;
windowRect.height = bodyRect.height;
- bodyRect.x = arrowRect.width - __arrowLeftMargin;
+ bodyRect.x = arrowRect.width - __arrowLeftMargin + __anchorPopupOverlap;
bodyRect.y = 0.0f;
// Set arrow position
arrowRect.y = anchorPosition.y - (arrowRect.height / 2.0f) - windowRect.y;
}
- itemRect.x = bodyLeftMargin;
- itemRect.y = bodyTopMargin + bodyBottomMargin;
+ itemRect.x = bodyRect.x + bodyLeftMargin;
+ itemRect.y = bodyRect.y + bodyTopMargin;
itemRect.width = __layoutSize.width;
itemRect.height = __layoutSize.height;
_AccessibilityContainer* pContainer = __pContextMenu->GetAccessibilityContainer();
if (pContainer != null)
{
+ /* not confirmed yet
+ _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
+ if (pElement != null)
+ {
+ pElement->SetTrait(L"Contextual popup");
+ pElement->SetHint(L"double tap to close");
+ pElement->SetBounds(FloatRectangle(0.0f, 0.0f, __pContextMenu->GetBoundsF().width, __pContextMenu->GetBoundsF().height));
+ pContainer->AddElement(*pElement);
+ __pContextMenu->AddAccessibilityElement(*pElement);
+ }
+ */
+
int itemCount = __pModel->GetItemCount();
for (int i = 0; i < itemCount; i++)
{
_AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true);
if (pItem != null && pElement != null)
{
- pElement->SetLabel(pItem->GetText());
-// pElement->SetTrait(ACCESSIBILITY_TRAITS_CONTEXTMENU);
- pElement->SetTrait(ACCESSIBILITY_TRAITS_LIST); // not yet
- pElement->SetBounds(pItem->GetDrawRect());
- if (i == 0)
+ pElement->SetName(L"ContextMenuItem" + Integer::ToString(i));
+ if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
{
- pElement->SetHint(L"The first of Contextual popup");
+ pElement->SetLabel(L"icon " + pItem->GetText());
}
- else if(i == itemCount - 1)
+ else
{
- pElement->SetHint(L"The last of Contextual popup");
+ pElement->SetLabel(pItem->GetText());
}
+
+ pElement->SetTrait(L"Contextual popup");
+ pElement->SetBounds(pItem->GetDrawRect());
pContainer->AddElement(*pElement);
__pContextMenu->AddAccessibilityElement(*pElement);
}
float __itemFontSize;
float __dividerHeight;
float __bgPressedMargin;
+ float __anchorPopupOverlap;
}; // _ContextMenuGridPresenter
}}} // Tizen::Ui: Control
float __itemBitmapHeight;
float __itemFontSize;
float __dividerHeight;
+ float __anchorPopupOverlap;
}; // _ContextMenuListPresenter
}}} // Tizen::Ui: Control
DECLARE_SHAPE_CONFIG(ANCHOR_LEFT_MARGIN, 41);
DECLARE_SHAPE_CONFIG(ANCHOR_RIGHT_MARGIN, 42);
DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_MARGIN, 43);
+ DECLARE_SHAPE_CONFIG(ANCHOR_POPUP_OVERLAP, 44);
DECLARE_FIXED_VALUE_CONFIG(GRID_ITEM_GAP, 1);
DECLARE_END_UI_CONFIG(CONTEXTMENU);
ADD_SHAPE_CONFIG(APPEARING_ANIMATION_DISTANCE_X, 40);
ADD_SHAPE_CONFIG(APPEARING_ANIMATION_DISTANCE_Y, 40);
ADD_SHAPE_CONFIG(ITEM_BG_PRESSED_MARGIN, 4);
+ ADD_SHAPE_CONFIG(ANCHOR_POPUP_OVERLAP, 1);
END_UI_CONFIG_MODE(720x1280);
START_UI_CONFIG_MODE(1280x720);