X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fskins2%2Fcommands%2Fcmd_show_window.hpp;h=18edc42e17a3e50c76cf86869d2b349da2fa5325;hb=cc4f67fe86359bae2db6fc631f0ef96e0c63c1d1;hp=8d34f36db7e2e403a6c4a8ac75eacfff72b1aaca;hpb=62d1b7d2d6ce7b7eec5cc48f91e884e0de02a48d;p=vlc diff --git a/modules/gui/skins2/commands/cmd_show_window.hpp b/modules/gui/skins2/commands/cmd_show_window.hpp old mode 100755 new mode 100644 index 8d34f36db7..18edc42e17 --- a/modules/gui/skins2/commands/cmd_show_window.hpp +++ b/modules/gui/skins2/commands/cmd_show_window.hpp @@ -1,11 +1,11 @@ /***************************************************************************** * cmd_show_window.hpp ***************************************************************************** - * Copyright (C) 2003 VideoLAN + * Copyright (C) 2003 the VideoLAN team * $Id$ * * Authors: Cyril Deguet - * Olivier Teulière + * Olivier Teulière * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,15 +19,17 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifndef CMD_SHOW_WINDOW_HPP #define CMD_SHOW_WINDOW_HPP #include "cmd_generic.hpp" +#include "../src/os_factory.hpp" #include "../src/top_window.hpp" #include "../src/window_manager.hpp" +#include "../src/popup.hpp" /// Command to show a window @@ -95,4 +97,30 @@ class CmdRaiseAll: public CmdGeneric WindowManager &m_rWinManager; }; + +/// Command to show a popup menu +class CmdShowPopup: public CmdGeneric +{ + public: + CmdShowPopup( intf_thread_t *pIntf, Popup &rPopup ): + CmdGeneric( pIntf ), m_rPopup( rPopup ) {} + virtual ~CmdShowPopup() {} + + /// This method does the real job of the command + virtual void execute() + { + int x, y; + OSFactory::instance( getIntf() )->getMousePos( x, y ); + m_rPopup.show( x, y ); + } + + /// Return the type of the command + virtual string getType() const { return "show popup"; } + + private: + /// Reference to the popup + Popup &m_rPopup; +}; + + #endif