top_window.hpp
Go to the documentation of this file.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
00039
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
00050
00051 virtual void processEvent( EvtFocus &rEvtFocus );
00052 virtual void processEvent( EvtMenu &rEvtMenu );
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
00059
00060 virtual void forwardEvent( EvtGeneric &rEvt, CtrlGeneric &rCtrl );
00061
00062
00063 virtual void refresh( int left, int top, int width, int height );
00064
00065
00066 virtual const GenericLayout& getActiveLayout() const;
00067
00068
00069 virtual void updateShape();
00070
00071
00072 virtual void onControlCapture( const CtrlGeneric &rCtrl );
00073
00074
00075 virtual void onControlRelease( const CtrlGeneric &rCtrl );
00076
00077
00078 virtual void onTooltipChange( const CtrlGeneric &rCtrl );
00079
00080
00081 VarBool &getMaximizedVar() { return *m_pVarMaximized; }
00082
00083
00084 bool isVisible() const { return m_visible; }
00085
00086 protected:
00087
00088 virtual void innerShow();
00089
00090
00091 virtual void innerHide();
00092
00093 private:
00094
00095
00096
00097
00098
00099 virtual void setActiveLayout( GenericLayout *pLayout );
00100
00101
00102
00103 bool m_visible;
00104
00105 WindowManager &m_rWindowManager;
00106
00107 GenericLayout *m_pActiveLayout;
00108
00109 CtrlGeneric *m_pLastHitControl;
00110
00111 CtrlGeneric *m_pCapturingControl;
00112
00113 CtrlGeneric *m_pFocusControl;
00114
00115 int m_currModifier;
00116
00117
00118 VarBoolImpl *m_pVarMaximized;
00119
00120
00121
00122
00123
00124 CtrlGeneric *findHitControl( int xPos, int yPos );
00125
00126
00127
00128
00129
00130 void setLastHit( CtrlGeneric *pNewHitControl );
00131 };
00132
00133 typedef CountedPtr<TopWindow> TopWindowPtr;
00134
00135
00136 #endif