bool _GetScreenShot(int depth, unsigned char*& pOutBuffer, int& screenWidth, int& screenHeight);
_Bitmap::_Bitmap(void)
- : __magicKey(0)
- , __timeStamp(0)
+ : __timeStamp(0)
, __opacity(255)
, __isOpaqueAllOver(0)
, __hasOwnership(true)
, __pUnlockCallbackFunc(null)
, __pUnlockCallbackParam(null)
{
- _Util::CarveMagicKey(*this, __magicKey);
}
_Bitmap::~_Bitmap(void)
{
delete[] __pBuffer;
}
-
- _Util::EraseMagicKey(*this, __magicKey);
}
result
result __Unlock(void);
private:
- unsigned long __magicKey;
unsigned long __timeStamp;
int __opacity;
long __isOpaqueAllOver;
////////////////////////////////////////////////////////////////////////////////
_BitmapImpl::_BitmapImpl(void)
- : _magicKey(0)
- , _sharedItem(std::tr1::shared_ptr<_SharedItem>(new (std::nothrow)_SharedItem))
+: _sharedItem(std::tr1::shared_ptr<_SharedItem>(new (std::nothrow)_SharedItem))
{
if (this->_sharedItem.get())
{
}
_UpdateBitmapTimeStamp(*this);
-
- _Util::CarveMagicKey(*this, _magicKey);
}
_BitmapImpl::~_BitmapImpl(void)
}
}
}
-
- _Util::EraseMagicKey(*this, _magicKey);
}
bool
_Canvas::_Canvas(void)
- : _magicKey(0)
- , _pNativeGfxEngine(static_cast<void*>(new (std::nothrow)_NativeGfxEngine))
+ : _pNativeGfxEngine(static_cast<void*>(new (std::nothrow)_NativeGfxEngine))
, __pParent(0)
, __pFont(0)
, __pPriorityFont(0)
__ComposeFgColor();
__ComposeBgColor();
-
- _Util::CarveMagicKey(*this, _magicKey);
}
_Canvas::~_Canvas(void)
{
delete static_cast<_NativeGfxEngine*>(_pNativeGfxEngine);
}
-
- _Util::EraseMagicKey(*this, _magicKey);
}
result
bool __IsInClipBounds(const _Util::Rectangle<double>& bounds);
protected:
- unsigned long _magicKey;
void* _pNativeGfxEngine;
private:
{
_CanvasImpl::_CanvasImpl(void)
- : _magicKey(0)
- , _pNativeCanvas(0)
+ : _pNativeCanvas(0)
, _pCoordHolder(0)
, _pFont(0)
, _pPriorityFont(0)
_pCoordHolder = null;
_pNativeCanvas = null;
}
-
- _Util::CarveMagicKey(*this, _magicKey);
}
_CanvasImpl::~_CanvasImpl(void)
delete _pCoordHolder;
delete _pNativeCanvas;
-
- _Util::EraseMagicKey(*this, _magicKey);
}
result
{
_Font::_Font()
- : __magicKey(0)
{
__fontAttrib.Init();
-
- _Util::CarveMagicKey(*this, __magicKey);
}
_Font::_Font(const _Font& obj)
- : __magicKey(0)
{
this->__fontAttrib = obj.__fontAttrib;
this->__sharedFont = obj.__sharedFont;
- _Util::CarveMagicKey(*this, __magicKey);
+ return;
}
_Font::~_Font(void)
{
- _Util::EraseMagicKey(*this, __magicKey);
}
result
result __GetTextExtentList(_TextBidiPropertyWithReorder& bidiProperty, _Util::AccumList<_Util::Pair<int, int> >& outList) const;
private:
- unsigned long __magicKey;
std::tr1::shared_ptr <_IFont> __sharedFont;
_FontAttribute __fontAttrib;
#include "FGrp_FontImpl.h"
#include "FGrp_Font.h"
#include "FGrp_ResUtil.h"
-#include "util/FGrp_Util.h"
using namespace Tizen::Base::Runtime;
_FontImpl::_FontImpl()
- : _magicKey(0)
- , _pCoordHolder(new (std::nothrow) _FontCoordHolder)
+ : _pCoordHolder(new (std::nothrow) _FontCoordHolder)
, _pNativeFont(new (std::nothrow) _Font)
{
if (_pNativeFont == null || _pCoordHolder == null)
_pNativeFont = null;
_pCoordHolder = null;
}
-
- _Util::CarveMagicKey(*this, _magicKey);
}
_FontImpl::_FontImpl(const _FontImpl& obj)
_pNativeFont = null;
_pCoordHolder = null;
}
-
- _Util::CarveMagicKey(*this, _magicKey);
}
_FontImpl::~_FontImpl()
delete _pCoordHolder;
_pCoordHolder = 0;
}
-
- _Util::EraseMagicKey(*this, _magicKey);
}
result
void Move(_SharedItem& source);
};
- unsigned long _magicKey;
std::tr1::shared_ptr<_SharedItem> _sharedItem;
friend class Bitmap;
_CanvasImpl& operator =(const _CanvasImpl& value);
protected:
- unsigned long _magicKey;
_Canvas* _pNativeCanvas;
struct _CanvasCoordHolder* _pCoordHolder;
Font* _pFont;
static bool UpdateDefaultFont(const Tizen::Base::String& key);
protected:
- unsigned long _magicKey;
struct _FontCoordHolder* _pCoordHolder;
Tizen::Graphics::_Font* _pNativeFont;
#include <FUi_WindowImpl.h>
#include <FUiAnim_VisualElementSurfaceImpl.h>
#include <FUiAnim_VisualElementImpl.h>
-#include <FUiAnim_DisplayManager.h>
+
#ifdef __cplusplus
extern "C"
#define FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT
#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT)
-void _RestoreContext(void);
void _PostRenderCallback(Ecore_Evas* ee);
void _SaveCurrentContext(_SglInfo* pSglInfo);
void _UnregisterRenderCallback(Evas_Object* pObject);
if (engineName.Contains(String("opengl_x11")))
{
- _DisplayManager* pDisplayManger = _DisplayManager::GetInstance();
- pDisplayManger->SetRestoreContextCallback(_RestoreContext);
return ENGINE_TYPE_OPENGL_X11;
}
else
if (engineName.Contains(String("opengl_x11")))
{
- _DisplayManager* pDisplayManger = _DisplayManager::GetInstance();
- pDisplayManger->SetRestoreContextCallback(_RestoreContext);
return ENGINE_TYPE_OPENGL_X11;
}
else if (engineName.Contains(String("software_x11")))
#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT)
void
-_RestoreContext(void)
-{
- if (__pPreviousSglInfo != null)
- {
- EGLDisplay display = __pPreviousSglInfo->display;
- EGLSurface surface = __pPreviousSglInfo->surface;
- EGLContext context = __pPreviousSglInfo->context;
-
- if (__isDoublePixmapEnabled)
- {
- _SglInfo* pBackSglInfo = null;
- _SglInfo* pFrontSglInfo = null;
-
- if (__pPreviousSglInfo->isBackbuffer)
- {
- pBackSglInfo = __pPreviousSglInfo;
- pFrontSglInfo = __pPreviousSglInfo->pSecondSglInfo;
- }
- else
- {
- pBackSglInfo = __pPreviousSglInfo->pSecondSglInfo;
- pFrontSglInfo = __pPreviousSglInfo;
- }
-
- surface = pBackSglInfo->surface;
- }
-
- EGLBoolean ret = eglMakeCurrent(display, surface, surface, context);
- SysTryLog(NID_GRP, ret == EGL_TRUE, "fail to restore previous surface and context. %#x %#x %#x %#x egl error:%#x"
- , (unsigned int)display
- , (unsigned int)surface
- , (unsigned int)surface
- , (unsigned int)context
- , (unsigned int)eglGetError());
- }
-}
-
-void
_PostRenderCallback(Ecore_Evas* ee)
{
if (__pPreviousSglInfo != null)
return temp;
}
-////////////////////////////////////////////////////////////////////////////
-// Magic key
-
-namespace
-{
-
-template <typename T>
-struct MagicKey
-{
-};
-
-template <>
-struct MagicKey<_CanvasImpl>
-{
- enum
- {
- TAG = 0xCA01
- };
-};
-
-template <>
-struct MagicKey<_Canvas>
-{
- enum
- {
- TAG = 0xCA03
- };
-};
-
-template <>
-struct MagicKey<_BitmapImpl>
-{
- enum
- {
- TAG = 0xBA01
- };
-};
-
-template <>
-struct MagicKey<_Bitmap>
-{
- enum
- {
- TAG = 0xBA03
- };
-};
-
-template <>
-struct MagicKey<_FontImpl>
-{
- enum
- {
- TAG = 0xF001
- };
-};
-
-template <>
-struct MagicKey<_Font>
-{
- enum
- {
- TAG = 0xF003
- };
-};
-
-}
-
-template <typename T>
-inline void CarveMagicKey(T&, unsigned long& key)
-{
- key = 0xC0DE0000 | MagicKey<T>::TAG;
-}
-
-template <typename T>
-inline void EraseMagicKey(T&, unsigned long& key)
-{
- key = 0xDEAD0000 | MagicKey<T>::TAG;
-}
-
} // Tizen::Graphics::_Util
}} // Tizen::Graphics
ClearLastResult();
_Window* pTop = GetRootWindow();
- if (pTop == null)
+ if (pTop)
{
return false;
}
{
if (pNextFocusControl != pControl)
{
+ pNextFocusControl->SetFocused();
pNextFocusControl->SetFocusModeStateEnabled(true);
pControl->SetFocusModeStateEnabled(false);
- pNextFocusControl->SetFocused();
}
findNextFocusControl = true;
break;
#include <Evas.h>
//#define VE_DEBUG // debug config
-//#define UI_ANIM_DEBUG
#define VE_DEBUG_MODULE
extern "C" _OSP_EXPORT_ void DumpAllEvas(void);
void* _DisplayManager::__pWakeUpEventHandler = null;
bool _DisplayManager::__wakeUpEventAdded = false;
_DisplayManager* _DisplayManager::__pInstance = null;
-_DisplayManager::RestoreContextCallback _DisplayManager::__pRestoreContextCallback = null;
_DisplayManager::_DisplayManager(void)
: __roots()
return E_SUCCESS;
}
-void
-_DisplayManager::SetRestoreContextCallback(RestoreContextCallback pRestoreContextCallback)
-{
- __pRestoreContextCallback = pRestoreContextCallback;
-}
-void
-_DisplayManager::RestoreContext(void)
-{
- if (__pRestoreContextCallback)
- {
- (*__pRestoreContextCallback)();
- }
-}
+
}}} // Tizen::Ui::Animations
#include "FUiAnim_EflNode.h"
#include "FUiAnim_EflLayer.h"
#include "FUiAnim_EflVisualElementSurfaceImpl.h"
-#include "FUiAnim_DisplayManager.h"
using namespace std;
using namespace Tizen::Base;
evas_object_show(__pEvasImage);
evas_object_move(__pEvasImage, -999999, -999999);
#endif
-
- _DisplayManager::RestoreContext();
return;
CATCH:
evas_object_del(__pEvasImage);
__pEvasImage = null;
- _DisplayManager::RestoreContext();
}
_EflVisualElementSurfaceImpl::_EflVisualElementSurfaceImpl(const Handle layer, const Handle object, const Dimension& size)
ClearLastResult();
_EflLayer* pLayer = reinterpret_cast<_EflLayer*>(layer);
- Evas* pEvas = evas_object_evas_get(reinterpret_cast<Evas_Object*>(object));
- if (pLayer->GetEvas() == pEvas)
+ Evas* evas = evas_object_evas_get(reinterpret_cast<Evas_Object*>(object));
+ if (pLayer->GetEvas() == evas)
{
__pEvasImage = reinterpret_cast<Evas_Object*>(object);
}
evas_object_show(__pEvasImage);
evas_object_move(__pEvasImage, -999999, -999999);
#endif
- _DisplayManager::RestoreContext();
}
_EflVisualElementSurfaceImpl::~_EflVisualElementSurfaceImpl(void)
evas_object_del(__pEvasImage);
}
evas_object_smart_member_del(__pEvasImage);
- _DisplayManager::RestoreContext();
}
if (__pBuffer != null)
}
__pBuffer = null;
- _DisplayManager::RestoreContext();
return E_SUCCESS;
}
#include "FUiAnim_MatrixUtil.h"
#include "FUiAnim_Debug.h"
#include "FUiAnim_EflNode.h"
-#include "FUiAnim_EflLayer.h"
#include "FUiAnim_VisualElementSurfaceImpl.h"
#include "FUiAnim_EflVisualElementSurfaceImpl.h"
#include "FUiAnim_DisplayManager.h"
__pSharedData->pSurface->GetBufferInfo(info);
byte* pStart = (byte*)evas_object_image_data_get((Evas_Object*)pSurfImpl->GetNativeHandle(), false);
- _DisplayManager::RestoreContext();
if(pStart)
{
if(pSurfImpl && pSurfImpl->GetNativeHandle() && pSurfImpl->__isImageObject)
{
byte* pStart = (byte*)evas_object_image_data_get((Evas_Object*)pSurfImpl->GetNativeHandle(), false);
- _DisplayManager::RestoreContext();
-
BufferInfo info;
__pSharedData->pSurface->GetBufferInfo(info);
else
{
DrawBackground();
+
+ //Bitmap* pBackgroundBitmap = __pButton->GetBackgroundBitmap(status);
+ //if (pBackgroundBitmap)
+ //{
+ // String imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName();
+ // if (imagePath.IsEmpty() == false && __pButton->GetText() == L"" && __pButton->GetBitmap(status) == null)
+ // {
+ // SysLog(NID_UI_CTRL, "Cannot get a canvas.");
+ // return;
+ // }
+ //}
}
DrawBitmap();
DrawText();
- if ((status == _BUTTON_STATUS_SELECTED && __pButton->GetToolbarItemBackgroundBitmap(_BUTTON_STATUS_SELECTED) == null) ||
- (status == _BUTTON_STATUS_PRESSED && prevStatus == _BUTTON_STATUS_SELECTED && __pButton->GetToolbarItemBackgroundBitmap(_BUTTON_STATUS_PRESSED) == null) ||
- (status == _BUTTON_STATUS_HIGHLIGHTED && prevStatus == _BUTTON_STATUS_SELECTED && __pButton->GetToolbarItemBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED) == null))
+ if ((status == _BUTTON_STATUS_SELECTED || (status == _BUTTON_STATUS_PRESSED && prevStatus == _BUTTON_STATUS_SELECTED)
+ || (status == _BUTTON_STATUS_HIGHLIGHTED && prevStatus == _BUTTON_STATUS_SELECTED))
+ && __pButton->GetToolbarItemBackgroundBitmap(_BUTTON_STATUS_SELECTED) == null)
{
DrawToolbarSelectedBitmap();
}
_KeyCode keyCode = keyInfo.GetKeyCode();
if (keyCode == _KEY_ENTER)
- //if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER)
{
CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle();
bool
_CheckButtonPresenter::OnFocusGained(const _Control& source)
{
- //if (__pCheckButton->IsFocusModeStateEnabled() == true)
- {
- __focusPrevStatus = __pCheckButton->GetCheckButtonStatus();
- __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
- __pCheckButton->Invalidate();
- }
+ __focusPrevStatus = __pCheckButton->GetCheckButtonStatus();
+ __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_HIGHLIGHTED);
+ __pCheckButton->Invalidate();
return true;
}
{
__pTextAccessibilityElement = new _AccessibilityElement(true);
__pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
-
- if ((GetEditStyle() & EDIT_STYLE_TITLE_TOP) || (GetEditStyle() & EDIT_STYLE_TITLE_LEFT))
- {
- __pTextAccessibilityElement->SetLabel(GetTitleText() + GetGuideText() + GetText());
- }
- else
- {
- __pTextAccessibilityElement->SetLabel(GetGuideText() + GetText());
- }
-
+ __pTextAccessibilityElement->SetLabel(GetTitleText() + GetGuideText() + GetText());
__pTextAccessibilityElement->SetTrait(L"Edit Field");
__pTextAccessibilityElement->SetName(L"EditText");
pEditAccessibilityContainer->AddElement(*__pTextAccessibilityElement);
CheckUSBKeyboardStatus();
- SysLog(NID_UI_CTRL, "INPUT_PANEL_SHOW_STATE_SHOW[Target:%x][Bound:%d][Usb mode:%d]", this, __isInputConnectionBound, __isUSBKeyboardConnected);
+ SysLog(NID_UI_CTRL, "[EDIT] INPUT_PANEL_SHOW_STATE_SHOW[Target:%x][Bound:%d][Usb mode:%d]", this, __isInputConnectionBound, __isUSBKeyboardConnected);
if (__isInputConnectionBound)
{
- if (__isKeypadCommandButtonVisible && __pCommandButton)
+ if (__isKeypadCommandButtonVisible)
{
SetFooterVisible(false);
}
}
}
- if (__isUSBKeyboardConnected && (__isKeypadCommandButtonVisible && __pCommandButton))
+ if ((__isUSBKeyboardConnected && __isKeypadCommandButtonVisible))
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
}
__isKeypadHiding = false;
CheckUSBKeyboardStatus();
- SysLog(NID_UI_CTRL, "INPUT_PANEL_SHOW_STATE_HIDE[Target:%x][Bound:%d][Usb mode:%d]", this, __isInputConnectionBound, __isUSBKeyboardConnected);
+ SysLog(NID_UI_CTRL, "[EDIT] INPUT_PANEL_SHOW_STATE_HIDE[Target:%x][Bound:%d][Usb mode:%d]", this, __isInputConnectionBound, __isUSBKeyboardConnected);
__isKeypadExist = false;
if (__isClipboardExist)
{
- AdjustParentPanelHeight(false);
+ AdjustParentPanelHeight(false, true);
}
else
{
if (__isClipboardExist)
{
- AdjustParentPanelHeight(false);
+ AdjustParentPanelHeight(false, true);
}
else
{
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT] Form deflate RESET!!!!!!!!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
}
}
}
- if ((__isKeypadCommandButtonVisible && __pCommandButton) && __isInputConnectionBound)
+ if (__isKeypadCommandButtonVisible && __isInputConnectionBound)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
}
- else if((__isUSBKeyboardConnected && (__isKeypadCommandButtonVisible &&__pCommandButton) && !__isInputConnectionBound) ||
+ else if((__isUSBKeyboardConnected && __isKeypadCommandButtonVisible && !__isInputConnectionBound) ||
(__isUSBKeyboardConnected && __isClipboardExist))
{
//do nothing
if ((__isUSBKeyboardConnected == false) && __isKeypadExist == false)
{
- SysLog(NID_UI_CTRL, "OnInputConnectionPanelBoundsChanged skipped - __isUSBKeyboardConnected:(%), __isKeypadExist:(%d)", __isUSBKeyboardConnected, __isKeypadExist);
return;
}
if (CheckKeypadExist(__pEdit->GetOrientation()) == false)//double check keypad Exist
{
- SysLog(NID_UI_CTRL, "OnInputConnectionPanelBoundsChanged skipped - Keypad doesn't exist!!");
return;
}
- else
- {
- if (IsKeypadRotating(__pEdit->GetOrientation()))
- {
- SysLog(NID_UI_CTRL, "OnInputConnectionPanelBoundsChanged skipped - Keypad is rotating!!");
- AdjustParentPanelHeight(true);
- return;
- }
- }
- SysLog(NID_UI_CTRL, "OnInputConnectionPanelBoundsChanged");
+ SysLog(NID_UI_CTRL, "[EDIT] OnInputConnectionPanelBoundsChanged");
ChangeLayoutInternal(__pEdit->GetOrientation());
- AdjustParentPanelHeight(false);
- ScrollPanelToCursorPosition();
+ AdjustParentPanelHeight(false, true);
if (__pParentForm)
{
+ ScrollPanelToCursorPosition();
__pParentForm->Draw();
}
__clipboardHeight = floatClipboardPopupSize.height;
- SysLog(NID_UI_CTRL, "clipboard height = %f, [KeypadExist:%d]keypad height = %f", floatClipboardPopupSize.height, __isKeypadExist, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "[EDIT] clipboard height = %f, [KeypadExist:%d]keypad height = %f", floatClipboardPopupSize.height, __isKeypadExist, absKeypadBounds.height);
if (__isKeypadExist) //resize as difference between clipboard height vs keypad height
{
if (floatClipboardPopupSize.height > absKeypadBounds.height)
{
ChangeLayoutInternal(__pEdit->GetOrientation());
- AdjustParentPanelHeight(false);
- ScrollPanelToCursorPosition();
+ AdjustParentPanelHeight(false, true);
if (__pParentForm)
{
+ ScrollPanelToCursorPosition();
__pParentForm->SetClipboardShowState(true);
__pParentForm->Draw();
}
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
- ScrollPanelToCursorPosition();
if (__pParentForm)
{
+ ScrollPanelToCursorPosition();
__pParentForm->SetClipboardShowState(true);
__pParentForm->Draw();
}
{
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
- ScrollPanelToCursorPosition();
if (__pParentForm)
{
+ ScrollPanelToCursorPosition();
__pParentForm->SetClipboardShowState(true);
__pParentForm->Draw();
}
__clipboardHeight = floatClipboardPopupSize.height;
- SysLog(NID_UI_CTRL, "clipboard height = %f, [KeypadExist:%d]keypad height = %f", floatClipboardPopupSize.height, __isKeypadExist, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "[EDIT] clipboard height = %f, [KeypadExist:%d]keypad height = %f", floatClipboardPopupSize.height, __isKeypadExist, absKeypadBounds.height);
if (__isKeypadExist)
{
{
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
- ScrollPanelToCursorPosition();
-
if (__pParentForm)
{
__pParentForm->Draw();
+ ScrollPanelToCursorPosition();
}
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
{
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
- ScrollPanelToCursorPosition();
-
if (__pParentForm)
{
__pParentForm->Draw();
+ ScrollPanelToCursorPosition();
}
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
{
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
- ScrollPanelToCursorPosition();
-
if (__pParentForm)
{
__pParentForm->Draw();
+ ScrollPanelToCursorPosition();
}
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
__clipboardHeight = 0.0f;
- SysLog(NID_UI_CTRL, "clipboard closed! [KeypadExist:%d]keypad height = %f", __isKeypadExist, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "[EDIT] clipboard closed! [KeypadExist:%d]keypad height = %f", __isKeypadExist, absKeypadBounds.height);
if (__isInputConnectionBound)
{
if (__isKeypadExist)
{
- AdjustParentPanelHeight(false);
+ AdjustParentPanelHeight(false, true);
if (__pParentForm)
{
AdjustParentPanelHeight(true);
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT] Form deflate RESET!!!!!!!!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
__pParentForm->SetClipboardShowState(false);
__pParentForm->Draw();
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT] Form deflate RESET!!!!!!!!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
if (__clipboardConnected)
}
__pTextString = new (std::nothrow) String;
- SysTryCatch(NID_UI_CTRL, __pTextString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ SysTryCatch(NID_UI_CTRL, __pTextString, , r = E_OUT_OF_MEMORY, "[EDIT] Unable to allocate text buffer.");
__limitLength = 0;
if (__pFont == null)
EditCutlinkColor cutlinkColor;
Font* pFont = _FontImpl::CloneN(const_cast <Font&>(*__pFont));
- SysTryReturnResult(NID_UI_CTRL, pFont, GetLastResult(), "Unable to get font.");
+ SysTryReturnResult(NID_UI_CTRL, pFont, GetLastResult(), "[EDIT] Unable to get font.");
_FontImpl* fontImpl = _FontImpl::GetInstance(*pFont);
SysTryReturnResult(NID_UI_CTRL, fontImpl, GetLastResult(), "[E_SYSTEM] fontImpl is null.");
if (pCutLinkObject == null)
{
- SysLog(NID_UI_CTRL, "Unable to allocate cutlink object.");
+ SysLog(NID_UI_CTRL, "[EDIT] Unable to allocate cutlink object.");
}
else
{
if (pSimpleText == null)
{
- SysLog(NID_UI_CTRL, "Unable to allocate text object.");
+ SysLog(NID_UI_CTRL, "[EDIT] Unable to allocate text object.");
}
else
_EditPresenter::GetLinkElementOffsetInTextBuffer(int elementIndex) const
{
const int textElementCount = __pTextObject->GetElementCount();
- SysTryReturn(NID_UI_CTRL, elementIndex >= 0 && elementIndex <= textElementCount, -1, E_OUT_OF_RANGE, "The Invalid argument is given.");
+ SysTryReturn(NID_UI_CTRL, elementIndex >= 0 && elementIndex <= textElementCount, -1, E_OUT_OF_RANGE, "[EDIT] The Invalid argument is given.");
_Text::TextElement* pTextElement = null;
int elementOffset = -1;
if (IsInternalFocused() && !tokenEditting)
{
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
- SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance.");
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "[EDIT] Unable to create _EditCopyPasteManager instance.");
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__pCopyPasteManager->Show();
__isCopyPasteManagerExist = true;
UpdateComponentInformation();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r));
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
- SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance.");
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "[EDIT] Unable to create _EditCopyPasteManager instance.");
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__pCopyPasteManager->CreateCopyPastePopup();
__pCopyPasteManager->Show();
else if (__textBlockMoving)
{
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
- SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance.");
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "[EDIT] Unable to create _EditCopyPasteManager instance.");
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__pCopyPasteManager->CreateCopyPastePopup();
__pCopyPasteManager->Show();
DeleteText(start, end);
ReleaseTextBlock();
pSubString = new String(__limitLength - currentLength + (end - start));
- SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "[EDIT] Unable to allocate text buffer.");
filteredString.SubString(0, __limitLength - currentLength + (end - start), *pSubString);
r = InsertTextAt(__cursorPos, pSubString->GetPointer());
}
pSubString = new String(__limitLength - currentLength);
- SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "[EDIT] Unable to allocate text buffer.");
filteredString.SubString(0, __limitLength - currentLength, *pSubString);
r = InsertTextAt(__cursorPos, pSubString->GetPointer());
bool
_EditPresenter::OnLongPressGestureDetected(void)
{
- SysLog(NID_UI_CTRL, "OnLongPressGestureDetected");
+ SysLog(NID_UI_CTRL, "[EDIT] OnLongPressGestureDetected");
if (__isClearIconPressed)
{
GetCursorBounds(true, cursorBounds);
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
- SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance.");
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "[EDIT] Unable to create _EditCopyPasteManager instance.");
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__pCopyPasteManager->Show();
__isCopyPasteManagerExist = true;
bool
_EditPresenter::OnTapGestureDetected(void)
{
- SysLog(NID_UI_CTRL, "OnTapGestureDetected");
+ SysLog(NID_UI_CTRL, "[EDIT] OnTapGestureDetected");
if (IsInternalFocused() == false)
{
GetCursorBounds(true, cursorBounds);
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
- SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance.");
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "[EDIT] Unable to create _EditCopyPasteManager instance.");
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__pCopyPasteManager->Show();
__isCopyPasteManagerExist = true;
result r = E_SUCCESS;
_Clipboard* pClipBoard = _Clipboard::GetInstance();
- SysTryReturnResult(NID_UI_CTRL, pClipBoard != null, E_SYSTEM, "Unable to get the clipboard instance.");
+ SysTryReturnResult(NID_UI_CTRL, pClipBoard != null, E_SYSTEM, "[EDIT] Unable to get the clipboard instance.");
int start = 0;
int end = 0;
String blockString(GetText(start, end - 1));
_ClipboardItem* pClipboardItem = _ClipboardItem::CreateInstanceN(CLIPBOARD_DATA_TYPE_TEXT, blockString);
- SysTryReturnResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "Unable to get the clipboarditem instance.");
+ SysTryReturnResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "[EDIT] Unable to get the clipboarditem instance.");
r = pClipBoard->CopyItem(*pClipboardItem);
continue;
}
const Bitmap * pImage = pImageText->GetBitmap();
- SysTryReturnResult(NID_UI_CTRL, pImage != null, E_SYSTEM, "Unable to get the bitmap from textobject.");
+ SysTryReturnResult(NID_UI_CTRL, pImage != null, E_SYSTEM, "[EDIT] Unable to get the bitmap from textobject.");
_ClipboardItem* pClipboardImageItem = _ClipboardItem::CreateInstanceN(CLIPBOARD_DATA_TYPE_IMAGE, *pImage);
- SysTryReturnResult(NID_UI_CTRL, pClipboardImageItem != null, E_SYSTEM, "Unable to get the clipboardImageitem instance.");
+ SysTryReturnResult(NID_UI_CTRL, pClipboardImageItem != null, E_SYSTEM, "[EDIT] Unable to get the clipboardImageitem instance.");
r = pClipBoard->CopyItem(*pClipboardImageItem);
String filteredString;
_Clipboard* pClipBoard = _Clipboard::GetInstance();
- SysTryReturnResult(NID_UI_CTRL, pClipBoard != null, E_SYSTEM, "Unable to get the clipboard instance.");
+ SysTryReturnResult(NID_UI_CTRL, pClipBoard != null, E_SYSTEM, "[EDIT] Unable to get the clipboard instance.");
const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO);
- SysTryReturnResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "Unable to get the clipboarditem instance.");
+ SysTryReturnResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "[EDIT] Unable to get the clipboarditem instance.");
const String* pClipString = dynamic_cast<const String*>(pClipboardItem->GetData());
- SysTryCatch(NID_UI_CTRL, pClipString, r = E_SYSTEM, E_SYSTEM, "Unable to get the clipboarditem instance.");
+ SysTryCatch(NID_UI_CTRL, pClipString, r = E_SYSTEM, E_SYSTEM, "[EDIT] Unable to get the clipboarditem instance.");
filteredString = *pClipString;
DeleteText(start, end);
ReleaseTextBlock();
pSubString = new String(__limitLength - currentLength + (end - start));
- SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "[EDIT] Unable to allocate text buffer.");
filteredString.SubString(0, __limitLength - currentLength + (end - start), *pSubString);
r = InsertTextAt(__cursorPos, pSubString->GetPointer());
}
pSubString = new String(__limitLength - currentLength);
- SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "Unable to allocate text buffer.");
+ SysTryCatch(NID_UI_CTRL, pSubString, , r = E_OUT_OF_MEMORY, "[EDIT] Unable to allocate text buffer.");
filteredString.SubString(0, __limitLength - currentLength, *pSubString);
r = InsertTextAt(__cursorPos, pSubString->GetPointer());
_EditPresenter::IsClipped(void) const
{
_Clipboard* pClipBoard = _Clipboard::GetInstance();
- SysTryReturn(NID_UI_CTRL, pClipBoard != null, false, E_SYSTEM, "Unable to get the clipboard instance.");
+ SysTryReturn(NID_UI_CTRL, pClipBoard != null, false, E_SYSTEM, "[EDIT] Unable to get the clipboard instance.");
const _ClipboardItem* pClipboardItem = pClipBoard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT|CLIPBOARD_DATA_TYPE_AUDIO | CLIPBOARD_DATA_TYPE_VIDEO);
if (pClipboardItem == null)
{
r = __pTextObject->SetAlignment(textAlign | TEXT_OBJECT_ALIGNMENT_TOP);
}
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Unable to set text alignment.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[EDIT] Unable to set text alignment.");
__horizontalAlignment = alignment;
return r;
if (start != 0 && end != -1)
{
SysTryReturn(NID_UI_CTRL, (start <= end), tempString, E_SYSTEM, "[E_SYSTEM] The invalid argument(start = %d, end = %d) is given.", start, end);
- int textLength = GetTextLength();
- SysTryReturn(NID_UI_CTRL, (start < textLength && end < textLength), tempString, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The invalid argument(start = %d, end = %d) is given.", start, end);
}
+ int textLength = GetTextLength();
+ SysTryReturn(NID_UI_CTRL, (start < textLength && end < textLength), tempString, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The invalid argument(start = %d, end = %d) is given.", start, end);
+
if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD)
{
int length = end - start + 1;
}
else
{
- SysTryReturnResult(NID_UI_CTRL, length <= __limitLength, E_INVALID_ARG, "The Invalid argument is given.");
+ SysTryReturnResult(NID_UI_CTRL, length <= __limitLength, E_INVALID_ARG, "[EDIT] The Invalid argument is given.");
}
if (__isInputConnectionBound && __isTextComposing)
result r = E_SUCCESS;
int length = GetTextLength();
- SysTryReturnResult(NID_UI_CTRL, -1 < position && position <= length, E_INVALID_ARG, "Invalid argument is given.");
+ SysTryReturnResult(NID_UI_CTRL, -1 < position && position <= length, E_INVALID_ARG, "[Edit] Invalid argument is given.");
if (__isTouchMoving == false)
{
}
r = __pTextObject->SetCursorIndex(position);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to set cursor position");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[Edit] Failed to set cursor position");
if (__cursorPos != position)
{
result r = E_SUCCESS;
int length = GetTextLength();
- SysTryReturnResult(NID_UI_CTRL, -1 < position && position <= length, E_INVALID_ARG, "Invalid argument is given.");
+ SysTryReturnResult(NID_UI_CTRL, -1 < position && position <= length, E_INVALID_ARG, "[Edit] Invalid argument is given.");
if (__isTouchMoving == false)
{
}
r = __pTextObject->SetCursorIndex(position);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to set cursor position");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[Edit] Failed to set cursor position");
__rowCursorIndex = rowIndex;
__columnCursorIndex = columnIndex;
String insertText = text;
int i = 0;
- SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= currentLength, E_OUT_OF_RANGE, "The Invalid argument is given.");
+ SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= currentLength, E_OUT_OF_RANGE, "[EDIT] The Invalid argument is given.");
if (__pEdit->GetEditStyle() & EDIT_STYLE_VIEWER)
{
}
else
{
- SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "The Invalid argument is given.");
+ SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "[EDIT] The Invalid argument is given.");
}
if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE || __pEdit->GetEditStyle() & EDIT_STYLE_TOKEN )
__pTextObject->SetRange(index, length);
r = __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), length);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to set length");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[Edit] Failed to set length");
__pTextObject->Compose();
}
else
{
- SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "The Invalid argument is given.");
+ SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "[EDIT] The Invalid argument is given.");
}
r = __pTextString->Append(text);
__pTextObject->SetRange(currentLength, length);
r = __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), length);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to set length");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[Edit] Failed to set length");
__pTextObject->Compose();
int length = GetTextLength();
- SysTryReturnResult(NID_UI_CTRL, -1 < startCursorPosition && startCursorPosition < endCursorPosition, E_INVALID_ARG, "Invalid argument is given.");
- SysTryReturnResult(NID_UI_CTRL, startCursorPosition < endCursorPosition && endCursorPosition <= length, E_INVALID_ARG, "Invalid argument is given.");
+ SysTryReturnResult(NID_UI_CTRL, -1 < startCursorPosition && startCursorPosition < endCursorPosition, E_INVALID_ARG, "[EDIT] Invalid argument is given.");
+ SysTryReturnResult(NID_UI_CTRL, startCursorPosition < endCursorPosition && endCursorPosition <= length, E_INVALID_ARG, "[EDIT] Invalid argument is given.");
_Text::TextElement* pFirstTextElement = __pTextObject->GetElementAtTextIndex(startCursorPosition);
const TextSimple* pFirstSimpleText = dynamic_cast <const TextSimple*>(pFirstTextElement);
int length = text.GetLength();
int totalLength = currentLength + length;
- SysTryReturnResult(NID_UI_CTRL, position >= 0 && position <= currentLength, E_OUT_OF_RANGE, "The given position is out-of-range.");
+ SysTryReturnResult(NID_UI_CTRL, position >= 0 && position <= currentLength, E_OUT_OF_RANGE, "[EDIT] The given position is out-of-range.");
if ((__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) || (__pEdit->GetEditStyle() & EDIT_STYLE_VIEWER))
{
}
else
{
- SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "The text exceeds the limitation length.");
+ SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "[EDIT] The text exceeds the limitation length.");
}
if (__isInputConnectionBound == true && __isTextComposing == true)
TextSimple* pSimpleText = null;
pSimpleText = new (std::nothrow) TextSimple(__pTextBuffer, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, GetFont());
- SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Unable to allocate text simple element.");
+ SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "[Edit] Unable to allocate text simple element.");
pSimpleText->ChangeTextOffset(__pTextBuffer, position);
pSimpleText->SetBitmap((Bitmap&)textImage);
if (!__pParentForm)
{
__pParentForm = GetParentForm();
-
- if (!__pParentForm && __isKeypadCommandButtonVisible)
- {
- __isKeypadCommandButtonVisible = false;
- }
}
if (__isAutoShrinkEnabled)
{
result r = E_SUCCESS;
__pTextVisualElement = new (std::nothrow) _VisualElement;
- SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "Unable to create __pTextVisualElement instance.");
+ SysTryReturn(NID_UI_CTRL, __pTextVisualElement != null, false, E_OUT_OF_MEMORY, "[EDIT] Unable to create __pTextVisualElement instance.");
r = __pTextVisualElement->Construct();
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r));
{
__pCommandButton->SetResizable(true);
__pCommandButton->SetMovable(true);
- SysLog(NID_UI_CTRL, "Command position changed!!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height);
+ SysLog(NID_UI_CTRL, "[EDIT]Command position changed!!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height);
r = __pCommandButton->SetBounds(bounds);
__pCommandButton->SetResizable(false);
if (__pParentForm == false)
{
- __isKeypadCommandButtonVisible = false;
return r;
}
__pCommandButton->SetResizable(true);
__pCommandButton->SetMovable(true);
- SysLog(NID_UI_CTRL, "Command created!!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height);
+ SysLog(NID_UI_CTRL, "[EDIT]Command created!!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height);
r = __pCommandButton->SetBounds(bounds);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
if (pFooter->GetVisibleState() == false)
{
__initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_HIDE;
- SysLog(NID_UI_CTRL, "EDIT_FOOTER_VISIBLE_STATUS_HIDE");
+ SysLog(NID_UI_CTRL, "[EDIT] CheckInitialFooterVisibleState - EDIT_FOOTER_VISIBLE_STATUS_HIDE");
}
else
{
__initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_SHOW;
- SysLog(NID_UI_CTRL, "EDIT_FOOTER_VISIBLE_STATUS_SHOW");
+ SysLog(NID_UI_CTRL, "[EDIT] CheckInitialFooterVisibleState - EDIT_FOOTER_VISIBLE_STATUS_SHOW");
}
}
else
{
__initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE;
- SysLog(NID_UI_CTRL, "EDIT_FOOTER_VISIBLE_STATUS_NONE");
+ SysLog(NID_UI_CTRL, "[EDIT] CheckInitialFooterVisibleState - EDIT_FOOTER_VISIBLE_STATUS_NONE");
}
return;
{
if (isVisible)
{
- SysLog(NID_UI_CTRL, "SetFooterVisible TRUE!!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT] SetFooterVisible TRUE!!!!!");
__footerVisibleChanged = false;
}
else
{
- SysLog(NID_UI_CTRL, "SetFooterVisible FALSE!!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT] SetFooterVisible FALSE!!!!!");
__footerVisibleChanged = true;
}
bounds = __pInputConnection->GetInputPanelBoundsF();
_CoordinateSystem* pCoordSystem = _CoordinateSystem::GetInstance();
- SysTryReturnResult(NID_UI_CTRL, pCoordSystem, E_SYSTEM, "Coordinate system load failed.");
+ SysTryReturnResult(NID_UI_CTRL, pCoordSystem, E_SYSTEM, "[EDIT] Coordinate system load failed.");
_ICoordinateSystemTransformer* pXformer = pCoordSystem->GetInverseTransformer();
- SysTryReturnResult(NID_UI_CTRL, pXformer, E_SYSTEM, "Coordinate system load failed.");
+ SysTryReturnResult(NID_UI_CTRL, pXformer, E_SYSTEM, "[EDIT] Coordinate system load failed.");
bounds = pXformer->Transform(bounds);
}
bool
-_EditPresenter::IsKeypadRotating(_ControlOrientation orientation)
-{
- FloatDimension screenSize;
- FloatRectangle absKeypadBounds(0.0f, 0.0f, 0.0f, 0.0f);
- _ControlManager* pControlManager = _ControlManager::GetInstance();
-
- GetKeypadBounds(absKeypadBounds);
-
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- screenSize.height = pControlManager->GetScreenSizeF().height;
- screenSize.width = pControlManager->GetScreenSizeF().width;
- }
- else
- {
- screenSize.height = pControlManager->GetScreenSizeF().width;
- screenSize.width = pControlManager->GetScreenSizeF().height;
- }
-
- if (absKeypadBounds.width == screenSize.width)
- {
- return false;
- }
- else
- {
- return true;
- }
-}
-
-bool
_EditPresenter::CheckKeypadExist(_ControlOrientation orientation)
{
FloatDimension screenSize;
screenSize.width = pControlManager->GetScreenSizeF().height;
}
- if (absKeypadBounds.width != 0 && absKeypadBounds.height != 0)
+ if ((absKeypadBounds.y != screenSize.height) && (absKeypadBounds.width == screenSize.width))
{
- if ((absKeypadBounds.y != screenSize.height))
- {
- SysLog(NID_UI_CTRL, "KEYPAD EXIST!!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
- return true;
- }
- else
- {
- SysLog(NID_UI_CTRL, "NO KEYPAD!!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
- return false;
- }
+ SysLog(NID_UI_CTRL, "[EDIT] CheckKeypadExist: KEYPAD EXIST!!!!Keypad(y: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.height);
+ return true;
}
else
{
- SysLog(NID_UI_CTRL, "NO KEYPAD!!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "[EDIT] CheckKeypadExist: NO KEYPAD!!!!Keypad(y: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.height);
return false;
}
}
//layout rearrange
if (__isUSBKeyboardConnected)
{
- SysLog(NID_UI_CTRL, "ShowKeypad called in USB ON mode!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT]ShowKeypad called in USB ON mode!!!!");
__isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //prediction alreaedy exists
}
else
{
- SysLog(NID_UI_CTRL, "ShowKeypad called in USB OFF mode!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT]ShowKeypad called in USB OFF mode!!!!");
__isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //call once only from here.
__pCopyPasteManager->Release();
}
- bool isScrollPanelBoundsReloaded = false;
-
- if (__pParentPanel)
- {
- _ControlImpl* pParentPanelImpl = static_cast <_ControlImpl* >(__pParentPanel->GetUserData());
- Rectangle builderBounds;
- isScrollPanelBoundsReloaded= pParentPanelImpl->GetBuilderBounds(orientation, builderBounds);
- }
-
__rotated = true;
CheckUSBKeyboardStatus();
if (__isInputConnectionBound || __clipboardConnected)
{
- SysLog(NID_UI_CTRL, "-------------------ChangeLayout------------------------");
-
- if (!isScrollPanelBoundsReloaded)
- {
- SysLog(NID_UI_CTRL, "ScrollPanel bounds is not changed by UIBuilder, so forcely reset ScrollPanel's height");
- AdjustParentPanelHeight(true);
- }
- else
- {
- SysLog(NID_UI_CTRL, "ScrollPanel bounds is changed by UIBuilder");
- }
+ SysLog(NID_UI_CTRL, "[EDIT]-------------------ChangeLayout------------------------");
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT] Form deflate RESET!!!!!!!!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
}
if (__isKeypadExist && ! __isClipboardExist) //only keypad exists, already get keypadbounds before callback [Causion]this timing clipboard height is still previous height
{
- if (isScrollPanelBoundsReloaded)
- {
- __initialParentHeight = 0.0f;
- }
-
+ __initialParentHeight = 0.0f;
ChangeLayoutInternal(orientation);
AdjustParentPanelHeight(false);
ScrollPanelToCursorPosition();
}
else // if clipboard exists, boundsChanged callback will delivered after rotate callback
{
- /*
if (__isClipboardExist)
{
__initialParentHeight = 0.0f;
AdjustParentPanelHeight(false);
ScrollPanelToCursorPosition();
}
- }*/
-
- if (!__isClipboardExist)
- {
- if (__isKeypadCommandButtonVisible)
- {
- __initialParentHeight = 0.0f;
- ChangeLayoutInternal(orientation);
- AdjustParentPanelHeight(false);
- ScrollPanelToCursorPosition();
- }
}
}
}
FloatRectangle keypadBounds(0.0f, 0.0f, 0.0f, 0.0f);
_ControlManager* pControlManager = _ControlManager::GetInstance();
- SysTryReturnResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "Failed to get root.");
+ SysTryReturnResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "[EDIT] Failed to get root.");
FloatDimension screenSize;
FloatRectangle commandButtonBounds(0.0f, 0.0f, 0.0f, 0.0f);
{
commandButtonBounds.width = screenSize.width;
float commandButtonHeight = 0.0f;
+ GET_SHAPE_CONFIG(FOOTER::HEIGHT, orientation, commandButtonHeight);
+ commandButtonBounds.height = commandButtonHeight;
if (__pParentForm)
{
- GET_SHAPE_CONFIG(FOOTER::HEIGHT, orientation, commandButtonHeight);
- commandButtonBounds.height = commandButtonHeight;
formDeflateHeight += commandButtonBounds.height;
if (__isKeypadExist || __isClipboardExist)
{
commandButtonBounds.y = screenSize.height - commandButtonBounds.height - __pParentForm->GetClientBoundsF().y;
}
-
- SetKeypadCommandButton(commandButtonBounds);
-
- if (__pCommandButton)
+ }
+ else
+ {
+ if (__isKeypadExist || __isClipboardExist)
{
- __pCommandButton->SetVisibleState(true);
- __pCommandButton->Invalidate();
+ commandButtonBounds.y = screenSize.height - shrinkedHeight - commandButtonBounds.height;
+ }
+ else
+ {
+ commandButtonBounds.y = screenSize.height - commandButtonBounds.height;
}
}
+
+ r = SetKeypadCommandButton(commandButtonBounds);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ if (__pCommandButton)
+ {
+ __pCommandButton->SetVisibleState(true);
+ __pCommandButton->Invalidate();
+ }
}
else
{
if (__pParentForm && deflateForm)
{
- SysLog(NID_UI_CTRL, "FormDeflateHeight:%f, KeypadExist(%d), ClipboardExist(%d), CommandButtonVisible(%d)",
+ SysLog(NID_UI_CTRL, "[EDIT]ChangeLayoutInternal: formDeflateHeight:%f, KeypadExist(%d), ClipboardExist(%d), CommandButtonVisible(%d)",
formDeflateHeight, __isKeypadExist, __isClipboardExist, __isKeypadCommandButtonVisible);
__pParentForm->DeflateClientRectHeight(formDeflateHeight);
}
}
void
-_EditPresenter::AdjustParentPanelHeight(bool restore)
+_EditPresenter::AdjustParentPanelHeight(bool restore, bool panelResizeByPrediction)
{
if (__pParentPanel == null)
{
screenSize.height = pControlManager->GetScreenSizeF().width;
}
+ if (panelResizeByPrediction)
+ restore = false;
+
if (restore)
{
if (__initialParentHeight)
{
scrollPanelBounds.height = __initialParentHeight;
- SysLog(NID_UI_CTRL, "Rollback ScrollPanel's height to %f and Set __initialParentHeight to 'Zero' ", __initialParentHeight);
+
__initialParentHeight = 0.0f;
__pParentPanel->SetBounds(scrollPanelBounds);
__pParentPanel->Invalidate();
displayedPanelHeight = screenSize.height - commandButtonHeight - absScrollPanelBounds.y;
gapY = (absKeypadBounds.y - commandButtonHeight)- absScrollPanelBounds.y;
- bool isOverlapped = true;
-
- if ((absKeypadBounds.y - commandButtonHeight) >= (absScrollPanelBounds.y + absScrollPanelBounds.height))
- {
- isOverlapped = false;
- }
-
- SysLog(NID_UI_CTRL, "IsOverlapped:(%d), __initialParentHeight:(%f), gapY:(%f)", isOverlapped, __initialParentHeight, gapY);
-
- if (!__initialParentHeight)
+ if (panelResizeByPrediction)
{
- if (!isOverlapped)
+ if ((absKeypadBounds.y - commandButtonHeight) >= (absScrollPanelBounds.y + absScrollPanelBounds.height))
{
return;
}
- if (gapY > 0.0f)
- {
- __initialParentHeight = scrollPanelBounds.height;
-
- SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f and Set __initialParentHeight:(%f)", gapY, __initialParentHeight);
-
- scrollPanelBounds.height = gapY;
- __pParentPanel->SetBounds(scrollPanelBounds);
- __pParentPanel->Invalidate();
- }
- }
- else
- {
- if (!isOverlapped)
+ if (__isUSBKeyboardConnected)
{
- if ((gapY < __initialParentHeight) && (gapY > 0.0f))
+ if (gapY > 0.0f)
{
- SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f", gapY);
-
scrollPanelBounds.height = gapY;
__pParentPanel->SetBounds(scrollPanelBounds);
__pParentPanel->Invalidate();
- return;
}
- else
+ }
+ else
+ {
+ if ((gapY > 0.0f) && __initialParentHeight)
{
- if (gapY > __initialParentHeight)
- {
- SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f", __initialParentHeight);
-
- scrollPanelBounds.height = __initialParentHeight;
- __pParentPanel->SetBounds(scrollPanelBounds);
- __pParentPanel->Invalidate();
- }
- return;
+ scrollPanelBounds.height = gapY;
+ __pParentPanel->SetBounds(scrollPanelBounds);
+ __pParentPanel->Invalidate();
}
}
+ }
+ else
+ {
+ if ((absKeypadBounds.y - commandButtonHeight) >= (absScrollPanelBounds.y + absScrollPanelBounds.height))
+ {
+ return;
+ }
- if (gapY > 0.0f)
+ if ((gapY > 0) && (gapY < displayedPanelHeight) && !__initialParentHeight)
{
- SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f", gapY);
+ __initialParentHeight = scrollPanelBounds.height;
+
scrollPanelBounds.height = gapY;
__pParentPanel->SetBounds(scrollPanelBounds);
__pParentPanel->Invalidate();
}
}
}
+
+ return;
}
result
if (__isUSBKeyboardConnected)
{
- SysLog(NID_UI_CTRL, "HideKeypad called in USB ON mode!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT]HideKeypad called in USB ON mode!!!!");
if (__pCommandButton && __isKeypadCommandButtonVisible)
{
SetFooterVisible(true);
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT] Form deflate RESET!!!!!!!!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
}
}
else
{
- SysLog(NID_UI_CTRL, "HideKeypad called in USB OFF mode!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT]HideKeypad called in USB OFF mode!!!!");
if (__pCommandButton && __isKeypadCommandButtonVisible)
{
if (!__isKeypadExist)
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "[EDIT] Form deflate RESET!!!!!!!!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
}
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE);
__pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
r = __pTextObject->SetTextObjectEllipsisType(ellipsisType);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Unable to Set ellipsis position.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[EDIT] Unable to Set ellipsis position.");
return r;
}
result r = E_SUCCESS;
r = AdjustFont(*pFont, EDIT_FONT_CHANGE_ALL);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font.");
+ SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "[EDIT] Unable to set font.");
__titleFontFaceName = pFont->GetFaceName();
SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = fontImpl->SetSize(size);
- SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed.");
+ SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "[EDIT] SetSize is failed.");
if (__pTextObject)
{
r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON;
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[EDIT] Unable to set font.");
}
if (IsGuideTextActivated())
{
r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength());
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[EDIT] Unable to set font.");
}
__contentFontSize = _CoordinateSystemUtils::ConvertToFloat(size);
SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = fontImpl->SetSize(size);
- SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed.");
+ SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "[EDIT] SetSize is failed.");
if (__pTextObject)
{
r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON;
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[EDIT] Unable to set font.");
}
if (IsGuideTextActivated())
{
r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength());
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[EDIT] Unable to set font.");
}
__contentFontSize = size;
result r = E_SUCCESS;
Font* pFont = _FontImpl::CloneN(const_cast <Font&>(font));
- SysTryReturnResult(NID_UI_CTRL, pFont, GetLastResult(), "Unable to create font.");
+ SysTryReturnResult(NID_UI_CTRL, pFont, GetLastResult(), "[EDIT] Unable to create font.");
__pFont = pFont;
{
r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON;
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "[EDIT] Unable to set font.");
}
if (IsGuideTextActivated())
{
r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength());
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "[EDIT] Unable to set font.");
}
return r;
if (__pTitleTextObject)
{
r = fontImpl->SetSize(__titleFontSize);
- SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed.");
+ SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "[EDIT] SetSize is failed.");
r = __pTitleTextObject->SetFont(pFont, 0, __pTitleTextObject->GetTextLength());
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[EDIT] Unable to set font.");
}
}
if (fontChange == EDIT_FONT_CHANGE_CONTENT || fontChange == EDIT_FONT_CHANGE_ALL)
{
r = fontImpl->SetSize(__contentFontSize);
- SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed.");
+ SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "[EDIT] SetSize is failed.");
unsigned long style = FONT_STYLE_PLAIN;
{
r = __pTextObject->SetFont(pFont, 0, __pTextObject->GetTextLength());
__ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON;
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[EDIT] Unable to set font.");
}
if (__pGuideTextObject)
{
r = __pGuideTextObject->SetFont(pFont, 0, __pGuideTextObject->GetTextLength());
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[EDIT] Unable to set font.");
}
}
Font* pFont = null;
IList* systemFontList = Font::GetSystemFontListN();
- SysTryReturnResult(NID_UI_CTRL, systemFontList, E_SYSTEM, "Unable to get system font list.\n");
+ SysTryReturnResult(NID_UI_CTRL, systemFontList, E_SYSTEM, "[EDIT] Unable to get system font list.\n");
int fontListCount = systemFontList->GetCount();
String tempFontFaceName;
tempFontFaceName = *static_cast<String*>(systemFontList->GetAt(i));
pFont = new (std::nothrow) Font;
- SysTryCatch(NID_UI_CTRL, pFont, , r = E_OUT_OF_MEMORY, "Unable to get text information.\n");
+ SysTryCatch(NID_UI_CTRL, pFont, , r = E_OUT_OF_MEMORY, "[EDIT] Unable to get text information.\n");
r = pFont->Construct(tempFontFaceName, fontStyle, textSize);
- SysTryCatch(NID_UI_CTRL, !IsFailed(r), , r, "Unable to construct Font.\n");
+ SysTryCatch(NID_UI_CTRL, !IsFailed(r), , r, "[EDIT] Unable to construct Font.\n");
// check font face name.
if (typefaceName.Equals(pFont->GetFaceName(), true))
pFont = null;
}
- SysTryCatch(NID_UI_CTRL, isFaceNameAvailable, , r = E_INVALID_ARG, "The unsupported font face name is given.\n");
+ SysTryCatch(NID_UI_CTRL, isFaceNameAvailable, , r = E_INVALID_ARG, "[EDIT] The unsupported font face name is given.\n");
if (styleMask & TEXT_BOX_TEXT_STYLE_UNDERLINE)
{
{
r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON;
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "[EDIT] Unable to set font.");
}
return r;
{
r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON;
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[EDIT] Unable to set font.");
}
if (IsGuideTextActivated())
{
r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength());
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[EDIT] Unable to set font.");
}
__contentTextStyle = textStyle;
if(fontImpl)
{
r = fontImpl->SetSize(__titleFontSize);
- SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed.");
+ SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "[EDIT] SetSize is failed.");
}
else
{
__pTitleTextObject->SetFont(__pFont, 0, __pTitleTextObject->GetTextLength());
r = fontImpl->SetSize(__contentFontSize);
- SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed.");
+ SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "[EDIT] SetSize is failed.");
__pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT);
startPosition = -1;
endPosition = -1;
- SysTryReturnResult(NID_UI_CTRL, postion >= 0 && postion <= length, E_OUT_OF_RANGE, "The given index is out-of-range.");
+ SysTryReturnResult(NID_UI_CTRL, postion >= 0 && postion <= length, E_OUT_OF_RANGE, "[EDIT] The given index is out-of-range.");
_Text::TextElement* pTextElement = __pTextObject->GetElementAtTextIndex(postion);
const TextSimple* pSimpleText = dynamic_cast <const TextSimple*>(pTextElement);
if (position == BUTTON_POSITION_LEFT)
{
SysTryReturnResult(NID_UI_CTRL, (IsMenuButtonSet() == false), E_SYSTEM,
- "[E_SYSTEM] A Menu button exists.");
+ "[E_SYSTEM] A Option button exists.");
}
SysTryReturnResult(NID_UI_CTRL, (count <= FOOTER_MAX_ITEM_COUNT_WITH_BUTTON), E_SYSTEM,
bool
_FooterImpl::IsMenuButtonSet(void) const
{
- return GetCore().IsButtonSet(MENU_BUTTON);
+ return GetCore().IsButtonSet(OPTION_BUTTON);
}
+
ButtonItemStatus
_FooterImpl::GetMenuButtonStatus(void) const
{
SysTryReturn(NID_UI_CTRL, (IsMenuButtonSet() == true), BUTTON_ITEM_STATUS_NORMAL, E_INVALID_OPERATION,
- "[E_INVALID_OPERATION] A Menu button doesn't exist");
+ "[E_INVALID_OPERATION] A Option button doesn't exist");
_ButtonStatus buttonStatus;
- buttonStatus = GetCore().GetButtonStatus(MENU_BUTTON);
+ buttonStatus = GetCore().GetButtonStatus(OPTION_BUTTON);
return ConvertButtonItemStatus(buttonStatus);
}
+
result
_FooterImpl::RemoveMenuButton(void)
{
- return GetCore().RemoveButtonAt(MENU_BUTTON);
+ return GetCore().RemoveButtonAt(OPTION_BUTTON);
}
+
result
_FooterImpl::SetMenuButtonEnabled(bool enable)
{
- return GetCore().SetButtonEnabled(MENU_BUTTON, enable);
+ return GetCore().SetButtonEnabled(OPTION_BUTTON, enable);
}
+
result
_FooterImpl::SetMenuButton(void)
{
if ((__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT) && GetItemCount() > 4)
{
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to set the menu button.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to set the option button.");
return E_SYSTEM;
}
else if ((__style == FOOTER_STYLE_BUTTON_ICON || __style == FOOTER_STYLE_BUTTON_TEXT || __style == FOOTER_STYLE_BUTTON_ICON_TEXT) && GetItemCount() > 5)
{
- SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to set the menu button.");
+ SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to set the option button.");
return E_SYSTEM;
}
delete pBackIconHighlightedEffectBitmap;
}
- return GetCore().SetButton(MENU_BUTTON, pButton);
+ return GetCore().SetButton(OPTION_BUTTON, pButton);
}
class _FooterMaker
__pFormMenuEventListener = pFormMenuEventListener;
if (__pFooter)
{
- __pFooter->SetMenuEventListener(*this, ID_MENU_BUTTON);
+ __pFooter->SetOptionEventListener(*this, ID_OPTION_BUTTON);
}
SetLastResult(E_SUCCESS);
{
transparent = false;
}
- else
- {
- transparent = true;
- }
}
}
else
}
bool
-_Form::IsIndicatorAutoHide(void) const
-{
- _Control* pParent = GetParent();
- _Frame* pFrame = dynamic_cast<_Frame*>(pParent);
-
- bool autohide = false;
-
- if (pFrame && IsAttachedToMainTree())
- {
- autohide = __pIndicator->GetIndicatorAutoHide();
- }
-
- return autohide;
-}
-
-bool
_Form::IsHeaderTranslucent(void) const
{
return __transparentHeader;
}
}
break;
- case ID_MENU_BUTTON :
+ case ID_OPTION_BUTTON :
if (__pFormMenuEventListener)
{
__pFormMenuEventListener->OnFormMenuRequested(*this);
}
result
-_Form::SetIndicatorShowState(bool state)
+_Form::SetIndicatorShowState(bool state, bool hide)
{
result r = E_SUCCESS;
{
if (pFrame->GetShowMode(false) == FRAME_SHOW_MODE_FULL_SCREEN)
{
- r = __pIndicator->SetIndicatorShowState(state);
+ r = __pIndicator->SetIndicatorShowState(state, hide);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
}
else if (mode == FRAME_SHOW_MODE_FULL_SCREEN)
{
- r = __pIndicator->SetIndicatorShowState(state);
+ r = __pIndicator->SetIndicatorShowState(state, hide);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
else if (!pFrame && IsAttachedToMainTree())
{
- r = __pIndicator->SetIndicatorShowState(false);
+ r = __pIndicator->SetIndicatorShowState(false, true);
}
__indicatorShowState = state;
}
result
-_Form::SetIndicatorAutoHide(bool autohide)
-{
- result r = E_SUCCESS;
-
- _Control* pParent = GetParent();
- _Frame* pFrame = dynamic_cast<_Frame*>(pParent);
-
- if (pFrame && IsAttachedToMainTree())
- {
- FrameShowMode mode = pFrame->GetShowMode();
- if (mode == FRAME_SHOW_MODE_FULL_SCREEN)
- {
- r = __pIndicator->SetIndicatorAutoHide(autohide);
- SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- }
- }
- return r;
-}
-
-result
_Form::SetIndicatorOpacity(_IndicatorOpacity opacity)
{
result r = E_SUCCESS;
SetIndicatorShowState(__indicatorShowState);
}
- SetIndicatorAutoHide(false);
r = GetLastResult();
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
else if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())
{
- AddIndicatorObject();
- SetIndicatorShowState(__indicatorShowState);
- SetIndicatorAutoHide(true);
+ SetIndicatorShowState(__indicatorShowState, true);
}
else
{
{
if (GetVisibleState())
{
- if (FORM_STYLE_INDICATOR & GetFormStyle())
- {
- SetIndicatorShowState(__indicatorShowState);
- SetIndicatorAutoHide(false);
- }
- else if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())
- {
- SetIndicatorShowState(true);
- SetIndicatorAutoHide(true);
- }
- else
- {
- SetIndicatorShowState(false);
- SetIndicatorAutoHide(false);
- }
+ SetIndicatorShowState(__indicatorShowState);
}
}
{
GetCore().SetIndicatorShowState(true);
indicatorBounds = GetCore().GetIndicatorBoundsF();
- GetCore().SetIndicatorAutoHide(false);
r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
else if(FORM_STYLE_INDICATOR_AUTO_HIDE & formStyle)
{
- r = GetCore().SetIndicatorShowState(true);
- r = GetCore().SetIndicatorAutoHide(true);
+ r = GetCore().SetIndicatorShowState(false, true);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
r = GetCore().SetIndicatorShowState(false);
- r = GetCore().SetIndicatorAutoHide(false);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
{
curPoint.y = portraitSize.width / portraitSize.height * prevPoint.y;
}
+
}
pFrameImpl->SetPosition(curPoint);
__firstDrawnIndex = index;
__firstDrawnItemFullyDrawn = _FloatCompareGE(itemRect.y, 0);
- while (itemRect.y < endYPos)
+ float lastDrawnItemY = 0.0f;
+ int lastIndex = -1;
+ bool isUpdated = false;
+
+ while (itemRect.y < endYPos || index <= __lastDrawnIndex)
{
itemRect.x = __startPosOfAxis;
while (itemRect.x < endXPos && index < itemCount)
itemRect.x += unitWidth;
}
itemRect.y += unitHeight;
+ if (itemRect.y >= endYPos && !isUpdated)
+ {
+ isUpdated = true;
+ lastIndex = index;
+ lastDrawnItemY = itemRect.y;
+ }
}
- __lastDrawnIndex = index - 1;
- __lastDrawnItemFullyDrawn = _FloatCompareGE(endYPos, itemRect.y);
+ __lastDrawnIndex = lastIndex - 1;
+ __lastDrawnItemFullyDrawn = _FloatCompareGE(endYPos, lastDrawnItemY);
// Support Accessibility
__RequestToDrawAccessibilityFocusUi = true;
typedef enum
{
- _INDICATOR_TYPE_UNKNOWN, /**< Unknown indicator type mode */
- _INDICATOR_TYPE_1, /**< Type 0 the the indicator */
- _INDICATOR_TYPE_2, /**< Type 1 the indicator */
-} _IndicatorTypeMode;
+ INDICATOR_TYPE_UNKNOWN, /**< Unknown indicator type mode */
+ INDICATOR_TYPE_1, /**< Type 0 the the indicator */
+ INDICATOR_TYPE_2, /**< Type 1 the indicator */
+} IndicatorTypeMode;
_Indicator*
_Indicator::CreateIndicator(void)
, __pCurrentVisualElement(null)
, __pWindow(null)
, __showstate(false)
- , __autohide(false)
, __opacity(_INDICATOR_OPACITY_OPAQUE)
, __orientation(_CONTROL_ORIENTATION_PORTRAIT)
{
}
result
-_Indicator::SetIndicatorShowState(bool state)
+_Indicator::SetIndicatorShowState(bool state, bool hide)
{
result r = E_SUCCESS;
if (__pWindow)
{
- r = pEcoreEvas->SetIndicatorShowState(*__pWindow, state);
- SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ if (hide)
+ {
+ r = pEcoreEvas->SetIndicatorShowState(*__pWindow, true);
+ }
+ else
+ {
+ r = pEcoreEvas->SetIndicatorShowState(*__pWindow, state);
+ }
}
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
__showstate = state;
SetShowState(state);
}
result
-_Indicator::SetIndicatorAutoHide(bool autohide)
-{
- Ecore_X_Window win;
- if (__pWindow)
- {
- win = (Ecore_X_Window)__pWindow->GetNativeHandle();
- }
-
- Ecore_Evas *pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject);
- SysTryReturnResult(NID_UI_CTRL, pPortraitEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas.");
- Ecore_Evas *pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject);
- SysTryReturnResult(NID_UI_CTRL, pLandscapeEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas.");
-
- if (autohide)
- {
- Color bgColor(0x00000000);
- SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f));
- ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
- }
- else
- {
- SetIndicatorOpacity(__opacity);
- ecore_x_e_illume_indicator_opacity_set(win, ECORE_X_ILLUME_INDICATOR_OPAQUE);
- }
-
- __autohide = autohide;
-}
-
-result
_Indicator::SetIndicatorOpacity(_IndicatorOpacity opacity)
{
result r = E_SUCCESS;
_IndicatorOpacity
_Indicator::GetIndicatorOpacity(void) const
{
- if (__autohide)
- {
- return _INDICATOR_OPACITY_TRANSPARENT;
- }
-
return __opacity;
}
-bool
-_Indicator::GetIndicatorAutoHide(void) const
-{
- return __autohide;
-}
-
Rectangle
_Indicator::GetIndicatorBounds(void) const
{
SetClipChildrenEnabled(false);
}
__orientation = orientation;
- if (!__autohide)
- {
- SetIndicatorOpacity(__opacity);
- }
+ SetIndicatorOpacity(__opacity);
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
int rotation = 0;
}*/
if (msgId == MSG_ID_INDICATOR_TYPE)
{
- _IndicatorTypeMode *pIndicatorTypeMode = (_IndicatorTypeMode*)(data);
+ IndicatorTypeMode *pIndicatorTypeMode = (IndicatorTypeMode*)(data);
_Window* pWindow = _ControlManager::GetInstance()->_ControlManager::GetTopVisibleWindow();
SysTryReturnVoidResult(NID_UI_CTRL, pWindow, E_INVALID_STATE, "[E_INVALID_STATE] Indicator is not attached main tree.");
Ecore_X_Window win = (Ecore_X_Window)pWindow->GetNativeHandle();
- if (*pIndicatorTypeMode == _INDICATOR_TYPE_1)
+ if (*pIndicatorTypeMode == INDICATOR_TYPE_1)
{
ecore_x_e_illume_indicator_type_set(win, ECORE_X_ILLUME_INDICATOR_TYPE_1);
}
- else if (*pIndicatorTypeMode == _INDICATOR_TYPE_2)
+ else if (*pIndicatorTypeMode == INDICATOR_TYPE_2)
{
ecore_x_e_illume_indicator_type_set (win, ECORE_X_ILLUME_INDICATOR_TYPE_2);
}
bool showstate = false;
bool opacity = false;
- bool autohide = false;
_Control* pOwner = GetOwner();
if (pOwner == null)
showstate = pForm->IsIndicatorVisible();
opacity = pForm->IsIndicatorTranslucent();
- autohide = pForm->IsIndicatorAutoHide();
}
else
{
{
showstate = pForm->IsIndicatorVisible();
opacity = pForm->IsIndicatorTranslucent();
- autohide = pForm->IsIndicatorAutoHide();
}
pOwner->LockInputEvent();
{
__pIndicator->SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE);
}
- __pIndicator->SetIndicatorAutoHide(autohide);
}
_Window::OnActivated();
ReleaseTouchCapture();
+ if (__pIndicator)
+ {
+ __pIndicator->DeleteIndicatorObject();
+ }
+
_Window::OnDeactivated();
}
}
- Layout* pLayout;
-
- pLayout = GetPublicLayoutN();
-
- if (pLayout != null)
- {
- Tizen::Ui::_SharedPtr<Tizen::Ui::_LayoutImpl> pLayoutImpl = _LayoutImpl::GetLayoutImpl(pLayout);
-
- if (!pLayoutImpl.IsNull())
- {
- r = GetCore().SetCurrentLayout(pLayoutImpl->GetCore());
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Failed to set up the current layout");
- }
- }
-
float indicatorheight = 0.0f;
const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF();
, __pToolbarPresenter(null)
, __pActionEventListener(null)
, __pBackEventListener(null)
- , __pMenuEventListener(null)
+ , __pOptionEventListener(null)
, __pLongPressGesture(null)
, __pFlickGesture(null)
, __pToolbarBackgroundBitmap(null)
, __pItems(null)
, __pTitleBadgeIcon(null)
, __backActionId(-1)
- , __menuActionId(-1)
+ , __optionActionId(-1)
, __itemCount(0)
, __style(TOOLBAR_TITLE)
, __transparent(false)
__pButtonItems[RIGHT_BUTTON] = null;
__pButtonItems[BACK_BUTTON] = null;
__pButtonItems[MIDDLE_BUTTON] = null;
- __pButtonItems[MENU_BUTTON] = null;
+ __pButtonItems[OPTION_BUTTON] = null;
for (int i = 0; i < TOOLBAR_ANIMATION_POSITION_MAX; i++)
{
__pBackEventListener = null;
}
- if (__pMenuEventListener)
+ if (__pOptionEventListener)
{
- __pMenuEventListener = null;
+ __pOptionEventListener = null;
}
if (__pLongPressGesture != null)
pButton->SetPosition(FloatPoint((toolbarWidth - buttonWidth - horizontalMargin)/2, verticalMargin));
break;
- case MENU_BUTTON:
+ case OPTION_BUTTON:
if (IsButtonSet(LEFT_BUTTON) == true)
{
RemoveButtonAt(LEFT_BUTTON);
}
pButton->SetPosition(FloatPoint(0.0f, 0.0f));
- if (__pMenuEventListener)
+ if (__pOptionEventListener)
{
- pButton->AddActionEventListener(*__pMenuEventListener);
- pButton->SetActionId(__menuActionId);
+ pButton->AddActionEventListener(*__pOptionEventListener);
+ pButton->SetActionId(__optionActionId);
}
break;
}
}
- if (!(position == BACK_BUTTON || position == MENU_BUTTON) && __pActionEventListener != null)
+ if (!(position == BACK_BUTTON || position == OPTION_BUTTON) && __pActionEventListener != null)
{
pButton->AddActionEventListener(*__pActionEventListener);
}
case MIDDLE_BUTTON:
name = L"MiddleButtonText";
break;
- case MENU_BUTTON:
- name = L"MenuButtonText";
+ case OPTION_BUTTON:
+ name = L"OptionButtonText";
break;
default:
return;
pButtonElement->SetLabel("Back");
pButtonElement->SetTrait("Button");
}
- else if (position == MENU_BUTTON)
+ else if (position == OPTION_BUTTON)
{
- pButtonElement->SetLabel("Menu");
+ pButtonElement->SetLabel("Option");
pButtonElement->SetTrait("Button");
}
else
{
if (__itemCount == 0)
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
- else if (__highlightedItemIndex == __itemCount + 1)
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
else
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
}
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
{
if (__highlightedItemIndex < __itemCount)
{
- if (__pItems.at(__highlightedItemIndex))
+ if(__pItems.at(__highlightedItemIndex))
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pItems.at(__highlightedItemIndex)->Invalidate();
}
else
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
- else if (__highlightedItemIndex == __itemCount + 1)
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
else
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
}
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
bool
_Toolbar::OnFocusGained(const _Control& source)
{
- if (__header == true && __style != TOOLBAR_TEXT) // right align
- {
- OnHeaderFocusGained(source);
- }
- else
- {
- OnFooterFocusGained(source);
- }
-
- return true;
-}
-
-result
-_Toolbar::OnHeaderFocusGained(const _Control& source)
-{
- if (__itemCount == 0)
- {
- if (__pButtonItems[MENU_BUTTON] || __pButtonItems[LEFT_BUTTON])
- {
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- else
- {
- if (__pButtonItems[BACK_BUTTON] || __pButtonItems[RIGHT_BUTTON])
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- }
-
- __highlightedItemIndex = __itemCount + 1;
- }
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- else
- {
- if (__pButtonItems[BACK_BUTTON] || __pButtonItems[RIGHT_BUTTON])
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- }
-
- __highlightedItemIndex = __itemCount + 1;
- }
- }
- }
- }
- else if (__pButtonItems[BACK_BUTTON] || __pButtonItems[RIGHT_BUTTON])
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- }
- }
- }
- else // itemCount != 0
- {
- if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
- || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE)
- {
- __highlightedItemIndex = GetSelectedItemIndex();
- }
- else // not segmented
- {
- __highlightedItemIndex = 0;
- }
-
- if (__pItems.at(__highlightedItemIndex))
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
- }
-
- return E_SUCCESS;
-}
-
-result
-_Toolbar::OnFooterFocusGained(const _Control& source)
-{
- __highlightedItemIndex = 0;
-
if (__itemCount == 0)
{
- if (__pButtonItems[MENU_BUTTON] || __pButtonItems[LEFT_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- else
- {
- if (__pButtonItems[BACK_BUTTON] || __pButtonItems[RIGHT_BUTTON])
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- }
-
- __highlightedItemIndex = __itemCount + 1;
- }
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
+ if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
+ {
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[BACK_BUTTON])
+ {
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
+ }
+ }
+ else
+ {
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
__pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
__pButtonItems[LEFT_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- else
- {
- if (__pButtonItems[BACK_BUTTON] || __pButtonItems[RIGHT_BUTTON])
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- }
-
- __highlightedItemIndex = __itemCount + 1;
- }
- }
- }
- }
- else if (__pButtonItems[BACK_BUTTON] || __pButtonItems[RIGHT_BUTTON])
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- }
- }
- }
- else // itemCount != 0
- {
- if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
- || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE)
- {
- __highlightedItemIndex = GetSelectedItemIndex();
-
- if (__pItems.at(__highlightedItemIndex))
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
- }
- else // not segmented
- {
- if (__pButtonItems[MENU_BUTTON] || __pButtonItems[LEFT_BUTTON])
- {
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- else
- {
- if (__pItems.at(__highlightedItemIndex))
- {
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
- else
- {
- for (__highlightedItemIndex = 0; __highlightedItemIndex < __itemCount; __highlightedItemIndex++)
- {
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
-
- break;
- }
- }
-
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount + 1;
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount + 1;
- }
- }
- }
- }
- }
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- else
- {
- if (__pItems.at(__highlightedItemIndex))
- {
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
- else
- {
- for (__highlightedItemIndex = 0; __highlightedItemIndex < __itemCount; __highlightedItemIndex++)
- {
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
-
- break;
- }
- }
-
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount + 1;
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount + 1;
- }
- }
- }
- }
- }
- }
- }
- }
- else
- {
- if (__pItems.at(__highlightedItemIndex))
- {
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
- else
- {
- for (__highlightedItemIndex = 0; __highlightedItemIndex < __itemCount; __highlightedItemIndex++)
- {
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
-
- break;
- }
- }
-
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
-
- __highlightedItemIndex = __itemCount;
- }
- }
- }
- }
- }
- }
- }
- }
-
- return E_SUCCESS;
-}
-
-#if 0
-result
-_Toolbar::OnHeaderFocusGained(const _Control& source)
-{
- if (__itemCount == 0)
- {
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
- {
- if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
- {
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[MENU_BUTTON])
- {
- if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
- || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE)
- {
- if (__pItems.empty() == true)
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else
- {
- __highlightedItemIndex = GetSelectedItemIndex();
-
- if (__pItems.at(__highlightedItemIndex))
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
- }
- }
- else // not segmented
- {
- if (__pItems.empty() == true)
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else
- {
- if (__pItems.at(0))
- {
- __pItems.at(0)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(0)->Invalidate();
- }
- }
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED
- || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE)
- {
- if (__pItems.empty() == true)
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else
- {
- __highlightedItemIndex = GetSelectedItemIndex();
-
- if (__pItems.at(__highlightedItemIndex))
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
- }
- }
- else // not segmented
- {
- if (__pItems.empty() == true)
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else
- {
- if (__pItems.at(0))
- {
- __pItems.at(0)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(0)->Invalidate();
- }
- }
- }
- }
- }
- else if (__highlightedItemIndex == __itemCount + 1)
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- }
- else
- {
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- }
- }
- else
- {
- if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
- {
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- }
- }
- }
- else
- {
- if (__highlightedItemIndex < __itemCount)
- {
- if(__pItems.at(__highlightedItemIndex))
- {
- if(__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- else
- {
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
- {
- if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
- {
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- else if (__highlightedItemIndex == __itemCount + 1)
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- }
- else
- {
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- }
- }
- else
- {
- if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
- {
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- }
- }
- }
- }
-
- return E_SUCCESS;
-}
-
-result
-_Toolbar::OnFooterFocusGained(const _Control& source)
-{
- if (__itemCount == 0)
- {
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
- {
- if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
- {
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- else if (__highlightedItemIndex == __itemCount + 1)
- {
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- }
- }
- else
- {
- if (__highlightedItemIndex == __itemCount)
- {
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
}
}
}
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
{
if(__pItems.at(__highlightedItemIndex))
{
- if(__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
}
}
else
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
- else if (__highlightedItemIndex == __itemCount + 1)
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
else
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- if(__pButtonItems[MENU_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- if(__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
}
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- if(__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if(__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- __highlightedItemIndex++;
- OnFocusGained(source);
- }
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
}
}
- return E_SUCCESS;
+ return true;
}
-#endif
-
bool
_Toolbar::OnFocusLost(const _Control& source)
{
if (__itemCount == 0)
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
- else if (__highlightedItemIndex == __itemCount + 1)
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
else
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
}
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
}
else
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
- else if (__highlightedItemIndex == __itemCount + 1)
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount + 1 && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
else
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
}
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
- if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex == __itemCount && __pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
+ __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[BACK_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount && __pButtonItems[RIGHT_BUTTON])
+ {
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
{
if (__itemCount != 0)
{
- if (__highlightedItemIndex < (__itemCount - 1)) // 0,1
+ if (__highlightedItemIndex < (__itemCount - 1))
{
if (__pItems.at(__highlightedItemIndex) != null)
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
}
__highlightedItemIndex++;
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
-
- if (__highlightedItemIndex - __pToolbarPresenter->GetFirstLoadedItemIndex() == SEGMENTED_ITEM_MAX)
- {
- __pToolbarPresenter->SetItemFit(__highlightedItemIndex - (SEGMENTED_ITEM_MAX - 1));
- }
- }
- else
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
+
+ if (__highlightedItemIndex - __pToolbarPresenter->GetFirstLoadedItemIndex() == SEGMENTED_ITEM_MAX)
{
- OnKeyReleased(source, keyInfo);
+ __pToolbarPresenter->SetItemFit(__highlightedItemIndex - (SEGMENTED_ITEM_MAX - 1));
}
}
}
- else // 2, L, R, B,
+ else
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])
{
- if (__highlightedItemIndex == __itemCount - 1)
+ if (__highlightedItemIndex < __itemCount)
{
if (__pItems.at(__highlightedItemIndex) != null)
{
if (__highlightedItemIndex == selectedItemIndex)
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
}
else
{
- if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex < __itemCount)
{
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
__pItems.at(__highlightedItemIndex)->Invalidate();
}
}
}
-
- if (__pButtonItems[LEFT_BUTTON])
+ else
{
- if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
+ if (__highlightedItemIndex < __itemCount - 1)
{
- if (__pButtonItems[BACK_BUTTON])
+ if (__pItems.at(__highlightedItemIndex) != null)
{
- if (__highlightedItemIndex == __itemCount - 1)
+ if (__highlightedItemIndex == selectedItemIndex)
{
- __highlightedItemIndex++;
-
- if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- OnKeyReleased(source, keyInfo);
- }
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
}
- else if (__highlightedItemIndex == __itemCount)
+ else
{
- __highlightedItemIndex++;
-
- if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
-
- if (__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
+ if (__highlightedItemIndex < __itemCount)
{
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- OnKeyReleased(source, keyInfo);
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pItems.at(__highlightedItemIndex)->Invalidate();
}
}
- }
- else if (__pButtonItems[RIGHT_BUTTON])
- {
- if (__highlightedItemIndex == __itemCount - 1)
- {
- __highlightedItemIndex++;
- if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- OnKeyReleased(source, keyInfo);
- }
- }
- else if (__highlightedItemIndex == __itemCount)
+ if (__highlightedItemIndex - __pToolbarPresenter->GetFirstLoadedItemIndex() == SEGMENTED_ITEM_MAX)
{
- __highlightedItemIndex++;
+ __pToolbarPresenter->SetItemFit(__highlightedItemIndex - (SEGMENTED_ITEM_MAX - 1));
+ }
+ }
+ }
+ }
- if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ if (__pButtonItems[LEFT_BUTTON])
+ {
+ if (__pButtonItems[RIGHT_BUTTON])
+ {
+ if (__highlightedItemIndex == __itemCount - 1)
+ {
+ __highlightedItemIndex++;
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
+ }
+ else if (__highlightedItemIndex == __itemCount)
+ {
+ __highlightedItemIndex++;
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
- if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- OnKeyReleased(source, keyInfo);
- }
- }
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
else
if (__highlightedItemIndex == __itemCount - 1)
{
__highlightedItemIndex++;
-
- if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
- else
- {
- OnKeyReleased(source, keyInfo);
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
}
else
{
- if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
+ if (__pButtonItems[RIGHT_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- if (__highlightedItemIndex == __itemCount - 1)
- {
- __highlightedItemIndex++;
-
- if (__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- OnKeyReleased(source, keyInfo);
- }
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
+ if (__highlightedItemIndex == __itemCount - 1)
{
- if (__highlightedItemIndex == __itemCount - 1)
- {
- __highlightedItemIndex++;
-
- if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- OnKeyReleased(source, keyInfo);
- }
- }
+ __highlightedItemIndex++;
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
{
if (__pButtonItems[LEFT_BUTTON])
{
- if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
+ if (__pButtonItems[RIGHT_BUTTON])
{
- if (__pButtonItems[BACK_BUTTON])
- {
- if (__highlightedItemIndex == 0)
- {
- __highlightedItemIndex++;
-
- if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
-
- if (__pButtonItems[BACK_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[BACK_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[BACK_BUTTON]->Invalidate();
- }
- else
- {
- OnKeyReleased(source, keyInfo);
- }
- }
- }
- else if (__pButtonItems[RIGHT_BUTTON])
+ if (__highlightedItemIndex == 0)
{
- if (__highlightedItemIndex == 0)
- {
- __highlightedItemIndex++;
-
- if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __highlightedItemIndex++;
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
- if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED)
- {
- __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[RIGHT_BUTTON]->Invalidate();
- }
- else
- {
- OnKeyReleased(source, keyInfo);
- }
- }
+ __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[RIGHT_BUTTON]->Invalidate();
}
}
}
{
if (__itemCount != 0)
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON]) // L Item R
{
if (__highlightedItemIndex == __itemCount)
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
__highlightedItemIndex = 0;
{
if (__highlightedItemIndex == __itemCount)
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
__highlightedItemIndex = 0;
}
}
}
- else // L is null
+ else // __pButtonItems[LEFT_BUTTON] is null
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON]) // Item R
{
}
else // __itemCount = 0
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
if (__highlightedItemIndex == 0)
{
__highlightedItemIndex++;
-
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
if (__pButtonItems[BACK_BUTTON])
{
{
if (__itemCount != 0)
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON]) // L Item R
{
__highlightedItemIndex = __itemCount;
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
else if (__highlightedItemIndex < __itemCount)
{
__highlightedItemIndex = __itemCount;
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
else if (__highlightedItemIndex < __itemCount)
{
}
}
}
- else // L is null
+ else // __pButtonItems[LEFT_BUTTON] is null
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON]) // Item R
{
}
else // __itemCount == 0
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
__highlightedItemIndex--;
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[MENU_BUTTON]->Invalidate();
- }
- else if (__pButtonItems[LEFT_BUTTON])
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pButtonItems[LEFT_BUTTON]->Invalidate();
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+ __pButtonItems[LEFT_BUTTON]->Invalidate();
}
}
}
{
if (__itemCount != 0)
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON]) // L Item R
{
|| __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE)
{
SetItemSelected(__highlightedItemIndex, true, false);
-
- if (__pItems.empty() == false)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
+ //__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
else
{
}
else if (__highlightedItemIndex == __itemCount)
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
- if (__pButtonItems[MENU_BUTTON] != null)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON] != null)
{
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
-
- if (__pButtonItems[LEFT_BUTTON] != null)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
else if (__highlightedItemIndex == __itemCount + 1)
|| __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE)
{
SetItemSelected(__highlightedItemIndex, true, false);
-
- if (__pItems.empty() == false)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
+ //__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
else
{
}
else if (__highlightedItemIndex == __itemCount)
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
- if (__pButtonItems[MENU_BUTTON] != null)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON] != null)
{
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
-
- if (__pButtonItems[LEFT_BUTTON] != null)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
}
- else // L is null
+ else // __pButtonItems[LEFT_BUTTON] is null
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON]) // Item R
{
|| __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE)
{
SetItemSelected(__highlightedItemIndex, true, false);
-
- if (__pItems.empty() == false)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
+ //__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
else
{
- _Button* beforeButton = dynamic_cast<_Button*>(__pItems.at(__highlightedItemIndex));
-
__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED);
- if (__highlightedItemIndex < __itemCount)
+ if (__pItems.empty() == false)
{
- _Button* afterButton = dynamic_cast<_Button*>(__pItems.at(__highlightedItemIndex));
-
- if (afterButton != NULL && (afterButton == beforeButton))
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- }
+ __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
|| __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE)
{
SetItemSelected(__highlightedItemIndex, true, false);
-
- if (__pItems.empty() == false)
- {
- __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- __pItems.at(__highlightedItemIndex)->Invalidate();
- }
+ //__pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
else
{
}
else // __itemCount == 0
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON]) // L R
{
if (__highlightedItemIndex == 0)
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
- if (__pButtonItems[MENU_BUTTON] != null)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON] != null)
{
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
-
- if (__pButtonItems[LEFT_BUTTON] != null)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
else if (__highlightedItemIndex == 1)
{
if (__highlightedItemIndex == 0)
{
- if (__pButtonItems[MENU_BUTTON])
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
- if (__pButtonItems[MENU_BUTTON] != null)
- {
- __pButtonItems[MENU_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- }
- }
- else if (__pButtonItems[LEFT_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON] != null)
{
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_SELECTED);
-
- if (__pButtonItems[LEFT_BUTTON] != null)
- {
- __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
- }
+ __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
}
}
}
}
- else // L is null
+ else // __pButtonItems[LEFT_BUTTON] is null
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON]) // R
{
{
__pActionEventListener = null;
- //for (int i = 0; i < __itemCount; i++)
- //{
- //__pItems.at(i)->RemoveActionEventListener(listener);
- //}
+ for (int i = 0; i < __itemCount; i++)
+ {
+ __pItems.at(i)->RemoveActionEventListener(listener);
+ }
- //for (int j = 0; j < MIDDLE_BUTTON; j++)
- //{
- // if (__pButtonItems[j])
- // {
- // __pButtonItems[j]->RemoveActionEventListener(listener);
- // }
- //}
+ for (int j = 0; j < MIDDLE_BUTTON; j++)
+ {
+ if (__pButtonItems[j])
+ {
+ __pButtonItems[j]->RemoveActionEventListener(listener);
+ }
+ }
return;
}
void
-_Toolbar::SetMenuEventListener(const Controls::_IActionEventListener& listener, int actionId)
+_Toolbar::SetOptionEventListener(const Controls::_IActionEventListener& listener, int actionId)
{
- __menuActionId = actionId;
- __pMenuEventListener = const_cast<_IActionEventListener*>(&listener);
+ __optionActionId = actionId;
+ __pOptionEventListener = const_cast<_IActionEventListener*>(&listener);
return;
}
GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth);
totalWidth += itemMinimumWidth;
}
- else if (IsButtonSet(MENU_BUTTON))
+ else if (IsButtonSet(OPTION_BUTTON))
{
GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth);
totalWidth += itemMinimumWidth;
GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth);
totalWidth += itemMinimumWidth;
}
- else if (IsButtonSet(MENU_BUTTON))
+ else if (IsButtonSet(OPTION_BUTTON))
{
GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth);
totalWidth += itemMinimumWidth;
{
if (__pButtonItems[BACK_BUTTON]) // L,B
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
__pButtonItems[BACK_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin,
(__itemArea.height - footerButtonItemHeight) / 2, footerButtonItemWidth, footerButtonItemHeight));
- __pButtonItems[MENU_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[OPTION_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
footerButtonItemWidth, footerButtonItemHeight));
__pButtonItems[BACK_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
- __pButtonItems[MENU_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[OPTION_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
else
{
{
if (__style != TOOLBAR_SOFTKEY)
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
__pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin,
(__itemArea.height - footerButtonItemHeight) / 2, footerButtonItemWidth, footerButtonItemHeight));
- __pButtonItems[MENU_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[OPTION_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
footerButtonItemWidth, footerButtonItemHeight));
__pButtonItems[RIGHT_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
- __pButtonItems[MENU_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[OPTION_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
else
{
{
if (__pButtonItems[BACK_BUTTON]) // B
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
- __pButtonItems[MENU_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[OPTION_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
footerButtonItemWidth, footerButtonItemHeight));
- __pButtonItems[MENU_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[OPTION_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
__pButtonItems[BACK_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin,
(__itemArea.height - footerButtonItemHeight) / 2, footerButtonItemWidth, footerButtonItemHeight));
{
if (__style != TOOLBAR_SOFTKEY)
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
- __pButtonItems[MENU_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[OPTION_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
footerButtonItemWidth, footerButtonItemHeight));
- __pButtonItems[MENU_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[OPTION_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
__pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin,
{
if (__pButtonItems[BACK_BUTTON]) // L B
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
__pButtonItems[BACK_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin,
(__itemArea.height - footerButtonItemHeight) / 2, footerButtonItemWidth, footerButtonItemHeight));
- __pButtonItems[MENU_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[OPTION_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
footerButtonItemWidth, footerButtonItemHeight));
__pButtonItems[BACK_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
- __pButtonItems[MENU_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[OPTION_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
else
{
{
if (__style != TOOLBAR_SOFTKEY)
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
- __pButtonItems[MENU_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[OPTION_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
footerButtonItemWidth, footerButtonItemHeight));
- __pButtonItems[MENU_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[OPTION_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
else
{
{
if (__pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
- __pButtonItems[MENU_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[OPTION_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
footerButtonItemWidth, footerButtonItemHeight));
- __pButtonItems[MENU_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[OPTION_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
__pButtonItems[BACK_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth - footerLeftMargin + rightTouchMargin,
}
else
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
- __pButtonItems[MENU_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
+ __pButtonItems[OPTION_BUTTON]->SetBounds(FloatRectangle(footerLeftMargin - leftTouchMargin, (__itemArea.height - footerButtonItemHeight) / 2,
footerButtonItemWidth, footerButtonItemHeight));
- __pButtonItems[MENU_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
+ __pButtonItems[OPTION_BUTTON]->SetTouchMargin(leftTouchMargin, topTouchMargin, rightTouchMargin, bottomTouchMargin);
}
}
}
}
else if (__itemCount == 3)
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[OPTION_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
{
if (__pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
rightMargin = footerLeftMargin;
itemButtonRightGap = footerLeftMargin;
}
else
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
rightMargin = footerLeftMargin;
itemButtonRightGap = footerLeftMargin;
}
else if (__itemCount == 3)
{
- if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[OPTION_BUTTON])
{
if (__pButtonItems[RIGHT_BUTTON] || __pButtonItems[BACK_BUTTON])
{
{
if (__pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
tabRightMargin = footerLeftMargin;
itemButtonRightGap = footerLeftMargin;
}
else
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
tabRightMargin = footerLeftMargin;
itemButtonRightGap = footerLeftMargin;
{
if (__pButtonItems[BACK_BUTTON])
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
tabRightMargin = footerLeftMargin;
itemButtonRightGap = footerLeftMargin;
}
else
{
- if (__pButtonItems[MENU_BUTTON])
+ if (__pButtonItems[OPTION_BUTTON])
{
tabRightMargin = footerLeftMargin;
itemButtonRightGap = footerLeftMargin;
static result ReleaseInstance(void);
static bool __wakeUpEventAdded;
- // For restoring gl context
- typedef void (*RestoreContextCallback)(void);
- static void SetRestoreContextCallback(RestoreContextCallback pRestoreContextCallback);
- static void RestoreContext(void);
public:
_RootVisualElement* CreateRoot(void);
static int __eventType;
static void* __pWakeUpEventHandler;
static _DisplayManager* __pInstance;
- static RestoreContextCallback __pRestoreContextCallback;
}; // _DisplayManager
}}} //namespace Tizen { namespace Ui { namespace Animations
result GetKeypadBounds(Tizen::Graphics::FloatRectangle& bounds) const;
float GetClipboardHeight(void) const;
bool CheckKeypadExist(_ControlOrientation orientation);
- bool IsKeypadRotating(_ControlOrientation orientation);
KeypadStyle GetKeypadStyle(void) const;
int GetTextLimitLength(void) const;
int GetMaxLineCount(void) const;
result OnTitleSlidingTimerExpired(void);
result OnFlickTimerExpired(void);
bool IsDelimiter(wchar_t character) const;
- void AdjustParentPanelHeight(bool restore);
+ void AdjustParentPanelHeight(bool restore, bool panelResizeByPrediction = false);
result ChangeLayoutInternal(_ControlOrientation orientation, bool deflateForm = true);
_Button* CreateCommandButtonItemN(int actionId, const Tizen::Base::String& text);
void CheckInitialFooterVisibleState(void);
bool IsHeaderVisible(void) const;
bool IsFooterVisible(void) const;
bool IsIndicatorTranslucent(void) const;
- bool IsIndicatorAutoHide(void) const;
bool IsHeaderTranslucent(void) const;
bool IsFooterTranslucent(void) const;
bool IsTabTranslucent(void) const;
void CreateSoftkey(unsigned long formStyle);
void SetTabStyle(int style);
- result SetIndicatorShowState(bool state);
- result SetIndicatorAutoHide(bool autohide);
+ result SetIndicatorShowState(bool state, bool hide = false);
result SetIndicatorOpacity(_IndicatorOpacity opacity);
virtual bool OnMousePressed(const _Control& source, const _MouseInfo& mouseinfo);
//Back button action ID
static const int ID_BACK_BUTTON = -10;
- static const int ID_MENU_BUTTON = -20;
+ static const int ID_OPTION_BUTTON = -20;
//For Focus UI
mutable std::unique_ptr<Tizen::Base::Collection::IListT<_Control*> > __pFocusControlList;
static _Indicator* CreateIndicator(void);
- result SetIndicatorShowState(bool state);
- result SetIndicatorAutoHide(bool autohide);
+ result SetIndicatorShowState(bool state, bool hide = false);
result SetIndicatorOpacity(_IndicatorOpacity opacity);
bool GetIndicatorShowState(void) const;
_IndicatorOpacity GetIndicatorOpacity(void) const;
- bool GetIndicatorAutoHide(void) const;
result AddIndicatorObject(_Control* pControl, _Window* pWindow);
result DeleteIndicatorObject(void);
result ChangeCurrentVisualElement(Tizen::Ui::Animations::_VisualElement* pVisualElement);
Tizen::Ui::Animations::_VisualElement* __pCurrentVisualElement;
_Window* __pWindow;
bool __showstate;
- bool __autohide;
_IndicatorOpacity __opacity;
Tizen::Ui::_ControlOrientation __orientation;
RIGHT_BUTTON,
MIDDLE_BUTTON,
BACK_BUTTON,
- MENU_BUTTON,
+ OPTION_BUTTON,
BUTTON_MAX
};
void SetBackEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener, int actionId);
- void SetMenuEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener, int actionId);
+ void SetOptionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener, int actionId);
virtual result OnAttachedToMainTree(void);
result InitToolbarColor(void);
- result OnHeaderFocusGained(const _Control& source);
-
- result OnFooterFocusGained(const _Control& source);
-
private:
bool __header;
Tizen::Ui::Controls::_IActionEventListener* __pBackEventListener;
- Tizen::Ui::Controls::_IActionEventListener* __pMenuEventListener;
+ Tizen::Ui::Controls::_IActionEventListener* __pOptionEventListener;
_TouchLongPressGestureDetector* __pLongPressGesture;
int __backActionId;
- int __menuActionId;
+ int __optionActionId;
int __itemCount;