resource/FUi_ResourceStringLoader.cpp
resource/FUi_ResourceConfigLoader.cpp
resource/FUi_ResourceConfigParser.cpp
+ resource/FUi_ResourceFocusUiConfig.cpp
## EFFECTS
effects/FUiEffects_EffectErrorMessages.cpp
effects/FUiEffects_EffectManagerImpl.cpp
#include "FUiAnim_VisualElementImpl.h"
#include "FUiCtrl_Form.h"
#include "FUiCtrl_Frame.h"
+#include "FUi_ContainerImpl.h"
using namespace std;
using namespace Tizen::Base;
delete __pAccessibilityContainer;
__pAccessibilityContainer = null;
+
+ if (__pFocusVisualElement)
+ {
+ __pFocusVisualElement.release();
+ }
}
// E_OUT_OF_MEMORY
pCanvas->SetBackgroundColor(0x55555555);
pCanvas->Clear();
Bitmap* pBitmap = null;
- result r = GET_BITMAP_CONFIG_N(ACCESSIBILITY::POPUP_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
+ result r = GET_BITMAP_CONFIG_N(FOCUSUI::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap);
if (r == E_SUCCESS)
{
_IControlDelegate& delegate = GetControlDelegate();
delegate.OnDrawFocus();
}
+
+void
+_Control::MakeFocusList(const _Control* pControl, IListT<_Control*>* pFocusControlList) const
+{
+ int childCount = pControl->GetChildCount();
+ for(int i = 0; i < childCount; i++)
+ {
+ _Control* pChildControl = pControl->GetChild(i);
+ Rectangle rect = pChildControl->GetAbsoluteBounds();
+ unique_ptr<IEnumeratorT<_Control*> > pEnum (pFocusControlList->GetEnumeratorN());
+ int index = 0;
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ _Control* pEnumeratorControl = null;
+ pEnum->GetCurrent(pEnumeratorControl);
+ if (pEnumeratorControl != null)
+ {
+ Rectangle enumeratorRect = pEnumeratorControl->GetAbsoluteBounds();
+ if(enumeratorRect.y > rect.y)
+ {
+ break;
+ }
+ else if (enumeratorRect.y == rect.y)
+ {
+ if(enumeratorRect.x > rect.x)
+ {
+ break;
+ }
+ }
+
+ index ++;
+ }
+ }
+ pFocusControlList->InsertAt(pChildControl, index);
+ }
+}
+
+void
+_Control::MakeChildContainerFocusList(const _Control* pControl, int startIndex , IListT<_Control*>* pFocusControlList) const
+{
+ unique_ptr<IListT<_Control*> > pTempList (new (std::nothrow) ArrayListT<_Control*>);
+ SysTryReturnVoidResult(NID_UI_CTRL, pTempList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+ MakeFocusList(pControl, pTempList.get());
+
+ unique_ptr<IEnumeratorT<_Control*> > pTempEnum(pTempList->GetEnumeratorN());
+ int index = ++startIndex;
+ while (pTempEnum->MoveNext() == E_SUCCESS)
+ {
+ _Control* pEnumeratorControl = null;
+ pTempEnum->GetCurrent(pEnumeratorControl);
+ pFocusControlList->InsertAt(pEnumeratorControl, index);
+ index ++;
+ }
+}
+
+Tizen::Base::Collection::IListT<_Control*>*
+_Control::GetFocusListN(void) const
+{
+ unique_ptr<IListT<_Control*> > pControlFocusList (new (std::nothrow) ArrayListT<_Control*>);
+ SysTryReturn(NID_UI_CTRL, pControlFocusList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ MakeFocusList(this, pControlFocusList.get());
+
+ unique_ptr<IEnumeratorT<_Control*> > pEnum(pControlFocusList->GetEnumeratorN());
+ SysTryReturn(NID_UI_CTRL, pEnum, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ int i =0;
+ int nextContainerIndex = -1;
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ _Control* pEnumeratorControl = null;
+ pEnum->GetCurrent(pEnumeratorControl);
+ _ContainerImpl* pTempContainerImpl = dynamic_cast<_ContainerImpl*>(static_cast <_ControlImpl* >(pEnumeratorControl->GetUserData()));
+
+ if (pTempContainerImpl != null && (nextContainerIndex < i))
+ {
+ if (pEnumeratorControl->IsChildControlFocusManage() == false)
+ {
+ MakeChildContainerFocusList(pEnumeratorControl, i, pControlFocusList.get());
+ nextContainerIndex = i;
+ pEnum.reset(pControlFocusList->GetEnumeratorN());
+ i = -1;
+ }
+ }
+ i++;
+ }
+ return pControlFocusList.release();
+}
}} // Tizen::Ui
return true;
}
-void
-_Form::MakeFocusList(const _Control* pControl, IListT<_Control*>* pFocusControlList) const
-{
- int childCount = pControl->GetChildCount();
- for(int i = 0; i < childCount; i++)
- {
- _Control* pChildControl = pControl->GetChild(i);
- Rectangle rect = pChildControl->GetAbsoluteBounds();
- unique_ptr<IEnumeratorT<_Control*> > pEnum (pFocusControlList->GetEnumeratorN());
- int index = 0;
- while (pEnum->MoveNext() == E_SUCCESS)
- {
- _Control* pEnumeratorControl = null;
- pEnum->GetCurrent(pEnumeratorControl);
- if (pEnumeratorControl != null)
- {
- Rectangle enumeratorRect = pEnumeratorControl->GetAbsoluteBounds();
- if(enumeratorRect.y > rect.y)
- {
- break;
- }
- else if (enumeratorRect.y == rect.y)
- {
- if(enumeratorRect.x > rect.x)
- {
- break;
- }
- }
-
- index ++;
- }
- }
- pFocusControlList->InsertAt(pChildControl, index);
- }
-}
-
-void
-_Form::MakeChildContainerFocusList(_Control* pControl, int startIndex) const
-{
- unique_ptr<IListT<_Control*> > pTempList (new (std::nothrow) ArrayListT<_Control*>);
- SysTryReturnVoidResult(NID_UI_CTRL, pTempList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- MakeFocusList(pControl, pTempList.get());
-
- unique_ptr<IEnumeratorT<_Control*> > pTempEnum(pTempList->GetEnumeratorN());
- int index = ++startIndex;
- while (pTempEnum->MoveNext() == E_SUCCESS)
- {
- _Control* pEnumeratorControl = null;
- pTempEnum->GetCurrent(pEnumeratorControl);
- __pFocusControlList->InsertAt(pEnumeratorControl, index);
- index ++;
- }
-}
-
IListT<_Control*>*
_Form::GetFocusList(void) const
{
if(!__pFocusControlList)
{
- __pFocusControlList.reset(new (std::nothrow) ArrayListT<_Control*>);
- SysTryReturn(NID_UI, __pFocusControlList, null, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- MakeFocusList(this, __pFocusControlList.get());
-
- unique_ptr<IEnumeratorT<_Control*> > pEnum(__pFocusControlList->GetEnumeratorN());
- int i =0;
- int nextContainerIndex = -1;
- while ( pEnum->MoveNext() == E_SUCCESS)
- {
- _Control* pEnumeratorControl = null;
- pEnum->GetCurrent(pEnumeratorControl);
- _ContainerImpl* pTempContainerImpl = dynamic_cast<_ContainerImpl*>(static_cast <_ControlImpl* >(pEnumeratorControl->GetUserData()));
-
- if (pTempContainerImpl != null && (nextContainerIndex < i))
- {
- if (pEnumeratorControl->IsChildControlFocusManage() == false)
- {
- MakeChildContainerFocusList(pEnumeratorControl, i);
- nextContainerIndex = i;
- pEnum.reset(__pFocusControlList->GetEnumeratorN());
- i = -1;
- }
- }
- i++;
- }
- __pFocusControlList->InsertAt(dynamic_cast<_Control*> (const_cast<_Form*>(this)), 0);
+ __pFocusControlList.reset(GetFocusListN());
+ __pFocusControlList->InsertAt(const_cast<_Form*>(this), 0);
}
-
return __pFocusControlList.get();
}
// Focus UI
Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
- void MakeFocusList(const _Control* pControl, Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const;
- void MakeChildContainerFocusList(_Control* pControl, int startIndex) const;
// Accessor
protected:
void SetNativeObjectFocusable(bool focusable);
// Focus UI
- void SetPreviousFocus(_Control* pPreviousFocus);
- void SetNextFocus(_Control* pNextFocus);
- _Control* GetPreviousFocus() const;
- _Control* GetNextFocus() const;
- void DrawFocus(void);
+ void SetPreviousFocus(_Control* pPreviousFocus);
+ void SetNextFocus(_Control* pNextFocus);
+ _Control* GetPreviousFocus() const;
+ _Control* GetNextFocus() const;
+ void DrawFocus(void);
+ Tizen::Base::Collection::IListT<_Control*>* GetFocusListN(void) const;
// Clipping
bool IsClipToParent(void) const;
void SetEventListener(_IntToType<_UI_EVENT_FOCUS>, _IFocusEventListener* pListener);
void SetEventListener(_IntToType<_UI_EVENT_NOTIFICAITON>, _INotificationEventListener* pListener);
+// Focus Ui
+ void MakeFocusList(const _Control* pControl, Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const;
+ void MakeChildContainerFocusList(const _Control* pControl, int startIndex, Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const;
+
private:
_ControlHandle __controlHandle;
Tizen::Base::String __name;
--- /dev/null
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "FUi_ResourceConfigMacro.h"
+
+START_UI_CONFIG(FOCUSUI);
+{
+ ADD_IMAGE_CONFIG(FOCUS,#00_focus.#.png);
+}
+END_UI_CONFIG(FOCUSUI);
+