ACTION_ID_BUTTON_CREATE_NAME_DONE = 103,
ACTION_ID_BUTTON_MOVE_TO_SELECTION = 104,
ACTION_ID_BUTTON_UNCHECKED = 105,
- ACTION_ID_CHECK_SELECT_OFF = 201,
- ACTION_ID_CHECK_SELECT_ON = 202,
+ ACTION_ID_ALBUM_LIST_SELECT_ALL = 201,
ACTION_ID_CONTEXT_MENU_MESSAGE = 301,
ACTION_ID_CONTEXT_MENU_EMAIL = 302,
ACTION_ID_CONTEXT_MENU_MORE_ADD_TAG = 303,
};
extern const wchar_t* IDL_FORM_ALBUM_LIST;
+extern const wchar_t* IDL_FORM_ALBUM_LIST_EDITOR;
extern const wchar_t* IDL_FORM_FILE_LIST;
extern const wchar_t* IDL_FORM_SETTING_MAIN;
extern const wchar_t* IDL_FORM_SETTING_INTERVAL;
extern const wchar_t* IDB_LIST_EXPAND_CLOSED_PRESS;
extern const wchar_t* IDB_LIST_EXPAND_OPENED;
extern const wchar_t* IDB_LIST_EXPAND_OPENED_PRESS;
+extern const wchar_t* IDB_ICON_SELECT_ALL;
+extern const wchar_t* IDB_ICON_SELECT_ALL_PRESS;
extern const wchar_t* DEVICE_STORAGE_CARD_MOUNTED;
extern const wchar_t* DEVICE_STORAGE_CARD_UNMOUNTED;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201303182057" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_FORM_ALBUM_LIST_EDITOR">
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="NONE"/>
+ <layout mode="Landscape" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="NONE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_ICON" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="true"/>
+ <itemSet/>
+ </Footer>
+ <Header>
+ <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" titleIconPath="" titleText="" titleTextColor=""/>
+ <itemSet/>
+ </Header>
+ <IconListView id="IDC_ICONLISTVIEW_ALBUM_LIST_EDITOR" parent="IDL_FORM_ALBUM_LIST_EDITOR">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" bitmapPathOfEmptyList="" checkBoxPosition="ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT" colorOfEmptyListText="" highlightedItemTextColor="" itemBitmapHeight="100.0" itemBitmapWidth="100.0" itemBorderStyle="ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW" itemHorizontalAlignment="ALIGNMENT_CENTER" itemHorizontalSpacing="2.0" itemTextHorizontalAlignment="ALIGNMENT_CENTER" itemTextSize="30.0" itemTextVerticalAlignment="ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM" itemVerticalAlignment="ALIGNMENT_MIDDLE" itemVerticalSpacing="2.0" magneticScrollSize="0.0" normalItemTextColor="" pressedItemTextColor="" scrollDirection="ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" textOfEmptyList="" touchAnimationEnabled="true"/>
+ <layout height="1010.0" mode="Portrait" style="" width="720.0" x="0.0" y="0.0"/>
+ <layout height="124.0" mode="Landscape" style="" width="730.0" x="165.0" y="20.0"/>
+ </IconListView>
+</Scene>
static const int Y_DELETE_BUTTON = 180;
static const int H_DELETE_BUTTON = 80;
-static const int X_POSITION_ICON_LIST_VIEW = 0;
-static const int Y_POSITION_ICON_LIST_VIEW = 80;
-
static const int H_CHECKBOX = 80;
static const int GAP_H_ICON_LIST_VIEW = 40;
AlbumListEditorForm::AlbumListEditorForm()
: __checkedCount(0)
- , __pAllCheckButton(null)
, __pSelectCountLabel(null)
, __pEditorFolderIconList(null)
, __pShareContextMenu(null)
AlbumListEditorForm::Initialize(void)
{
AppLogDebug("ENTER");
- result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+ result r = Form::Construct(IDL_FORM_ALBUM_LIST_EDITOR);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return r;
pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_GALLERY"));
pHeader->AddActionEventListener(*this);
+
+ ButtonItem selectAll;
+ selectAll.Construct(BUTTON_ITEM_STYLE_ICON, ACTION_ID_ALBUM_LIST_SELECT_ALL);
+ Bitmap* pBitmapSelectAll = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL);
+ Bitmap* pBitmapSelectAllPress = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL_PRESS);
+ if (pBitmapSelectAll != null)
+ {
+ selectAll.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapSelectAll);
+ }
+ if (pBitmapSelectAll != null)
+ {
+ selectAll.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmapSelectAllPress);
+ }
+ pHeader->SetButton(BUTTON_POSITION_RIGHT, selectAll);
+ delete pBitmapSelectAll;
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return E_SUCCESS;
tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)",
ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), __checkedCount);
- __pAllCheckButton = new (std::nothrow) CheckButton();
- __pAllCheckButton->Construct(Rectangle(0, 0, GetClientAreaBounds().width, H_CHECKBOX),
- CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT, false);
- __pAllCheckButton->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL"));
- __pAllCheckButton->SetActionId(ACTION_ID_CHECK_SELECT_ON, ACTION_ID_CHECK_SELECT_OFF);
- __pAllCheckButton->SetChromaKeyColor(Color(COLOR_SELECT_COUNT_LABEL));
- __pAllCheckButton->AddActionEventListener(*this);
- AddControl(*__pAllCheckButton);
-
__pSelectCountLabel = new (std::nothrow) Label();
__pSelectCountLabel->Construct(Rectangle(0, GetClientAreaBounds().height - H_SELECT_COUNT_LABEL,
GetClientAreaBounds().width, H_SELECT_COUNT_LABEL), tempString);
AppLogDebug("ENTER");
Dimension itemSize(W_FOLDER_SIZE, H_FOLDER_SIZE);
__pEditorFolderIconList = new (std::nothrow) IconListView();
- __pEditorFolderIconList->Construct(Rectangle(X_POSITION_ICON_LIST_VIEW, Y_POSITION_ICON_LIST_VIEW,
- GetClientAreaBounds().width, GetClientAreaBounds().height - H_CHECKBOX - GAP_H_ICON_LIST_VIEW),
- itemSize, ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
+ __pEditorFolderIconList->Construct(Rectangle(0, 0, GetClientAreaBounds().width,
+ GetClientAreaBounds().height - H_CHECKBOX - GAP_H_ICON_LIST_VIEW), itemSize,
+ ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
if (pBitmap != null)
{
__pSelectCountLabel->SetText(tempString);
__pSelectCountLabel->RequestRedraw();
__pEditorFolderIconList->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
- int maxCount = __pPresentationModel->GetFolderCount();
-
- if (__pAllCheckButton->IsSelected() == true)
- {
- __pAllCheckButton->SetSelected(false);
- }
- else
- {
- if (__checkedCount == maxCount)
- {
- AppLogDebug("SELECTIONTEST(%d)(%d)",__checkedCount, maxCount);
- __pAllCheckButton->SetSelected(true);
- }
- }
}
SetButtonState();
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
else
{
r = E_SUCCESS;
- __pAllCheckButton->SetSelected(true);
- __pAllCheckButton->RequestRedraw(true);
}
SetAllCheckState(false);
AppLogDebug("ENTER");
switch (actionId)
{
- case ACTION_ID_CHECK_SELECT_ON:
+ case ACTION_ID_ALBUM_LIST_SELECT_ALL:
SetAllCheckState(true);
break;
- case ACTION_ID_CHECK_SELECT_OFF:
- SetAllCheckState(false);
- break;
case ACTION_ID_FOOTER_DELETE:
if (__checkedCount > 0)
{
__pSelectCountLabel->SetText(tempString);
__pSelectCountLabel->RequestRedraw();
- int maxCount = __pPresentationModel->GetFolderCount();
- if (__checkedCount != 0 && __checkedCount == maxCount)
- {
- __pAllCheckButton->SetSelected(true);
- }
- else
- {
- __pAllCheckButton->SetSelected(false);
- }
-
SetButtonState();
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}