Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

top_window.hpp

00001 /*****************************************************************************
00002  * top_window.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id: top_window.hpp 12912 2005-10-22 11:57:29Z asmax $
00006  *
00007  * Authors: Cyril Deguet     <[email protected]>
00008  *          Olivier Teulière <[email protected]>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef TOP_WINDOW_HPP
00026 #define TOP_WINDOW_HPP
00027 
00028 #include "generic_window.hpp"
00029 #include "../utils/pointer.hpp"
00030 #include <list>
00031 
00032 class OSWindow;
00033 class OSGraphics;
00034 class GenericLayout;
00035 class CtrlGeneric;
00036 class WindowManager;
00037 
00038 
00040 class TopWindow: public GenericWindow
00041 {
00042     private:
00043         friend class WindowManager;
00044     public:
00045         TopWindow( intf_thread_t *pIntf, int xPos, int yPos,
00046                    WindowManager &rWindowManager,
00047                    bool dragDrop, bool playOnDrop, bool visible );
00048         virtual ~TopWindow();
00049 
00051         virtual void processEvent( EvtRefresh &rEvtRefresh );
00052         virtual void processEvent( EvtFocus &rEvtFocus );
00053         virtual void processEvent( EvtMotion &rEvtMotion );
00054         virtual void processEvent( EvtMouse &rEvtMouse );
00055         virtual void processEvent( EvtLeave &rEvtLeave );
00056         virtual void processEvent( EvtKey &rEvtKey );
00057         virtual void processEvent( EvtScroll &rEvtScroll );
00058 
00060         virtual void forwardEvent( EvtGeneric &rEvt, CtrlGeneric &rCtrl );
00061 
00062         // Refresh an area of the window
00063         virtual void refresh( int left, int top, int width, int height );
00064 
00066         virtual const GenericLayout& getActiveLayout() const;
00067 
00069         virtual void updateShape();
00070 
00072         virtual void onControlCapture( const CtrlGeneric &rCtrl );
00073 
00075         virtual void onControlRelease( const CtrlGeneric &rCtrl );
00076 
00078         virtual void onTooltipChange( const CtrlGeneric &rCtrl );
00079 
00081         bool isVisible() const { return m_visible; }
00082 
00083     protected:
00085         virtual void innerShow();
00086 
00087     private:
00089         virtual void setActiveLayout( GenericLayout *pLayout );
00090 
00092         bool m_visible;
00094         WindowManager &m_rWindowManager;
00096         GenericLayout *m_pActiveLayout;
00098         CtrlGeneric *m_pLastHitControl;
00100         CtrlGeneric *m_pCapturingControl;
00102         CtrlGeneric *m_pFocusControl;
00104         int m_currModifier;
00105 
00108         CtrlGeneric *findHitControl( int xPos, int yPos );
00109 
00112         void setLastHit( CtrlGeneric *pNewHitControl );
00113 };
00114 
00115 typedef CountedPtr<TopWindow> TopWindowPtr;
00116 
00117 
00118 #endif

Generated on Tue Dec 20 10:14:42 2005 for vlc-0.8.4a by  doxygen 1.4.2