aboutsummaryrefslogtreecommitdiff
path: root/guilib/GUIWindow.h
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-02-20 04:01:17 +0000
committerjmarshallnz <jmarshallnz@svn>2010-02-20 04:01:17 +0000
commited2841601193313a745b376f2fd85de3ce5aa1b0 (patch)
treeb27ae04bda48507ead95b087ae8e72ec2bfce6c9 /guilib/GUIWindow.h
parent5696d9d43d7272d58d4f754563f486b90589d2fa (diff)
added: CGUIWindow::FrameMove function to update anything per frame, and moved existing updating out of Render(). It is not safe to do a lot of processing in Render as some processing may invoke a further Render() at the app level (eg background loading directory refreshes) which may cause problems.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@27989 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIWindow.h')
-rw-r--r--guilib/GUIWindow.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/guilib/GUIWindow.h b/guilib/GUIWindow.h
index 94615cc214..b2181670bc 100644
--- a/guilib/GUIWindow.h
+++ b/guilib/GUIWindow.h
@@ -85,7 +85,20 @@ public:
bool Load(const CStdString& strFileName, bool bContainsPath = false);
void CenterWindow();
+
+ /*! \brief Main render function, called every frame.
+ Window classes should override this only if they need to alter how something is rendered.
+ General updating on a per-frame basis should be handled in FrameMove instead, as Render
+ is not necessarily re-entrant.
+ \sa FrameMove
+ */
virtual void Render();
+
+ /*! \brief Main update function, called every frame prior to rendering
+ Any window that requires updating on a frame by frame basis (such as to maintain
+ timers and the like) should override this function.
+ */
+ virtual void FrameMove() {};
// Close should never be called on this base class (only on derivatives) - its here so that window-manager can use a general close
virtual void Close(bool forceClose = false);