cmd_minimize.cpp
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:3k
源码类别:

midi

开发平台:

Unix_Linux

  1. /*****************************************************************************
  2.  * cmd_minimize.cpp
  3.  *****************************************************************************
  4.  * Copyright (C) 2003 the VideoLAN team
  5.  * $Id: 043c440d087cff68b955a9cf2169393d431dd485 $
  6.  *
  7.  * Authors: Mohammed Adnène Trojette     <adn@via.ecp.fr>
  8.  *          Olivier Teulière <ipkiss@via.ecp.fr>
  9.  *
  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.
  14.  *
  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.
  19.  *
  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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  23.  *****************************************************************************/
  24. #include "cmd_minimize.hpp"
  25. #include "../src/window_manager.hpp"
  26. #include "../src/os_factory.hpp"
  27. void CmdMinimize::execute()
  28. {
  29.     // Get the instance of OSFactory
  30.     OSFactory *pOsFactory = OSFactory::instance( getIntf() );
  31.     pOsFactory->minimize();
  32. }
  33. void CmdRestore::execute()
  34. {
  35.     // Get the instance of OSFactory
  36.     OSFactory *pOsFactory = OSFactory::instance( getIntf() );
  37.     pOsFactory->restore();
  38. }
  39. CmdMaximize::CmdMaximize( intf_thread_t *pIntf,
  40.                           WindowManager &rWindowManager,
  41.                           TopWindow &rWindow ):
  42.     CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
  43.     m_rWindow( rWindow )
  44. {
  45. }
  46. void CmdMaximize::execute()
  47. {
  48.     // Simply delegate the job to the WindowManager
  49.     m_rWindowManager.maximize( m_rWindow );
  50. }
  51. CmdUnmaximize::CmdUnmaximize( intf_thread_t *pIntf,
  52.                               WindowManager &rWindowManager,
  53.                               TopWindow &rWindow ):
  54.     CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
  55.     m_rWindow( rWindow )
  56. {
  57. }
  58. void CmdUnmaximize::execute()
  59. {
  60.     // Simply delegate the job to the WindowManager
  61.     m_rWindowManager.unmaximize( m_rWindow );
  62. }
  63. void CmdAddInTray::execute()
  64. {
  65.     // Get the instance of OSFactory
  66.     OSFactory *pOsFactory = OSFactory::instance( getIntf() );
  67.     pOsFactory->addInTray();
  68. }
  69. void CmdRemoveFromTray::execute()
  70. {
  71.     // Get the instance of OSFactory
  72.     OSFactory *pOsFactory = OSFactory::instance( getIntf() );
  73.     pOsFactory->removeFromTray();
  74. }
  75. void CmdAddInTaskBar::execute()
  76. {
  77.     // Get the instance of OSFactory
  78.     OSFactory *pOsFactory = OSFactory::instance( getIntf() );
  79.     pOsFactory->addInTaskBar();
  80. }
  81. void CmdRemoveFromTaskBar::execute()
  82. {
  83.     // Get the instance of OSFactory
  84.     OSFactory *pOsFactory = OSFactory::instance( getIntf() );
  85.     pOsFactory->removeFromTaskBar();
  86. }