namespace Tizen { namespace Ui {
+/**
+ * @struct ColorKey
+ * @brief This struct provides the color keys of controls.
+ *
+ * @since 2.1
+ *
+ * The %ColorKey struct provides the color keys of controls.
+ *
+ */
struct _OSP_EXPORT_ ColorKey
{
+ /**
+ * @struct Button
+ * @brief This struct provides the color keys of %Button.
+ *
+ * @since 2.1
+ *
+ * The %Button struct provides the color keys of %Button.
+ *
+ */
struct _OSP_EXPORT_ Button
{
/**
_OSP_EXPORT_ static const int TEXT_HIGHLIGHTED;
};
+ /**
+ * @struct CheckButton
+ * @brief This struct provides the color keys of %CheckButton.
+ *
+ * @since 2.1
+ *
+ * The %CheckButton struct provides the color keys of %CheckButton.
+ *
+ */
struct CheckButton
{
/**
*/
_OSP_EXPORT_ static const int DIVIDER_LINE_RIGHT_NORMAL;
};
+
+ /**
+ * @struct ColorPicker
+ * @brief This struct provides the color keys of %ColorPicker.
+ *
+ * @since 2.1
+ *
+ * The %ColorPicker struct provides the color keys of %ColorPicker.
+ *
+ */
struct _OSP_EXPORT_ ColorPicker
{
/**
_OSP_EXPORT_ static const int HANDLER_HIGHLIGHTED;
};
+ /**
+ * @struct ContextMenu
+ * @brief This struct provides the color keys of %ContextMenu.
+ *
+ * @since 2.1
+ *
+ * The %ContextMenu struct provides the color keys of %ContextMenu.
+ *
+ */
struct _OSP_EXPORT_ ContextMenu
{
/**
_OSP_EXPORT_ static const int ITEM_TEXT_DISABLED;
};
+ /**
+ * @struct DateTimeBar
+ * @brief This struct provides the color keys of %DateTimeBar.
+ *
+ * @since 2.1
+ *
+ * The %DateTimeBar struct provides the color keys of %DateTimeBar.
+ *
+ */
struct _OSP_EXPORT_ DateTimeBar
{
/**
*/
_OSP_EXPORT_ static const int TEXT_PRESSED;
};
+
+ /**
+ * @struct DateTimePicker
+ * @brief This struct provides the color keys of %DateTimePicker.
+ *
+ * @since 2.1
+ *
+ * The %DateTimePicker struct provides the color keys of %DateTimePicker.
+ *
+ */
struct _OSP_EXPORT_ DateTimePicker
{
/**
*/
_OSP_EXPORT_ static const int TITLE_DISABLED;
};
+
+ /**
+ * @struct Edit
+ * @brief This struct provides the color keys of %Edit.
+ *
+ * @since 2.1
+ *
+ * The %Edit struct provides the color keys of %Edit.
+ *
+ */
struct _OSP_EXPORT_ Edit
{
/**
_OSP_EXPORT_ static const int CURSOR_NORMAL;
};
+ /**
+ * @struct EditDate
+ * @brief This struct provides the color keys of %EditDate.
+ *
+ * @since 2.1
+ *
+ * The %EditDate struct provides the color keys of %EditDate.
+ *
+ */
struct _OSP_EXPORT_ EditDate
{
/**
_OSP_EXPORT_ static const int CONTENT_BG_HIGHLIGHTED;
};
+ /**
+ * @struct EditTime
+ * @brief This struct provides the color keys of %EditTime.
+ *
+ * @since 2.1
+ *
+ * The %EditTime struct provides the color keys of %EditTime.
+ *
+ */
struct _OSP_EXPORT_ EditTime
{
/**
_OSP_EXPORT_ static const int CONTENT_BG_HIGHLIGHTED;
};
+ /**
+ * @struct FastScroll
+ * @brief This struct provides the color keys of %FastScroll.
+ *
+ * @since 2.1
+ *
+ * The %FastScroll struct provides the color keys of %FastScroll.
+ *
+ */
struct _OSP_EXPORT_ FastScroll
{
/**
_OSP_EXPORT_ static const int POPUP_TEXT_NORMAL;
};
+ /**
+ * @struct Footer
+ * @brief This struct provides the color keys of %Footer.
+ *
+ * @since 2.1
+ *
+ * The %Footer struct provides the color keys of %Footer.
+ *
+ */
struct _OSP_EXPORT_ Footer
{
/**
_OSP_EXPORT_ static const int DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL;
};
+ /**
+ * @struct Form
+ * @brief This struct provides the color keys of %Form.
+ *
+ * @since 2.1
+ *
+ * The %Form struct provides the color keys of %Form.
+ *
+ */
struct _OSP_EXPORT_ Form
{
/**
_OSP_EXPORT_ static const int BG_NORMAL;
};
+ /**
+ * @struct Gallery
+ * @brief This struct provides the color keys of %Gallery.
+ *
+ * @since 2.1
+ *
+ * The %Gallery struct provides the color keys of %Gallery.
+ *
+ */
struct _OSP_EXPORT_ Gallery
{
/**
_OSP_EXPORT_ static const int EMPTY_TEXT_NORMAL;
};
+ /**
+ * @struct Header
+ * @brief This struct provides the color keys of %Header.
+ *
+ * @since 2.1
+ *
+ * The %Header struct provides the color keys of %Header.
+ *
+ */
struct _OSP_EXPORT_ Header
{
/**
_OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED;
};
+ /**
+ * @struct IconList
+ * @brief This struct provides the color keys of %IconList.
+ *
+ * @since 2.1
+ *
+ * The %IconList struct provides the color keys of %IconList.
+ *
+ */
struct _OSP_EXPORT_ IconList
{
/**
_OSP_EXPORT_ static const int ITEM_BORDER_HIGHLIGHTED;
};
+ /**
+ * @struct InputPad
+ * @brief This struct provides the color keys of %InputPad.
+ *
+ * @since 2.1
+ *
+ * The %InputPad struct provides the color keys of %InputPad.
+ *
+ */
struct _OSP_EXPORT_ InputPad
{
/**
_OSP_EXPORT_ static const int BUTTON_BG_DISABLED;
};
+ /**
+ * @struct Label
+ * @brief This struct provides the color keys of %Label.
+ *
+ * @since 2.1
+ *
+ * The %Label struct provides the color keys of %Label.
+ *
+ */
struct _OSP_EXPORT_ Label
{
/**
_OSP_EXPORT_ static const int TEXT_NORMAL;
};
+ /**
+ * @struct MessageBox
+ * @brief This struct provides the color keys of %MessageBox.
+ *
+ * @since 2.1
+ *
+ * The %MessageBox struct provides the color keys of %MessageBox.
+ *
+ */
struct _OSP_EXPORT_ MessageBox
{
/**
_OSP_EXPORT_ static const int BOTTOM_BUTTON_TEXT_HIGHLIGHTED;
};
+ /**
+ * @struct OptionMenu
+ * @brief This struct provides the color keys of %OptionMenu.
+ *
+ * @since 2.1
+ *
+ * The %OptionMenu struct provides the color keys of %OptionMenu.
+ *
+ */
struct _OSP_EXPORT_ OptionMenu
{
/**
_OSP_EXPORT_ static const int LIST_ITEM_DIVIDER_02_NORMAL;
};
+ /**
+ * @struct Panel
+ * @brief This struct provides the color keys of %Panel.
+ *
+ * @since 2.1
+ *
+ * The %Panel struct provides the color keys of %Panel.
+ *
+ */
struct _OSP_EXPORT_ Panel
{
/**
_OSP_EXPORT_ static const int GROUPED_STYLE_BG_NORMAL;
};
+ /**
+ * @struct Popup
+ * @brief This struct provides the color keys of %Popup.
+ *
+ * @since 2.1
+ *
+ * The %Popup struct provides the color keys of %Popup.
+ *
+ */
struct _OSP_EXPORT_ Popup
{
/**
_OSP_EXPORT_ static const int TITLE_BG_NORMAL;
};
+ /**
+ * @struct Progress
+ * @brief This struct provides the color keys of %Progress.
+ *
+ * @since 2.1
+ *
+ * The %Progress struct provides the color keys of %Progress.
+ *
+ */
struct _OSP_EXPORT_ Progress
{
/**
_OSP_EXPORT_ static const int BAR_NORMAL;
};
+ /**
+ * @struct Scroll
+ * @brief This struct provides the color keys of %Scroll.
+ *
+ * @since 2.1
+ *
+ * The %Scroll struct provides the color keys of %Scroll.
+ *
+ */
struct _OSP_EXPORT_ Scroll
{
/**
_OSP_EXPORT_ static const int BUTTON_BG_PRESSED;
};
+ /**
+ * @struct SearchBar
+ * @brief This struct provides the color keys of %SearchBar.
+ *
+ * @since 2.1
+ *
+ * The %SearchBar struct provides the color keys of %SearchBar.
+ *
+ */
struct _OSP_EXPORT_ SearchBar
{
/**
_OSP_EXPORT_ static const int BG_NORMAL;
};
+ /**
+ * @struct Slider
+ * @brief This struct provides the color keys of %Slider.
+ *
+ * @since 2.1
+ *
+ * The %Slider struct provides the color keys of %Slider.
+ *
+ */
struct _OSP_EXPORT_ Slider
{
/**
_OSP_EXPORT_ static const int OVERLAY_TEXT_NORMAL;
};
+ /**
+ * @struct SplitPanel
+ * @brief This struct provides the color keys of %SplitPanel.
+ *
+ * @since 2.1
+ *
+ * The %SplitPanel struct provides the color keys of %SplitPanel.
+ *
+ */
struct _OSP_EXPORT_ SplitPanel
{
/**
_OSP_EXPORT_ static const int DIVIDER_BG_DISABLED;
};
+ /**
+ * @struct TabBar
+ * @brief This struct provides the color keys of %TabBar.
+ *
+ * @since 2.1
+ *
+ * The %TabBar struct provides the color keys of %TabBar.
+ *
+ */
struct _OSP_EXPORT_ TabBar
{
/**
_OSP_EXPORT_ static const int ARROW_BG_NORMAL;
};
+ /**
+ * @struct Tab
+ * @brief This struct provides the color keys of %Tab.
+ *
+ * @since 2.1
+ *
+ * The %Tab struct provides the color keys of %Tab.
+ *
+ */
struct _OSP_EXPORT_ Tab
{
/**
_OSP_EXPORT_ static const int ITEM_TEXT_DISABLED;
};
+ /**
+ * @struct TableView
+ * @brief This struct provides the color keys of %TableView.
+ *
+ * @since 2.1
+ *
+ * The %TableView struct provides the color keys of %TableView.
+ *
+ */
struct _OSP_EXPORT_ TableView
{
/**
_OSP_EXPORT_ static const int ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL;
};
+ /**
+ * @struct TokenEdit
+ * @brief This struct provides the color keys of %TokenEdit.
+ *
+ * @since 2.1
+ *
+ * The %TokenEdit struct provides the color keys of %TokenEdit.
+ *
+ */
struct _OSP_EXPORT_ TokenEdit
{
/**
_BufferInfoImpl::_BufferInfoImpl()
: __handleType(HANDLE_TYPE_NONE)
, __handle(INVALID_BUFFER_HANDLE)
+ , __pUserData(null)
, __orientation(ORIENTATION_PORTRAIT)
, __rotation(ROTATION_0)
{
_BufferInfoImpl::_BufferInfoImpl(const _BufferInfoImpl& src)
: __handleType(src.__handleType)
, __handle(src.__handle)
+ , __pUserData(src.__pUserData)
, __orientation(src.__orientation)
, __rotation(ROTATION_0)
{
}
}
+void*
+_BufferInfoImpl::GetUserData(HandleType handleType) const
+{
+ switch (handleType)
+ {
+ case HANDLE_TYPE_OVERLAY_REGION:
+ return __pUserData;
+ default:
+ return null;
+ }
+}
+
void
-_BufferInfoImpl::SetHandle(HandleType handleType, int handle)
+_BufferInfoImpl::SetHandle(HandleType handleType, int handle, void* pUserData)
{
switch (handleType)
{
case HANDLE_TYPE_NONE:
__handleType = HANDLE_TYPE_NONE;
__handle = INVALID_BUFFER_HANDLE;
+ __pUserData = null;
break;
case HANDLE_TYPE_OVERLAY_REGION:
case HANDLE_TYPE_VE_SURFACE:
case HANDLE_TYPE_CANVAS_TEXTURE:
__handleType = handleType;
__handle = handle;
+ __pUserData = pUserData;
break;
}
}
}
}} // Tizen::Graphics
+
*/
int GetHandle(HandleType handleType) const;
+ void* GetUserData(HandleType handleType) const;
+
/*
* Sets the handle of the current instance of _BufferInfoImpl.
*
*/
- void SetHandle(HandleType handleType, int handle);
+ void SetHandle(HandleType handleType, int handle, void* pUserData = null);
/*
* Gets the orientation of the current instance of _BufferInfoImpl.
HandleType __handleType;
int __handle;
+ void* __pUserData;
Orientation __orientation;
Rectangle __bounds;
Rotation __rotation;
bool
_Control::OnFocusGained(const _Control& source)
{
+ bool isfocusMode = _FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled();
+ if (isfocusMode)
+ {
+ DrawFocus();
+ }
return false;
}
_Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(this);
if ((&control) == pFocusTraversalControl)
{
- pTop->SetFocusTraversalControl(this);
+ pTop->SetFocusTraversalControl(&control, false);
}
}
_VisualElement*
_Control::GetVisualElement(void) const
{
- //SysAssert(__pVisualElement);
return __pVisualElement;
}
{
int count = PrintDescription(printChildren, 0, level);
- SysLog(NID_UI, "%d controls were printed.", count);
+ SysSecureLog(NID_UI, "%d controls were printed.", count);
}
int
indent.Append(format);
String delimiter(L"-------------------------------------------------------------------------------------------");
- SysLog(NID_UI, "%ls", delimiter.GetPointer());
+ SysSecureLog(NID_UI, "%ls", delimiter.GetPointer());
// Public
String publicDescription = GetControlDelegate().GetDescription();
if (!publicDescription.IsEmpty())
{
- SysLog(NID_UI, "%ls %ls", indent.GetPointer(), publicDescription.GetPointer());
+ SysSecureLog(NID_UI, "%ls %ls", indent.GetPointer(), publicDescription.GetPointer());
}
_ControlManager* pControlManager = _ControlManager::GetInstance();
}
// Core
- SysLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) focusable(%d) focused(%d) clip(%d) movable(%d) resizable(%d) inputEnableState(%d)",
+ SysSecureLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) focusable(%d) focused(%d) clip(%d) movable(%d) resizable(%d) inputEnableState(%d)",
indent.GetPointer(), this, __controlHandle.ToInt(), GetName().GetPointer(), IsEnabled(), GetEnableState(), IsVisible(), GetVisibleState(),
IsFocusable(), focused, IsClipToParent(), IsMovable(), IsResizable(), GetInputEnableState());
Rectangle clientBounds = GetClientBounds();
Rectangle absoluteBounds = GetAbsoluteBounds();
- SysLog(NID_UI, "%ls bounds(%d %d %d %d) min(%d %d) max(%d %d) scrollPos(%.2f %.2f) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+ SysSecureLog(NID_UI, "%ls bounds(%d %d %d %d) min(%d %d) max(%d %d) scrollPos(%.2f %.2f) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
indent.GetPointer(), bounds.x, bounds.y, bounds.width, bounds.height,
min.width, min.height, max.width, max.height,
GetVerticalScrollPosition(), GetHorizontalScrollPosition(),
clientBounds.x, clientBounds.y, clientBounds.width, clientBounds.height,
absoluteBounds.x, absoluteBounds.y, absoluteBounds.width, absoluteBounds.height);
- SysLog(NID_UI, "%ls bgColor(0x%x) layoutable(%d) orientation(%d) drag(%d) drop(%d) area(%d) layer(%d)",
+ SysSecureLog(NID_UI, "%ls bgColor(0x%x) layoutable(%d) orientation(%d) drag(%d) drop(%d) area(%d) layer(%d)",
indent.GetPointer(), __backgroundColor.GetRGB32(), IsLayoutable(), GetOrientation(), IsDragEnabled(), IsDropEnabled(), GetArea(), GetLayer());
Canvas* pCanvas = GetCanvasN();
Color canvasBackgroundColor = pCanvas->GetBackgroundColor();
Color canvasForegroundColor = pCanvas->GetForegroundColor();
- SysLog(NID_UI, "%ls canvas.bounds(%d %d %d %d) canvas.bgColor(0x%x) canvas.fgColor(0x%x)",
+ SysSecureLog(NID_UI, "%ls canvas.bounds(%d %d %d %d) canvas.bgColor(0x%x) canvas.fgColor(0x%x)",
indent.GetPointer(), canvasBounds.x, canvasBounds.y, canvasBounds.width, canvasBounds.height, canvasBackgroundColor.GetRGB32(), canvasForegroundColor.GetRGB32());
delete pCanvas;
}
- SysLog(NID_UI, "%ls DataBindingContext(0x%x) ControlDelegate(0x%x) UserData(0x%x) destroying(%d)",
+ SysSecureLog(NID_UI, "%ls DataBindingContext(0x%x) ControlDelegate(0x%x) UserData(0x%x) destroying(%d)",
indent.GetPointer(), __pDataBindingContext, __pControlDelegate, __pUserData, __destroying);
// Ownees
if (!ownees.IsEmpty())
{
- SysLog(NID_UI, "%ls Ownees(%ls)", indent.GetPointer(), ownees.GetPointer());
+ SysSecureLog(NID_UI, "%ls Ownees(%ls)", indent.GetPointer(), ownees.GetPointer());
}
_VisualElementImpl* pVisualElementImpl = _VisualElementImpl::GetInstance(*__pVisualElement);
- SysLog(NID_UI, "%ls _VisualElement(0x%x) _VisualElementImpl(0x%x) VisualElementContentProvider(0x%x) VisualElementEventListener(0x%x)",
+ SysSecureLog(NID_UI, "%ls _VisualElement(0x%x) _VisualElementImpl(0x%x) VisualElementContentProvider(0x%x) VisualElementEventListener(0x%x)",
indent.GetPointer(), __pVisualElement, pVisualElementImpl, __pVisualElementContentProvider, __pVisualElementEventListener);
// Layout
- SysLog(NID_UI, "%ls LayoutItemHandler(0x%x) PortraitLayout(0x%x) LandscapeLayout(0x%x) LayoutContainer(0x%x)",
+ SysSecureLog(NID_UI, "%ls LayoutItemHandler(0x%x) PortraitLayout(0x%x) LandscapeLayout(0x%x) LayoutContainer(0x%x)",
indent.GetPointer(), __pLayoutItemHandler, __pPortraitLayout, __pLandscapeLayout, __pLayoutContainer);
// Derived class
String description = GetDescription();
if (!description.IsEmpty())
{
- SysLog(NID_UI, "%ls %ls", indent.GetPointer(), description.GetPointer());
+ SysSecureLog(NID_UI, "%ls %ls", indent.GetPointer(), description.GetPointer());
}
// Print Gesture List
pEnumerator->GetCurrent(pGestureDetector);
if (pGestureDetector)
{
- SysLog(NID_UI, "%ls AddedGesture : %ls", indent.GetPointer(), pGestureDetector->GetDescription().GetPointer());
+ SysSecureLog(NID_UI, "%ls AddedGesture : %ls", indent.GetPointer(), pGestureDetector->GetDescription().GetPointer());
}
}
pStartedGestureEnumerator->GetKey(pStartedGestureDetector);
if (pStartedGestureDetector)
{
- SysLog(NID_UI, "%ls StartedGesture : %ls", indent.GetPointer(), pStartedGestureDetector->GetDescription().GetPointer());
+ SysSecureLog(NID_UI, "%ls StartedGesture : %ls", indent.GetPointer(), pStartedGestureDetector->GetDescription().GetPointer());
}
}
_UiPrintControl(*pWindow, true, level);
}
}
+
+_OSP_EXPORT_ void
+_UiPrintControlList(int level)
+{
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+
+ int count = pControlManager->GetControlCount();
+ for (int i = 0; i< count; i++)
+ {
+ _Control* pControl = pControlManager->GetControl((count-1) - i);
+ if (pControl != null)
+ {
+ SysSecureLog(NID_UI, "[Control Manager] pControl index %d", i);
+ _UiPrintControl(*pControl, true, level);
+ }
+ else
+ {
+ SysSecureLog(NID_UI, "[Control Manager] pControl is null");
+ }
+ }
+}
}
namespace Tizen { namespace Ui
return _ControlHandle();
}
+ if (__pAllControlList)
+ {
+ __pAllControlList->Add(pObject);
+ }
+
return __objectManager.Register(*pObject);
}
SysLog(NID_UI, "A _Control Released()");
}
+ if (__pAllControlList)
+ {
+ __pAllControlList->Remove(pObject);
+ }
+
return __objectManager.Unregister(handle);
}
_ControlManager::_ControlManager(void) // [ToDo] exception check.
: __pWindowList(null)
, __pAllWindowList(null)
+ , __pAllControlList(null)
, __isCoordinateSystemLogical(true)
, __logicalCoordinateSystem(0)
, __logicalBaseScreenSize(BASE_SCREEN_SIZE_NONE)
__pAllWindowList = new (std::nothrow)LinkedListT<_Window*>;
SysTryCatch(NID_UI, __pAllWindowList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ __pAllControlList = new (std::nothrow)LinkedListT<_Control*>;
+ SysTryCatch(NID_UI, __pAllControlList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
__pGestureList = new (std::nothrow)LinkedListT<_TouchGestureDetector*>;
SysTryCatch(NID_UI, __pGestureList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
__pAllWindowList = null;
}
+ if (__pAllControlList)
+ {
+ delete __pAllControlList;
+ __pAllControlList = null;
+ }
+
if (__pGestureList)
{
delete __pGestureList;
{
_Clipboard::ReleaseInstance();
+ if (GetUsedHandleCount() != 0)
+ {
+ SysLog(NID_UI, "[Control Manager] The number of unreleased handle: %d", GetUsedHandleCount());
+ }
+
+ if (GetControlCount() != 0)
+ {
+ SysLog(NID_UI, "[Control Manager] The number of unreleased control: %d", GetControlCount());
+ }
+
if (__pWindowList)
{
delete __pWindowList;
__pAllWindowList = null;
}
+ if (__pAllControlList)
+ {
+ delete __pAllControlList;
+ __pAllControlList = null;
+ }
+
if (__pGestureList)
{
delete __pGestureList;
DestroyEcoreEvasMgr();
- if (GetUsedHandleCount() != 0)
- {
- SysLog(NID_UI, "[Control Manager] The number of unreleased controls: %d", GetUsedHandleCount());
- }
-
-
_IndicatorManager::ReleaseInstance();
_DisplayManager::ReleaseInstance();
_Control* pChild = null;
_Control::ControlList& children = control.GetChildList();
+ _Window* pTop = control.GetRootWindow();
+ if (pTop)
+ {
+ _Control* pControl = pTop->GetFocusControl(&control);
+ if ((&control) == pControl)
+ {
+ pTop->SetFocusControl(&control, false);
+ }
+ _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(&control);
+ if ((&control) == pFocusTraversalControl)
+ {
+ pTop->SetFocusTraversalControl(&control, false);
+ }
+ }
+
r = control.GetControlDelegate().OnDetachingFromMainTree();
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
}
+_Control*
+_ControlManager::GetControl(int index) const
+{
+ _Control* pControl;
+ __pAllControlList->GetAt(index, pControl);
+
+ return pControl;
+}
+
+int
+_ControlManager::GetControlCount(void) const
+{
+ return __pAllControlList->GetCount();
+}
+
_Window*
_ControlManager::GetWindow(int index) const
{
return __pWindowList->GetCount();
}
+
_Window*
_ControlManager::GetAllWindow(int index) const
{
}
}
- __pAllWindowList->Add(&window);
+ if (__pAllWindowList->Contains(&window) == false)
+ {
+ __pAllWindowList->Add(&window);
+ }
return __pWindowList->Add(&window);
}
SysLog(NID_UI, "It's failed to get the flag of auto-rotate.");
}
- SysLog(NID_UI, "[Window Manager Rotation] AUTO_ROTATION = %d", autoRotate);
+ SysLog(NID_UI, "[WM ROTATION] AUTO_ROTATION = %d", autoRotate);
if (autoRotate == false)
{
_EcoreEvas* pEcoreEvas = ::GetEcoreEvasMgr()->GetEcoreEvas();
if (pEcoreEvas)
{
- SysLog(NID_UI, "[Window Manager Rotation] ROTATION_UNKNOWN");
+ SysLog(NID_UI, "[WM ROTATION] ROTATION_UNKNOWN");
device_rotation = pEcoreEvas->GetWindowRotation(*pCurrentFrame);
}
}
break;
}
- SysLog(NID_UI, "[Window Manager Rotation] device_rotation = %d", device_rotation);
+ SysLog(NID_UI, "[WM ROTATION] device_rotation = %d", device_rotation);
}
else
{
- SysLog(NID_UI, "[Window Manager Rotation] device_rotation = error");
+ SysLog(NID_UI, "[WM ROTATION] device_rotation = error");
}
return ::Convert(device_rotation);
Ecore_X_Window targetWin = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] OnWindowStateChanged is called.", targetWin);
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] OnWindowStateChanged is called.", targetWin);
int winCount = pControlManager->GetAllWindowCount();
for (int i = 0; i < winCount; i++)
, __openClipboard(false)
{
int ret = appcore_unset_rotation_cb();
- SysLog(NID_UI, "[Window Manager Rotation] appcore_unset_rotation_cb = %d", ret);
+ SysLog(NID_UI, "[WM ROTATION] appcore_unset_rotation_cb = %d", ret);
__pWindowVisibilityChanged = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, OnWindowVisibilityChanged, (void*) this);
SysTryReturnVoidResult(NID_UI, __pWindowVisibilityChanged, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
rotatePartial = false;
}
- Evas_Object* pWinObj = pLayer->GetElmWin();
Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
int rootW = 0;
{
ecore_evas_rotation_with_resize_set(pEcoreEvas, orientation);
- evas_object_move(pWinObj, 0, 0);
if ((orientation == 0) || (orientation == 180))
{
- evas_object_resize(pWinObj, rootW, rootH);
+ pLayer->SetBounds(FloatRectangle(0, 0, rootW, rootH));
}
else
{
- evas_object_resize(pWinObj, rootH, rootW);
+ pLayer->SetBounds(FloatRectangle(0, 0, rootH, rootW));
}
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, FULL SCREEN] Rotate bounds(rot = %d).", win, orientation);
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, FULL SCREEN] Rotate bounds(ROT %d).", win, orientation);
}
}
else
Rectangle winBounds = _CoordinateSystemUtils::Transform(window.GetBounds());
int rotate = ecore_evas_rotation_get(pEcoreEvas);
-
int winX = winBounds.x;
int winY = winBounds.y;
int h = 0;
Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
- evas_object_move(pWinObj, winX, winY);
if (ret == EINA_FALSE)
{
- evas_object_resize(pWinObj, winBounds.width, winBounds.height);
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, PARTIAL SCREEN] Rotate bounds(rot = %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height);
+ pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d, %d, %d).", win, orientation, winX, winY, winBounds.width, winBounds.height);
}
else
{
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, PARTIAL SCREEN] Rotate bounds(rot = %d, %d, %d) ONLY MOVE.", win, orientation, winX, winY);
+ pLayer->SetBounds(FloatRectangle(winX, winY, w, h));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, PARTIAL SCREEN] Rotate bounds(ROT %d, %d, %d) ONLY MOVE.", win, orientation, winX, winY);
}
}
}
{
ecore_x_icccm_transient_for_unset(ownee);
ecore_x_icccm_transient_for_set(ownee, owner);
- SysLog(NID_UI, "[Window Order Group][Window : 0x%x] transient_for_set -> 0x%x", ownee, owner);
+ SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] transient_for_set -> 0x%x", ownee, owner);
}
}
Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
ecore_x_icccm_transient_for_unset(win);
+ SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] transient_for_unset", win);
if (level == _WINDOW_LEVEL_NORMAL)
{
ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NORMAL);
+ SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] set : ECORE_X_WINDOW_TYPE_NORMAL", win);
}
else if (level == _WINDOW_LEVEL_NOTIFICATION_HIGH)
{
ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NOTIFICATION);
utilx_set_system_notification_level((Display*)ecore_x_display_get(), win, UTILX_NOTIFICATION_LEVEL_HIGH);
+ SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] set : ECORE_X_WINDOW_TYPE_NOTIFICATION, UTILX_NOTIFICATION_LEVEL_HIGH", win);
}
else if (level == _WINDOW_LEVEL_NOTIFICATION_MIDDLE)
{
ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NOTIFICATION);
utilx_set_system_notification_level((Display*)ecore_x_display_get(), win, UTILX_NOTIFICATION_LEVEL_NORMAL);
+ SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] set : ECORE_X_WINDOW_TYPE_NOTIFICATION, UTILX_NOTIFICATION_LEVEL_NORMAL", win);
}
SetLastResult(E_SUCCESS);
int h = 0;
Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
- evas_object_move(pWinObject, winX, winY);
if (ret == EINA_FALSE)
{
- evas_object_resize(pWinObject, winBounds.width, winBounds.height);
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+ pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
}
else
{
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY);
+ pLayer->SetBounds(FloatRectangle(winX, winY, w, h));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY, w, h);
}
SetLastResult(E_SUCCESS);
int h = 0;
Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
- evas_object_move(pWinObject, winX, winY);
if (ret == EINA_FALSE)
{
- evas_object_resize(pWinObject, winBounds.width, winBounds.height);
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
+ pLayer->SetBounds(FloatRectangle(winX, winY, winBounds.width, winBounds.height));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d).", win, rotate, winX, winY, winBounds.width, winBounds.height);
}
else
{
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set bounds(rot = %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY);
+ pLayer->SetBounds(FloatRectangle(winX, winY, w, h));
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set bounds(ROT %d, %d, %d, %d, %d) ONLY MOVE.", win, rotate, winX, winY, w, h);
}
SetLastResult(E_SUCCESS);
{
ecore_x_icccm_transient_for_unset(owneeWin);
ecore_x_icccm_transient_for_set(owneeWin, ownerWin);
- SysLog(NID_UI, "[Window Order Group][Window : 0x%x] transient_for_set -> 0x%x", owneeWin, ownerWin);
+ SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] transient_for_set -> 0x%x", owneeWin, ownerWin);
}
}
else
{
- SysLog(NID_UI, "[Window Order Group][Window : 0x%x] Skip to transient_for_set", owneeWin);
+ SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] Skip to transient_for_set", owneeWin);
}
// Ownee window
bool preferredRoation = pOwnerWindow->GetPreferredRotation();
if (preferredRoation == true)
{
- int preferredRotation = ecore_evas_wm_rotation_preferred_rotation_get(pOwnerLayer->GetEcoreEvas());
+ //int preferredRotation = ecore_evas_wm_rotation_preferred_rotation_get(pOwnerLayer->GetEcoreEvas());
+ int preferredRotation = 0;
+ ecore_x_e_window_rotation_preferred_rotation_get(ownerWin, &preferredRotation);
SetWindowPreferredRotation(ownee, preferredRotation);
}
else
{
ecore_x_e_window_rotation_app_set(win, EINA_TRUE);
}
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set window preferred rotation(%d).", win, rotation);
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set window preferred rotation(%d).", win, rotation);
ecore_evas_wm_rotation_preferred_rotation_set(pLayer->GetEcoreEvas(), rotation);
_Window* pWindow = const_cast<_Window*>(&window);
ecore_x_e_window_rotation_app_set(win, EINA_TRUE);
}
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set window available rotation(%d).", win, count);
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set window available rotation(%d).", win, count);
ecore_evas_wm_rotation_available_rotations_set(pLayer->GetEcoreEvas(), rotations, count);
}
Rectangle winBounds = _CoordinateSystemUtils::Transform(bounds);
Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas());
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set rotation bounds(rot = %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set rotation bounds(ROT %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
ecore_x_e_window_rotation_geometry_set(win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
}
Rectangle winBounds = _CoordinateSystemUtils::ConvertToInteger(winBoundsF);
Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas());
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set rotation bounds(rot = %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set rotation bounds(ROT %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
ecore_x_e_window_rotation_geometry_set(win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height);
}
_FocusManagerImpl::_FocusManagerImpl(void)
: __pCurrentFocusUiControl(null)
, __isFocusMode(false)
+ , __focusDirection(FOCUS_DIRECTION_DOWNWARD)
{
#ifdef _FOCUS_UI_
result r = _UiEventManager::GetInstance()->AddPostKeyEventListener(*this);
else
{
_Control* pTraversalControl = FindTraversalControlFromChild(pControl);
- pTop->SetFocusTraversalControl(pTraversalControl);
+ pTop->SetFocusTraversalControl(pTraversalControl, true);
}
{
if (IsFocusControlListControl(pControl))
{
- pTop->SetFocusTraversalControl(pControl);
+ pTop->SetFocusTraversalControl(pControl, true);
}
pControl->DrawFocus();
return;
{
pFocusControl->SetFocused();
pFocusControl->DrawFocus();
- pTop->SetFocusTraversalControl(pFocusControl);
+ pTop->SetFocusTraversalControl(pFocusControl, true);
return;
}
}
{
pFocusControl->SetFocused();
pFocusControl->DrawFocus();
- pTop->SetFocusTraversalControl(pFocusControl);
+ pTop->SetFocusTraversalControl(pFocusControl, true);
return;
}
}
index ++;
}
- pTop->SetFocusTraversalControl(pNextFocusControl);
+ pTop->SetFocusTraversalControl(pNextFocusControl, true);
if (pNextFocusControl && findNextFocusControl == true)
{
_Control* pParentControl = pNextFocusControl->GetParent();
return false;
}
_KeyCode keyCode = keyInfo.GetKeyCode();
- FocusDirection focusDirection = FOCUS_DIRECTION_DOWNWARD;
+ __focusDirection = FOCUS_DIRECTION_DOWNWARD;
_Control* pControl = const_cast<_Control*> (&source);
switch(keyCode)
{
if (keyInfo.GetKeyModifier() & _KEY_MODIFIER_SHIFT)
{
- focusDirection = FOCUS_DIRECTION_UPWARD;
+ __focusDirection = FOCUS_DIRECTION_UPWARD;
}
break;
}
case _KEY_UP :
{
- focusDirection = FOCUS_DIRECTION_UPWARD;
+ __focusDirection = FOCUS_DIRECTION_UPWARD;
break;
}
case _KEY_DOWN :
{
- focusDirection = FOCUS_DIRECTION_DOWNWARD;
+ __focusDirection = FOCUS_DIRECTION_DOWNWARD;
break;
}
default :
return false;
}
}
- StartFocusTraversal(pControl, focusDirection);
+ StartFocusTraversal(pControl, __focusDirection);
+ return false;
+}
+
+bool _FocusManagerImpl::IsForwardDirection(void) const
+{
+ if (__focusDirection == FOCUS_DIRECTION_DOWNWARD)
+ {
+ return true;
+ }
return false;
}
int
_ModalLoopManager::BeginMainLoop(void)
{
+ __lastExitCode = -1;
__nestedMainLoop++;
::GetEcoreEvasMgr()->BeginMainLoop();
using namespace Tizen::Ui::Controls;
using namespace Tizen::Graphics;
-namespace Tizen { namespace Ui {
+namespace
+{
+const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+}
-const String _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+namespace Tizen { namespace Ui {
_OrientationAgent*
_OrientationAgent::CreateInstanceN(Control& publicControl)
// Request rotation to window manager -> async -> Update VEs
// Window(not rotation) -> sync -> UpdateVEs
- SysLog(NID_UI, "[Window Manager Rotation] ---------- Update : START ----------");
+ SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- Update : START ----------", this);
_ControlImplManager* pImplManager = _ControlImplManager::GetInstance();
SysAssert(pImplManager);
}
OrientationStatus status = pImplManager->GetOrientationStatus(__mode);
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Update : __mode(%d) -> status(%d)", handle, __mode, status);
+ SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x][WIN 0x%x] Update : __mode(%d) -> status(%d)", this, handle, __mode, status);
if (__updateStatus == true)
{
__draw = draw;
// }
- SysLog(NID_UI, "[Window Manager Rotation] ---------- Update : END ----------");
+ SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- Update : END ----------", this);
}
void
// Update window bounds
// Invalidate
- SysLog(NID_UI, "[Window Manager Rotation] ---------- UpdateOrientation : START ----------");
+ SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- UpdateOrientation : START ----------", this);
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
if (!pEcoreEvas)
pImpl->Invalidate(true);
Rectangle bounds = pRootWindow->GetBounds();
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, rot = %d, %d, %d, %d, %d] Update Orientation.", pRootWindow->GetNativeHandle(), rotation, bounds.x, bounds.y, bounds.width, bounds.height);
+ SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x][WIN 0x%x, ROT %d, %d, %d, %d, %d] Update Orientation.", this, pRootWindow->GetNativeHandle(), rotation, bounds.x, bounds.y, bounds.width, bounds.height);
- SysLog(NID_UI, "[Window Manager Rotation] ---------- UpdateOrientation : END ----------");
+ SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- UpdateOrientation : END ----------", this);
}
void
const _PublicOrientationEventArg* pArg = dynamic_cast <const _PublicOrientationEventArg*>(&arg);
SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid.");
- SysLog(NID_UI, "[Window Manager Rotation] Fire the public orientation event with %d -> 0x%x", pArg->GetOrientationStatus(), __pSource);
+ SysLog(NID_UI, "[WM ROTATION] Fire the public orientation event with %d -> 0x%x", pArg->GetOrientationStatus(), __pSource);
pEventListener->OnOrientationChanged(*__pSource, (OrientationStatus)(pArg->GetOrientationStatus()));
ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA);
ADD_PALETTE(BASIC::B052L4D, 0x66FAFAFA);
ADD_PALETTE(BASIC::B052L5, 0xFFFAFAFA);
+ ADD_PALETTE(BASIC::B052L5D, 0x3FFAFAFA);
+ ADD_PALETTE(BASIC::B052L5P, 0xFF5D83FF);
ADD_PALETTE(BASIC::B052L6, 0xFFFAFAFA);
ADD_PALETTE(BASIC::B052L6D, 0x99FAFAFA);
ADD_PALETTE(BASIC::B052L6P1, 0xFFFAFAFA);
ADD_PALETTE(BASIC::B061L2, 0xFF49577B);
ADD_PALETTE(BASIC::B061L3, 0xFF969A9C);
ADD_PALETTE(BASIC::B061L4, 0xFF1D263C);
- ADD_PALETTE(BASIC::B061L5, 0xFF222222);
+ ADD_PALETTE(BASIC::B061L5, 0xFF000000);
ADD_PALETTE(BASIC::B061L6, 0xFF333537);
ADD_PALETTE(BASIC::B0621L1, 0x00000000);
ADD_PALETTE(BASIC::B0621L2, 0x00000000);
ADD_PALETTE(BASIC::W0641D, 0x996B6D79);
ADD_PALETTE(BASIC::W0651, 0xFF3A3A3A);
ADD_PALETTE(BASIC::W0711, 0xFF525767);
+ ADD_PALETTE(BASIC::W0711P, 0xFF2B3AAF);
+ ADD_PALETTE(BASIC::W0711D, 0xFF3E414E);
ADD_PALETTE(BASIC::W0712, 0xFF4267A9);
ADD_PALETTE(BASIC::W0713, 0xFF2B3AAF);
ADD_PALETTE(BASIC::W0714, 0xFF263E5F);
ADD_PALETTE(BASIC::W0715, 0xFF2B3AAF);
- ADD_PALETTE(BASIC::W0721, 0x00000000);
+ ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA);
+ ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA);
+ ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA);
ADD_PALETTE(BASIC::W0811, 0xFF253296);
ADD_PALETTE(BASIC::W0812, 0x00000000);
ADD_PALETTE(BASIC::W0813, 0xFF595959);
ADD_PALETTE(BASIC::B052L4P, 0xFFFAFAFA);
ADD_PALETTE(BASIC::B052L4D, 0x7F282828);
ADD_PALETTE(BASIC::B052L5, 0xFF282828);
+ ADD_PALETTE(BASIC::B052L5D, 0x7F282828);
+ ADD_PALETTE(BASIC::B052L5P, 0xFF007BDA);
ADD_PALETTE(BASIC::B052L6, 0xFF282828);
ADD_PALETTE(BASIC::B052L6D, 0x7F282828);
ADD_PALETTE(BASIC::B052L6P1, 0xFF0E68AD);
ADD_PALETTE(BASIC::B061L2, 0xFFDBD9CE);
ADD_PALETTE(BASIC::B061L3, 0xFFD6D3C9);
ADD_PALETTE(BASIC::B061L4, 0xFF444444);
- ADD_PALETTE(BASIC::B061L5, 0xFF222222);
+ ADD_PALETTE(BASIC::B061L5, 0xFF000000);
ADD_PALETTE(BASIC::B061L6, 0xFF17191C);
ADD_PALETTE(BASIC::B0621L1, 0x00000000);
ADD_PALETTE(BASIC::B0621L2, 0x00000000);
ADD_PALETTE(BASIC::F022L1i, 0xFFB8B8B8);
ADD_PALETTE(BASIC::F022L2i, 0xFF4C85C9);
ADD_PALETTE(BASIC::F022L2iD, 0x4C4C85C9);
- ADD_PALETTE(BASIC::F031L1, 0xFF3A3A3A);
+ ADD_PALETTE(BASIC::F031L1, 0xFF282828);
ADD_PALETTE(BASIC::F031L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F031L1D, 0x7F3A3A3A);
+ ADD_PALETTE(BASIC::F031L1D, 0x7F282828);
ADD_PALETTE(BASIC::F031L2, 0x00000000);
ADD_PALETTE(BASIC::F031L2P, 0x00000000);
ADD_PALETTE(BASIC::F031L2D, 0x00000000);
ADD_PALETTE(BASIC::F031L3, 0xFFFAFAFA);
ADD_PALETTE(BASIC::F031L3P, 0xFFFAFAFA);
ADD_PALETTE(BASIC::F031L3D, 0x7FFAFAFA);
- ADD_PALETTE(BASIC::F032L1, 0xFF656565);
+ ADD_PALETTE(BASIC::F032L1, 0xFF282828);
ADD_PALETTE(BASIC::F032L1P, 0xFFFAFAFA);
- ADD_PALETTE(BASIC::F032L1D, 0x7F656565);
+ ADD_PALETTE(BASIC::F032L1D, 0x7F282828);
ADD_PALETTE(BASIC::F032L2, 0xFFFAFAFA);
ADD_PALETTE(BASIC::F032L2P, 0xFFFAFAFA);
ADD_PALETTE(BASIC::F032L2D, 0x7FFAFAFA);
ADD_PALETTE(BASIC::W0641P, 0xFF0079D4);
ADD_PALETTE(BASIC::W0641D, 0x7FF7F5ED);
ADD_PALETTE(BASIC::W0651, 0xFFBFBFBF);
- ADD_PALETTE(BASIC::W0711, 0xFF769DCC);
+ ADD_PALETTE(BASIC::W0711, 0xFF6C90BC);
+ ADD_PALETTE(BASIC::W0711P, 0xFF007AD8);
+ ADD_PALETTE(BASIC::W0711D, 0xFF607DA1);
ADD_PALETTE(BASIC::W0712, 0x00000000);
ADD_PALETTE(BASIC::W0713, 0xFF4093F7);
ADD_PALETTE(BASIC::W0714, 0x00000000);
ADD_PALETTE(BASIC::W0715, 0xFF2889FF);
- ADD_PALETTE(BASIC::W0721, 0x00000000);
+ ADD_PALETTE(BASIC::W0721, 0xFFFAFAFA);
+ ADD_PALETTE(BASIC::W0721P, 0xFFFAFAFA);
+ ADD_PALETTE(BASIC::W0721D, 0x99FAFAFA);
ADD_PALETTE(BASIC::W0811, 0xFF5787C2);
ADD_PALETTE(BASIC::W0812, 0x00000000);
ADD_PALETTE(BASIC::W0813, 0xFF494949);
if (listenerType == _UI_LISTENER_POST)
{
+ SysTryReturn(NID_UI, __pPostEventListenerMap, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] PostEventListenerMap is null.");
__pPostEventListenerMap->GetValue(eventType, pEventListeners);
}
else if (listenerType == _UI_LISTENER_TARGET_POST)
{
+ SysTryReturn(NID_UI, __pTargetPostEventListenerMap, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] TargetPostEventListenerMap is null.");
__pTargetPostEventListenerMap->GetValue(eventType, pEventListeners);
}
else
{
result r = E_SUCCESS;
+ SysTryReturn(NID_UI, __pEventListenerMap, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] EventListenerMap is null.");
r = __pEventListenerMap->GetValue(eventType, pEventListeners);
SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
}
{
RemoveAllEventListenerList(__pEventListenerMap.get());
RemoveAllEventListenerList(__pPostEventListenerMap.get());
+ RemoveAllEventListenerList(__pTargetPostEventListenerMap.get());
}
}} // Tizen::Ui
if (__type == _WINDOW_TYPE_MAIN)
{
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, BASIC] Create.", GetNativeHandle());
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, BASIC] Create.", GetNativeHandle());
}
else
{
pEcoreEvas->SetWindowType(*this, _WINDOW_TYPE_SUB);
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, UTILITY] Create.", GetNativeHandle());
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, UTILITY] Create.", GetNativeHandle());
}
return E_SUCCESS;
bool
_Window::IsActivationEnabled(void)
{
- if (__type == _WINDOW_TYPE_VE)
+ if (__type == _WINDOW_TYPE_VE || IsSystemWindow())
{
return IsFocusable();
}
int rotation = pEcoreEvas->GetWindowRotation(*this);
Rectangle winBounds = GetBounds();
- SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, %d, %d, %d, %d] OnWindowStateChanged : prev rot = %d, cur rot = %d", GetNativeHandle(), winBounds.x, winBounds.y, winBounds.width, winBounds.height, __rotation, rotation);
+ SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, %d, %d, %d, %d] OnWindowStateChanged : prev ROT %d, cur ROT %d", GetNativeHandle(), winBounds.x, winBounds.y, winBounds.width, winBounds.height, __rotation, rotation);
if (rotation == __rotation)
{
}
// <3>
- SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : START ----------");
+ SysLog(NID_UI, "[WM ROTATION] ---------- Update Ownee Window : START ----------");
_ControlOrientation controlOrientation = (rotation == 0 || rotation == 180) ? _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE;
ChangeLayout(controlOrientation, false);
Invalidate(true);
- SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : END ----------");
+ SysLog(NID_UI, "[WM ROTATION] ---------- Update Ownee Window : END ----------");
SetOrientationCallbackModeEnabled(false);
}
{
return __pFocusTraversalControl;
}
+
void
-_Window::SetFocusTraversalControl(_Control* pControl)
+_Window::SetFocusTraversalControl(_Control* pControl, bool on)
{
- __pFocusTraversalControl = pControl;
+ if (on)
+ {
+ __pFocusTraversalControl = pControl;
+ }
+ else
+ {
+ __pFocusTraversalControl = this;
+ }
}
void
using namespace Tizen::Ui;
using namespace Tizen::Ui::Animations;
-//#define _NEED_DAMAGE_HANDER_
-
-//#define PRINT printf
+//#define PRINT(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
#define PRINT(...)
-
-
namespace
{
#define __UNUSED__
Ecore_Idle_Enterer* __pOnIdleLoopIterator = null;
-
-//static const double fpsLimitInterval = 1.0 / 55.0;
-static bool __needPreRender = false;
-Eina_Bool
-OnIdleLoopIterate(void* pData)
-{
- _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
-
-// PRINT("OnIdleLoopIterate()\n");
-
-
- if (!pDisplayManager)
- {
- return ECORE_CALLBACK_CANCEL; // for remove callback
- }
-
- Tizen::Ui::Animations::_AnimationManager* pAnimationManager = Tizen::Ui::Animations::_AnimationManager::GetInstance();
-
- if (!pAnimationManager)
- {
- return ECORE_CALLBACK_CANCEL; // for remove callback
- }
-
- //CHECK ME : how about the performance?
-// double currentTime = ecore_time_get();
-// static double prevFlushTime = 0;
-
-// if (currentTime - prevFlushTime >= fpsLimitInterval * 0.99)
- {
- pAnimationManager->ProcessAnimationTick();
-
-// prevFlushTime = currentTime;
-
- pDisplayManager->RenderAll();
-
- pDisplayManager->Flush();
- }
-
- return ECORE_CALLBACK_RENEW;
-}
-
-// WARNING: Without this, idle-enterer will be called after evas destroyed which may cause crash while accessing ecore-evas.
+#ifdef USE_WORKAROUND
void
-OnEcoreEvasFree(Ecore_Evas* pEcoreEvas)
+OnRenderFlushPost(void* pData, Evas* pEvas, void* ev)
{
- ecore_evas_manual_render_set(pEcoreEvas, EINA_FALSE);
+// _EflLayer* pLayer = (_EflLayer*)pData;
+// int w, h;
+// evas_output_size_get(pLayer->GetEvas(), &w, &h);
+// int rotate = ecore_evas_rotation_get(pLayer->GetEcoreEvas());
+// PRINT("[%#x] OnRenderFlushPost size(%d,%d) rotate=%d\n", (unsigned int)pData, w, h, rotate);
}
-#endif
-
-
-#ifdef _NEED_DAMAGE_HANDER_
Eina_Bool
OnXWindowDamaged(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo)
{
-#if 1
_Ecore_X_Event_Window_Damage* pEvent = (_Ecore_X_Event_Window_Damage*)pEventInfo;
if (pData)
if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
{
- FloatRectangle bounds = pLayer->GetBounds();
-
- evas_damage_rectangle_add(pLayer->GetEvas(), 0, 0, (int)bounds.width, (int)bounds.height);
- pLayer->SetEvasRenderNeeded();
-
- _DisplayManager::GetInstance()->AddWakeUpEvent();
-
- PRINT("OnXWindowDamaged(%p)[%d,%d,%d,%d]------------\n", pLayer->GetEvas(), pEvent->x, pEvent->y, pEvent->w, pEvent->h);
+ PRINT("[%#x] OnXWindowDamaged[%d,%d,%d,%d]------------\n", (unsigned int)pLayer, pEvent->x, pEvent->y, pEvent->w, pEvent->h);
}
}
-#endif
return EINA_TRUE;
}
Eina_Bool
OnXWindowConfigured(void* pData, int type, void* pEventInfo)
{
-#if 0
_Ecore_X_Event_Window_Configure* pEvent = (_Ecore_X_Event_Window_Configure*)pEventInfo;
if (pData)
if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
{
- FloatRectangle bounds = pLayer->GetBounds();
-
- evas_damage_rectangle_add(pLayer->GetEvas(), 0, 0, (int)bounds.width, (int)bounds.height);
- pLayer->SetEvasRenderNeeded();
+ int w, h;
+ evas_output_size_get(pLayer->GetEvas(), &w, &h);
+ PRINT("[%#x] OnXWindowConfigured[%d,%d,%d,%d] evas(%d,%d)------------\n", (unsigned int)pLayer, pEvent->x, pEvent->y, pEvent->w, pEvent->h, w, h);
- _DisplayManager::GetInstance()->AddWakeUpEvent();
-
- PRINT("OnXWindowConfigured(%p)[%d,%d,%d,%d]------------\n", pLayer->GetEvas(), pEvent->x, pEvent->y, pEvent->w, pEvent->h);
}
}
-#endif
return EINA_TRUE;
}
}
_EflLayer* pLayer = (_EflLayer*)pData;
- PRINT("############ Hidden (%p, 0x%x) \n" , pLayer, pEvent->win);
-
if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
{
- PRINT("############ Hidden (%p) -> EventDone() \n" , pData);
- pLayer->SetVisibilityChangeCompleted();
- _DisplayManager::GetInstance()->AddWakeUpEvent();
+ PRINT("[%#x] ############ Hidden -> EventDone() \n" , (unsigned int)pData);
}
return EINA_TRUE;
}
_EflLayer* pLayer = (_EflLayer*)pData;
- PRINT("############ Shown (%p, 0x%x) \n" , pLayer, pEvent->win);
-
if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas()))
{
- PRINT("############ Shown (%p) -> EventDone() \n" , pData);
- FloatRectangle bounds = pLayer->GetBounds();
+ //ecore_evas_rotation_set(pLayer->GetEcoreEvas(), 270);
+ PRINT("[%#x] ############ Shown -> EventDone() \n" , (unsigned int)pData);
+ }
+
+ return EINA_TRUE;
+}
+#endif // USE_WORKAROUND
+
+
+
+//static const double fpsLimitInterval = 1.0 / 55.0;
+static bool __needPreRender = false;
+Eina_Bool
+OnIdleLoopIterate(void* pData)
+{
+ _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+
+// PRINT("OnIdleLoopIterate()\n");
+
+
+ if (!pDisplayManager)
+ {
+ return ECORE_CALLBACK_CANCEL; // for remove callback
+ }
- evas_damage_rectangle_add(pLayer->GetEvas(), 0, 0, (int)bounds.width, (int)bounds.height);
+ Tizen::Ui::Animations::_AnimationManager* pAnimationManager = Tizen::Ui::Animations::_AnimationManager::GetInstance();
- pLayer->SetVisibilityChangeCompleted();
- _DisplayManager::GetInstance()->AddWakeUpEvent();
+ if (!pAnimationManager)
+ {
+ return ECORE_CALLBACK_CANCEL; // for remove callback
}
- return EINA_TRUE;
+ //CHECK ME : how about the performance?
+// double currentTime = ecore_time_get();
+// static double prevFlushTime = 0;
+
+// if (currentTime - prevFlushTime >= fpsLimitInterval * 0.99)
+ {
+ pAnimationManager->ProcessAnimationTick();
+
+// prevFlushTime = currentTime;
+
+ pDisplayManager->RenderAll();
+
+ pDisplayManager->Flush();
+ }
+
+ return ECORE_CALLBACK_RENEW;
}
+// WARNING: Without this, idle-enterer will be called after evas destroyed which may cause crash while accessing ecore-evas.
+void
+OnEcoreEvasFree(Ecore_Evas* pEcoreEvas)
+{
+ ecore_evas_manual_render_set(pEcoreEvas, EINA_FALSE);
+}
#endif
+
void
PreRenderCallback(Ecore_Evas* ee)
{
}
#endif
- _DisplayManager::GetInstance()->Render(*pEflLayer->GetRootVisualElement());
+ _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+ if (pDisplayManager)
+ {
+ pDisplayManager->Render(*pEflLayer->GetRootVisualElement());
+ }
}
}
if (pEflLayer && pEflLayer->GetRootVisualElement())
{
- _DisplayManager::GetInstance()->PostRender(*pEflLayer->GetRootVisualElement());
+ _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+ if (pDisplayManager)
+ {
+ pDisplayManager->PostRender(*pEflLayer->GetRootVisualElement());
+ }
}
}
int _EflLayer::_countOfLayer = 0;
_EflLayer::_EflLayer(void)
- : _pEvas(null)
+ : _pRootVisualElement(null)
+ , _pEvas(null)
, _pEcoreEvas(null)
, _pWindow(null)
- , _pOnWindowDamagedHandler(null)
- , _pOnWindowConfiguredHandler(null)
- , _pOnWindowHideHandler(null)
- , _pOnWindowShowHandler(null)
- , _needEvasRender(0)
+ , _needBoundsChangeRequest(false)
, _needShowStateChangeRequest(false)
, _isShow(false)
- , _isVisibilityChangeInProgress(false)
, _needAsyncVisibilityChangeRequest(true)
, _isMainType(true)
, _needRender(true)
+ , _pOnWindowDamagedHandler(null)
+ , _pOnWindowConfiguredHandler(null)
+ , _pOnWindowHideHandler(null)
+ , _pOnWindowShowHandler(null)
, __isWinObject(true)
+ , __bounds()
{
_countOfLayer++;
}
_EflLayer::_EflLayer(bool isMainType)
- : _pEvas(null)
+ : _pRootVisualElement(null)
+ , _pEvas(null)
, _pEcoreEvas(null)
, _pWindow(null)
- , _pOnWindowDamagedHandler(null)
- , _pOnWindowConfiguredHandler(null)
- , _pOnWindowHideHandler(null)
- , _pOnWindowShowHandler(null)
- , _needEvasRender(0)
+ , _needBoundsChangeRequest(false)
, _needShowStateChangeRequest(false)
, _isShow(false)
- , _isVisibilityChangeInProgress(false)
, _needAsyncVisibilityChangeRequest(true)
, _isMainType(isMainType)
, _needRender(true)
+ , _pOnWindowDamagedHandler(null)
+ , _pOnWindowConfiguredHandler(null)
+ , _pOnWindowHideHandler(null)
+ , _pOnWindowShowHandler(null)
, __isWinObject(true)
+ , __bounds()
{
_countOfLayer++;
}
__pOnIdleLoopIterator = null;
}
-#ifdef _NEED_DAMAGE_HANDER_
+
+#ifdef USE_WORKAROUND
if (_pOnWindowDamagedHandler)
{
ecore_event_handler_del(_pOnWindowDamagedHandler);
ecore_event_handler_del(_pOnWindowShowHandler);
_pOnWindowShowHandler = null;
}
-#endif
+#endif // USE_WORKAROUND
#endif
if(_isMainType)
{
_pWindow = elm_win_add(NULL, NULL, ELM_WIN_BASIC);
+ PRINT("[%#x] CREATE WINDOW [MAIN TYPE]\n", (unsigned int)this);
}
else
{
_pWindow = elm_win_add(NULL, NULL, ELM_WIN_UTILITY);
+ PRINT("[%#x] CREATE WINDOW [UTIL TYPE]\n", (unsigned int)this);
}
SysTryReturnResult(NID_UI, _pWindow, E_SYSTEM, "A system error has been occurred.");
}
// CHECK ME: Is this needed for GL mode?
-#ifdef _NEED_DAMAGE_HANDER_
+
+#ifdef USE_WORKAROUND
if(_pOnWindowDamagedHandler == null)
{
_pOnWindowDamagedHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DAMAGE, OnXWindowDamaged, this);
{
_pOnWindowShowHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, OnXWindowShown, this);
}
+ evas_event_callback_add(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost, (void*)this);
+#endif // USE_WORKAROUND
-#endif
#ifdef VE_VSYNC_UPDATE
if(__pOnIdleLoopIterator == null)
result
_EflLayer::SetBounds(const FloatRectangle& bounds)
{
- if (_pWindow)
- {
- evas_object_move(_pWindow, bounds.x, bounds.y);
- evas_object_resize(_pWindow, bounds.width, bounds.height);
- }
+ if (__bounds == bounds)
+ return E_SUCCESS;
+
+ __bounds = bounds;
+ evas_object_move(_pWindow, __bounds.x, __bounds.y);
+ evas_object_resize(_pWindow, __bounds.width, __bounds.height);
+ PRINT("[%#x] Initialzing evas_object_move(%f, %f) \n", (unsigned int)this, __bounds.x, __bounds.y);
+ PRINT("[%#x] Initialzing evas_object_resize(%f, %f) \n", (unsigned int)this, __bounds.width, __bounds.height);
+
return E_SUCCESS;
}
{
if (_pWindow)
{
- int x = 0;
- int y = 0;
- int w = 0;
- int h = 0;
-
- evas_object_geometry_get(_pWindow, null, null, &w, &h);
-
- if (__isWinObject == true)
- {
- elm_win_screen_position_get(_pWindow, &x, &y);
- }
-
- return FloatRectangle(x, y, w, h);
+ return __bounds;
}
return FloatRectangle();
result
_EflLayer::SetShowState(bool show)
{
-#ifdef ECORE_EVAS_ASYNC_VISIBILITY_BUG_HACK
if (_isShow == show)
{
return E_SUCCESS;
{
// Show State is not applied yet. Need cancel the visibility change request.
_needShowStateChangeRequest = false;
- PRINT("Cancel SetShowState request (%d)\n", show);
+ PRINT("[%#x] Cancel SetShowState request (%d)\n", (unsigned int)this, show);
}
else
{
_needShowStateChangeRequest = true;
- _DisplayManager::GetInstance()->AddWakeUpEvent();
- PRINT("SetShowState request (%d)\n", show);
- }
- _isShow = show;
-#else
- if (_pWindow)
- {
- if (show)
+ _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
+ if (pDisplayManager)
{
- evas_object_show(_pWindow);
- }
- else
- {
- evas_object_hide(_pWindow);
+ pDisplayManager->AddWakeUpEvent();
}
+ PRINT("[%#x] SetShowState request (%d)\n", (unsigned int)this, show);
}
-#endif
+
+ _isShow = show;
return E_SUCCESS;
}
{
opacity = 1.0f;
}
- else if(opacity<0.0f)
+ else if(opacity < 0.0f)
{
opacity = 0.0f;
}
if (_FloatCompare(opacity, 1.0f))
{
-// ecore_evas_alpha_set(_pEcoreEvas, EINA_FALSE);
if (__isWinObject == true)
{
elm_win_alpha_set(_pWindow, EINA_FALSE);
}
else if (opacity < 1.0f)
{
-
-// ecore_evas_alpha_set(_pEcoreEvas, EINA_TRUE);
if (__isWinObject == true)
{
elm_win_alpha_set(_pWindow, EINA_TRUE);
a = opacity*255;
evas_object_color_set(_pWindow, r, g, b, a);
}
+ PRINT("[%#x] ALPHA SET(opacity=%f)\n", (unsigned int)this, opacity);
}
float
_EflLayer::GetOpacity(void)
{
if (!_pWindow)
- return 0.0f;
+ {
+ return 0.0f;
+ }
int r,g,b,a;
evas_object_color_get(_pWindow, &r, &g, &b, &a);
if (a > 255)
+ {
return 1.0f;
+ }
return a / 255.0f;
{
if (_pEcoreEvas)
{
- PRINT("Flush StateChange(%p) - is Pending(%d) \n",this , _isVisibilityChangeInProgress);
-
- if (_needShowStateChangeRequest && (!_needAsyncVisibilityChangeRequest || !_isVisibilityChangeInProgress))
+ if (_needShowStateChangeRequest)
{
if (_isShow)
{
evas_object_show(_pWindow);
-
- // QUICK-DIRTY HACK TO BE REMOVED !!!
-#ifdef ECORE_EVAS_ASYNC_VISIBILITY_BUG_HACK
- ecore_x_sync();
- ecore_x_flush();
- usleep(30 * 1000);
-
- FloatRectangle bounds = GetBounds();
- evas_damage_rectangle_add(_pEvas, 0, 0, (int)bounds.width, (int)bounds.height);
-#endif
-
- PRINT("evas_object_show(%p) \n", this);
+ PRINT("[%#x] evas_object_show \n", (unsigned int)this);
}
else
{
evas_object_hide(_pWindow);
- PRINT("evas_object_hide(%p) \n", this);
+ PRINT("[%#x] evas_object_hide \n", (unsigned int)this);
}
-
-#ifdef _NEED_DAMAGE_HANDER_
- _isVisibilityChangeInProgress = true;
-#endif
_needShowStateChangeRequest = false;
}
- if (_needEvasRender > 0)
- {
- _DisplayManager::GetInstance()->AddWakeUpEvent();
- _needEvasRender--;
- }
FloatRectangle rect = GetBounds();
if(!_needRender)
{
- PRINT("_needRender = false bounds(%f %f %f %f)\n", rect.x, rect.y, rect.width, rect.height);
+ PRINT("[%#x] _needRender = false bounds(%f %f %f %f)\n", (unsigned int)this, __bounds.x, __bounds.y, __bounds.width, __bounds.height);
return;
}
- PRINT("ecore_evas_manual_render bounds(%f %f %f %f)\n", rect.x, rect.y, rect.width, rect.height);
+ //PRINT("[%#x] ecore_evas_manual_render bounds(%f %f %f %f)\n", (unsigned int)this, __bounds.x, __bounds.y, __bounds.width, __bounds.height);
__needPreRender = false;
ecore_evas_manual_render(_pEcoreEvas);
__needPreRender = true;
}
-#if 0
- if (_pEvas)
- {
- if(show)
- {
- evas_render_idle_flush(_pEvas);
- }
- else
- {
- evas_render(_pEvas);
- }
- }
-#endif
+
}
DrawText();
}
- if (__showUnderlineBitmap && __pButton->GetToolbarItemBackgroundBitmap(status) == null)
+ if (__showUnderlineBitmap && __pButton->GetToolbarItemBackgroundBitmap(status) == null && status != _BUTTON_STATUS_PRESSED)
{
DrawUnderlineBitmap();
}
return;
}
- if (__pButton->IsEnabled())
+ if (__pButton->GetEnableState())
{
__pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pButton->Invalidate();
, __onOffHandlerPosition(0.0f)
, __onOffHandlerPressed(false)
, __onOffHandlerMoved(false)
+ , __highlightedIndex(0)
+ , __detailedPressed(false)
{
}
pHighlightedReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBgBitmap,
Color::GetColor(COLOR_ID_MAGENTA), __pCheckButton->GetColor(_CHECK_BUTTON_STATUS_HIGHLIGHTED));
- if (pHighlightedReColorBgBitmap)
+ if (pHighlightedReColorBgBitmap && __highlightedIndex == 0)
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pHighlightedReColorBgBitmap))
{
Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
- if (pCircleNormalBitmap)
+ if (__detailedPressed == true)
{
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
+ if (pCircleNormalBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+ }
- if (pDetailedRightNormalBitmap)
+ if (pDetailedRightNormalBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ }
+ }
+ else
{
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+ if (pCircleNormalBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+ }
+
+ if (pDetailedRightNormalBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+ }
}
if (pReColorCircleBitmap)
Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
- if (pCirclePressedBitmap)
+ if (__detailedPressed == true)
{
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
+ if (pCirclePressedBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+ }
- if (pDetailedRightPressedBitmap)
+ if (pDetailedRightPressedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ }
+ }
+ else
{
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ if (pCirclePressedBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+ }
+
+ if (pDetailedRightPressedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+ }
}
if (pReColorCircleBitmap)
Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
}
- if (pReColorMarkBgHighlightedBitmap)
+ if (pReColorMarkBgHighlightedBitmap && __highlightedIndex == 1)
{
pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pReColorMarkBgHighlightedBitmap);
}
Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
Bitmap* pDetailedRightHighlightedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
- if (pCircleNormalBitmap)
+ if (__detailedPressed == true)
{
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
+ if (pCircleNormalBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+ }
- if (pDetailedRightHighlightedBitmap)
+ if (pDetailedRightHighlightedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ }
+ }
+ else
{
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
+ if (pCircleNormalBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+ }
+
+ if (pDetailedRightHighlightedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
+ }
}
if (pReColorCircleBitmap)
pReColorCircleHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
}
- if (pReColorCircleHighlightedBitmap)
+ if (pReColorCircleHighlightedBitmap && __highlightedIndex == 2)
{
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleHighlightedBitmap);
}
Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED);
Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED);
- if (pCircleSelectedBitmap)
+ if (__detailedPressed == true)
{
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
- }
+ if (pCircleSelectedBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+ }
- if (pDetailedRightSelectedBitmap)
+ if (pDetailedRightSelectedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ }
+ }
+ else
{
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
+ if (pCircleSelectedBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
+ }
+
+ if (pDetailedRightSelectedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
+ }
}
if (pReColorCircleBitmap)
Bitmap* pCircleNormalBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL);
Bitmap* pDetailedRightNormalBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL);
- if (pCircleNormalBitmap)
+ if (__detailedPressed == true)
{
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
+ if (pCircleNormalBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+ }
- if (pDetailedRightNormalBitmap)
+ if (pDetailedRightNormalBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ }
+ }
+ else
{
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+ if (pCircleNormalBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+ }
+
+ if (pDetailedRightNormalBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+ }
}
if (pReColorCircleBitmap)
Bitmap* pCirclePressedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED);
Bitmap* pDetailedRightPressedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED);
- if (pCirclePressedBitmap)
+ if (__detailedPressed == true)
{
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
- }
+ if (pCirclePressedBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+ }
- if (pDetailedRightPressedBitmap)
+ if (pDetailedRightPressedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ }
+ }
+ else
{
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ if (pCirclePressedBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCirclePressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+ }
+
+ if (pDetailedRightPressedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightPressedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightNormalColor);
+ }
}
if (pReColorCircleBitmap)
Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
Bitmap* pDetailedRightHighlightedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
- if (pCircleNormalBitmap)
+ if (__detailedPressed == true)
{
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
- }
+ if (pCircleNormalBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+ }
- if (pDetailedRightHighlightedBitmap)
+ if (pDetailedRightHighlightedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ }
+ }
+ else
{
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
+ if (pCircleNormalBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleNormalBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedNormalBgColor);
+ }
+
+ if (pDetailedRightHighlightedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightHighlightedColor);
+ }
}
if (pReColorCircleBitmap)
pReColorCircleHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
}
- if (pReColorCircleHighlightedBitmap)
+ if (pReColorCircleHighlightedBitmap && __highlightedIndex == 1)
{
pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pReColorCircleHighlightedBitmap);
}
Bitmap* pCircleSelectedBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_SELECTED);
Bitmap* pDetailedRightSelectedBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_SELECTED);
- if (pCircleSelectedBitmap)
+ if (__detailedPressed == true)
{
- pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
- }
+ if (pCircleSelectedBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedPressedBgColor);
+ }
- if (pDetailedRightSelectedBitmap)
+ if (pDetailedRightSelectedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightPressedColor);
+ }
+ }
+ else
{
- pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
+ if (pCircleSelectedBitmap)
+ {
+ pReColorCircleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pCircleSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedSelectedBgColor);
+ }
+
+ if (pDetailedRightSelectedBitmap)
+ {
+ pReColorRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDetailedRightSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedRightSelectedColor);
+ }
}
if (pReColorCircleBitmap)
pReColorOnOffBgHighlightedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pOnOffBgHighlightedBitmap, Color::GetColor(COLOR_ID_MAGENTA), detailedHighlightedBgColor);
}
- if (pReColorOnOffBgHighlightedBitmap)
+ if (pReColorOnOffBgHighlightedBitmap && __highlightedIndex == 1)
{
pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pReColorOnOffBgHighlightedBitmap);
}
__pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
}
}
+ else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+ {
+ if (__detailedButtonBounds.Contains(touchPoint))
+ {
+ __detailedPressed = true;
+ }
+ else
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+ }
+ }
else
{
__pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
_CheckButtonStatus status = __pCheckButton->GetCheckButtonStatus();
CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
- if (status == _CHECK_BUTTON_STATUS_NORMAL && __onOffHandlerPressed == false)
+ if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
{
- if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
+ if (status == _CHECK_BUTTON_STATUS_NORMAL && __onOffHandlerPressed == false)
{
- AdjustHandlerPosition();
-
- __onOffHandlerPressed = false;
__onOffHandlerMoved = false;
+
+ return true;
}
+ }
+ else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+ {
+ if (status == _CHECK_BUTTON_STATUS_NORMAL && __detailedPressed == true)
+ {
+ __detailedPressed = false;
- return true;
+ __pCheckButton->Invalidate();
+
+ return true;
+ }
+ }
+ else
+ {
+ if (status == _CHECK_BUTTON_STATUS_NORMAL)
+ {
+ return true;
+ }
}
if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON
if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
{
- detailedBounds.width = detailedBounds.width - checkButtonLeftMargin - checkButtonDetailedBitmapWidth;
-
- if (detailedBounds.Contains(touchPoint))
+ if (!__detailedButtonBounds.Contains(touchPoint))
{
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
FloatRectangle bounds = __pCheckButton->GetClientBoundsF();
bool isInCheckButtonArea = bounds.Contains(touchPoint);
bool isInOnOffHandlerArea = __onOffSlidingButtonBounds.Contains(touchPoint);
+ bool isDetailedArea = __detailedButtonBounds.Contains(touchPoint);
- if (__onOffHandlerPressed == true)
+ CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
+
+ if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
{
- __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+ if (__onOffHandlerPressed == true)
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+ }
+ else
+ {
+ if (isInCheckButtonArea == true && __touchMoveHandled == false && isInOnOffHandlerArea == false )
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+ }
+ else
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+ }
+ }
+ }
+ else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+ {
+ if (isDetailedArea == true && __touchMoveHandled == false)
+ {
+ __detailedPressed = true;
+
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+ }
+ else
+ {
+ __detailedPressed = false;
+
+ if (isInCheckButtonArea == true && __touchMoveHandled == false && isDetailedArea == false )
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+ }
+ else
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL);
+ }
+ }
}
else
{
- if (isInCheckButtonArea == true && __touchMoveHandled == false && isInOnOffHandlerArea == false )
+ if (isInCheckButtonArea == true && __touchMoveHandled == false)
{
__pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
}
}
}
- CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
-
if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
{
if (isInOnOffHandlerArea == true && __onOffHandlerPressed == true)
detailedHighlightedBgColor);
}
- if (pReColorBgBitmap)
+ if (pReColorBgBitmap && __highlightedIndex == 1)
{
pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pReColorBgBitmap);
}
detailedHighlightedBgColor);
}
- if (pReColorBgBitmap)
+ if (pReColorBgBitmap && __highlightedIndex == 1)
{
pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pReColorBgBitmap);
}
{
_KeyCode keyCode = keyInfo.GetKeyCode();
+ CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
+
if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
{
if (__pCheckButton->GetCheckButtonStatus() != _CHECK_BUTTON_STATUS_DISABLED)
{
- __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+ if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER)
+ {
+ if (__highlightedIndex == 1)
+ {
+ __onOffHandlerPressed = true;
+ }
+ else
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+ }
+ }
+ else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
+ {
+ if (__highlightedIndex == 2)
+ {
+ __detailedPressed = true;
+ }
+ else
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+ }
+ }
+ else if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+ {
+ if (__highlightedIndex == 1)
+ {
+ __detailedPressed = true;
+ }
+ else
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+ }
+ }
+ else
+ {
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED);
+ }
}
}
- __pCheckButton->Draw();
+ __pCheckButton->Invalidate();
return false;
}
{
_KeyCode keyCode = keyInfo.GetKeyCode();
- if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
+ CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
+
+ if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_LEFT)
{
- CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
+ if (checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER)
+ {
+ __highlightedIndex = 0;
+ }
+ else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
+ {
+ if (__highlightedIndex == 0)
+ {
+ __highlightedIndex = 1;
+ }
+ else if (__highlightedIndex == 1)
+ {
+ __highlightedIndex = 2;
+ }
+ else if (__highlightedIndex == 2)
+ {
+ __highlightedIndex = 0;
+ }
+ }
+ else
+ {
+ if (__highlightedIndex == 0)
+ {
+ __highlightedIndex = 1;
+ }
+ else if (__highlightedIndex == 1)
+ {
+ __highlightedIndex = 0;
+ }
+ }
+ __pCheckButton->Invalidate();
+ }
+ else if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_RIGHT)
+ {
+ if (checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER)
+ {
+ __highlightedIndex = 0;
+ }
+ else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
+ {
+ if (__highlightedIndex == 0)
+ {
+ __highlightedIndex = 2;
+ }
+ else if (__highlightedIndex == 1)
+ {
+ __highlightedIndex = 0;
+ }
+ else if (__highlightedIndex == 2)
+ {
+ __highlightedIndex = 1;
+ }
+ }
+ else
+ {
+ if (__highlightedIndex == 0)
+ {
+ __highlightedIndex = 1;
+ }
+ else if (__highlightedIndex == 1)
+ {
+ __highlightedIndex = 0;
+ }
+ }
+
+ __pCheckButton->Invalidate();
+ }
+ else if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
+ {
if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON
|| checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
{
__pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
- PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
+ if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON)
+ {
+ if (__highlightedIndex != 2)
+ {
+ PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
- __pCheckButton->FireActionEvent();
+ __pCheckButton->FireActionEvent();
- if (__pCheckButton->GetRadioGroup() != null)
- {
- __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+ if (__pCheckButton->GetRadioGroup() != null)
+ {
+ __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+ }
+ }
+ else
+ {
+ __detailedPressed = false;
+ }
}
+ else if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)
+ {
+ if (__highlightedIndex != 1)
+ {
+ PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
- if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING)
+ __pCheckButton->FireActionEvent();
+
+ if (__pCheckButton->GetRadioGroup() != null)
+ {
+ __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+ }
+ }
+ else
+ {
+ __detailedPressed = false;
+ }
+ }
+ else if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING)
{
+ PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
+
+ __pCheckButton->FireActionEvent();
+
+ if (__pCheckButton->GetRadioGroup() != null)
+ {
+ __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+ }
+
AdjustHandlerPosition();
__onOffHandlerPressed = false;
__onOffHandlerMoved = false;
}
+ else
+ {
+ PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton);
+
+ __pCheckButton->FireActionEvent();
+
+ if (__pCheckButton->GetRadioGroup() != null)
+ {
+ __pCheckButton->SendTouchReleasedEvent(*__pCheckButton);
+ }
+ }
}
return false;
bool
_CheckButtonPresenter::OnFocusGained(const _Control& source)
{
+ __highlightedIndex = 0;
+
if (__pCheckButton->IsFocusModeStateEnabled() == true)
{
if (__pCheckButton->GetCheckButtonStatus() != _CHECK_BUTTON_STATUS_DISABLED)
void
_ContextMenuItem::DrawItemUpperDivider(void)
{
+ FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+ Color dividerLineColor = Color(0, 0, 0, 0);
+
if (__pUpperDividerLineLabel == null)
{
__pUpperDividerLineLabel = _Label::CreateLabelN();
SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- FloatRectangle bounds = GetBoundsF();
- __pUpperDividerLineLabel->SetBounds(FloatRectangle(__leftMargin, 0.0f, bounds.width - __leftMargin - __rightMargin, __dividerHeight));
-
AttachChild(*__pUpperDividerLineLabel);
_AccessibilityContainer* pContainer = __pUpperDividerLineLabel->GetAccessibilityContainer();
}
}
- Color dividerLineColor = Color(0, 0, 0, 0);
+ bounds = GetBoundsF();
if (__selected == false)
{
dividerLineColor = __upperDividerLineColor;
}
+ __pUpperDividerLineLabel->SetBounds(FloatRectangle(__leftMargin, 0.0f, bounds.width - __leftMargin - __rightMargin, __dividerHeight));
__pUpperDividerLineLabel->SetBackgroundColor(dividerLineColor);
__pUpperDividerLineLabel->Invalidate();
}
void
_ContextMenuItem::DrawItemLowerDivider(void)
{
+ FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f);
+ Color dividerLineColor(0, 0, 0, 0);
+
if (__pLowerDividerLineLabel == null)
{
__pLowerDividerLineLabel = _Label::CreateLabelN();
SysTryReturnVoidResult(NID_UI_CTRL, __pLowerDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- FloatRectangle bounds = GetBoundsF();
- __pLowerDividerLineLabel->SetBounds(FloatRectangle(__leftMargin, bounds.height - __dividerHeight, bounds.width - __leftMargin - __rightMargin, __dividerHeight));
-
AttachChild(*__pLowerDividerLineLabel);
_AccessibilityContainer* pContainer = __pLowerDividerLineLabel->GetAccessibilityContainer();
}
}
- Color dividerLineColor = Color(0, 0, 0, 0);
+ bounds = GetBoundsF();
if (__selected == false)
{
dividerLineColor = __lowerDividerLineColor;
}
+ __pLowerDividerLineLabel->SetBounds(FloatRectangle(__leftMargin, bounds.height - __dividerHeight, bounds.width - __leftMargin - __rightMargin, __dividerHeight));
__pLowerDividerLineLabel->SetBackgroundColor(dividerLineColor);
__pLowerDividerLineLabel->Invalidate();
}
return null;
}
- // calculate item size
- float bitmapWidth = (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) ? __itemBitmapWidth : 0.0f;
-
FloatDimension textArea(0.0f, 0.0f);
FloatDimension itemSize(0.0f, 0.0f);
- __pFont->GetTextExtent(text, text.GetLength(), textArea);
- float labelTopMargin = 0.0f;
- float iconGap = 0.0f;
- float textGap = 0.0f;
- float textLabelX = 0.0f;
- GET_SHAPE_CONFIG(LABEL::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin);
- GET_SHAPE_CONFIG(CONTEXTMENU::LIST_TEXT_GAP, _CONTROL_ORIENTATION_PORTRAIT, textGap);
- iconGap = __itemGap;
+ CalculateItemSize(text, itemType, textArea, itemSize);
- if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
- {
- textArea.width += 2.0 * iconGap;
- itemSize.width = textArea.width + bitmapWidth + textGap;
- textLabelX = iconGap + bitmapWidth;
- }
- else
- {
- textArea.width += 2.0f * textGap;
- itemSize.width = textArea.width;
- }
-
- textArea.height += 2.0f * labelTopMargin;
- itemSize.height = __itemHeight + (__dividerHeight * 2.0f);
-
- itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
+ pItem->SetSize(itemSize);
- if (itemSize.width > __itemMaxWidth)
+ float textLabelX = 0.0f;
+ if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
{
- textArea.width -= itemSize.width - __itemMaxWidth;
- itemSize.width = __itemMaxWidth;
+ textLabelX = __itemGap + __itemBitmapWidth;
}
- pItem->SetSize(itemSize);
-
// add text label
-
pLabel = _Label::CreateLabelN();
pLabel->SetText(text);
ContextMenuCoreItemStatus itemStatus = CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL;
return pItem;
}
+void
+_ContextMenuListPresenter::CalculateItemSize(const String &text, ContextMenuItemDrawingType itemType, FloatDimension &textArea, FloatDimension &itemSize)
+{
+ float bitmapWidth = (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) ? __itemBitmapWidth : 0.0f;
+
+ __pFont->GetTextExtent(text, text.GetLength(), textArea);
+ float labelTopMargin = 0.0f;
+ float iconGap = 0.0f;
+ float textGap = 0.0f;
+ GET_SHAPE_CONFIG(LABEL::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin);
+ GET_SHAPE_CONFIG(CONTEXTMENU::LIST_TEXT_GAP, _CONTROL_ORIENTATION_PORTRAIT, textGap);
+ iconGap = __itemGap;
+
+ if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP)
+ {
+ textArea.width += 2.0 * iconGap;
+ itemSize.width = textArea.width + bitmapWidth + textGap;
+ }
+ else
+ {
+ textArea.width += 2.0f * textGap;
+ itemSize.width = textArea.width;
+ }
+
+ textArea.height += 2.0f * labelTopMargin;
+ itemSize.height = __itemHeight + (__dividerHeight * 2.0f);
+
+ itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
+
+ if (itemSize.width > __itemMaxWidth)
+ {
+ textArea.width -= itemSize.width - __itemMaxWidth;
+ itemSize.width = __itemMaxWidth;
+ }
+
+ return;
+}
+
result
_ContextMenuListPresenter::AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap,
const Tizen::Graphics::Bitmap* pPressedBitmap,
SysTryReturn(NID_UI_CTRL, false, r, r, "Failed to add item.");
}
+ CalculateItemMaximumWidth();
+
return E_SUCCESS;
}
r = __pModel->RemoveItem(index);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item.");
+ CalculateItemMaximumWidth();
+
return r;
}
}
}
+void
+_ContextMenuListPresenter::CalculateItemMaximumWidth(void)
+{
+ FloatDimension itemSize(0.0f, 0.0f);
+ FloatDimension textArea(0.0f, 0.0f);
+ float maxItemWidth = 0.0f;
+
+ for (int i = 0; i < __pModel->GetItemCount() - 1; i++)
+ {
+ _ContextMenuItem* pItem = null;
+
+ pItem = __pModel->GetItem(i);
+ SysTryReturn(NID_UI_CTRL, pItem != null, , E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item.");
+
+ CalculateItemSize(pItem->GetText(), pItem->GetType(), textArea, itemSize);
+
+ if (maxItemWidth < itemSize.width)
+ {
+ maxItemWidth = itemSize.width;
+ }
+ }
+
+ __itemWidth = maxItemWidth;
+}
+
int
_ContextMenuListPresenter::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const
{
bool
_DateTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
- int boxId = 0;
-
if (!__keypadEnabled)
{
return false;
_KeyCode keyCode = keyInfo.GetKeyCode();
- if (__focusedBoxIndex < __outputBoxMaxCount)
- {
- boxId = __pDisplayBox[__focusedBoxIndex]->GetDisplayBoxId();
-
- if ((keyCode != _KEY_RIGHT) && (keyCode != _KEY_LEFT) && (keyCode != _KEY_TAB) && (boxId == DATETIME_ID_MONTH))
- {
- //month can be changed only with touch on input pad
- return true;
- }
- }
-
switch (keyCode)
{
case _KEY_RIGHT:
else if (boxId == DATETIME_ID_MONTH)
{
PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_SIP, __pView);
- newNumber = inputPadReturnValue;
- __inputComposing = DATETIME_INPUT_BEGIN;
+
+ if (__inputComposing == DATETIME_INPUT_BEGIN && __keypadEnabled)
+ {
+ currentNumber = GetNumberInBox(boxId);
+ newNumber = currentNumber * 10 + inputPadReturnValue;
+
+ if (newNumber > 12)
+ {
+ newNumber = 12;
+ }
+ else if (newNumber < 1)
+ {
+ newNumber = 1;
+ }
+
+ ChangeFocusBox();
+ }
+ else
+ {
+ if (inputPadReturnValue == 0)
+ {
+ return;
+ }
+ newNumber = inputPadReturnValue;
+ __inputComposing = DATETIME_INPUT_BEGIN;
+
+ if (!__keypadEnabled || newNumber > 1)
+ {
+ ChangeFocusBox();
+ }
+ }
SetNumberInBox(boxId, newNumber);
- ChangeFocusBox();
}
else
{
FloatPoint textPoint;
TextSimple* pOldSimpleText = null;
TextSimple* pNewSimpleText = null;
+ bool isCustomBitmap = false;
_DateTimeUtils dateTimeUtils;
monthString = dateTimeUtils.GetMonthString(GetMonth());
VisualElementPropertyAnimation* pNewBoundsAnimation = null;
VisualElementPropertyAnimation* pOldBoundsAnimation = null;
Canvas *pCanvas = null;
+ Canvas *pContentCanvas = null;
Color contentBgColor;
Color textPressedColor;
float contentTextMargin;
pNewVisualElement->SetShowState(true);
pOldVisualElement->SetShowState(true);
- __pContentProvider->SetBounds(FloatRectangle((rect.x + contentTextMargin), (rect.y + contentTextMargin), (rect.width - (contentTextMargin * 2.0f)), (rect.height - (contentTextMargin * 2.0f))));
+ __pContentProvider->SetBounds(FloatRectangle((rect.x + contentTextMargin), (rect.y + (contentTextMargin * 2.0f)), (rect.width - (contentTextMargin * 2.0f)), (rect.height - (contentTextMargin * 4.0f))));
pNewVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height));
pOldVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height));
- pCanvas = pEditDateElement->GetCanvasN(__pContentProvider->GetBounds());
- pCanvas->SetBackgroundColor(contentBgColor);
+ pContentCanvas = pEditDateElement->GetCanvasN(__pContentProvider->GetBounds());
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ pContentCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+ pContentCanvas->Clear();
+
+ pCanvas = pEditDateElement->GetCanvasN(rect);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
+ rect.x = 0.0f;
+ rect.y = 0.0f;
+ r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap);
+ isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED);
+
+ if (!isCustomBitmap)
+ {
+ result res = DrawResourceBitmap(*pCanvas, rect, __pContentBgEffectPressedBitmap);
+
+ if (res != E_SUCCESS)
+ {
+ SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(res));
+ }
+ }
+
delete pCanvas;
pCanvas = null;
+ if (r != E_SUCCESS)
+ {
+ pContentCanvas->SetBackgroundColor(contentBgColor);
+ pContentCanvas->Clear();
+ }
+
+ delete pContentCanvas;
+ pContentCanvas = null;
+
pEditDateElement->AttachChild(*__pContentProvider);
__pContentProvider->AttachChild(*pOldVisualElement);
__pContentProvider->AttachChild(*pNewVisualElement);
delete pNewSimpleText;
pNewSimpleText = null;
+ delete pContentCanvas;
+ pContentCanvas = null;
+
return;
}
String hourString;
String minuteString;
String newValue;
+ TextSimple* pOldSimpleText = null;
+ TextSimple* pNewSimpleText = null;
+ bool isCustomBitmap = false;
_DateTimeUtils dateTimeUtils;
int hours = GetHour();
VisualElementPropertyAnimation* pNewBoundsAnimation = null;
VisualElementPropertyAnimation* pOldBoundsAnimation = null;
Canvas *pCanvas = null;
+ Canvas *pContentCanvas = null;
Color contentBgColor;
Color textNormalColor;
Color textPressedColor;
+ float contentTextMargin;
GET_COLOR_CONFIG(EDITTIME::CONTENT_BG_PRESSED, contentBgColor);
GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textPressedColor);
+ GET_SHAPE_CONFIG(EDITDATE::CONTENT_TEXT_MARGIN, __pEditTime->GetOrientation(), contentTextMargin);
__pFont->GetTextExtent(newValue, newValue.GetLength(), newTextDim);
__pFont->GetTextExtent(__lastSelectedValue, __lastSelectedValue.GetLength(), oldTextDim);
pOldVisualElement->SetShowState(true);
- if (newTextDim.width > oldTextDim.width)
- {
- textPoint.x = (rect.width - newTextDim.width) / 2.0f;
- textPoint.y = (rect.height - newTextDim.height) / 2.0f;
- __pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
- pNewVisualElement->SetBounds(FloatRectangle(0.0f, newTextDim.height * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
+ __pContentProvider->SetBounds(FloatRectangle((rect.x + contentTextMargin), (rect.y + (contentTextMargin * 2.0f)), (rect.width - (contentTextMargin * 2.0f)), (rect.height - (contentTextMargin * 4.0f))));
- rect.x = __pContentProvider->GetBounds().x;
- rect.y = __pContentProvider->GetBounds().y;
- rect.width = __pContentProvider->GetBounds().width;
- rect.height = __pContentProvider->GetBounds().height;
+ pNewVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height));
+ pOldVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height));
- textPoint.x = (rect.width - oldTextDim.width) / 2.0f;
- textPoint.y = (rect.height - oldTextDim.height) / 2.0f;
+ pContentCanvas = pEditTimeElement->GetCanvasN(__pContentProvider->GetBounds());
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ pContentCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+ pContentCanvas->Clear();
- pOldVisualElement->SetBounds(FloatRectangle(textPoint.x * 1.0f, 0.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
- }
- else
+ pCanvas = pEditTimeElement->GetCanvasN(rect);
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+ pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+ pCanvas->Clear();
+ rect.x = 0.0f;
+ rect.y = 0.0f;
+ r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap);
+ isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED);
+
+ if (!isCustomBitmap)
{
- textPoint.x = (rect.width - oldTextDim.width) / 2.0f;
- textPoint.y = (rect.height - oldTextDim.height) / 2.0f;
- __pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
- pOldVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
+ result res = DrawResourceBitmap(*pCanvas, rect, __pContentBgEffectPressedBitmap);
- rect.x = __pContentProvider->GetBounds().x;
- rect.y = __pContentProvider->GetBounds().y;
- rect.width = __pContentProvider->GetBounds().width;
- rect.height = __pContentProvider->GetBounds().height;
+ if (res != E_SUCCESS)
+ {
+ SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(res));
+ }
+ }
- textPoint.x = (rect.width - newTextDim.width) / 2.0f;
- textPoint.y = (rect.height - newTextDim.height) / 2.0f;
+ delete pCanvas;
+ pCanvas = null;
- pNewVisualElement->SetBounds(FloatRectangle(textPoint.x * 1.0f, newTextDim.height * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
+ if (r != E_SUCCESS)
+ {
+ pContentCanvas->SetBackgroundColor(contentBgColor);
+ pContentCanvas->Clear();
}
- pCanvas = pEditTimeElement->GetCanvasN(rect);
- pCanvas->SetBackgroundColor(contentBgColor);
- pCanvas->Clear();
- delete pCanvas;
+ delete pContentCanvas;
+ pContentCanvas = null;
pEditTimeElement->AttachChild(*__pContentProvider);
pNewBoundsAnimation->SetDuration(300);
pNewBoundsAnimation->SetPropertyName("bounds.position");
- pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x * 1.0f, newTextDim.height * 1.0f)));
- pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x * 1.0f, 0.0f)));
+ pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, oldTextDim.height)));
+ pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, 0.0f)));
pNewBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
pOldBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation();
pOldBoundsAnimation->SetDuration(300);
pOldBoundsAnimation->SetPropertyName("bounds.position");
- pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x * 1.0f, 0.0f)));
- pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x * 1.0f, oldTextDim.height * -1.0f)));
+ pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, 0.0f)));
+ pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, oldTextDim.height * -1.0f)));
pOldBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
+ pOldSimpleText = new (std::nothrow)TextSimple((const_cast <wchar_t*>(__lastSelectedValue.GetPointer())), __lastSelectedValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+ SysTryCatch(NID_UI_CTRL, (pOldSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
pCanvas = pOldVisualElement->GetCanvasN();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
pCanvas->SetForegroundColor(textPressedColor);
- (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD);
- pCanvas->SetFont(*__pFont);
- pCanvas->DrawText(FloatPoint(0.0f, 0.0f), __lastSelectedValue);
+
+ (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize);
+ (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN);
+ __textObject.RemoveAll();
+ __textObject.AppendElement(*pOldSimpleText);
+
+ __textObject.SetFont(__pFont, 0, __textObject.GetTextLength());
+ __textObject.SetForegroundColor(textPressedColor, 0, __textObject.GetTextLength());
+ __textObject.SetBounds(FloatRectangle(0, 0, pCanvas->GetBounds().width, pCanvas->GetBounds().height));
+ __textObject.Draw(*_CanvasImpl::GetInstance(*pCanvas));
delete pCanvas;
pCanvas = null;
+ pNewSimpleText = new (std::nothrow)TextSimple((const_cast <wchar_t*>(newValue.GetPointer())), newValue.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
+ SysTryCatch(NID_UI_CTRL, (pNewSimpleText != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
pCanvas = pNewVisualElement->GetCanvasN();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
pCanvas->SetForegroundColor(textPressedColor);
- (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD);
- pCanvas->SetFont(*__pFont);
- pCanvas->DrawText(FloatPoint(0.0f, 0.0f), newValue);
+
+ (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize);
+ (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN);
+ __textObject.RemoveAll();
+ __textObject.AppendElement(*pNewSimpleText);
+
+ __textObject.SetFont(__pFont, 0, __textObject.GetTextLength());
+ __textObject.SetForegroundColor(textPressedColor, 0, __textObject.GetTextLength());
+ __textObject.SetBounds(FloatRectangle(0, 0, pCanvas->GetBounds().width, pCanvas->GetBounds().height));
+ __textObject.Draw(*_CanvasImpl::GetInstance(*pCanvas));
delete pCanvas;
pCanvas = null;
delete pOldBoundsAnimation;
pOldBoundsAnimation = null;
- delete pCanvas;
- pCanvas = null;
+ delete pOldSimpleText;
+ pOldSimpleText = null;
+
+ delete pNewSimpleText;
+ pNewSimpleText = null;
+
+ delete pContentCanvas;
+ pContentCanvas = null;
return;
}
}
else if (!pFrame && IsAttachedToMainTree())
{
- r = __pIndicator->SetIndicatorShowState(false);
+ __pIndicator->SetShowState(false);
}
__indicatorShowState = state;
}
}
+ AdjustClientBounds();
+
return r;
}
{
__pFocusTraversalControl = pControl;
}
+
+void
+_Form::OnFormActivated(void)
+{
+ AddIndicatorObject();
+}
+
+
}}} // Tizen::Ui::Controls
#define OPTIONKEY SOFTKEY_COUNT
-namespace Tizen { namespace Ui { namespace Controls
+namespace
{
+const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+}
-const String _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+namespace Tizen { namespace Ui { namespace Controls
+{
Dimension
_FormImpl::FormSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const
}
else
{
+ if (OnFormOrientationStatusRequested() == ORIENTATION_STATUS_PORTRAIT || OnFormOrientationStatusRequested() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ GetCore().SetIndicatorShowState(true);
+ }
+ else
+ {
+ GetCore().SetIndicatorShowState(false);
+ }
+
GetCore().SetIndicatorAutoHide(false, false);
}
r = GetLastResult();
{
GetCore().SetIndicatorShowState(true);
}
+ else
+ {
+ GetCore().SetIndicatorShowState(false);
+ }
}
}
GetCore().AdjustClientBounds();
pIndicator->OnChangeLayout(orientation);
}
-
float adjHeight = 0.0f;
if (GetCore().HasHeader())
namespace Tizen { namespace Ui { namespace Controls {
-const String _ACTIVATE_FRAME = L"ActivateFrame";
+const wchar_t* _ACTIVATE_FRAME = L"ActivateFrame";
_Frame::_Frame(void)
: __pFramePresenter(null)
}
pNewForm->SetVisibleState(true);
+ pNewForm->OnFormActivated();
_Control* pFocus = pNewForm->GetFocusControl();
if (pFocus)
{
if (on)
{
pForm->SetFocusControl(pControl);
- if (isCurrentForm && pFrame->IsActivated())
+ if (isCurrentForm && pFrame && pFrame->IsActivated())
{
pControlMgr->SetFocusControl(*pControl);
}
}
void
-_Frame::SetFocusTraversalControl(_Control* pControl)
+_Frame::SetFocusTraversalControl(_Control* pControl, bool on)
{
_Form* pForm = null;
_Control* pTempControl = pControl;
if (pForm)
{
- pForm->SetFocusTraversalControl(pControl);
+ if (on)
+ {
+ pForm->SetFocusTraversalControl(pControl);
+ }
+ else
+ {
+ pForm->SetFocusTraversalControl(pForm);
+ }
}
}
}}} // Tizen::Ui::Controls
using namespace Tizen::Ui;
using namespace Tizen::Ui::Animations;
+namespace
+{
+const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
+}
+
namespace Tizen { namespace Ui { namespace Controls {
-const String _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent";
const _FrameImpl*
_FrameImpl::GetInstance(const Frame& frame)
bool
_Gallery::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
{
- return true;
+ _GalleryViewEventInfo viewEventInfo;
+ _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_CANCELED, &viewEventInfo);
+
+ return GetPresenter().PostEvent(viewEvent);
}
// Windowing Event Callbacks
case GALLERY_VIEW_EVENT_BOUNDS_CHANGED:
return OnBoundsChanged();
+ case GALLERY_VIEW_EVENT_TOUCH_CANCELED:
+ return __pGalleryViewEventHandler->OnTouchCanceled();
+
default:
SysTryReturn(NID_UI_CTRL, false, false, E_INVALID_ARG,
"[E_INVALID_ARG] The event type(%d) is invalid type", event.GetEventType());
}
bool
-_GalleryViewEventHandler::ResetTouch()
+_GalleryViewEventHandler::ResetTouch(void)
{
result r = E_SUCCESS;
return true;
}
+bool
+_GalleryViewEventHandler::OnTouchCanceled(void)
+{
+ ResetTouch();
+
+ return true;
+}
+
void
_GalleryViewEventHandler::OnTransitionCancel(void)
{
if (pCanvas == null)
{
+ Color backgroundColor = Color(0, 0, 0, 0);
if (__pEmptyListVE != null)
{
pCanvas = __pEmptyListVE->GetCanvasN();
else
{
pCanvas = __pVE->GetCanvasN();
+ backgroundColor = __pIconListView->GetBackgroundColor();
}
SysTryCatch(NID_UI, pCanvas != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+ pCanvas->SetBackgroundColor(backgroundColor);
pCanvas->Clear();
}
if (__selectedOverlayBitmapId >= 0)
{
FireIconListViewItemEvent(EVENT_TYPE_OVERLAY_BITMAP_SELECTED, index, __selectedOverlayBitmapId);
+ __selectedOverlayBitmapId = INVALID_INDEX;
return;
}
void
_Indicator::SetIndicatorAutoHide(bool portrait, bool landscape)
{
- Ecore_X_Window win;
+ Ecore_X_Window win = 0;
if (__pWindow)
{
win = (Ecore_X_Window)__pWindow->GetNativeHandle();
void
_Indicator::OnChangeLayout(_ControlOrientation orientation)
{
- Ecore_X_Window win;
+ Ecore_X_Window win = 0;
if (__pWindow)
{
win = (Ecore_X_Window)__pWindow->GetNativeHandle();
}
else
{
- SetIndicatorShowState(false);
SetIndicatorOpacity(__opacity);
ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE);
}
return false;
}
}
+ return false;
}
void
return HIT_TEST_NOWHERE;
}
- _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*this->__pCurrentVisualElement);
Evas_Object* pImageObject = null;
- if (pImpl)
+ if (this->__pCurrentVisualElement)
{
- _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pImpl->GetNativeNode());
- if (pNativeNode)
+ _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*this->__pCurrentVisualElement);
+ if (pImpl)
{
- VisualElementSurface* pPortraitSurface = pNativeNode->GetSurface();
- if (pPortraitSurface)
+ _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pImpl->GetNativeNode());
+ if (pNativeNode)
{
- _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pPortraitSurface));
- if (pSurface)
+ VisualElementSurface* pPortraitSurface = pNativeNode->GetSurface();
+ if (pPortraitSurface)
{
- pImageObject = (Evas_Object*)pSurface->GetNativeHandle();
+ _EflVisualElementSurfaceImpl* pSurface = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pPortraitSurface));
+ if (pSurface)
+ {
+ pImageObject = (Evas_Object*)pSurface->GetNativeHandle();
+ }
}
}
}
{
if (__pListViewItem != null)
{
+ _TableViewItem* pContextItem = __pListViewItem->GetContextItem();
__pListViewItem->Release();
+
+ if (pContextItem)
+ {
+ pContextItem->Release();
+ }
}
delete __pEvent;
result
_ListItemBaseImpl::SetContextItem(const _ListContextItemImpl* pItem)
{
+ if (__pListViewItem->GetContextItem())
+ {
+ __pListViewItem->GetContextItem()->Release();
+ }
+
if (pItem == null)
{
__pListViewItem->SetContextItem(null);
if (pContextItem != null)
{
__pListViewItem->SetItemWidth(__itemSize.width);
+
+ pContextItem->AddRef();
+
__pListViewItem->SetContextItem(pContextItem);
__pListViewItem->SetContextItemEventListener(*this);
if ((pContextItem != null) && (__pContextItemEventListener != null))
{
pContextItem->RemoveContextItemEventListener(*__pContextItemEventListener);
+ __pContextItemEventListener = null;
}
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
else
{
pContextItem->RemoveContextItemEventListener(*__pContextItemEventListener);
+ __pContextItemEventListener = null;
}
}
}
}
}
+void
+_MessageBox::OnDrawFocus(void)
+{
+ __pMsgboxPresenter->OnDrawFocus();
+ return;
+}
+
bool
_MessageBox::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
SysTryCatch(NID_UI_CTRL, __pScrollPanel != null, , E_OUT_OF_MEMORY, "[E_SYSTEM] Failed to create the scroll.");
__pScrollPanel->SetBounds(__textBounds);
__pScrollPanel->AttachChild(*__pLabel);
+ __pScrollPanel->SetFocusable(false);
__pMessageBox->AttachChild(*__pScrollPanel);
__buttonBgBounds = FloatRectangle(transLeftMargin + __bgImageMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth)- (transLeftMargin + transRightMargin) - (2 * __bgImageMargin), bottomHeight - __bgImageMargin);
case MSGBOX_STYLE_OKCANCEL:
__buttonNum = 2;
- GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[0]);
- GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[1]);
+ GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[1]);
+ GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]);
break;
case MSGBOX_STYLE_YESNO:
__buttonNum = 2;
- GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[0]);
- GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[1]);
+ GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[1]);
+ GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[0]);
break;
case MSGBOX_STYLE_YESNOCANCEL:
__buttonNum = 3;
- GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[0]);
+ GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[2]);
GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[1]);
- GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[2]);
+ GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]);
break;
case MSGBOX_STYLE_ABORTRETRYIGNORE:
case MSGBOX_STYLE_RETRYCANCEL:
__buttonNum = 2;
- GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_RETRY, __buttonText[0]);
- GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[1]);
+ GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_RETRY, __buttonText[1]);
+ GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]);
break;
default:
switch (btnPos)
{
case 0:
- SetReturnValue(MSGBOX_RESULT_OK);
+ SetReturnValue(MSGBOX_RESULT_CANCEL);
break;
case 1:
- SetReturnValue(MSGBOX_RESULT_CANCEL);
+ SetReturnValue(MSGBOX_RESULT_OK);
break;
}
break;
switch (btnPos)
{
case 0:
- SetReturnValue(MSGBOX_RESULT_YES);
+ SetReturnValue(MSGBOX_RESULT_NO);
break;
case 1:
- SetReturnValue(MSGBOX_RESULT_NO);
+ SetReturnValue(MSGBOX_RESULT_YES);
break;
}
break;
switch (btnPos)
{
case 0:
- SetReturnValue(MSGBOX_RESULT_YES);
+ SetReturnValue(MSGBOX_RESULT_CANCEL);
break;
case 1:
break;
case 2:
- SetReturnValue(MSGBOX_RESULT_CANCEL);
+ SetReturnValue(MSGBOX_RESULT_YES);
break;
}
break;
switch (btnPos)
{
case 0:
- SetReturnValue(MSGBOX_RESULT_RETRY);
+ SetReturnValue(MSGBOX_RESULT_CANCEL);
break;
case 1:
- SetReturnValue(MSGBOX_RESULT_CANCEL);
+ SetReturnValue(MSGBOX_RESULT_RETRY);
break;
}
break;
return true;
}
+void
+_MessageBoxPresenter::OnDrawFocus(void)
+{
+ _ControlImpl* pImpl = null;
+ _Button* pButtonCore = null;
+
+ if (__pButtons != null)
+ {
+ pImpl = _ControlImpl::GetInstance(*__pButtons[0]);
+ pButtonCore = dynamic_cast<_Button*>(&pImpl->GetCore());
+ __pButtons[0]->SetFocus();
+ __pMessageBox->SetFocusTraversalControl(pButtonCore, true);
+ }
+
+ return;
+}
+
bool
_MessageBoxPresenter::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element)
{
if (pFocusControl != null)
{
- pTop->SetFocusTraversalControl(pFocusControl);
+ pTop->SetFocusTraversalControl(pFocusControl, true);
_Control* pParentControl = pFocusControl->GetParent();
if (pParentControl != null)
void
_OptionMenu::OnActivated(void)
{
+ _TouchManager* pTouchManager = _TouchManager::GetInstance();
+
+ if (pTouchManager)
+ {
+ pTouchManager->SetTouchCanceled(null);
+ }
SetTouchCapture(false, false);
return _Window::OnActivated();
// calculate item size
float bitmapWidth = 0.0f;
- FloatDimension textArea(0.0f, 0.0f);
- FloatDimension itemSize(0.0f, 0.0f);
-
- __pFont->GetTextExtent(text, text.GetLength(), textArea);
- float labelLeftMargin = 0.0f, labelTopMargin = 0.0f;
- GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin);
- GET_SHAPE_CONFIG(LABEL::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin);
- textArea.width += 2.0f * labelLeftMargin;
- textArea.height += 2.0f * labelTopMargin;
- itemSize.height = __itemHeight + (__dividerHeight * 2.0f);
- itemSize.width = __leftMargin + textArea.width + __rightMargin;
-
if (itemType == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP)
{
bitmapWidth = __itemBitmapWidth;
- itemSize.width = itemSize.width + bitmapWidth;
}
- itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
+ FloatDimension textArea(0.0f, 0.0f);
+ FloatDimension itemSize(0.0f, 0.0f);
- if (itemSize.width > __itemMaxWidth)
- {
- textArea.width -= itemSize.width - __itemMaxWidth;
- itemSize.width = __itemMaxWidth;
- }
+ CalculateItemSize(text, itemType, textArea, itemSize);
+ float labelLeftMargin = 0.0f;
+ GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin);
pItem->SetSize(itemSize);
// add text label
return pItem;
}
+void
+_OptionMenuPresenter::CalculateItemSize(const String &text, OptionMenuItemDrawingType itemType, FloatDimension &textArea, FloatDimension &itemSize)
+{
+ float labelLeftMargin = 0.0f;
+ float labelTopMargin = 0.0f;
+ __pFont->GetTextExtent(text, text.GetLength(), textArea);
+
+ GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin);
+ GET_SHAPE_CONFIG(LABEL::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin);
+
+ textArea.width += 2.0f * labelLeftMargin;
+ textArea.height += 2.0f * labelTopMargin;
+ itemSize.height = __itemHeight + (__dividerHeight * 2.0f);
+ itemSize.width = __leftMargin + textArea.width + __rightMargin;
+
+ if (itemType == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP)
+ {
+ itemSize.width = itemSize.width + __itemBitmapWidth;
+ }
+
+ itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
+
+ if (itemSize.width > __itemMaxWidth)
+ {
+ textArea.width -= itemSize.width - __itemMaxWidth;
+ itemSize.width = __itemMaxWidth;
+ }
+}
+
result
_OptionMenuPresenter::AddItem(const String& text, int actionId, const Bitmap* normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap)
{
return pItem->GetActionId();
}
-FloatDimension
-_OptionMenuPresenter::GetMainItemMaximumWidth(void)
+void
+_OptionMenuPresenter::CalculateItemMaximumWidth(void)
{
- float labelLeftMargin = 0.0f;
FloatDimension itemSize(0.0f, 0.0f);
- FloatDimension maxItemTextArea(0.0f, 0.0f);
-
- GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin);
+ FloatDimension textArea(0.0f, 0.0f);
+ float maxItemWidth = 0.0f;
for (int i = 0; i < __pModel->GetItemCount() - 1; i++)
{
- FloatDimension currentItemTextArea(0.0f, 0.0f);
_OptionMenuItem* pItem = null;
pItem = __pModel->GetItem(i);
- SysTryReturn(NID_UI_CTRL, pItem != null, FloatDimension(0.0f, 0.0f), E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item.");
-
- String itemText = pItem->GetText();
-
- __pFont->GetTextExtent(itemText, itemText.GetLength(), currentItemTextArea);
+ SysTryReturn(NID_UI_CTRL, pItem != null, , E_SYSTEM, "[E_SYSTEM] A system error occurred. Unable to get the item.");
- if (currentItemTextArea.width > maxItemTextArea.width)
- {
- maxItemTextArea = currentItemTextArea;
- }
+ CalculateItemSize(pItem->GetText(), pItem->GetType(), textArea, itemSize);
- if (pItem->GetType() == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP)
+ if (maxItemWidth < itemSize.width)
{
- itemSize.width = itemSize.width + __itemBitmapWidth;
+ maxItemWidth = itemSize.width;
}
}
- maxItemTextArea.width += 2.0f * labelLeftMargin;
- itemSize.width += __leftMargin + maxItemTextArea.width + __rightMargin;
-
- itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width;
-
- if (itemSize.width > __itemMaxWidth)
- {
- itemSize.width = __itemMaxWidth;
- }
-
- return itemSize;
+ __itemWidth = maxItemWidth;
}
result
return r;
}
- FloatDimension maxItemTextArea = GetMainItemMaximumWidth();
- pItem->SetSize(maxItemTextArea);
-
- __itemWidth = maxItemTextArea.width;
+ CalculateItemMaximumWidth();
return r;
}
r = __pModel->RemoveItem(index);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to delete item.");
- FloatDimension maxItemTextArea = GetMainItemMaximumWidth();
-
- __itemWidth = maxItemTextArea.width;
+ CalculateItemMaximumWidth();
return r;
}
long long length = attributes.GetFileSize();
SysTryReturnResult(NID_UI_CTRL, length > 0, E_SYSTEM, "The size of file(%s) is zero.", fileName.GetPointer());
- std::unique_ptr<char> pXmlBuffer(new (std::nothrow) char[length]);
+ std::unique_ptr<char[]> pXmlBuffer(new (std::nothrow) char[length]);
SysTryReturnResult(NID_UI_CTRL, pXmlBuffer != null, E_OUT_OF_MEMORY, "The Buffer of Xml is null");
File fileObj;
_pTitleTextAccessibilityElement->SetBounds(__pPopupPresenter->GetTitleTextBounds());
}
}
+}
+void
+_Popup::OnDrawFocus(void)
+{
+ return;
}
bool
{
__pIndicator->SetIndicatorShowState(true);
}
+ else
+ {
+ __pIndicator->SetIndicatorShowState(false);
+ }
}
__pIndicator->OnChangeLayout(orientation);
}
}
void
+_ProgressPopup::OnDrawFocus(void)
+{
+ _ControlImpl* pImpl = null;
+ _Button* pButtonCore = null;
+
+ if (__pButton != null)
+ {
+ pImpl = _ControlImpl::GetInstance(*__pButton);
+ pButtonCore = dynamic_cast<_Button*>(&pImpl->GetCore());
+ __pButton->SetFocus();
+ SetFocusTraversalControl(pButtonCore, true);
+ }
+
+ return;
+}
+
+void
_ProgressPopup::SetButtonText(void)
{
String buttonText;
SysTryCatch(NID_UI_CTRL, __pScrollPanel != null, , E_OUT_OF_MEMORY, "[E_SYSTEM] Failed to create the scroll.");
__pScrollPanel->SetBounds(__textBounds);
+ __pScrollPanel->SetFocusable(false);
__pScrollPanel->AttachChild(*__pLabel);
__pProgressPopup->AttachChild(*__pScrollPanel);
}
}
result
-_ScrollPanel::Initialize(const _ScrollPanelPresenter& presenter)
+_ScrollPanel::Initialize(const _ScrollPanelPresenter& presenter, bool acquireHandle)
{
ClearLastResult();
r = GetLastResult();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
- AcquireHandle();
+ if (acquireHandle)
+ {
+ AcquireHandle();
+ }
r = AddGestureDetector(*__pGestureFlick);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
r = pPresenter->Construct(this);
SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = _ScrollPanel::Initialize(*pPresenter);
+ r = _ScrollPanel::Initialize(*pPresenter, false);
SetTableViewPresenter(pPresenter);
SetScrollAreaAutoResizingEnabled(false);
bool
_TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!IsFocusModeStateEnabled())
+ {
+ return false;
+ }
+
_KeyCode keyCode = keyInfo.GetKeyCode();
IListT<_Control*>* pFocusList = GetFocusListN();
SysTryReturn(NID_UI_CTRL, pFocusList != null, true, GetLastResult(), "[%s] propagating.", GetErrorMessage(GetLastResult()));
bool
_TableViewItem::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!IsFocusModeStateEnabled())
+ {
+ return false;
+ }
+
_KeyCode keyCode = keyInfo.GetKeyCode();
if(keyCode == _KEY_ENTER)
return response;
}
- if (IsScrollAnimationRunning())
+ if (IsScrollAnimationRunning() && (GetScrollPosition() == GetScrollPositionInternal()))
{
pItem->SetTouchPressOnScroll(true);
return response;
bool
_TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!__pTableView->IsFocusModeStateEnabled())
+ {
+ return false;
+ }
+
_KeyCode keyCode = keyInfo.GetKeyCode();
_Control* pFocusedControl = null;
_Window* pTop = source.GetRootWindow();
}
pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex));
+
+ if (!pItem->GetVisibleState())
+ {
+ TableViewItemTag firstItemPos = {-1, -1};
+ GetFirstItem(firstItemPos);
+ if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex)
+ {
+ return false;
+ }
+
+ continue;
+ }
+
if (pItem->GetBoundsF().y < GetScrollPosition())
{
ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
}
pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex));
+
+ if (!pItem->GetVisibleState())
+ {
+ TableViewItemTag lastItemPos = {-1, -1};
+ GetLastItem(lastItemPos);
+
+ if (itemPos.groupIndex == lastItemPos.groupIndex && itemPos.itemIndex == lastItemPos.itemIndex)
+ {
+ return false;
+ }
+
+ continue;
+ }
if (pItem->GetBoundsF().y + pItem->GetBoundsF().height > GetScrollPosition() + __pTableView->GetBoundsF().height)
{
ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
bool
_TableViewPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
{
+ if (!__pTableView->IsFocusModeStateEnabled())
+ {
+ return false;
+ }
+
_KeyCode keyCode = keyInfo.GetKeyCode();
if (keyCode == _KEY_UP || keyCode == _KEY_DOWN)
void
_TableViewPresenter::OnDrawFocus(void)
{
+ if (!__pTableView->IsFocusModeStateEnabled())
+ {
+ return;
+ }
+
_Control* pFocusedControl = null;
_Window* pTop = __pTableView->GetRootWindow();
if (pTop)
#include "FUi_CoordinateSystemUtils.h"
#include "FUi_AccessibilityContainer.h"
#include "FUi_AccessibilityElement.h"
+#include "FUiAnim_VisualElementImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Runtime;
pTokenElement->SetAnimationProvider(null);
if (pToken->isImplicitAnimation)
{
- VisualElementAnimation* pAnimation = CreateAnimationN(*pTokenElement, true);
+ VisualElementAnimation* pAnimation = CreateAnimationN(*pTokenElement);
pTokenElement->AddAnimation(*pAnimation);
delete pAnimation;
pToken->isImplicitAnimation = false;
}
VisualElementAnimation*
-_TokenEditPresenter::CreateAnimationN(VisualElement& source, bool create)
+_TokenEditPresenter::CreateAnimationN(VisualElement& source)
{
VisualElementAnimation* pAnimation = null;
VisualElementAnimationGroup* pAnimationGroup = new (std::nothrow) VisualElementAnimationGroup();
SysTryReturn(NID_UI_CTRL, pOpacityAnimation, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
pOpacityAnimation->SetPropertyName("opacity");
- if (!create)
- {
- pOpacityAnimation->SetStartValue(Variant(1.0f));
- pOpacityAnimation->SetEndValue(Variant(0.0f));
- }
- else
- {
- pOpacityAnimation->SetStartValue(Variant(0.0f));
- pOpacityAnimation->SetEndValue(Variant(1.0f));
- }
+
+ pOpacityAnimation->SetStartValue(Variant(0.0f));
+ pOpacityAnimation->SetEndValue(Variant(1.0f));
pOpacityAnimation->SetDuration(ANIMATION_DURATION_OPACITY);
pOpacityAnimation->SetTimingFunction(__pTimingFunction);
startValue.width = startValue.width * 0.9;
startValue.height = startValue.height * 0.9;
- if (!create)
- {
- pBoundsAnimation->SetStartValue(Variant(source.GetBounds()));
- pBoundsAnimation->SetEndValue(Variant(startValue));
- pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
- }
- else
- {
- pBoundsAnimation->SetStartValue(Variant(startValue));
- pBoundsAnimation->SetEndValue(Variant(source.GetBounds()));
- }
+ pBoundsAnimation->SetStartValue(Variant(startValue));
+ pBoundsAnimation->SetEndValue(Variant(source.GetBounds()));
pBoundsAnimation->SetDuration(ANIMATION_DURATION_BOUNDS);
pBoundsAnimation->SetTimingFunction(__pTimingFunction);
_Token* pToken = null;
_VisualElement* pTokenVisualElement = null;
+
if (__animatingIndex == (GetTokenCount() - 1))
{
pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1));
{
pTokenVisualElement = pToken->GetVisualElement();
SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
- pTokenVisualElement->RemoveAnimation(L"TokenAnimation");
+ pTokenVisualElement->RemoveAllAnimations();
}
}
+
pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1));
if (pToken)
{
if (pTokenVisualElement && __animatingIndex >= 0)
{
__isAnimationInProgress = true;
- VisualElementAnimation* pAnimation = CreateAnimationN(*pTokenVisualElement, false);
- pTokenVisualElement->AddAnimation(L"TokenAnimation", *pAnimation);
- delete pAnimation;
+ PerformRemoveTokenAnimation(*pTokenVisualElement);
}
}
}
void
+_TokenEditPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue)
+{
+ VisualElementValueAnimation* pAnimation = dynamic_cast< VisualElementValueAnimation* >(const_cast< VisualElementAnimation* >(&animation));
+ VisualElement* pPresentation = const_cast< VisualElement* >(target.AcquirePresentationInstance());
+
+ if (pPresentation && pAnimation)
+ {
+ float diffX = 0.0f;
+ float diffY = 0.0f;
+
+ diffX = pPresentation->GetBounds().x;
+ diffY = pPresentation->GetBounds().y;
+
+ Variant newBounds(FloatRectangle(diffX, diffY, currentValue.ToFloatRectangle().width, currentValue.ToFloatRectangle().height));
+ _VisualElementImpl::GetInstance(*pPresentation)->SetProperty(VePropBounds, newBounds);
+ }
+ else
+ {
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get presentation instance of visual element.");
+ }
+
+ target.ReleasePresentationInstance();
+}
+
+void
_TokenEditPresenter::OnTimerExpired(Timer& timer)
{
Timer* onTimer = &timer;
return;
}
+void
+_TokenEditPresenter::PerformRemoveTokenAnimation(VisualElement& source)
+{
+ if (__pTimingFunction == null)
+ {
+ __pTimingFunction = new (std::nothrow) SineTimingFunction();
+ SysTryReturnVoidResult(NID_UI_CTRL, __pTimingFunction, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+ }
+
+ AnimationTransaction::Begin();
+
+ VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+ SysTryReturnVoidResult(NID_UI_CTRL, pOpacityAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ pOpacityAnimation->SetPropertyName("opacity");
+ pOpacityAnimation->SetStartValue(Variant(1.0f));
+ pOpacityAnimation->SetEndValue(Variant(0.0f));
+
+ pOpacityAnimation->SetDuration(ANIMATION_DURATION_OPACITY);
+ pOpacityAnimation->SetTimingFunction(__pTimingFunction);
+
+ source.AddAnimation("OpacityAnimation", *pOpacityAnimation);
+ delete pOpacityAnimation;
+
+ VisualElementValueAnimation* pBoundsAnimation = new (std::nothrow) VisualElementValueAnimation(); //deletion will happen in catch/ in Destroy animation
+ SysTryReturnVoidResult(NID_UI_CTRL, pBoundsAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+ pBoundsAnimation->SetTimingFunction(__pTimingFunction);
+ FloatRectangle startValue = source.GetBounds();
+ startValue.x = startValue.x + startValue.width * 0.05;
+ startValue.y = startValue.y + startValue.height * 0.05;
+ startValue.width = startValue.width * 0.9;
+ startValue.height = startValue.height * 0.9;
+
+ pBoundsAnimation->SetStartValue(Variant(source.GetBounds()));
+ pBoundsAnimation->SetEndValue(Variant(startValue));
+ pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
+ pBoundsAnimation->SetVisualElementAnimationTickEventListener(this);
+ pBoundsAnimation->SetDuration(ANIMATION_DURATION_BOUNDS);
+ source.AddAnimation(L"BoundsAnimation", *pBoundsAnimation);
+ delete pBoundsAnimation;
+
+ AnimationTransaction::Commit();
+
+ return;
+}
+
}}} //Tizen::Ui::Controls
return E_SUCCESS;
}
+#if 1
result
_Toolbar::SetTransparent(bool transparent)
{
return E_SUCCESS;
}
+#endif
+
+#if 0
+result
+_Toolbar::SetTransparent(bool transparent)
+{
+ if (__style == TOOLBAR_SOFTKEY)
+ {
+ return E_SUCCESS;
+ }
+
+ __transparent = transparent;
+
+ InitToolbarColor();
+
+ Bitmap* pMagentaBackgroundBitmap = null;
+
+ if (__isUserBackgroundBitmap == false)
+ {
+ if (__pToolbarBackgroundBitmap)
+ {
+ delete __pToolbarBackgroundBitmap;
+ __pToolbarBackgroundBitmap = null;
+ }
+
+ if (__pToolbarBackgroundEffectBitmap)
+ {
+ delete __pToolbarBackgroundEffectBitmap;
+ __pToolbarBackgroundEffectBitmap = null;
+ }
+
+ if (__transparent == true)
+ {
+ if (__header == true)
+ {
+ GET_BITMAP_CONFIG_N(HEADER::TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap);
+
+ bool customTheme = IS_CUSTOM_BITMAP(HEADER::TRANSLUCENT_BG_NORMAL);
+ if (customTheme == false)
+ {
+ GET_BITMAP_CONFIG_N(HEADER::TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap);
+ }
+ }
+ else
+ {
+ GET_BITMAP_CONFIG_N(FOOTER::TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap);
+
+ bool customTheme = IS_CUSTOM_BITMAP(FOOTER::TRANSLUCENT_BG_NORMAL);
+ if (customTheme == false)
+ {
+ GET_BITMAP_CONFIG_N(FOOTER::TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap);
+ }
+ }
+ }
+ else
+ {
+ if (__header == true)
+ {
+ GET_BITMAP_CONFIG_N(HEADER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap);
+
+ bool customTheme = IS_CUSTOM_BITMAP(HEADER::BG_NORMAL);
+ if (customTheme == false)
+ {
+ GET_BITMAP_CONFIG_N(HEADER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap);
+ }
+ }
+ else
+ {
+ GET_BITMAP_CONFIG_N(FOOTER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap);
+
+ bool customTheme = IS_CUSTOM_BITMAP(FOOTER::BG_NORMAL);
+ if (customTheme == false)
+ {
+ GET_BITMAP_CONFIG_N(FOOTER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap);
+ }
+ }
+ }
+
+ if (__transparent == true)
+ {
+ __isUserBackgroundBitmap = true;
+
+ Color tempColor;
+
+ if (__header == true)
+ {
+ GET_COLOR_CONFIG(HEADER::TRANSLUCENT_BG_NORMAL, tempColor);
+ }
+ else
+ {
+ GET_COLOR_CONFIG(FOOTER::TRANSLUCENT_BG_NORMAL, tempColor);
+ }
+
+ if (pMagentaBackgroundBitmap)
+ {
+ __pToolbarBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pMagentaBackgroundBitmap),
+ Color::GetColor(COLOR_ID_MAGENTA), tempColor);
+
+ if (__pToolbarBackgroundBitmap)
+ {
+ __pToolbarBackgroundBitmap->SetAlphaConstant(0x7F);
+ }
+ }
+
+ SetTitleTextColor(__transTitleTextColor);
+ SetDescriptionTextColor(__transDescriptionTextColor);
+
+ for (int i = 0; i < __itemCount ; i ++)
+ {
+ if (__pItems.at(i) != null)
+ {
+ ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i));
+ }
+ }
+
+ for (int i = 0; i < BUTTON_MAX; i++)
+ {
+ if (__pButtonItems[i] != null)
+ {
+ ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
+ }
+ }
+ }
+ else // not transparent
+ {
+ __isUserBackgroundBitmap = false;
+
+ __pToolbarBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pMagentaBackgroundBitmap),
+ Color::GetColor(COLOR_ID_MAGENTA), GetColor());
+
+ SetTitleTextColor(__titleTextColor);
+ SetDescriptionTextColor(__descriptionTextColor);
+
+ for (int i = 0; i < __itemCount ; i ++)
+ {
+ if (__pItems.at(i) != null)
+ {
+ ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i));
+ }
+ }
+
+ for (int i = 0; i < BUTTON_MAX; i++)
+ {
+ if (__pButtonItems[i] != null)
+ {
+ ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
+ }
+ }
+ }
+ }
+ else // __isUserBackgroundBitmap == true
+ {
+ if (__transparent == true)
+ {
+ SetTitleTextColor(__transTitleTextColor);
+ SetDescriptionTextColor(__transDescriptionTextColor);
+
+ for (int i = 0; i < __itemCount ; i ++)
+ {
+ if (__pItems.at(i) != null)
+ {
+ ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i));
+ }
+ }
+
+ for (int i = 0; i < BUTTON_MAX; i++)
+ {
+ if (__pButtonItems[i] != null)
+ {
+ ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
+ }
+ }
+ }
+ else // not transparent
+ {
+ SetTitleTextColor(__titleTextColor);
+ SetDescriptionTextColor(__descriptionTextColor);
+
+ for (int i = 0; i < __itemCount ; i ++)
+ {
+ if (__pItems.at(i) != null)
+ {
+ ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i));
+ }
+ }
+
+ for (int i = 0; i < BUTTON_MAX; i++)
+ {
+ if (__pButtonItems[i] != null)
+ {
+ ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]);
+ }
+ }
+ }
+ }
+
+ delete pMagentaBackgroundBitmap;
+
+ return E_SUCCESS;
+}
+#endif
result
_Toolbar::SetWaitingAnimationPosition(ToolbarAnimationPosition animationPos, float x, float y)
{
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
{
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
}
else // itemCount != 0
{
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
{
__highlightedItemIndex = GetSelectedItemIndex();
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
}
}
else // not segmented
}
else
{
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
}
else
{
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
{
if (__highlightedItemIndex < __itemCount)
{
- if(__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
{
if (__highlightedItemIndex < (__itemCount - 1)) // 0,1
{
- if (__pItems.at(__highlightedItemIndex) != null)
+ if (__highlightedItemIndex == selectedItemIndex)
{
- if (__highlightedItemIndex == selectedItemIndex)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
}
}
- else
+ }
+ else
+ {
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
}
}
+ }
- __highlightedItemIndex++;
+ __highlightedItemIndex++;
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
+ {
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
{
if (__highlightedItemIndex == __itemCount - 1)
{
- if (__pItems.at(__highlightedItemIndex) != null)
+ if (__highlightedItemIndex == selectedItemIndex)
{
- if (__highlightedItemIndex == selectedItemIndex)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
}
}
- else
+ }
+ else
+ {
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__highlightedItemIndex = 0;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
else if (__highlightedItemIndex < __itemCount - 1)
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
__highlightedItemIndex++;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
else if (__highlightedItemIndex == __itemCount -1)
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
__highlightedItemIndex = 0;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
else if (__highlightedItemIndex < __itemCount - 1)
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
__highlightedItemIndex++;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
}
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
__highlightedItemIndex++;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
else if (__highlightedItemIndex == __itemCount -1)
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
__highlightedItemIndex++;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
- if (__highlightedItemIndex - __pToolbarPresenter->GetFirstLoadedItemIndex() == SEGMENTED_ITEM_MAX)
- {
- if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
+ if (__highlightedItemIndex - __pToolbarPresenter->GetFirstLoadedItemIndex() == SEGMENTED_ITEM_MAX)
{
- __pToolbarPresenter->SetItemFit(__highlightedItemIndex - (SEGMENTED_ITEM_MAX - 1));
+ if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
+ {
+ __pToolbarPresenter->SetItemFit(__highlightedItemIndex - (SEGMENTED_ITEM_MAX - 1));
+ }
}
}
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
}
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
}
}
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
else if (__highlightedItemIndex > 0)
{
- if (__pItems.at(__highlightedItemIndex) != null)
+ if (__highlightedItemIndex == selectedItemIndex)
{
- if (__highlightedItemIndex == selectedItemIndex)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
}
}
- else
+ }
+ else
+ {
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
}
}
+ }
- __highlightedItemIndex--;
+ __highlightedItemIndex--;
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
+ {
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
__highlightedItemIndex--;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
else if (__highlightedItemIndex == __itemCount + 1)
__highlightedItemIndex = __itemCount - 1;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
}
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
__highlightedItemIndex--;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
}
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
__highlightedItemIndex--;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
else if (__highlightedItemIndex == __itemCount)
__highlightedItemIndex--;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
}
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ }
}
}
__highlightedItemIndex--;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false);
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
- if (__pToolbarPresenter->GetFirstLoadedItemIndex() > __highlightedItemIndex)
- {
- if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
+ if (__pToolbarPresenter->GetFirstLoadedItemIndex() > __highlightedItemIndex)
{
- __pToolbarPresenter->SetItemFit(__highlightedItemIndex);
+ if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
+ {
+ __pToolbarPresenter->SetItemFit(__highlightedItemIndex);
+ }
}
}
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ else
+ {
+ OnKeyReleased(source, keyInfo);
+ }
}
}
}
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex))
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
{
if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
|| __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- SetItemHighlighted(__highlightedItemIndex, true, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ SetItemHighlighted(__highlightedItemIndex, true, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
}
}
}
if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
|| __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- SetItemHighlighted(__highlightedItemIndex, true, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ SetItemHighlighted(__highlightedItemIndex, true, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
}
}
}
if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
|| __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- SetItemHighlighted(__highlightedItemIndex, true, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ SetItemHighlighted(__highlightedItemIndex, true, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
}
}
}
if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
|| __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- SetItemHighlighted(__highlightedItemIndex, true, false);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ SetItemHighlighted(__highlightedItemIndex, true, false);
+ }
}
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
- __lastHighlightedItemIndex = __highlightedItemIndex;
- __highlighted = true;
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+
+ __lastHighlightedItemIndex = __highlightedItemIndex;
+ __highlighted = true;
+ }
}
}
}
{
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+ }
}
}
else if (__highlightedItemIndex == __itemCount)
{
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+ }
}
}
else if (__highlightedItemIndex == __itemCount)
{
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+ }
}
}
else if (__highlightedItemIndex == __itemCount)
{
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex))
{
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+ if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ {
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED);
+ }
}
}
}
}
else
{
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth , vmargin,
+ __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin,
headerRightButtonWidth, headerButtonItemHeight));
__pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
headerLeftButtonWidth, headerButtonItemHeight));
}
else
{
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth , vmargin,
+ __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin,
headerRightButtonWidth, headerButtonItemHeight));
__pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin,
headerLeftButtonWidth, headerButtonItemHeight));
}
else
{
- __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth , vmargin,
+ __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth + 1, vmargin,
headerRightButtonWidth, headerButtonItemHeight));
if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE)
}
else
{
- __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth , vmargin,
+ __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth + 1, vmargin,
headerLeftButtonWidth, headerButtonItemHeight));
if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE)
if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button
{
blockWidth[0] = blockWidth[1] = (GetSizeF().width - dividerWidth ) / 2;
+
+ blockWidth[1] += 1;
}
else
{
__pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0] + dividerWidth, vmargin, blockWidth[1], segmentedItemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],vmargin, blockWidth[2], segmentedItemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(GetSizeF().width - blockWidth[2],vmargin, blockWidth[2] + 2, segmentedItemHeight));
}
else
{
__pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + dividerWidth * 2,
vmargin, blockWidth[2], segmentedItemHeight));
__pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
- vmargin, GetSizeF().width - (blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3), segmentedItemHeight));
+ vmargin, blockWidth[3] + 1, segmentedItemHeight));
}
else
{
else
{
__pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] + 1, segmentedItemHeight));
}
}
else
else
{
__pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] + 1, segmentedItemHeight));
}
}
__pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
- (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight));
+ (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 2, segmentedItemHeight));
}
}
else
__pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
- (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight));
+ (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2] + 2, segmentedItemHeight));
}
}
__pItems.at(2)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
(GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight));
__pItems.at(3)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
- (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[3], segmentedItemHeight));
+ (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[3] + 1, segmentedItemHeight));
for (int i = 0; i < __itemCount ; i++)
{
itemWidth[0] = itemWidth[1] = (__itemArea.width - tabLeftMargin * 2 - dividerWidth) / 2;
__pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1], segmentedItemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1] + 1, segmentedItemHeight));
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30
__pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin, vmargin, itemWidth[0], segmentedItemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + dividerWidth, vmargin, itemWidth[1], segmentedItemHeight));
- __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + dividerWidth * 2, vmargin, itemWidth[2], segmentedItemHeight));
+ __pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + dividerWidth * 2, vmargin, itemWidth[2] + 2, segmentedItemHeight));
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26
__pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + dividerWidth * 2,
vmargin, itemWidth[2], segmentedItemHeight));
__pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + itemWidth[0] + itemWidth[1] + itemWidth[2] + dividerWidth * 3,
- vmargin, itemWidth[3], segmentedItemHeight));
+ vmargin, itemWidth[3] + 1, segmentedItemHeight));
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize); // 24
GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24
else
{
__pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight));
}
}
else
else
{
__pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
- __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
+ __pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight));
}
}
__pItems.at(0)->SetBounds(FloatRectangle(dividerWidth + tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
- (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
+ (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight));
}
}
else
__pItems.at(0)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight));
__pItems.at(1)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight));
__pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
- (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
+ (GetSizeF().height - itemHeight) / 2, blockWidth[2] + 2, itemHeight));
}
}
__pItems.at(2)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + dividerWidth * 2,
(GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight));
__pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
- (GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight));
+ (GetSizeF().height - itemHeight) / 2, blockWidth[3] + 1, itemHeight));
for (int i = 0; i < __itemCount; i++)
{
__pItems.at(3)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + dividerWidth * 3,
(GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight));
__pItems.at(4)->SetBounds(FloatRectangle(tabLeftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2] + blockWidth[3] + dividerWidth * 4,
- (GetSizeF().height - itemHeight) / 2, blockWidth[4], itemHeight));
+ (GetSizeF().height - itemHeight) / 2, blockWidth[4] + 1, itemHeight));
for (int i = 0; i < __itemCount; i++)
{
pCanvas->SetBackgroundColor(backgroundColor);
pCanvas->Clear();
- if (style == TOOLBAR_TITLE || style == TOOLBAR_HEADER_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
+ if (style == TOOLBAR_TITLE || style == TOOLBAR_HEADER_SEGMENTED)
+ {
+ if (__pToolbar->GetButton(RIGHT_BUTTON))
+ {
+ if (__pToolbar->GetButton(LEFT_BUTTON))
+ {
+ DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
+ (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+
+ DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap
+ - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap,
+ (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+ }
+ else
+ {
+ DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
+ (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+ }
+ }
+ else
+ {
+ if (__pToolbar->GetButton(LEFT_BUTTON))
+ {
+ DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap,
+ (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
+ }
+ }
+ }
+ else if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE)
{
if (__pToolbar->GetButton(RIGHT_BUTTON))
{
if (__pToolbar->GetButton(RIGHT_BUTTON))
{
DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap,
- dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
+ (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
}
if (__pToolbar->GetButton(LEFT_BUTTON))
{
DrawDividerLine(FloatPoint(__pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width,
- dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas);
+ (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas);
}
}
float textDimWidth = 0.0f;
float textDimHeight = 0.0f;
+ float leftMargin = 0.0f;
GET_SHAPE_CONFIG(HEADER::TAB_TEXT_DIM_WIDTH, __pToolbar->GetOrientation(), textDimWidth);
+ GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, __pToolbar->GetOrientation(), leftMargin);
ToolbarStyle style = __pToolbar->GetStyle();
{
if (__pToolbar->GetDescriptionText() != L"")
{
- textDimHeight = __titleRect.height;
+ textDimHeight = __titleRect.height + __titleRect.y;
}
else
{
}
}
- Color titleTextDimColor;
- GET_COLOR_CONFIG(HEADER::TITLE_TEXT_DIM_NORMAL, titleTextDimColor);
+ //Color titleTextDimColor;
+ //GET_COLOR_CONFIG(HEADER::TITLE_TEXT_DIM_NORMAL, titleTextDimColor);
Bitmap* pTitleTextDimLeftBitmap = null;
GET_BITMAP_CONFIG_N(HEADER::TITLE_TEXT_DIM_EFFECT_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, pTitleTextDimLeftBitmap);
Bitmap* pReColorTitleTextDimLeftBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTitleTextDimLeftBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), titleTextDimColor);
+ Color::GetColor(COLOR_ID_MAGENTA), __pToolbar->GetColor());
if (pReColorTitleTextDimLeftBitmap)
{
Canvas* pCanvas = __pToolbar->GetCanvasN();
FloatRectangle bounds = FloatRectangle(0.0f, 0.0f, textDimWidth, textDimHeight);
+ if (__pToolbar->GetTitleIcon() != null)
+ {
+ bounds.x += __titleRect.x;
+ }
+
if (pCanvas == null)
{
SysLog(NID_UI_CTRL, "Cannot get a canvas.");
+
+ delete pReColorTitleTextDimLeftBitmap;
+
return;
}
FloatRectangle(0.0f, 0.0f, pReColorTitleTextDimLeftBitmap->GetWidthF(), pReColorTitleTextDimLeftBitmap->GetHeightF()));
}
- delete pTitleTextDimLeftBitmap;
delete pReColorTitleTextDimLeftBitmap;
delete pCanvas;
}
GET_BITMAP_CONFIG_N(HEADER::TITLE_TEXT_DIM_EFFECT_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, pTitleTextDimRightBitmap);
Bitmap* pReColorTitleTextDimRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTitleTextDimRightBitmap,
- Color::GetColor(COLOR_ID_MAGENTA), titleTextDimColor);
+ Color::GetColor(COLOR_ID_MAGENTA), __pToolbar->GetColor());
if (pReColorTitleTextDimRightBitmap)
{
Canvas* pCanvas = __pToolbar->GetCanvasN();
FloatRectangle bounds = FloatRectangle(__titleRect.width, 0.0f, textDimWidth, textDimHeight);
+ if (__pToolbar->GetTitleIcon() != null)
+ {
+ bounds.x += (__titleRect.x - leftMargin);
+ }
+
if (pCanvas == null)
{
SysLog(NID_UI_CTRL, "Cannot get a canvas.");
+
+ delete pReColorTitleTextDimRightBitmap;
return;
}
FloatRectangle(0.0f, 0.0f, pReColorTitleTextDimRightBitmap->GetWidthF(), pReColorTitleTextDimRightBitmap->GetHeightF()));
}
- delete pTitleTextDimRightBitmap;
delete pReColorTitleTextDimRightBitmap;
delete pCanvas;
}
#include <FGrpFloatRectangle.h>
#include "FUiAnim_NativeLayer.h"
+//#define USE_WORKAROUND
+
namespace Tizen { namespace Ui { namespace Animations
{
void SetOpacity(float opacity);
float GetOpacity(void);
+ result SetRotation(int angle);
+ result SetInternalBounds(void);
+
+ void SetOwner(_EflLayer* pOwner);
+
+ int GetRotation(void);
+
+ _RootVisualElement* GetRootVisualElement(void) const
+ {
+ return _pRootVisualElement;
+ }
+
Evas* GetEvas(void) const
{
return _pEvas;
return _pWindow;
}
- void SetEvasRenderNeeded(void)
- {
- _needEvasRender = 1;
- }
-
- void SetVisibilityChangeCompleted(void)
- {
- _isVisibilityChangeInProgress = false;
- }
-
bool IsAsyncVisibilityChangeNeeded(void) const
{
return _needAsyncVisibilityChangeRequest;
virtual result Configure(_RootVisualElement& rootElement);
protected:
+ _RootVisualElement* _pRootVisualElement;
Evas* _pEvas;
Ecore_Evas* _pEcoreEvas;
Evas_Object* _pWindow;
- Ecore_Event_Handler* _pOnWindowDamagedHandler;
- Ecore_Event_Handler* _pOnWindowConfiguredHandler;
- Ecore_Event_Handler* _pOnWindowHideHandler;
- Ecore_Event_Handler* _pOnWindowShowHandler;
- int _needEvasRender;
+ bool _needBoundsChangeRequest;
bool _needShowStateChangeRequest;
bool _isShow;
- bool _isVisibilityChangeInProgress;
bool _needAsyncVisibilityChangeRequest;
bool _isMainType;
bool _needRender;
-
static int _countOfLayer;
+ Ecore_Event_Handler* _pOnWindowDamagedHandler;
+ Ecore_Event_Handler* _pOnWindowConfiguredHandler;
+ Ecore_Event_Handler* _pOnWindowHideHandler;
+ Ecore_Event_Handler* _pOnWindowShowHandler;
private:
bool __isWinObject;
+ Tizen::Graphics::FloatRectangle __bounds;
};
}}} //namespace Tizen { namespace Ui { namespace Animations
float __onOffHandlerPosition;
bool __onOffHandlerPressed;
bool __onOffHandlerMoved;
+ int __highlightedIndex;
+ bool __detailedPressed;
}; // _CheckButtonPresenter
}}} // Tizen::Ui::Controls
virtual result AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
virtual result InsertItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
virtual result SetItem(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
+ void CalculateItemSize(const Base::String& text, ContextMenuItemDrawingType itemType, Tizen::Graphics::FloatDimension &textArea, Tizen::Graphics::FloatDimension &itemSize);
virtual result DeleteItem(int index);
virtual result DeleteItemAll(void);
virtual int CalculateShowItemCount(void);
_ContextMenuItem* CreateItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const;
+ void CalculateItemMaximumWidth(void);
private:
_ContextMenuListPresenter(const _ContextMenuListPresenter& rhs);
virtual void OnBoundsChanged(void);
virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
virtual void OnVisibleStateChanged(void);
+ void OnFormActivated(void);
// Focus UI
Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
virtual void ResetFocusList(void);
virtual Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
virtual _Control* GetFocusTraversalControl(_Control* pControl) const;
- virtual void SetFocusTraversalControl(_Control* pControl);
+ virtual void SetFocusTraversalControl(_Control* pControl, bool on);
// Focus
virtual _Control* GetFocusControl(const _Control* pControl) const;
GALLERY_VIEW_EVENT_TOUCH_DOUBLE_PRESSED,
GALLERY_VIEW_EVENT_TOUCH_MOVED,
GALLERY_VIEW_EVENT_TOUCH_PINCH_ZOOM,
- GALLERY_VIEW_EVENT_TOUCH_FLICK
+ GALLERY_VIEW_EVENT_TOUCH_FLICK,
+ GALLERY_VIEW_EVENT_TOUCH_CANCELED
};
class _GalleryViewEventInfo;
bool OnTouchPinchZoom(_GalleryViewEventInfo& eventInfo);
bool OnTouchMoved(_GalleryViewEventInfo& eventInfo);
bool OnTouchFlicked(_GalleryViewEventInfo& eventInfo);
- bool ResetTouch();
+ bool OnTouchCanceled(void);
+ bool ResetTouch(void);
//notiListener
virtual void OnTransitionCancel(void);
virtual void OnBoundsChanged(void);
virtual void OnSettingChanged(Tizen::Base::String& key);
+ virtual void OnDrawFocus(void);
virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
+ virtual void OnDrawFocus(void);
bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
virtual result ApplyColorProperty(void);
int GetSubItemIndexFromActionId(int actionId) const;
int GetSubItemActionIdAt(int mainIndex, int subIndex) const;
- Tizen::Graphics::FloatDimension GetMainItemMaximumWidth(void);
+ void CalculateItemMaximumWidth(void);
+ void CalculateItemSize(const Base::String& text, OptionMenuItemDrawingType itemType, Tizen::Graphics::FloatDimension &textArea, Tizen::Graphics::FloatDimension &itemSize);
virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds);
virtual void OnBoundsChanged(void);
+ virtual void OnDrawFocus(void);
virtual bool IsLayoutChangable(void) const;
virtual void OnOwnerChanged(_Control* pOldOwner);
virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
virtual void OnSettingChanged(Tizen::Base::String& key);
+ virtual void OnDrawFocus(void);
+
public:
result AddProgressPopupEventListener(const Tizen::Ui::Controls::_IProgressPopupEventListener& listener);
protected:
_ScrollPanel(void);
- virtual result Initialize(const _ScrollPanelPresenter& presenter);
+ virtual result Initialize(const _ScrollPanelPresenter& presenter, bool acquireHandle = true);
// Accessor
virtual result SetScrollPanelPresenter(const _ScrollPanelPresenter* presenter);
: public Tizen::Ui::Controls::_EditPresenter
, virtual public Tizen::Base::Runtime::IEventListener
, public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener
+ , public Tizen::Ui::Animations::IVisualElementAnimationTickEventListener
{
public:
_TokenEditPresenter(void);
float GetLineSpacingF() const;
- Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationN(Tizen::Ui::Animations::VisualElement& source, bool create);
+ Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationN(Tizen::Ui::Animations::VisualElement& source);
virtual bool IsGuideTextActivated(void) const;
virtual void DrawText(void);
virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally);
virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount){}
virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target){}
+ virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue);
+
void OnBoundsChanged(void);
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
void SetDrawFocusState(bool focusState);
int GetFocusedTokenIndex(void) const;
void PrepareFocusUiMode(void);
+ void PerformRemoveTokenAnimation(Tizen::Ui::Animations::VisualElement& source);
private:
bool DrawToken(int count = -1);
result OpenWindow(_Window& window, bool invalidate);
result CloseWindow(_Window& window);
+// For control list
+ _Control* GetControl(int index) const;
+ int GetControlCount(void) const;
+
// Orientation
_ControlOrientation GetOrientation(void) const;
void SetOrientation(_ControlOrientation orientation);
Tizen::Base::_ObjectManagerT <_Control> __objectManager;
Tizen::Base::Collection::LinkedListT<_Window*>* __pWindowList;
Tizen::Base::Collection::LinkedListT<_Window*>* __pAllWindowList;
+ Tizen::Base::Collection::LinkedListT<_Control*>* __pAllControlList;
bool __isCoordinateSystemLogical;
int __logicalCoordinateSystem;
static void ReleaseInstance(void);
bool IsFocusModeStateEnabled(void) const;
+ bool IsForwardDirection(void) const;
private:
/**
static _FocusManagerImpl* __pInstance;
Tizen::Ui::_Control* __pCurrentFocusUiControl;
bool __isFocusMode;
+ FocusDirection __focusDirection;
}; // _FocusManagerImpl
}}//Tizen::Ui
virtual Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
virtual void ResetFocusList(void);
virtual _Control* GetFocusTraversalControl(_Control* pControl) const;
- virtual void SetFocusTraversalControl(_Control* pControl);
+ virtual void SetFocusTraversalControl(_Control* pControl, bool on);
// Dimming
result SetDimmingEnabled(bool enabled);
const char* key ="TOKENEDIT::BG_NORMAL";
__pImageKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_IMAGE);
}
+ {
+ const char* key ="EXPANDABLEEDITAREA::BG_NORMAL";
+ __pImageKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_IMAGE);
+ }
}
return __pImageKeyTable;
}
const char* key ="TOKENEDIT::GUIDE_TEXT_NORMAL";
__pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::GUIDE_TEXT_NORMAL_COLOR);
}
+ {
+ const char* key ="EXPANDABLEEDITAREA::BG_NORMAL";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::BG_SELECTED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_SELECTED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::BG_HIGHLIGHTED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_HIGHLIGHTED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::BG_DISABLED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_DISABLED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::TEXT_NORMAL";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_NORMAL_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::TEXT_SELECTED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_SELECTED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::TEXT_HIGHLIGHTED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_HIGHLIGHTED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::TEXT_DISABLED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_DISABLED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_NORMAL";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_NORMAL_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_PRESSED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_PRESSED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_HIGHLIGHTED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_HIGHLIGHTED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_DISABLED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_DISABLED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::EDIT_BG_NORMAL";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_NORMAL_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::EDIT_BG_PRESSED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_PRESSED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::EDIT_BG_HIGHLIGHTED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_HIGHLIGHTED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::EDIT_BG_DISABLED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_DISABLED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_NORMAL";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_NORMAL_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_PRESSED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_PRESSED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_HIGHLIGHTED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_HIGHLIGHTED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_DISABLED";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_DISABLED_COLOR);
+ }
+ {
+ const char* key ="EXPANDABLEEDITAREA::GUIDE_TEXT_NORMAL";
+ __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::GUIDE_TEXT_NORMAL_COLOR);
+ }
}
return __pColorKeyTable;
}
ADD_COLOR_CONFIG(TAB_TEXT_DIM_NORMAL, $B0514);
ADD_COLOR_CONFIG(TAB_TEXT_DIM_TRANSLUCENT_NORMAL, $B013);
- ADD_COLOR_CONFIG(TITLE_TEXT_DIM_NORMAL, $B0511);
+ //ADD_COLOR_CONFIG(TITLE_TEXT_DIM_NORMAL, $B0511);
ADD_COLOR_CONFIG(TITLE_TEXT_DIM_TRANSLUCENT_NORMAL, $B013);
ADD_COLOR_CONFIG(SUB_TITLE_EFFECT_NORMAL, $B0511);
}
if (doAnimation)
{
- ReserveDestroyingScene(previousSceneId); // Destroy the Scene after animator finished(stopped).
+ ReserveDestroyingScene(previousSceneId); // Destroy the Scene after animator finished(stopped).
}
else
{