ctrl_video.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 #ifndef CTRL_VIDEO_HPP
00025 #define CTRL_VIDEO_HPP
00026
00027 #include "ctrl_generic.hpp"
00028 #include "../utils/position.hpp"
00029 #include "../src/vout_window.hpp"
00030 #include <vlc_vout.h>
00031
00032
00033
00034 class CtrlVideo: public CtrlGeneric
00035 {
00036 public:
00037 CtrlVideo( intf_thread_t *pIntf, GenericLayout &rLayout,
00038 bool autoResize, const UString &rHelp, VarBool *pVisible );
00039 virtual ~CtrlVideo();
00040
00041
00042 virtual void handleEvent( EvtGeneric &rEvent );
00043
00044
00045 virtual bool mouseOver( int x, int y ) const;
00046
00047
00048 virtual void onResize();
00049
00050
00051 virtual void onPositionChange();
00052
00053
00054 virtual void draw( OSGraphics &rImage, int xDest, int yDest );
00055
00056
00057 virtual string getType() const { return "video"; }
00058
00059
00060 virtual void onUpdate( Subject<VarBool> &rVariable , void* );
00061
00062
00063 void attachVoutWindow( VoutWindow* pVoutWindow,
00064 int width = -1, int height = -1 );
00065
00066
00067 void detachVoutWindow( );
00068
00069
00070 virtual TopWindow* getWindow() { return CtrlGeneric::getWindow(); }
00071
00072
00073 virtual VoutWindow* getVoutWindow() { return m_pVoutWindow; }
00074
00075
00076 virtual void setLayout( GenericLayout *pLayout,
00077 const Position &rPosition );
00078 virtual void unsetLayout();
00079
00080
00081 virtual void resizeControl( int width, int height );
00082
00083
00084 virtual bool isUseable() { return m_bIsUseable; }
00085
00086
00087 virtual bool isUsed() { return m_pVoutWindow ? true : false; }
00088
00089 private:
00090
00091 GenericLayout &m_rLayout;
00092
00093
00094 bool m_bAutoResize;
00095
00096
00097 int m_xShift, m_yShift;
00098
00099
00100 bool m_bIsUseable;
00101
00102
00103 VoutWindow *m_pVoutWindow;
00104 };
00105
00106 #endif