2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file popup_object.h
18 * @author Justyna Mejzner (j.mejzner@samsung.com)
20 * @brief This is declaration file of PopupObject
23 #ifndef WRT_SRC_POPUP_POPUPOBJECT_H_
24 #define WRT_SRC_POPUP_POPUPOBJECT_H_
26 #include <dpl/foreach.h>
34 namespace PopupObject {
36 class PopupObjectBase;
41 typedef std::list<IPopupObject*> PopupObjects;
53 virtual Button* asButton() = 0;
54 virtual Label* asLabel() = 0;
55 virtual Check* asCheck() = 0;
56 virtual PopupType getType() const = 0;
57 virtual ~IPopupObject()
61 class PopupObjectBase : public IPopupObject
64 virtual Button* asButton()
69 virtual Label* asLabel()
74 virtual Check* asCheck()
80 PopupType getType() const
86 PopupObjectBase(PopupType type) : m_type(type)
92 class Button : public PopupObjectBase
95 Button(const std::string& label,
97 PopupObjectBase(BUTTON),
107 const std::string& getLabel() const
112 int getLabelId() const
122 class Label : public PopupObjectBase
125 Label(const std::string &label) :
126 PopupObjectBase(LABEL),
135 const std::string& getLabel() const
144 class Check : public PopupObjectBase
147 Check(const std::string &label) :
148 PopupObjectBase(CHECK),
157 const std::string& getCheckLabel() const
163 std::string m_checkLabel;
170 #endif //WRT_SRC_POPUP_POPUPOBJECT_H_