3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.1 (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://floralicense.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.
19 /*@file: IntArticleReaderForm.h
20 *@brief: This header file contains the declarations of the ArticleReaderForm class.
24 #ifndef _INT_ARTICLE_READER_FORM_H_
25 #define _INT_ARTICLE_READER_FORM_H_
31 #include "IntSharePopup.h"
34 class ArticleReaderForm
35 : public Tizen::Ui::Controls::Form
36 , public Tizen::Ui::IActionEventListener
37 , public Tizen::Ui::IKeypadEventListener
38 , public Tizen::Ui::IOrientationEventListener
39 , public Tizen::Ui::ITextEventListener
40 , public Tizen::Ui::ITouchEventListener
41 , public Tizen::Ui::Scenes::ISceneEventListener
42 , public Tizen::Web::Controls::ITextSearchListener
43 , public Tizen::Web::Controls::IWebUiEventListener
49 * @brief The Default Constructor
51 ArticleReaderForm(void);
54 * @brief The Default Destructor
56 virtual ~ArticleReaderForm(void);
59 * @brief Initializes this instance of ArticleReaderForm.
61 bool Initialize(void);
63 // Initializes the controls of the UI for ArticleReaderForm.
64 virtual result OnInitializing(void);
66 virtual result OnTerminating(void);
68 //IActionEventListener
69 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
71 //IKeypadEventListener
72 virtual void OnKeypadWillOpen(Tizen::Ui::Control& source){}
73 virtual void OnKeypadOpened(Tizen::Ui::Control& source);
74 virtual void OnKeypadClosed(Tizen::Ui::Control& source);
75 virtual void OnKeypadBoundsChanged (Tizen::Ui::Control &source){}
76 virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction){}
78 //IOrientationEventListener
79 virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
82 virtual void OnTextValueChangeCanceled (const Tizen::Ui::Control &source){}
83 virtual void OnTextValueChanged (const Tizen::Ui::Control &source);
86 virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
87 virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
88 virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
89 virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
90 virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
91 virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
92 virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){}
95 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
96 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
99 virtual void OnTextFound(int totalCount, int currentOrdinal);
101 //IWebUiEventListener
102 virtual void OnWebPageBlockSelected(Tizen::Web::Controls::Web& source, Tizen::Graphics::Point& startPoint, Tizen::Graphics::Point& endPoint);
103 virtual void OnWebPageShowRequested(Tizen::Web::Controls::Web& source){}
104 virtual Tizen::Web::Controls::Web* OnWebWindowCreateRequested(void){return null;}
105 virtual void OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source) {}
107 result InitSelectTextContextMenu(Tizen::Graphics::Point p);
108 result InitFindWordPanel(void);
109 void StartWordSearch(void);
111 void RelayoutControls(void);
112 void FindNextWord(bool next);
114 static const int IDA_MORE_BUTTON;
115 static const int IDA_BACK_BUTTON;
116 static const int IDA_SMALL_FONT_BUTTON;
117 static const int IDA_LARGE_FONT_BUTTON;
118 static const int IDA_SAVE_CLICKED;
119 static const int IDA_SHARE_CLICKED;
120 static const int IDA_PRINT_CLICKED;
122 static const int IDA_COPY_TEXT_CLICKED;
123 static const int IDA_FIND_TEXT_CLICKED;
124 static const int IDA_SHARE_TEXT_CLICKED;
126 static const int IDA_FINDWORD_CANCEL_CLICKED;
127 static const int IDA_FINDWORD_CLEAR_CLICKED;
128 static const int IDA_FINDWORD_NEXT_CLICKED;
129 static const int IDA_FINDWORD_PREV_CLICKED;
132 Tizen::Web::Controls::Web* __pWebReader;
133 Tizen::Ui::Controls::Panel* __pFooterPanel;
134 Tizen::Ui::Controls::Button* __pMoreBtn;
135 Tizen::Ui::Controls::Button* __pBackBtn;
136 Tizen::Ui::Controls::Button* __pSmallFontBtn;
137 Tizen::Ui::Controls::Button* __pLargeFontBtn;
138 Tizen::Ui::Controls::ContextMenu* __pMoreMenu;
139 Tizen::Web::Controls::HitElementResult* __pHitElementResult;
140 Tizen::Ui::Controls::ContextMenu* __pSelectionMenu;
142 Tizen::Ui::Controls::Label * __pFindWordBgLabel;
143 Tizen::Ui::Controls::Button* __pFindWordClear;
144 Tizen::Ui::Controls::Label* __pFindWordCountLabel;
145 Tizen::Ui::Controls::Panel* __pFindWordControl;
146 Tizen::Ui::Controls::EditField* __pFindWordEditField;
147 Tizen::Ui::Controls::Button* __pFindWordNext;
148 Tizen::Ui::Controls::Button* __pFindWordPrev;
150 // Tizen::Base::String __currentSelectedStr;
151 SharePopup* __pPopUp;
152 Tizen::Base::String* __pReaderData;
153 Tizen::Base::String* __pShareUrl;
154 Tizen::Base::String* __pShareTitle;
158 #endif /* _INT_ARTICLE_READER_FORM_H_ */