00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
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