3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.tizenopensource.org/license
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #include "FormManager.h"
19 #include "AnimationBaseForm.h"
21 using namespace Osp::App;
22 using namespace Osp::Ui;
23 using namespace Osp::Ui::Controls;
25 AnimationBaseForm::AnimationBaseForm(void)
26 : __pVisualElement(null)
30 AnimationBaseForm::~AnimationBaseForm(void)
35 AnimationBaseForm::Initialize()
37 Construct(FORM_STYLE_NORMAL | FORM_STYLE_HEADER | FORM_STYLE_FOOTER | FORM_STYLE_INDICATOR);
39 SetFormBackEventListener(this);
45 AnimationBaseForm::OnInitializing(void)
53 AnimationBaseForm::OnActionPerformed(const Control& source, int actionId)
57 case ID_FOOTER_BUTTON_PLAY:
61 case ID_FOOTER_BUTTON_STOP:
70 AnimationBaseForm::OnFormBackRequested(Osp::Ui::Controls::Form& source)
72 Frame* pFrame = UiApp::GetInstance()->GetFrameAt(0);
75 FormManager* pFormManager = static_cast<FormManager*>(pFrame->GetControl(L"FormManager"));
77 if (pFormManager != null)
79 pFormManager->SendUserEvent(FormManager::REQUEST_ID_MAIN_FORM, null);
85 AnimationBaseForm::InitializeFooter(void)
87 Footer* pFooter = Form::GetFooter();
89 pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
90 pFooter->SetBackButton();
91 pFooter->AddActionEventListener(*this);
93 FooterItem footerItem1;
94 footerItem1.Construct(ID_FOOTER_BUTTON_PLAY);
95 footerItem1.SetText(L"Play");
97 FooterItem footerItem2;
98 footerItem2.Construct(ID_FOOTER_BUTTON_STOP);
99 footerItem2.SetText(L"Stop");
101 pFooter->AddItem(footerItem1);
102 pFooter->AddItem(footerItem2);
106 AnimationBaseForm::PlayAnimation(void)
111 AnimationBaseForm::StopAnimation(void)