1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2003 VideoLAN
7 * Authors: Cyril Deguet <asmax@via.ecp.fr>
8 * Olivier Teulière <ipkiss@via.ecp.fr>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 *****************************************************************************/
25 #ifndef CMD_SHOW_WINDOW_HPP
26 #define CMD_SHOW_WINDOW_HPP
28 #include "cmd_generic.hpp"
29 #include "../src/top_window.hpp"
30 #include "../src/window_manager.hpp"
33 /// Command to show a window
34 class CmdShowWindow: public CmdGeneric
37 CmdShowWindow( intf_thread_t *pIntf, WindowManager &rWinManager,
39 CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) {}
40 virtual ~CmdShowWindow() {}
42 /// This method does the real job of the command
43 virtual void execute() { m_rWinManager.show( m_rWin ); }
45 /// Return the type of the command
46 virtual string getType() const { return "show window"; }
49 /// Reference to the window manager
50 WindowManager &m_rWinManager;
51 /// Reference to the window
56 /// Command to hide a window
57 class CmdHideWindow: public CmdGeneric
60 CmdHideWindow( intf_thread_t *pIntf, WindowManager &rWinManager,
62 CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) {}
63 virtual ~CmdHideWindow() {}
65 /// This method does the real job of the command
66 virtual void execute() { m_rWinManager.hide( m_rWin ); }
68 /// Return the type of the command
69 virtual string getType() const { return "hide window"; }
72 /// Reference to the window manager
73 WindowManager &m_rWinManager;
74 /// Reference to the window
79 /// Command to raise all windows
80 class CmdRaiseAll: public CmdGeneric
83 CmdRaiseAll( intf_thread_t *pIntf, WindowManager &rWinManager ):
84 CmdGeneric( pIntf ), m_rWinManager( rWinManager ) {}
85 virtual ~CmdRaiseAll() {}
87 /// This method does the real job of the command
88 virtual void execute() { m_rWinManager.raiseAll(); }
90 /// Return the type of the command
91 virtual string getType() const { return "raise all windows"; }
94 /// Reference to the window manager
95 WindowManager &m_rWinManager;