]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/window_manager.hpp
Merge branch 'base' into master
[vlc] / modules / gui / skins2 / src / window_manager.hpp
index ba738f441bec046f12807e646f09a4f5f0d3afe3..4cdca61d166533b005f73f803b3e429b55e7fd5c 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "skin_common.hpp"
 #include "top_window.hpp"
+#include "../utils/position.hpp"
 #include <list>
 #include <map>
 #include <set>
@@ -59,8 +60,10 @@ class WindowManager: public SkinObject
         /// Destructor
         virtual ~WindowManager();
 
-        /// Add a window to the list of known windows. Necessary if you want
-        /// your window to be movable...
+        /**
+         * Add a window to the list of known windows. Necessary if you want
+         * your window to be movable...
+         */
         void registerWindow( TopWindow &rWindow );
 
         /// Remove a previously registered window
@@ -79,20 +82,26 @@ class WindowManager: public SkinObject
          */
         void move( TopWindow &rWindow, int left, int top ) const;
 
-        /// Tell the window manager that a resize is initiated for rWindow
+        /// Tell the window manager that a resize is initiated for rLayout
         void startResize( GenericLayout &rLayout, Direction_t direction );
 
         /// Tell the window manager that the current resizing ended
         void stopResize();
 
         /**
-         * Resize the rWindow window to (width, height), and move all its
+         * Resize the rLayout layout to (width, height), and move all its
          * anchored windows, if some anchors are moved during the resizing.
          * If a new anchoring is detected, the windows will move (or resize)
          * accordingly.
          */
         void resize( GenericLayout &rLayout, int width, int height ) const;
 
+        /// Maximize the given window
+        void maximize( TopWindow &rWindow );
+
+        /// Unmaximize the given window
+        void unmaximize( TopWindow &rWindow );
+
         /// Raise all the registered windows
         void raiseAll() const;
 
@@ -105,6 +114,12 @@ class WindowManager: public SkinObject
         /// Synchronize the windows with their visibility variable
         void synchVisibility() const;
 
+        /// Save the current visibility of the windows
+        void saveVisibility();
+
+        /// Restore the saved visibility of the windows
+        void restoreVisibility() const;
+
         /// Raise the given window
         void raise( TopWindow &rWindow ) const { rWindow.raise(); }
 
@@ -164,8 +179,15 @@ class WindowManager: public SkinObject
         map<TopWindow*, WinSet_t> m_dependencies;
         /// Store all the windows
         WinSet_t m_allWindows;
-        /// Store the moving windows; this set is updated at every start of
-        /// move.
+        /**
+         * Store the windows that were visible when saveVisibility() was
+         * last called.
+         */
+        WinSet_t m_savedWindows;
+        /// Store the moving windows
+        /**
+         * This set is updated at every start of move.
+         */
         WinSet_t m_movingWindows;
         /**
          * Store the moving windows in the context of resizing
@@ -186,6 +208,8 @@ class WindowManager: public SkinObject
         int m_moveAlpha;
         /// Direction of the current resizing
         Direction_t m_direction;
+        /// Rect of the last maximized window
+        SkinsRect m_maximizeRect;
         /// Tooltip
         Tooltip *m_pTooltip;
         /// Active popup, if any