9 * Copyright (C) 2005-2013 Team XBMC
12 * This Program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2, or (at your option)
17 * This Program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with XBMC; see the file COPYING. If not, see
24 * <http://www.gnu.org/licenses/>.
28 #include "GUIWindow.h"
29 #include "WindowIDs.h"
39 CGUIDialog(int id, const CStdString &xmlFile);
40 virtual ~CGUIDialog(void);
42 virtual bool OnAction(const CAction &action);
43 virtual bool OnMessage(CGUIMessage& message);
44 virtual void DoProcess(unsigned int currentTime, CDirtyRegionList &dirtyregions);
45 virtual void Render();
47 void DoModal(int iWindowID = WINDOW_INVALID, const CStdString ¶m = ""); // modal
48 void Show(); // modeless
50 virtual bool OnBack(int actionID);
52 virtual bool IsDialogRunning() const { return m_active; };
53 virtual bool IsDialog() const { return true;};
54 virtual bool IsModalDialog() const { return m_bModal; };
56 void SetAutoClose(unsigned int timeoutMs);
57 void ResetAutoClose(void);
58 bool IsAutoClosed(void) const { return m_bAutoClosed; };
59 void SetSound(bool OnOff) { m_enableSound = OnOff; };
60 virtual bool IsSoundEnabled() const { return m_enableSound; };
63 virtual void SetDefaults();
64 virtual void OnWindowLoaded();
65 virtual void UpdateVisibility();
67 virtual void DoModal_Internal(int iWindowID = WINDOW_INVALID, const CStdString ¶m = ""); // modal
68 virtual void Show_Internal(); // modeless
69 virtual void OnDeinitWindow(int nextWindowID);
71 bool m_wasRunning; ///< \brief true if we were running during the last DoProcess()
75 unsigned int m_showStartTime;
76 unsigned int m_showDuration;