This XML file was automatically generated by UiBuilder - do not modify by hand.
-->
<!DOCTYPE Scene SYSTEM "UIForm.dtd">
-
-<Scene Bversion="3.0.0.201302121633" Dversion="20120315">
+<Scene Bversion="2.0.0.201303280947" Dversion="20120315">
<LogicalCoordinate>720</LogicalCoordinate>
<Form id="IDL_FORM_IMAGE_VIEWER">
- <property backgroundColor="" backgroundColorOpacity="100" orientation="Automatic" 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="LAYOUT_RELATIVE"/>
- <layout mode="Landscape" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
+ <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
</Form>
<Footer>
<property backgroundBitmapPath="" color="" colorOpacity="0" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_ICON" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" showBackButton="true"/>
<itemSet/>
</Footer>
- <Header>
- <property backgroundBitmapPath="" color="" colorOpacity="0" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="0" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="0" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="0" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="0" selectedItemTextColor="" titleIconPath="" titleText="" titleTextColor=""/>
- <itemSet/>
- </Header>
<Gallery id="IDC_GALLERY" parent="IDL_FORM_IMAGE_VIEWER">
- <property backgroundColor="" bitmapPathOfEmptyGallery="" slideShowAnimation="GALLERY_ANIMATION_PAGE" slideShowAnimationDuration="3000" slideShowViewDuration="10" textOfEmptyGallery="" zoomingEnabled="true"/>
- <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="1011" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
- <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="124" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="730" x="526" y="329"/>
+ <property accessibilityHint="" backgroundColor="" bitmapPathOfEmptyGallery="" slideShowAnimation="GALLERY_ANIMATION_PAGE" slideShowAnimationDuration="3000" slideShowViewDuration="10" textOfEmptyGallery="" zoomingEnabled="true"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="1182.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDL_FORM_IMAGE_VIEWER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="635.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_FORM_IMAGE_VIEWER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_FORM_IMAGE_VIEWER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_FORM_IMAGE_VIEWER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
</Gallery>
+ <Label id="IDC_LABEL_INFO" parent="IDL_FORM_IMAGE_VIEWER">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="20" text="Label1" textColor="#FFFFFF" textSize="52.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="6" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_FORM_IMAGE_VIEWER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_FORM_IMAGE_VIEWER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_FORM_IMAGE_VIEWER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="58.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_FORM_IMAGE_VIEWER" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_FORM_IMAGE_VIEWER" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_FORM_IMAGE_VIEWER" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </Label>
</Scene>
static const unsigned int COLOR_DELETE_BUTTON_NORMAL = Color32<208, 82, 82>::Value;
static const unsigned int COLOR_DELETE_BUTTON_PRESSED = Color32<194, 71, 71>::Value;
static const unsigned int COLOR_DELETE_BUTTON_TEXT = Color32<248, 246, 239>::Value;
+static const unsigned int COLOR_GALLERY_BG = Color32<31,31,31>::Value;
static const Rectangle RECT_DETAILS_CONTORL_LABEL (20, 0, 200, 48);
ImageViewerForm::ImageViewerForm(void)
: __initializeDisplayModeCurrent(APPCONTROL_MODE_NORMAL)
-, __pHeader(null)
+, __pLabel(null)
, __pFooter(null)
, __pScrollPanel(null)
, __pDetail_Label(null)
ImageViewerForm::Initialize()
{
AppLogDebug("ENTER");
+
+
+ result r = Form::Construct(IDL_FORM_IMAGE_VIEWER);
+
__pPresentationModel = ImageViewerPresentationModel::GetInstance();
if (__pPresentationModel->GetFileCount() > 0)
__initializeDisplayModeCurrent = APPCONTROL_MODE_NORMAL;
}
- result r = Form::Construct(IDL_FORM_IMAGE_VIEWER);
-
if (filePath == EMPTY_SPACE)
{
MessageBox messageBox;
ImageViewerForm::OnInitializing(void)
{
AppLogDebug("ENTER");
+ result r = E_SUCCESS;
SetFormBackEventListener(this);
__pPresentationModel->AddListener(this);
+ __pLabel = dynamic_cast<Label*>(GetControl(L"IDC_LABEL_INFO"));
+
+ if(__pLabel == null)
+ {
+ return E_FAILURE;
+ }
+ __pLabel->SetBackgroundColor(COLOR_HEADER_CONTORL_PANEL);
+ SetControlAlwaysOnTop(*__pLabel,true);
+
+ int allCount = __pPresentationModel->GetFileCount();
+ int index = 1 ;
+ String displayText;
+ displayText.Append(index);
+ displayText.Append("/");
+ displayText.Append(allCount);
+
+ __pLabel->SetText(displayText);
+
CreateGallery();
InitializeDisplay(__initializeDisplayModeCurrent);
InitializePanelDetail();
__pTimer->Construct(*this);
__pTimer->Start(1);
}
- result r = SetActionBarsTranslucent(FORM_ACTION_BAR_INDICATOR, true);
+
AddOrientationEventListener(*this);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
Rectangle clientRect = GetClientAreaBounds();
Rectangle rect = GetBounds();
- __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height));
+ __pGallery->SetBounds(Rectangle(0, clientRect.y, rect.width, rect.height));
__pPlayButton->SetBounds(Rectangle(clientRect.width / 2 - W_PLAY_BUTTON / 2,
clientRect.height / 2 - W_PLAY_BUTTON / 2, W_PLAY_BUTTON, H_PLAY_BUTTON));
ImageViewerForm::InitializeDisplay(AppControlMode status)
{
AppLogDebug("ENTER");
- String strItemText;
- String strItemIdxText;
- __pHeader = GetHeader();
- __pHeader->AddActionEventListener(*this);
+ String strItemIdxText;
__pFooter = GetFooter();
__pFooter->AddActionEventListener(*this);
__pFooter->RemoveAllItems();
- GetHeaderString(0, strItemText, strItemIdxText);
+ GetLabelText(0, strItemIdxText);
Rectangle rect = GetClientAreaBounds();
- __pHeader->SetTitleText(strItemText);
- __pHeader->SetDescriptionText(strItemIdxText);
+
if (status == APPCONTROL_MODE_NORMAL)
{
}
void
-ImageViewerForm::GetHeaderString(int index, String &fileName, String &page)
+ImageViewerForm::GetLabelText(int index, String &page)
{
AppLogDebug("ENTER");
int allCount = __pPresentationModel->GetFileCount();
String pStr = __pPresentationModel->GetFilePathAt(index);
- fileName = __pPresentationModel->GetFileName(pStr);
page.Format(FORMAT_BUFFER_SIZE, L"%d/%d", index + 1, allCount);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
filePath = __pPresentationModel->GetFilePathAt(currentIndex);
__pPresentationModel->RequestImage(filePath);
- GetHeaderString(__pGallery->GetCurrentItemIndex(), strItemText, strItemIdxText);
- __pHeader->SetTitleText(strItemText);
- __pHeader->SetDescriptionText(strItemIdxText);
+ GetLabelText(__pGallery->GetCurrentItemIndex(), strItemIdxText);
if (__visible == true)
{
Rectangle rect = GetBounds();
__pGallery = new (std::nothrow) Gallery();
- __pGallery->Construct(Rectangle(0, -clientRect.y, rect.width, rect.height));
+ __pGallery->Construct(Rectangle(0, clientRect.y, rect.width, rect.height));
__pGallery->SetName(L"GalleryControl");
__pGallery->SetItemProvider(*this);
__pGallery->AddGalleryEventListener(*this);
+ __pGallery->SetBackgroundColor(COLOR_GALLERY_BG);
AddControl(*__pGallery);
__pGallery->SetTextOfEmptyGallery(ResourceManager::GetString(L"IDS_COM_BODY_LOADING"));
}
Rectangle clientRect = GetClientAreaBounds();
- result r = __pScrollPanel->Construct(Rectangle(0, 0, clientRect.width, clientRect.height));
+ result r = __pScrollPanel->Construct(Rectangle(0, 0, clientRect.width, clientRect.height - __pLabel->GetHeight()));
if (r != E_SUCCESS)
{
AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
AppLogDebug("ENTER");
Rectangle clientRect = GetClientAreaBounds();
- __pScrollPanel->SetBounds(0, 0, clientRect.width, clientRect.height);
+ __pScrollPanel->SetBounds(0,__pLabel->GetHeight(), clientRect.width, clientRect.height - __pLabel->GetHeight());
int currentIndex = __pGallery->GetCurrentItemIndex();
String strFilePath = __pPresentationModel->GetFilePathAt(currentIndex);
AppLogDebug("ENTER index(%d) filePath(%ls)", index, filePath.GetPointer());
__pPresentationModel->RequestImage(filePath);
- String strItemText;
String strItemIdxText;
- GetHeaderString(__pGallery->GetCurrentItemIndex(), strItemText, strItemIdxText);
- __pHeader->SetTitleText(strItemText);
- __pHeader->SetDescriptionText(strItemIdxText);
+ GetLabelText(__pGallery->GetCurrentItemIndex(), strItemIdxText);
+ __pLabel->SetText(strItemIdxText);
if (__visible == true)
{
__pPlayButton->SetShowState(false);
}
- SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR | FORM_ACTION_BAR_HEADER | FORM_ACTION_BAR_FOOTER, false);
+ SetActionBarsVisible( FORM_ACTION_BAR_FOOTER, false);
+ __pLabel->SetShowState(false);
__visible = false;
}
else
__pPlayButton->SetShowState(true);
}
- SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR | FORM_ACTION_BAR_HEADER | FORM_ACTION_BAR_FOOTER, true);
+ SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true);
+ __pLabel->SetShowState(true);
__visible = true;
__pPlayButton->SetPosition(__pPlayButton->GetPosition().x, __pPlayButton->GetPosition().y - 1);
Rectangle clientRect = GetClientAreaBounds();
Rectangle rect = GetBounds();
- __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height));
+ __pGallery->SetBounds(Rectangle(0, clientRect.y, rect.width, rect.height));
Invalidate(true);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
PowerManager::KeepScreenOnState(true, false);
if (__visible == true)
{
- SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR | FORM_ACTION_BAR_HEADER | FORM_ACTION_BAR_FOOTER, false);
+ SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, false);
+ __pLabel->SetShowState(false);
int index = __pGallery->GetCurrentItemIndex();
String filePath = __pPresentationModel->GetFilePathAt(index);
if (__visible == false)
{
- SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR | FORM_ACTION_BAR_HEADER | FORM_ACTION_BAR_FOOTER, true);
-
+ SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true);
+ __pLabel->SetShowState(true);
String filePath = __pPresentationModel->GetFilePathAt(index);
ContentType contentType = ContentManagerUtil::CheckContentType(filePath);
if (contentType == CONTENT_TYPE_VIDEO)
__visible = true;
}
- String strItemText;
String strItemIdxText;
- GetHeaderString(index, strItemText, strItemIdxText);
- __pHeader->SetTitleText(strItemText);
- __pHeader->SetDescriptionText(strItemIdxText);
+ GetLabelText(index, strItemIdxText);
+ __pLabel->SetText(strItemIdxText);
+
Rectangle clientRect = GetClientAreaBounds();
Rectangle rect = GetBounds();
Rectangle clientRect = GetClientAreaBounds();
Rectangle rect = GetBounds();
- __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height));
- __pScrollPanel->SetBounds(Rectangle(0, 0, clientRect.width, clientRect.height));
+ __pGallery->SetBounds(Rectangle(0, clientRect.y, rect.width, rect.height));
+ __pScrollPanel->SetBounds(Rectangle(0, __pLabel->GetHeight(), clientRect.width, clientRect.height - __pLabel->GetHeight()));
__pPlayButton->SetBounds(Rectangle(clientRect.width / 2 - 80, clientRect.height / 2 - 80, 160, 160));
if (previousSceneId == IDSCN_IMAGE_NAME_EDITOR && currentSceneId == IDSCN_IMAGE_VIEWER)
{
SetDetailInfo();
- String strItemText(EMPTY_SPACE);
String strItemIdxText(EMPTY_SPACE);
- GetHeaderString(__pGallery->GetCurrentItemIndex(), strItemText, strItemIdxText);
- __pHeader->SetTitleText(strItemText);
- __pHeader->SetDescriptionText(strItemIdxText);
+ GetLabelText(__pGallery->GetCurrentItemIndex(), strItemIdxText);
+ __pLabel->SetText(strItemIdxText);
Invalidate(true);
}
__pGallery->SetCurrentItemIndex(currentIndex);
}
- String strItemText(EMPTY_SPACE);
String strItemIdxText(EMPTY_SPACE);
__pGallery->UpdateGallery();
String filePath = __pPresentationModel->GetFilePathAt(currentIndex);
__pPresentationModel->RequestImage(filePath);
- GetHeaderString(currentIndex, strItemText, strItemIdxText);
- __pHeader->SetTitleText(strItemText);
- __pHeader->SetDescriptionText(strItemIdxText);
+ GetLabelText(currentIndex,strItemIdxText);
+ __pLabel->SetText(strItemIdxText);
if (__visible == true)
{