DateTimePicker changes according to new UI Spec.
authorsr.shashank <sr.shashank@samsung.com>
Wed, 27 Mar 2013 10:32:16 +0000 (16:02 +0530)
committersr.shashank <sr.shashank@samsung.com>
Tue, 2 Apr 2013 10:10:33 +0000 (15:40 +0530)
Change-Id: I6ffe1957d0d6652efe8a66b0cba0d68351b7b39d
Signed-off-by: sr.shashank <sr.shashank@samsung.com>
src/ui/controls/FUiCtrl_DateTimePicker.cpp
src/ui/controls/FUiCtrl_DateTimePresenter.cpp
src/ui/inc/FUiCtrl_DateTimePicker.h
src/ui/inc/FUiCtrl_DateTimePresenter.h
src/ui/inc/FUi_ResourceDateTimePickerConfig.h
src/ui/resource/FUi_ResourceDateTimePickerConfig.cpp

index 8257994..b5578aa 100644 (file)
@@ -57,7 +57,6 @@ IMPLEMENT_PROPERTY(_DateTimePicker);
 
 _DateTimePicker::_DateTimePicker(_DateTimePresenter* pPresenter, const String& title)
        : __pPresenter(pPresenter)
-       , __pHeader(null)
        , __pFooter(null)
        , __title(title)
        , __pDateTimeChangeEvent(null)
@@ -75,13 +74,6 @@ _DateTimePicker::~_DateTimePicker(void)
                __pDateTimeChangeEvent = null;
        }
 
-       if (__pHeader != null)
-       {
-               DetachSystemChild(*__pHeader);
-               delete __pHeader;
-               __pHeader = null;
-       }
-
        if (__pFooter != null)
        {
                DetachSystemChild(*__pFooter);
@@ -122,15 +114,18 @@ _DateTimePicker::CreateDateTimePickerN(int style, const String& title)
        result r = E_SUCCESS;
        FloatDimension pickerSize(0.0f, 0.0f);
        FloatDimension screenSize(0.0f, 0.0f);
+       FloatRectangle indicatorBounds(0.0f, 0.0f, 0.0f, 0.0f);
        _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
+       _DateTimePresenter* pPresenter = null;
+       _DateTimePicker* pView = null;
 
        SysTryReturn(NID_UI_CTRL, ((style & DATETIME_OUTPUT_STYLE_DATETIME) != DATETIME_OUTPUT_STYLE_INVALID), null, E_INVALID_ARG,
                                "[E_INVALID_ARG] Invalid argument(s) is used. The style provided is not present in the _DateTimeOutputStyle list.");
 
-       _DateTimePresenter* pPresenter = new (std::nothrow) _DateTimePresenter(style, title);
+       pPresenter = new (std::nothrow) _DateTimePresenter(style, title);
        SysTryReturn(NID_UI_CTRL, (pPresenter != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
-       _DateTimePicker* pView = new (std::nothrow) _DateTimePicker(pPresenter, title);
+       pView = new (std::nothrow) _DateTimePicker(pPresenter, title);
        SysTryCatch(NID_UI_CTRL, (pView != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
        r = pView->InitializeFont();
@@ -147,17 +142,18 @@ _DateTimePicker::CreateDateTimePickerN(int style, const String& title)
                pickerSize.width = screenSize.height;
                pickerSize.height = screenSize.width;
        }
+
+       indicatorBounds = pView->GetIndicatorBoundsF();
+       pickerSize.height -= indicatorBounds.height;
+
+       r = pView->SetPosition(FloatPoint(0.0f, indicatorBounds.height));
+       SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM,
+                               "[E_SYSTEM] A system error has occurred. Failed to set the position for this control");
+
        r = pView->SetSize(pickerSize);
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM,
                                "[E_SYSTEM] A system error has occurred. Failed to set the size for this control");
 
-       if (title.IsEmpty() == false && orientation == _CONTROL_ORIENTATION_PORTRAIT)
-       {
-               r = pView->CreateHeader();
-               SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM,
-                                       "[E_SYSTEM] A system error has occurred. Failed to create the header for this control");
-       }
-
        r = pView->CreateFooter();
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM,
                                        "[E_SYSTEM] A system error has occurred. Failed to create the footer for this control");
@@ -191,67 +187,6 @@ CATCH:
 }
 
 result
-_DateTimePicker::CreateHeader(void)
-{
-       FloatRectangle indicatorBounds(0.0f, 0.0f, 0.0f, 0.0f);
-       FloatRectangle headerBounds(0.0f, 0.0f, 0.0f, 0.0f);
-       _Frame* pFrame = dynamic_cast <_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
-       SysTryReturnResult(NID_UI_CTRL, (pFrame != null), E_SYSTEM,
-                                         "A system error has occurred. Failed to get the instance of frame.");
-
-       _Form* pForm = pFrame->GetCurrentForm();
-       SysTryReturnResult(NID_UI_CTRL, (pForm != null), E_SYSTEM,
-                                         "A system error has occurred. Failed to get the instance of form.");
-
-       indicatorBounds = pForm->GetIndicatorBoundsF();
-
-       _Toolbar* pHeader = _Toolbar::CreateToolbarN(true);
-       result r = GetLastResult();
-       SysTryReturnResult(NID_UI_CTRL, (pHeader != null), r, "[%s] Propagating.", GetErrorMessage(r));
-
-       r = AttachSystemChild(*pHeader);
-       if (r != E_SUCCESS)
-       {
-               delete pHeader;
-               return r;
-       }
-
-       pHeader->SetStyle(TOOLBAR_TITLE);
-       pHeader->SetTitleText(__title);
-       pHeader->SetMovable(true);
-       pHeader->SetResizable(true);
-       headerBounds = pHeader->GetBoundsF();
-       headerBounds.y = indicatorBounds.height;
-       pHeader->SetBounds(headerBounds);
-       pHeader->SetMovable(false);
-       pHeader->SetResizable(false);
-
-       if (__pHeader != null)
-       {
-               DetachSystemChild(*__pHeader);
-               delete __pHeader;
-               __pHeader = null;
-       }
-
-       __pHeader = pHeader;
-
-       return E_SUCCESS;
-}
-
-result
-_DateTimePicker::DestroyHeader(void)
-{
-       if (__pHeader != null)
-       {
-               DetachSystemChild(*__pHeader);
-               delete __pHeader;
-               __pHeader = null;
-       }
-
-       return E_SUCCESS;
-}
-
-result
 _DateTimePicker::CreateFooter(void)
 {
        result r = E_SUCCESS;
@@ -356,28 +291,6 @@ _DateTimePicker::DestroyFooter(void)
        return E_SUCCESS;
 }
 
-FloatRectangle
-_DateTimePicker::GetHeaderBounds(void)
-{
-       FloatRectangle headerBounds(0.0f, 0.0f, 0.0f, 0.0f);
-       float headerHeight = 0.0f;
-
-       GET_SHAPE_CONFIG(HEADER::HEIGHT, GetOrientation(), headerHeight);
-
-       _Frame* pFrame = dynamic_cast <_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
-       SysTryReturn(NID_UI_CTRL, (pFrame != null), FloatRectangle(), E_SYSTEM,
-                                "[E_SYSTEM] A system error has occurred. Failed to get the instance of frame.");
-
-       _Form* pForm = pFrame->GetCurrentForm();
-       SysTryReturn(NID_UI_CTRL, (pForm != null), FloatRectangle(), E_SYSTEM,
-                                "[E_SYSTEM] A system error has occurred. Failed to get the instance of form.");
-
-       headerBounds = pForm->GetIndicatorBoundsF();
-       headerBounds.height += headerHeight;
-
-       return headerBounds;
-}
-
 result
 _DateTimePicker::CreateDisplayVisualElement(void)
 {
@@ -990,6 +903,7 @@ _DateTimePicker::OnChangeLayout(_ControlOrientation orientation)
        result r = E_SUCCESS;
        FloatDimension pickerSize(0.0f, 0.0f);
        FloatDimension screenSize(0.0f, 0.0f);
+       FloatRectangle indicatorBounds(0.0f, 0.0f, 0.0f, 0.0f);
 
        screenSize = _ControlManager::GetInstance()->GetScreenSizeF();
        pickerSize = screenSize;
@@ -999,23 +913,17 @@ _DateTimePicker::OnChangeLayout(_ControlOrientation orientation)
                pickerSize.height = screenSize.width;
        }
 
+       indicatorBounds = GetIndicatorBoundsF();
+       pickerSize.height -= indicatorBounds.height;
+
+       SetMovable(true);
        SetResizable(true);
-       SetSize(pickerSize);
-       SetResizable(false);
 
-       if (__pHeader != null)
-       {
-               r = DestroyHeader();
-               SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM,
-                                                         "[E_SYSTEM] A system error has occurred. Failed to destroy the header for this control.");
-       }
+       SetSize(pickerSize);
+       SetPosition(FloatPoint(0.0f, indicatorBounds.height));
 
-       if (orientation == _CONTROL_ORIENTATION_PORTRAIT && __title.IsEmpty() == false)
-       {
-               r = CreateHeader();
-               SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM,
-                                                         "[E_SYSTEM] A system error has occurred. Failed to create the header for this control.");
-       }
+       SetMovable(false);
+       SetResizable(false);
 
        r = DestroyFooter();
        SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM,
@@ -1109,12 +1017,6 @@ _DateTimePicker::OnFontChanged(Font* pFont)
                        SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.");
                }
 
-               if (__pHeader != null)
-               {
-                       r = __pHeader->SetFont(pFont->GetFaceName());
-                       SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.");
-               }
-
                if (__pFooter != null)
                {
                        for (int i=0; i < __pFooter->GetItemCount(); i++)
@@ -1163,4 +1065,27 @@ _DateTimePicker::InitializeFont(void)
        return r;
 }
 
+FloatRectangle
+_DateTimePicker::GetIndicatorBoundsF(void)
+{
+       FloatRectangle indicatorBounds(0.0f, 0.0f, 0.0f, 0.0f);
+       _Frame* pFrame = null;
+       _Form* pForm = null;
+
+       pFrame = dynamic_cast <_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
+       SysTryReturn(NID_UI_CTRL, (pFrame != null), FloatRectangle(), E_SYSTEM,
+                                         "[E_SYSTEM] A system error has occurred. Failed to get the instance of frame.");
+
+       pForm = pFrame->GetCurrentForm();
+       SysTryReturn(NID_UI_CTRL, (pForm != null), FloatRectangle(), E_SYSTEM,
+                                         "[E_SYSTEM] A system error has occurred. Failed to get the instance of form.");
+
+       if (pForm->HasIndicator())
+       {
+               indicatorBounds = pForm->GetIndicatorBoundsF();
+       }
+
+       return indicatorBounds;
+}
+
 }}} // Tizen::Ui::Controls
index 73551e9..c7b7f51 100755 (executable)
@@ -69,6 +69,7 @@ _DateTimePresenter::_DateTimePresenter(int pickerStyle, const String& title)
        , __isFocusBoxChanged(false)
        , __inputComposing(DATETIME_INPUT_END)
        , __changeFocusCounter(DATE_TIME_CHANGE_FOCUS_COUNTER_MIN)
+       , __title(title)
        , __pPmBoxNormalBitmap(null)
        , __pPmBoxEffectBitmap(null)
        , __pPmBoxPressedEffectBitmap(null)
@@ -428,6 +429,11 @@ _DateTimePresenter::Draw(void)
        // Draw DisplayBox Background
        DrawBackground(*pCanvas);
 
+       if (!__title.IsEmpty())
+       {
+               DrawTitle(*pCanvas);
+       }
+
        DrawDividers(*pCanvas);
 
        for (int i = 0; i < __outputBoxMaxCount; i++)
@@ -922,9 +928,6 @@ _DateTimePresenter::UpdateDateTimeOutputConfig(void)
        GET_SHAPE_CONFIG(DATETIMEPICKER::AMPM_WIDTH, orientation, amPmWidth);
        GET_SHAPE_CONFIG(DATETIMEPICKER::TIME_AMPM_MARGIN, orientation, amPmMargin);
 
-       dateTimeElementY = (outputAreaBounds.height - dateTimeDisplayBoxHeight) / 2.0f;
-       amPmElementY = (outputAreaBounds.height - amPmDisplayBoxHeight) / 2.0f;
-
        if (__pickerStyle == DATETIME_OUTPUT_STYLE_DATE)
        {
                dateBounds.width = monthBounds.width = yearBounds.width = dpDateElementWidth;
@@ -939,6 +942,25 @@ _DateTimePresenter::UpdateDateTimeOutputConfig(void)
        dateBounds.height = monthBounds.height = yearBounds.height = hourBounds.height = minuteBounds.height = dateTimeDisplayBoxHeight;
        amPmBounds.height = amPmDisplayBoxHeight;
 
+       if (__title.IsEmpty())
+       {
+               dateTimeElementY = (outputAreaBounds.height - dateTimeDisplayBoxHeight) / 2.0f;
+               amPmElementY = (outputAreaBounds.height - amPmDisplayBoxHeight) / 2.0f;
+       }
+       else
+       {
+               float topMargin = 0.0f;
+               float bottomMargin = 0.0f;
+               float titleHeight = 0.0f;
+
+               GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_TOP_MARGIN, orientation, topMargin);
+               GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_BOTTOM_MARGIN, orientation, bottomMargin);
+               GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_HEIGHT, orientation, titleHeight);
+
+               dateTimeElementY = topMargin + titleHeight + bottomMargin;
+               amPmElementY = topMargin + titleHeight;
+       }
+
        dateBounds.y = monthBounds.y = yearBounds.y = hourBounds.y = minuteBounds.y = dateTimeElementY;
        amPmBounds.y = amPmElementY;
 
@@ -1058,7 +1080,7 @@ _DateTimePresenter::UpdateDateTimeOutputConfig(void)
                }
                else
                {
-                       hourBounds.x = dateTimeMargin + timeOutputMargin;
+                       hourBounds.x = timeOutputMargin;
                        minuteBounds.x = hourBounds.x + hourBounds.width + colonWidth + 2 * colonMargin;
                        amPmBounds.x = minuteBounds.x + minuteBounds.width + amPmMargin;
                }
@@ -1121,7 +1143,7 @@ _DateTimePresenter::LoadResource(void)
        r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pPmBoxNormalBitmap);
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
 
-       r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pPmBoxEffectBitmap);
+       r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pPmBoxEffectBitmap);
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
 
        r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::AMPM_BG_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pPmBoxPressedEffectBitmap);
@@ -1230,11 +1252,17 @@ _DateTimePresenter::DrawDateTimeDisplayBox(Canvas& canvas, int index)
 {
        result r = E_SUCCESS;
        String text;
+       int fontSize = 0;
        int number = 0;
        int boxId = __pDisplayBox[index]->GetDisplayBoxId();
        number = GetNumberInBox(boxId);
        DateTimePickerStatus status = DATETIME_STATUS_NORMAL;
 
+       GET_SHAPE_CONFIG(DATETIMEPICKER::FONT_SIZE, __pView->GetOrientation(), fontSize);
+
+       r = _FontImpl::GetInstance(*__pFont)->SetSize(fontSize);
+       SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+
        if (__pView->IsEnabled() == false)
        {
                status = DATETIME_STATUS_DISABLED;
@@ -1377,6 +1405,40 @@ _DateTimePresenter::DrawBackground(Canvas& canvas)
 }
 
 void
+_DateTimePresenter::DrawTitle(Canvas& canvas)
+{
+       result r = E_SUCCESS;
+       float marginX = 0.0f;
+       float marginY = 0.0f;
+       int fontSize = 0;
+       Color color(0, 0, 0, 0);
+       _ControlOrientation orientation = __pView->GetOrientation();
+
+       GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_LEFT_MARGIN, orientation, marginX);
+       GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_TOP_MARGIN, orientation, marginY);
+
+       GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_FONT_SIZE, orientation, fontSize);
+
+       r = _FontImpl::GetInstance(*__pFont)->SetSize(fontSize);
+       SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+
+       if (__pView->IsEnabled())
+       {
+               GET_COLOR_CONFIG(DATETIMEPICKER::TITLE_NORMAL, color);
+       }
+       else
+       {
+               GET_COLOR_CONFIG(DATETIMEPICKER::TITLE_DISABLED, color);
+       }
+
+       canvas.SetForegroundColor(color);
+       canvas.SetFont(*__pFont);
+       canvas.DrawText(FloatPoint(marginX, marginY), __title);
+
+       return;
+}
+
+void
 _DateTimePresenter::DrawDividers(Canvas& canvas)
 {
        result r = E_SUCCESS;
@@ -1395,8 +1457,24 @@ _DateTimePresenter::DrawDividers(Canvas& canvas)
        GET_COLOR_CONFIG(DATETIMEPICKER::DIVIDER_LEFT_HALF, colorHalfLeft);
        GET_COLOR_CONFIG(DATETIMEPICKER::DIVIDER_RIGHT_HALF, colorHalfRight);
 
-       lineStart.y = (GetOutputArea().height - dividerHeight) / 2.0f;
-       lineEnd.y = lineStart.y + dividerHeight;
+       if (__title.IsEmpty())
+       {
+               lineStart.y = (GetOutputArea().height - dividerHeight) / 2.0f;
+               lineEnd.y = lineStart.y + dividerHeight;
+       }
+       else
+       {
+               float topMargin = 0.0f;
+               float bottomMargin = 0.0f;
+               float titleHeight = 0.0f;
+
+               GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_TOP_MARGIN, orientation, topMargin);
+               GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_BOTTOM_MARGIN, orientation, bottomMargin);
+               GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_HEIGHT, orientation, titleHeight);
+
+               lineStart.y = topMargin + titleHeight + bottomMargin;
+               lineEnd.y = lineStart.y + dividerHeight;
+       }
 
        canvas.SetLineWidth(dividerWidth/2.0f);
 
@@ -1468,12 +1546,18 @@ _DateTimePresenter::GetOutputArea(void)
        _ControlOrientation orientation = __pView->GetOrientation();
 
        FloatRectangle outputArea(0.0f, 0.0f, 0.0f, 0.0f);
-       FloatRectangle headerBounds = __pView->GetHeaderBounds();
 
        GET_SHAPE_CONFIG(DATETIMEPICKER::LEFT_MARGIN, orientation, outputArea.x);
        GET_SHAPE_CONFIG(DATETIMEPICKER::TOP_MARGIN, orientation, outputArea.y);
 
-       outputArea.y += headerBounds.y + headerBounds.height;
+       if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+       {
+               float headerHeight = 0.0f;
+
+               GET_SHAPE_CONFIG(HEADER::HEIGHT, orientation, headerHeight);
+               outputArea.y += headerHeight;
+       }
+
        outputArea.width = __pView->GetBounds().width - 2 * outputArea.x;
 
        GET_SHAPE_CONFIG(DATETIMEPICKER::OUTPUT_AREA_HEIGHT, orientation, outputArea.height);
@@ -1584,12 +1668,28 @@ int
 _DateTimePresenter::CalculateTouchOutputArea(float posX, float posY)
 {
        FloatRectangle outputArea = GetOutputArea();
+       _ControlOrientation orientation = __pView->GetOrientation();
 
        for (int i = 0; i < __outputBoxMaxCount; i++)
        {
                FloatRectangle boxBounds = __pDisplayBox[i]->GetDisplayBoxBounds();
 
-               boxBounds.y = outputArea.y + ((outputArea.height - boxBounds.height) / 2);
+               if (__title.IsEmpty())
+               {
+                       boxBounds.y = outputArea.y + ((outputArea.height - boxBounds.height) / 2);
+               }
+               else
+               {
+                       float topMargin = 0.0f;
+                       float bottomMargin = 0.0f;
+                       float titleHeight = 0.0f;
+
+                       GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_TOP_MARGIN, orientation, topMargin);
+                       GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_BOTTOM_MARGIN, orientation, bottomMargin);
+                       GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_HEIGHT, orientation, titleHeight);
+
+                       boxBounds.y = outputArea.y + topMargin + titleHeight + bottomMargin;
+               }
 
                if ((posX >= boxBounds.x) && (posX < boxBounds.x + boxBounds.width)
                        && (posY >= boxBounds.y) && (posY < boxBounds.y + boxBounds.height))
index f1d36b9..bce2122 100644 (file)
@@ -160,16 +160,13 @@ public:
        Tizen::Graphics::Font* GetDateTimeFont(void);
        result InitializeFont(void);
 
-       result CreateHeader(void);
-       result DestroyHeader(void);
        result CreateFooter(void);
        result DestroyFooter(void);
 
-       Tizen::Graphics::FloatRectangle GetHeaderBounds(void);
-
        result CreateDisplayVisualElement(void);
        void SetDisplayVisualElementBounds(Tizen::Graphics::FloatRectangle bounds);
        Tizen::Ui::Animations::_VisualElement* GetDisplayVisualElement(void);
+       Tizen::Graphics::FloatRectangle GetIndicatorBoundsF(void);
 
 private:
        _DateTimePicker(_DateTimePresenter* pPresenter, const Tizen::Base::String& title = L"");
@@ -180,7 +177,6 @@ private:
 private:
        _DateTimePresenter* __pPresenter;
 
-       _Toolbar* __pHeader;
        _Toolbar* __pFooter;
        Tizen::Base::String __title;
 
index 75e98a5..7202fc2 100644 (file)
@@ -118,6 +118,8 @@ private:
 
        void DrawBackground(Tizen::Graphics::Canvas& canvas);
 
+       void DrawTitle(Tizen::Graphics::Canvas& canvas);
+
        void DrawDividers(Tizen::Graphics::Canvas& canvas);
 
        void ChangeInputPadStyle(int boxId);
@@ -206,6 +208,8 @@ private:
 
        int __changeFocusCounter;
 
+       Tizen::Base::String __title;
+
        Tizen::Graphics::Bitmap* __pPmBoxNormalBitmap;
        Tizen::Graphics::Bitmap* __pPmBoxEffectBitmap;
        Tizen::Graphics::Bitmap* __pPmBoxPressedEffectBitmap;
index fb7663e..f158d37 100755 (executable)
@@ -42,16 +42,20 @@ DECLARE_UI_CONFIG(DATETIMEPICKER);
        DECLARE_COLOR_CONFIG(AMPM_TEXT_DISABLED, 14)
        DECLARE_COLOR_CONFIG(DIVIDER_LEFT_HALF, 15)
        DECLARE_COLOR_CONFIG(DIVIDER_RIGHT_HALF, 16)
+       DECLARE_COLOR_CONFIG(TITLE_NORMAL, 17)
+       DECLARE_COLOR_CONFIG(TITLE_DISABLED, 18)
        
        DECLARE_IMAGE_CONFIG(AMPM_BG_NORMAL, 1)
        DECLARE_IMAGE_CONFIG(AMPM_BG_PRESSED, 2)
        DECLARE_IMAGE_CONFIG(AMPM_BG_HIGHLIGHTED, 3)
-       DECLARE_IMAGE_CONFIG(AMPM_BG_EFFECT, 4)
-       DECLARE_IMAGE_CONFIG(AMPM_BG_PRESSED_EFFECT, 5)
-       DECLARE_IMAGE_CONFIG(AMPM_BG_DISABLED_EFFECT, 6)
-       DECLARE_IMAGE_CONFIG(COLON_BG_NORMAL, 7)
-       DECLARE_IMAGE_CONFIG(BG_NORMAL, 8);
-       DECLARE_IMAGE_CONFIG(BG_EFFECT, 9);
+       DECLARE_IMAGE_CONFIG(AMPM_BG_DISABLED, 4)
+       DECLARE_IMAGE_CONFIG(AMPM_BG_NORMAL_EFFECT, 5)
+       DECLARE_IMAGE_CONFIG(AMPM_BG_PRESSED_EFFECT, 6)
+       DECLARE_IMAGE_CONFIG(AMPM_BG_DISABLED_EFFECT, 7)
+       DECLARE_IMAGE_CONFIG(AMPM_BG_HIGHLIGHTED_EFFECT, 8)
+       DECLARE_IMAGE_CONFIG(COLON_BG_NORMAL, 9)
+       DECLARE_IMAGE_CONFIG(BG_NORMAL, 10);
+       DECLARE_IMAGE_CONFIG(BG_EFFECT, 11);
        
        DECLARE_SHAPE_CONFIG(FOOTER_HEIGHT, 1)
        DECLARE_SHAPE_CONFIG(INPUTPAD_HEIGHT, 2)
@@ -60,20 +64,23 @@ DECLARE_UI_CONFIG(DATETIMEPICKER);
        DECLARE_SHAPE_CONFIG(AMPM_DISPLAY_BOX_HEIGHT, 5)
        DECLARE_SHAPE_CONFIG(TOP_MARGIN, 6)
        DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 7)
-       DECLARE_SHAPE_CONFIG(DATE_ELEMENT_WIDTH, 8)
-       DECLARE_SHAPE_CONFIG(TIME_ELEMENT_WIDTH, 9)
-       DECLARE_SHAPE_CONFIG(AMPM_WIDTH, 10)
-       DECLARE_SHAPE_CONFIG(COLON_WIDTH, 11)
-       DECLARE_SHAPE_CONFIG(DATE_TIME_MARGIN, 12)
-       DECLARE_SHAPE_CONFIG(TIME_AMPM_MARGIN, 13)
-       DECLARE_SHAPE_CONFIG(COLON_MARGIN, 14)
-       DECLARE_SHAPE_CONFIG(DIVIDER_HEIGHT, 15)
-       DECLARE_SHAPE_CONFIG(TIME_OUTPUT_MARGIN, 16)
-       DECLARE_SHAPE_CONFIG(FONT_SIZE, 17)
-       DECLARE_SHAPE_CONFIG(DTP_DATE_ELEMENT_WIDTH, 18)
-       DECLARE_SHAPE_CONFIG(DP_DATE_ELEMENT_WIDTH, 19)
-       
-       DECLARE_FIXED_VALUE_CONFIG(DIVIDER_WIDTH, 1)
+       DECLARE_SHAPE_CONFIG(TITLE_TOP_MARGIN, 8)
+       DECLARE_SHAPE_CONFIG(TITLE_LEFT_MARGIN, 9)
+       DECLARE_SHAPE_CONFIG(TITLE_BOTTOM_MARGIN, 10)
+       DECLARE_SHAPE_CONFIG(TITLE_HEIGHT, 11)
+       DECLARE_SHAPE_CONFIG(DTP_DATE_ELEMENT_WIDTH, 12)
+       DECLARE_SHAPE_CONFIG(DP_DATE_ELEMENT_WIDTH, 13)
+       DECLARE_SHAPE_CONFIG(TIME_ELEMENT_WIDTH, 14)
+       DECLARE_SHAPE_CONFIG(AMPM_WIDTH, 15)
+       DECLARE_SHAPE_CONFIG(COLON_WIDTH, 16)
+       DECLARE_SHAPE_CONFIG(DATE_TIME_MARGIN, 17)
+       DECLARE_SHAPE_CONFIG(TIME_AMPM_MARGIN, 18)
+       DECLARE_SHAPE_CONFIG(COLON_MARGIN, 19)
+       DECLARE_FIXED_VALUE_CONFIG(DIVIDER_WIDTH, 20)
+       DECLARE_SHAPE_CONFIG(DIVIDER_HEIGHT, 21)
+       DECLARE_SHAPE_CONFIG(TIME_OUTPUT_MARGIN, 22)
+       DECLARE_SHAPE_CONFIG(FONT_SIZE, 23)
+       DECLARE_SHAPE_CONFIG(TITLE_FONT_SIZE, 24)
 DECLARE_END_UI_CONFIG(DATETIMEPICKER);
 
-#endif //_FUI_RESOURCE_DATETIMEPICKER_CONFIG_H_
\ No newline at end of file
+#endif //_FUI_RESOURCE_DATETIMEPICKER_CONFIG_H_
index 39d5623..f885bcc 100755 (executable)
@@ -45,12 +45,19 @@ START_UI_CONFIG(DATETIMEPICKER);
        ADD_COLOR_CONFIG(DIVIDER_LEFT_HALF, $B0224);
        ADD_COLOR_CONFIG(DIVIDER_RIGHT_HALF, $B0222);
 
+       ADD_COLOR_CONFIG(TITLE_NORMAL, $B052L5);
+       ADD_COLOR_CONFIG(TITLE_DISABLED, $B052L5);
+
        ADD_IMAGE_CONFIG(AMPM_BG_NORMAL, #00_button_01.#.png);
        ADD_IMAGE_CONFIG(AMPM_BG_PRESSED, #00_button_01.#.png);
        ADD_IMAGE_CONFIG(AMPM_BG_HIGHLIGHTED, #00_button_01_focus.#.png);
-       ADD_IMAGE_CONFIG(AMPM_BG_EFFECT, #00_button_01_ef.#.png);
+       ADD_IMAGE_CONFIG(AMPM_BG_DISABLED, #00_button_01.#.png);
+
+       ADD_IMAGE_CONFIG(AMPM_BG_NORMAL_EFFECT, #00_button_01_ef.#.png);
        ADD_IMAGE_CONFIG(AMPM_BG_PRESSED_EFFECT, #00_button_01_ef_press.#.png);
        ADD_IMAGE_CONFIG(AMPM_BG_DISABLED_EFFECT, #00_button_01_ef_dim.#.png);
+       ADD_IMAGE_CONFIG(AMPM_BG_HIGHLIGHTED_EFFECT, #00_button_01_ef.#.png);
+
        ADD_IMAGE_CONFIG(COLON_BG_NORMAL, #00_date_picker_dot.png);
        ADD_IMAGE_CONFIG(BG_NORMAL, #00_list_group_bg.#.png);
        ADD_IMAGE_CONFIG(BG_EFFECT, #00_list_group_bg_ef.#.png);
@@ -67,6 +74,11 @@ START_UI_CONFIG(DATETIMEPICKER);
                ADD_SHAPE_CONFIG(TOP_MARGIN, 32);
                ADD_SHAPE_CONFIG(LEFT_MARGIN, 16);
 
+               ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN, 12);
+               ADD_SHAPE_CONFIG(TITLE_LEFT_MARGIN, 20);
+               ADD_SHAPE_CONFIG(TITLE_BOTTOM_MARGIN, 5);
+               ADD_SHAPE_CONFIG(TITLE_HEIGHT, 36);
+
                ADD_SHAPE_CONFIG(DTP_DATE_ELEMENT_WIDTH, 130);
                ADD_SHAPE_CONFIG(DP_DATE_ELEMENT_WIDTH, 228);
                ADD_SHAPE_CONFIG(TIME_ELEMENT_WIDTH, 48);
@@ -84,15 +96,19 @@ START_UI_CONFIG(DATETIMEPICKER);
                ADD_SHAPE_CONFIG(TIME_OUTPUT_MARGIN, 20);
 
                ADD_SHAPE_CONFIG(FONT_SIZE, 36);
+               ADD_SHAPE_CONFIG(TITLE_FONT_SIZE, 32);
        }
        END_UI_CONFIG_MODE(720x1280);
 
        START_UI_CONFIG_MODE(1280x720);
        {
+               ADD_SHAPE_CONFIG(TOP_MARGIN, 52);
+
                ADD_SHAPE_CONFIG(FOOTER_HEIGHT, 84);
                ADD_SHAPE_CONFIG(INPUTPAD_HEIGHT, 316);
 
-               ADD_SHAPE_CONFIG(DATE_ELEMENT_WIDTH, 242);
+               ADD_SHAPE_CONFIG(DTP_DATE_ELEMENT_WIDTH, 242);
+               ADD_SHAPE_CONFIG(DP_DATE_ELEMENT_WIDTH, 242);
 
                ADD_SHAPE_CONFIG(DATE_TIME_MARGIN, 66);
                ADD_SHAPE_CONFIG(TIME_AMPM_MARGIN, 84);