Message Box new ux changes.
authorsriram.k <sriram.k@samsung.com>
Thu, 20 Jun 2013 11:55:46 +0000 (17:25 +0530)
committersriram.k <sriram.k@samsung.com>
Thu, 20 Jun 2013 14:07:31 +0000 (19:37 +0530)
Signed-off-by: sriram.k <sriram.k@samsung.com>
Change-Id: I694c0fffb99cac0ef31282a3bca4d8550e7f5887

42 files changed:
res/common/usr/share/osp/bitmaps/480x800/00_popup_bg.#.png
res/common/usr/share/osp/bitmaps/480x800/00_popup_button_bg.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/00_popup_title_bg.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg_ef.#.png
res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg.#.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg_ef.#.png
res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg_ef.#.png
res/common/usr/share/osp/bitmaps/480x800/white/00_popup_button_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_popup_bg.#.png
res/common/usr/share/osp/bitmaps/720x1280/00_popup_bg_ef.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_bg.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_normal_bg.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_popup_title_bg.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_popup_title_bg.#__.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg_ef.#.png
res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_bg.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg_ef.#.png
res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_bg.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg_ef.#.png
res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_bg.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_ef.#.png [new file with mode: 0644]
src/ui/controls/FUiCtrl_MessageBox.cpp
src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp
src/ui/inc/FUiCtrl_MessageBox.h
src/ui/inc/FUiCtrl_MessageBoxPresenter.h
src/ui/inc/FUi_ResourceMessageBoxConfig.h
src/ui/resource/FUi_ResourceMessageBoxConfig.cpp

index 68bae2e..a84ae44 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/480x800/00_popup_bg.#.png and b/res/common/usr/share/osp/bitmaps/480x800/00_popup_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_button_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_button_bg.#.png
new file mode 100644 (file)
index 0000000..395405e
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/00_popup_button_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_title_bg.#.png
new file mode 100644 (file)
index 0000000..9759f8e
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/00_popup_title_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png
deleted file mode 100644 (file)
index e6d5677..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png and /dev/null differ
index c5e3410..0db8c5e 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg_ef.#.png and b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_ef.#.png
new file mode 100644 (file)
index 0000000..607e0cc
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_ef.#.png
new file mode 100644 (file)
index 0000000..8324192
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg.#.png
deleted file mode 100644 (file)
index e6d5677..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg.#.png and /dev/null differ
index c5e3410..0db8c5e 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg_ef.#.png and b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_ef.#.png
new file mode 100644 (file)
index 0000000..607e0cc
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png
new file mode 100644 (file)
index 0000000..8324192
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png
deleted file mode 100644 (file)
index 84150a3..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png and /dev/null differ
index 7a393e1..6803486 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg_ef.#.png and b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_button_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_button_ef.#.png
new file mode 100644 (file)
index 0000000..7649449
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_button_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png
new file mode 100644 (file)
index 0000000..e23d37a
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png differ
index c22ea2a..a84ae44 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bg.#.png and b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bg_ef.#.png
deleted file mode 100644 (file)
index 0d19b92..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bg_ef.#.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_bg.#.png
new file mode 100644 (file)
index 0000000..395405e
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_normal_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_normal_bg.#.png
new file mode 100644 (file)
index 0000000..1eeb37d
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_normal_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_title_bg.#.png
new file mode 100644 (file)
index 0000000..9759f8e
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_title_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_title_bg.#__.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_title_bg.#__.png
new file mode 100644 (file)
index 0000000..101e777
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_title_bg.#__.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg.#.png
deleted file mode 100644 (file)
index c610733..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg.#.png and /dev/null differ
index 1476677..0db8c5e 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg_ef.#.png and b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_ef.#.png
new file mode 100644 (file)
index 0000000..607e0cc
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_bg.#.png
deleted file mode 100644 (file)
index ebe1f72..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_bg.#.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png
new file mode 100644 (file)
index 0000000..8324192
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg.#.png
deleted file mode 100644 (file)
index c610733..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg.#.png and /dev/null differ
index 1476677..0db8c5e 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg_ef.#.png and b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_ef.#.png
new file mode 100644 (file)
index 0000000..607e0cc
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_bg.#.png
deleted file mode 100644 (file)
index ebe1f72..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_bg.#.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png
new file mode 100644 (file)
index 0000000..8324192
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg.#.png
deleted file mode 100644 (file)
index c610733..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg.#.png and /dev/null differ
index 0d19b92..6803486 100644 (file)
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg_ef.#.png and b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_ef.#.png
new file mode 100644 (file)
index 0000000..7649449
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_bg.#.png
new file mode 100644 (file)
index 0000000..9759f8e
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_bg.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_ef.#.png
new file mode 100644 (file)
index 0000000..e23d37a
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_ef.#.png differ
index 45d70dc..9f72485 100644 (file)
@@ -49,6 +49,10 @@ _MessageBox::_MessageBox(void)
        : __pMsgboxPresenter(null)
        , __msgboxStyle(MSGBOX_STYLE_NONE)
        , __textColor(Color(0xFFFFFFFF))
+       , __pButtonEffectBitmap(null)
+       , __pTitleEffectBitmap(null)
+       , __pComposedButtonBitmap(null)
+       , __pComposedTitleBitmap(null)
        , __text(L"")
        , __timeout(0)
 {
@@ -69,6 +73,18 @@ _MessageBox::~_MessageBox(void)
        delete _pOutlineBitmap;
        _pOutlineBitmap = null;
 
+       delete __pButtonEffectBitmap;
+       __pButtonEffectBitmap = null;
+
+       delete __pTitleEffectBitmap;
+       __pTitleEffectBitmap = null;
+
+       delete __pComposedButtonBitmap;
+       __pComposedButtonBitmap = null;
+
+       delete __pComposedTitleBitmap;
+       __pComposedTitleBitmap = null;
+
        _SettingInfoImpl::RemoveSettingEventListenerForInternal(*this);
 }
 
@@ -98,6 +114,11 @@ _MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle
        result r = E_SUCCESS;
 
        float titleHeight = 0.0f;
+       Bitmap* buttonBgBitmap = null;
+       Bitmap* titleBgBitmap = null;
+       Color titleBgColor(0x00000000);
+       Color buttonBgColor(0x00000000);
+       _AccessibilityContainer* pContainer = null;
 
        _titleText = title;
        _titleState = !(title.Equals(L"", false));
@@ -119,6 +140,8 @@ _MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle
        GET_COLOR_CONFIG(MESSAGEBOX::BG_NORMAL, _bgColor);
        GET_COLOR_CONFIG(MESSAGEBOX::TITLE_TEXT_NORMAL, _titleTextColor);
        GET_COLOR_CONFIG(MESSAGEBOX::TEXT_NORMAL, __textColor);
+       GET_COLOR_CONFIG(MESSAGEBOX::BG_TITLE, titleBgColor);
+       GET_COLOR_CONFIG(MESSAGEBOX::BG_BUTTON, buttonBgColor);
 
        GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, GetOrientation(), titleHeight);
 
@@ -132,7 +155,37 @@ _MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle
        r = GetLastResult();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] failed to load MessageBox BG Image.");
 
+       // MsgBox-BottomBitmap
+       GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, buttonBgBitmap);
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       // MsgBox-BottomEffectBitmap
+       GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_BUTTON_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pButtonEffectBitmap);
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       // MsgBox-TitleBitmap
+       GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_AREA, BITMAP_PIXEL_FORMAT_ARGB8888, titleBgBitmap);
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       // MsgBox-TitleEffectBitmap
+       GET_BITMAP_CONFIG_N(MESSAGEBOX::BG_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTitleEffectBitmap);
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
        _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), _bgColor);
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       __pComposedButtonBitmap = _BitmapImpl::GetColorReplacedBitmapN(*buttonBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), buttonBgColor);
+       r = GetLastResult();
+       SysTryCatch(NID_UI_CTRL, (__pComposedButtonBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       __pComposedTitleBitmap = _BitmapImpl::GetColorReplacedBitmapN(*titleBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), titleBgColor);
+       r = GetLastResult();
+       SysTryCatch(NID_UI_CTRL, (__pComposedTitleBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r));
 
        // for clearing canvas
        if (GetVisualElement() != null)
@@ -140,8 +193,6 @@ _MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle
                GetVisualElement()->SetSurfaceOpaque(false);
        }
 
-       _AccessibilityContainer* pContainer = null;
-
        pContainer = GetAccessibilityContainer();
        if(pContainer != null)
        {
@@ -150,10 +201,34 @@ _MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle
        }
 
        r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this);
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
        SetTouchPressThreshold(0.08);
 
+       delete buttonBgBitmap;
+       buttonBgBitmap = null;
+
+       delete titleBgBitmap;
+       titleBgBitmap = null;
+
+       return r;
+
+CATCH:
+       delete buttonBgBitmap;
+       buttonBgBitmap = null;
+
+       delete titleBgBitmap;
+       titleBgBitmap = null;
+
+       delete _pComposedBgBitmap;
+       _pComposedBgBitmap = null;
+
+       delete __pComposedButtonBitmap;
+       __pComposedButtonBitmap = null;
+
+       delete __pComposedTitleBitmap;
+       __pComposedTitleBitmap = null;
+
        return r;
 }
 
@@ -469,5 +544,29 @@ _MessageBox::OnAccessibilityValueDecreased(const _AccessibilityContainer& contro
 {
        return false;
 }
+
+Bitmap*
+_MessageBox::GetButtonBackgroundBitmap(void)
+{
+       return __pComposedButtonBitmap;
+}
+
+Bitmap*
+_MessageBox::GetButtonBackgroundEffectBitmap(void)
+{
+       return __pButtonEffectBitmap;
+}
+
+Bitmap*
+_MessageBox::GetTitleBackgroundBitmap(void)
+{
+       return __pComposedTitleBitmap;
+}
+
+Bitmap*
+_MessageBox::GetTitleBackgroundEffectBitmap(void)
+{
+       return __pTitleEffectBitmap;
+}
 }}} // Tizen::Ui::Controls
 
index d87a2f2..21559b7 100644 (file)
@@ -60,6 +60,8 @@ _MessageBoxPresenter::_MessageBoxPresenter(void)
        , __msgboxResult(MSGBOX_RESULT_CLOSE)
        , __pBodyTextObject(null)
        , __textBounds(0.0f, 0.0f, 0.0f, 0.0f)
+       , __titleBgBounds(0.0f, 0.0f, 0.0f, 0.0f)
+       , __buttonBgBounds(0.0f, 0.0f, 0.0f, 0.0f)
        , __pLabel(null)
        , __pScroll(null)
        , __pScrollPanel(null)
@@ -141,6 +143,8 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
        float transTopMargin = 0.0f;
        float transBottomMargin = 0.0f;
        float labelHeight = 0.0f;
+       float transLeftMargin = 0.0f;
+       float transRightMargin = 0.0f;
 
        GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_SIZE, orientation, titleTextSize);
        GET_SHAPE_CONFIG(POPUP::MIN_TITLE_TEXT_SIZE, orientation, minTitleTextSize);
@@ -157,8 +161,12 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
 
        GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin);
        GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin);
+       GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin);
+       GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin);
 
        __textBounds.width = defaultWidth - GetLeftRightLabelMargin();
+       __titleBgBounds.width = defaultWidth - (transLeftMargin + transRightMargin);
+       __buttonBgBounds.width = defaultWidth - (transLeftMargin + transRightMargin);
 
        // TitleText
        if (__pMessageBox->HasTitle() == true)
@@ -227,7 +235,6 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox)
        float transBottomMargin = 0.0f;
        float transLeftMargin = 0.0f;
        float transRightMargin = 0.0f;
-
        float labelHeight = 0.0f;
 
        _ControlOrientation orientation;
@@ -258,6 +265,8 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox)
        GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin);
        GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin);
 
+       __titleBgBounds= FloatRectangle(transLeftMargin, transTopMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth) - (2 * transLeftMargin), titleHeight);
+
        // TitleText
        if (__pMessageBox->HasTitle() == true)
        {
@@ -279,9 +288,9 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox)
                SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
                _titleBounds = FloatRectangle(titleLeftMargin + transLeftMargin,
-                                                       titleTopMargin + transTopMargin,
-                                                       defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
-                                                       titleHeight - titleTopMargin);
+                                                                       __titleBgBounds.y + (__titleBgBounds.height - labelHeight) / 2,
+                                                                       defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
+                                                                       titleHeight - titleTopMargin);
        }
        else
        {
@@ -343,6 +352,8 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox)
        __pScrollPanel->AttachChild(*__pLabel);
        __pMessageBox->AttachChild(*__pScrollPanel);
 
+       __buttonBgBounds = FloatRectangle(transLeftMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth)- (transLeftMargin + transRightMargin), bottomHeight);
+
        r = CreateButtons();
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -426,19 +437,15 @@ _MessageBoxPresenter::Draw(void)
        result r = E_SUCCESS;
 
        float defaultWidth = 0.0f;
-
        float textSize = 0.0f;
 
        bool isCustomBitmap = false;
 
        _ControlOrientation orientation;
 
-       isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BG_NORMAL);
-
        orientation = __pMessageBox->GetOrientation();
 
        GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth);
-
        GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_SIZE, orientation, textSize);
 
        Canvas* pCanvas = __pMessageBox->GetCanvasN();
@@ -453,7 +460,12 @@ _MessageBoxPresenter::Draw(void)
 
        const Bitmap* pBackgroundBitmap = __pMessageBox->GetBackgroundBitmap();
        const Bitmap* pOutlineBitmap = __pMessageBox->GetOutlineBitmap();
+       const Bitmap* pButtonBitmap = __pMessageBox->GetButtonBackgroundBitmap();
+       const Bitmap* pButtonEffectBitmap = __pMessageBox->GetButtonBackgroundEffectBitmap();
+       const Bitmap* pTitleBitmap = __pMessageBox->GetTitleBackgroundBitmap();
+       const Bitmap* pTitleEffectBitmap = __pMessageBox->GetTitleBackgroundEffectBitmap();
 
+       isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BG_NORMAL);
        // Draw BG
        if (pBackgroundBitmap != null)
        {
@@ -480,16 +492,64 @@ _MessageBoxPresenter::Draw(void)
                }
        }
 
+       //DrawButtonBG
+       if(pButtonBitmap != null)
+       {
+               if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pButtonBitmap))
+               {
+                       pCanvas->DrawNinePatchedBitmap(__buttonBgBounds, *pButtonBitmap);
+               }
+               else
+               {
+                       pCanvas->DrawBitmap(__buttonBgBounds, *pButtonBitmap);
+               }
+       }
+       //DrawEffectButtonBitmap
+       if (pButtonEffectBitmap != null)
+       {
+               if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pButtonEffectBitmap))
+               {
+                       pCanvas->DrawNinePatchedBitmap(__buttonBgBounds, *pButtonEffectBitmap);
+               }
+               else
+               {
+                       pCanvas->DrawBitmap(__buttonBgBounds, *pButtonEffectBitmap);
+               }
+       }
+
        // Draw Title
        if (_pTitleTextObject != null)
        {
+               //DrawTitleBG
+               if(pTitleBitmap != null)
+               {
+                       if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTitleBitmap))
+                       {
+                               pCanvas->DrawNinePatchedBitmap(__titleBgBounds, *pTitleBitmap);
+                       }
+                       else
+                       {
+                               pCanvas->DrawBitmap(__titleBgBounds, *pTitleBitmap);
+                       }
+               }
+               //DrawEffectTitleBitmap
+               if (pTitleEffectBitmap != null)
+               {
+                       if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTitleEffectBitmap))
+                       {
+                               pCanvas->DrawNinePatchedBitmap(__titleBgBounds, *pTitleEffectBitmap);
+                       }
+                       else
+                       {
+                               pCanvas->DrawBitmap(__titleBgBounds, *pTitleEffectBitmap);
+                       }
+               }
                r = SetFontInfo(FONT_STYLE_PLAIN, _titleTextSize);
                SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
                _pTitleTextObject->SetFont(_pFont, 0, _pTitleTextObject->GetTextLength());
                _pTitleTextObject->SetForegroundColor(__pMessageBox->GetTitleTextColor(), 0, _pTitleTextObject->GetTextLength());
                _pTitleTextObject->SetBounds(_titleBounds);
-
                _pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas));
        }
 
@@ -754,14 +814,12 @@ _MessageBoxPresenter::CalculateButtonPositionAndSize(int buttonIndex)
                w = defaultWidth - (btnSideMargin1 * 2.0f);
                h = btnHeight;
                x = btnSideMargin1;
-               y = transTopMargin + titleHeight + (textTopMargin * 2.0f) + __textObjHeight + btnTopMargin;
                break;
 
        case 2:
                w = (defaultWidth - (btnSideMargin2 * 2.0f) - btnGap) / 2.0f;
                h = btnHeight;
                x = btnSideMargin2 + (buttonIndex * (w + btnGap));
-               y = transTopMargin + titleHeight + (textTopMargin * 2.0f) + __textObjHeight + btnTopMargin;
                break;
 
        case 3:
@@ -776,7 +834,6 @@ _MessageBoxPresenter::CalculateButtonPositionAndSize(int buttonIndex)
                        w = (defaultWidth - ((btnSideMargin3 + btnGap) * 2.0f)) / 3.0f;
                        h = btnHeight;
                        x = btnSideMargin3 + (buttonIndex * (w + btnGap));
-                       y = transTopMargin + titleHeight + (textTopMargin * 2.0f) + __textObjHeight + btnTopMargin;
                        break;
                }
                break;
@@ -784,7 +841,7 @@ _MessageBoxPresenter::CalculateButtonPositionAndSize(int buttonIndex)
        default:
                break;
        }
-
+       y = __buttonBgBounds.y + (__buttonBgBounds.height - h) / 2;
        return FloatRectangle(x, y, w, h);
 }
 
index 2ad5941..03765b2 100644 (file)
@@ -87,6 +87,11 @@ public:
        virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element);
        virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element);
        virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+
+       Tizen::Graphics::Bitmap* GetButtonBackgroundBitmap(void);
+       Tizen::Graphics::Bitmap* GetButtonBackgroundEffectBitmap(void);
+       Tizen::Graphics::Bitmap* GetTitleBackgroundBitmap(void);
+       Tizen::Graphics::Bitmap* GetTitleBackgroundEffectBitmap(void);
 // Accessors
 public:
        MessageBoxStyle GetMsgBoxStyle(void) const;
@@ -121,6 +126,12 @@ private:
        MessageBoxStyle __msgboxStyle;
 
        Tizen::Graphics::Color __textColor;
+
+
+       Tizen::Graphics::Bitmap* __pButtonEffectBitmap;
+       Tizen::Graphics::Bitmap* __pTitleEffectBitmap;
+       Tizen::Graphics::Bitmap* __pComposedButtonBitmap;
+       Tizen::Graphics::Bitmap* __pComposedTitleBitmap;
        Tizen::Base::String __text;
 
        unsigned long __timeout;
index 276e97b..d573842 100644 (file)
@@ -176,6 +176,9 @@ private:
        Tizen::Graphics::_Text::TextObject* __pBodyTextObject;
 
        Tizen::Graphics::FloatRectangle __textBounds;
+       Tizen::Graphics::FloatRectangle __titleBgBounds;
+       Tizen::Graphics::FloatRectangle __buttonBgBounds;
+
 
        Tizen::Ui::Controls::_Label* __pLabel;
        Tizen::Ui::Controls::_Scroll* __pScroll;
index 83ce528..b7b6132 100644 (file)
@@ -28,8 +28,14 @@ DECLARE_UI_CONFIG(MESSAGEBOX);
        DECLARE_COLOR_CONFIG(BG_NORMAL, 1);
        DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL, 2);
        DECLARE_COLOR_CONFIG(TEXT_NORMAL, 3);
+       DECLARE_COLOR_CONFIG(BG_BUTTON, 4);
+       DECLARE_COLOR_CONFIG(BG_TITLE, 5);
        DECLARE_IMAGE_CONFIG(BG_NORMAL, 1);
        DECLARE_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, 2);
+       DECLARE_IMAGE_CONFIG(BG_BUTTON_AREA, 3);
+       DECLARE_IMAGE_CONFIG(BG_BUTTON_EFFECT, 4);
+       DECLARE_IMAGE_CONFIG(BG_TITLE_AREA, 5);
+       DECLARE_IMAGE_CONFIG(BG_TITLE_EFFECT, 6);
        DECLARE_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 1);
        DECLARE_SHAPE_CONFIG(MIN_WIDTH, 1);
        DECLARE_SHAPE_CONFIG(MIN_HEIGHT, 2);
index 787a731..b2d60a0 100644 (file)
@@ -27,9 +27,15 @@ START_UI_CONFIG(MESSAGEBOX);
        ADD_COLOR_CONFIG(BG_NORMAL, $B061L1);
        ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $B063L9);
        ADD_COLOR_CONFIG(TEXT_NORMAL, $B063L1);
+       ADD_COLOR_CONFIG(BG_BUTTON, $B061L3);
+       ADD_COLOR_CONFIG(BG_TITLE, $B061L2);
 
        ADD_IMAGE_CONFIG(BG_NORMAL, $00_popup_bg.#.png);
        ADD_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, $00_popup_bg_ef.#.png);
+       ADD_IMAGE_CONFIG(BG_BUTTON_AREA, $00_popup_button_bg.#.png);
+       ADD_IMAGE_CONFIG(BG_BUTTON_EFFECT, $00_popup_button_ef.#.png);
+       ADD_IMAGE_CONFIG(BG_TITLE_AREA, $00_popup_title_bg.#.png);
+       ADD_IMAGE_CONFIG(BG_TITLE_EFFECT, $00_popup_title_ef.#.png);
 
        START_UI_CONFIG_MODE(480x800);
        {
@@ -44,17 +50,17 @@ START_UI_CONFIG(MESSAGEBOX);
                ADD_SHAPE_CONFIG(MIN_WIDTH, 510);                                   // 20120504
                ADD_SHAPE_CONFIG(MIN_HEIGHT, 122);                                  // 20120803
 
-               ADD_SHAPE_CONFIG(DEFAULT_WIDTH, 720);                       // 20121113
+               ADD_SHAPE_CONFIG(DEFAULT_WIDTH, 652);                       // 20121113
                ADD_SHAPE_CONFIG(MAX_HEIGHT, 590);                                  // 20120803
 
                ADD_SHAPE_CONFIG(TITLE_HEIGHT, 78);                         // 20130403
                ADD_SHAPE_CONFIG(TITLE_TEXT_SIZE, 50);              // 20121113
                ADD_SHAPE_CONFIG(MIN_TITLE_TEXT_SIZE, 42);          // 20121113
                ADD_SHAPE_CONFIG(TITLE_TEXT_TOP_MARGIN, 20);    // 20130403
-               ADD_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN, 29);   // 20130403
-               ADD_SHAPE_CONFIG(TITLE_TEXT_RIGHT_MARGIN, 29);  // 20130403
+               ADD_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN, 26);   // 20130403
+               ADD_SHAPE_CONFIG(TITLE_TEXT_RIGHT_MARGIN, 26);  // 20130403
 
-               ADD_SHAPE_CONFIG(BOTTOM_HEIGHT, 118);                       // 20130403
+               ADD_SHAPE_CONFIG(BOTTOM_HEIGHT, 96);                        // 20130403
 
                ADD_SHAPE_CONFIG(TEXT_SIZE, 38);                                    // 20130403
                ADD_SHAPE_CONFIG(TEXT_HEIGHT, 132);                                 // 20130403
@@ -65,26 +71,26 @@ START_UI_CONFIG(MESSAGEBOX);
                ADD_SHAPE_CONFIG(TEXT_TOP_MRAGIN, 20);                // 20121113
 
                ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 14);              //20121113
-               ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 34);               //20121113
+               ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 16);               //20121113
                ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 16);
                ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 16);
 
                ADD_SHAPE_CONFIG(BUTTON_HEIGHT, 74);                    // 20121113
-               ADD_SHAPE_CONFIG(BUTTON_INTERNAL_GAP, 16);          // 20130404
+               ADD_SHAPE_CONFIG(BUTTON_INTERNAL_GAP, 10);          // 20130404
 
                ADD_SHAPE_CONFIG(BUTTON_TOP_MARGIN, 20);                        // 20121113
                ADD_SHAPE_CONFIG(BUTTON_BOTTOM_MARGIN, 24);             // 20130403
 
-               ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_01, 110);           // 20120803 : 1 Button
-               ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_02, 36);            // 20121113 : 2 Buttons
-               ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_03, 36);            // 20121113 : 3 Buttons
+               ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_01, 101);           // 20120803 : 1 Button
+               ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_02, 28);            // 20121113 : 2 Buttons
+               ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_03, 28);            // 20121113 : 3 Buttons
        }
        END_UI_CONFIG_MODE(720x1280);
 
        START_UI_CONFIG_MODE(1280x720);
        {
-               ADD_SHAPE_CONFIG(DEFAULT_WIDTH, 900);                       // 20130403
-               ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_01, 200);           // 20130403 : 1 Button
+               ADD_SHAPE_CONFIG(DEFAULT_WIDTH, 832);                       // 20130403
+               ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_01, 191);           // 20130403 : 1 Button
        }
        END_UI_CONFIG_MODE(1280x720);