4 * Copyright (C) 2005-2013 Team XBMC
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with XBMC; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 #include "guilib/GUIDialog.h"
24 #include "utils/Variant.h"
26 #define DIALOG_MAX_LINES 3
27 #define DIALOG_MAX_CHOICES 2
29 class CGUIDialogBoxBase :
33 CGUIDialogBoxBase(int id, const CStdString &xmlFile);
34 virtual ~CGUIDialogBoxBase(void);
35 virtual bool OnMessage(CGUIMessage& message);
36 bool IsConfirmed() const;
37 void SetLine(int iLine, const CVariant &line);
38 void SetHeading(const CVariant &heading);
39 void SetChoice(int iButton, const CVariant &choice);
41 CStdString GetDefaultLabel(int controlId) const;
42 virtual int GetDefaultLabelID(int controlId) const;
43 /*! \brief Get a localized string from a variant
44 If the varaint is already a string we return directly, else if it's an integer we return the corresponding
46 \param var the variant to localize.
48 CStdString GetLocalized(const CVariant &var) const;
50 virtual void OnInitWindow();
51 virtual void OnDeinitWindow(int nextWindowID);
56 std::string m_strHeading;
57 std::string m_strLines[DIALOG_MAX_LINES];
58 std::string m_strChoices[DIALOG_MAX_CHOICES];