Applied latest source code
[apps/native/preloaded/MusicPlayer.git] / inc / MpNowPlayContentPanel.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                MpNowPlayContentPanel.h
19  * @brief               This is the header file for NowPlayContentPanel class.
20  */
21
22 #ifndef _MP_NOW_PLAY_CONTENT_PANEL_H_
23 #define _MP_NOW_PLAY_CONTENT_PANEL_H_
24
25 #include <new>
26 #include <FApp.h>
27 #include <FBase.h>
28 #include <FGraphics.h>
29 #include <FSocial.h>
30 #include <FUi.h>
31 #include "MpCommonUtil.h"
32 #include "MpIMusicPlayerEventListener.h"
33 #include "MpMusicPlayerPresentationModel.h"
34
35 class NowPlayContentPanel
36         : public Tizen::Ui::Controls::Panel
37         , public Tizen::Ui::ITouchEventListener
38         , public IMusicPlayerEventListener
39 {
40 public:
41         NowPlayContentPanel(void);
42         virtual ~NowPlayContentPanel(void);
43         result Initialize(void);
44         bool GetPlayStatus(void);
45
46         virtual void OnPlayStateChanged(Tizen::Media::PlayerState playerState);
47         virtual void OnPlayContentChanged(int currentContentIndex);
48         virtual void OnPlayTimeChanged(const Tizen::Base::String& currentDuration, int currentPosition);
49         virtual void OnPlayVolumeBarStateChanged(void);
50         virtual void OnPlayPresentationModelDestroying(void);
51
52         virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
53         virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
54         virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
55         virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
56         virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
57         virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
58
59 private:
60         Tizen::Ui::Controls::Label* __pThumbnailLabel;
61         Tizen::Ui::Controls::Label* __pPlayStatusLabel;
62         Tizen::Ui::Controls::Label* __pTitleLabel;
63         Tizen::Ui::Controls::Label* __pTouchLabel;
64         Tizen::Ui::Controls::Slider* __pPlayStateSlider;
65         PlayerPresentationModel* __pPresentationModel;
66 };
67
68 #endif // _MP_NOW_PLAY_CONTENT_PANEL_H_