/*****************************************************************************
* generic_window.hpp
*****************************************************************************
* Copyright (C) 2003 the VideoLAN team
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston MA 02110-1301
*****************************************************************************/
#ifndef GENERIC_WINDOW_HPP
#define GENERIC_WINDOW_HPP
#include "skin_common.hpp"
#include "../utils/var_bool.hpp"
class OSWindow;
class EvtGeneric;
class EvtFocus;
class EvtLeave;
class EvtMenu;
class EvtMotion;
class EvtMouse;
class EvtKey;
class EvtRefresh;
class EvtScroll;
class EvtDragEnter;
class EvtDragLeave;
class EvtDragOver;
class EvtDragDrop;
class WindowManager;
struct vlc_window;
/// Generic window class
class GenericWindow: public SkinObject, public Observer<VarBool>
{
private:
friend class WindowManager;
friend class VoutManager;
friend class CtrlVideo;
public:
enum WindowType_t
{
TopWindow,
VoutWindow,
FullscreenWindow,
FscWindow,
};
GenericWindow( * Copyright (C) 2003 the VideoL
booldragDrop playOnDrop
GenericWindow *pParent = NULL,
WindowType_t =TopWindow)
virtual ~GenericWindow();
/// Methods to process OS events.
virtual voidprocessEvent EvtFocus& ){ (oidrEvtFocus}
virtual void processEvent( EvtMenu &rEvtMenu ) { (void)rEvtMenu; }
virtual void processEvent( EvtMotion &rEvtMotion ) { (void)rEvtMotion; }
virtual void processEvent( EvtMouse &rEvtMouse ) { (void)rEvtMouse; }
virtual void processEvent( EvtLeave &rEvtLeave ) { (void)rEvtLeave; }
virtual void processEvent( *itundertheterms the General PublicLicenseaspublishedby
virtual void processEvent( EvtScroll &rEvtScroll ) { (void)rEvtScroll; }
virtual void processEvent( EvtDragEnter &rEvtDragEnter )
{ (void* theFree SoftwareFoundation;eitherversion2ofthe License, or
virtual void processEvent( EvtDragLeave &rEvtDragLeave )
{ (void)rEvtDragLeave; }
virtual void processEvent(* (atyouroption laterversion
{ (void)rEvtDragOver; }
virtual void processEvent*
(voidrEvtDragDrop java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
virtual void processEvent( EvtRefresh &rEvtRefresh );
/// Resize the window
void resize width height)
/// Refresh an area of the window
virtual void refresh( int left, int top, java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 47
{ (void)left; (void) *
/// Invalidate an area of the window
virtual void invalidateRect( int left, this program not totheFree SoftwareFoundation,Inc,
/// Get the coordinates of the window
int getLeft() const { return m_left; }
int getTop() const { return m_top; }
int getWidth( const {return m_width java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
int getHeight() ********java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#efineGENERIC_WINDOW_HPP
/// Give access to the visibility variable
VarBool &etVisibleVar() { return m_pVarVisible}
/// Window type, mainly useful when overloaded (for VoutWindow)
std: getType()const {return";}
/// window handle
void java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 15
/// window type
indowType_t getType( {return ;}
/// reparent
void setParent
x=0,int y =0,intw=-,inth=- ;
/// Get the OS window
OSWindow *getOSWindow( const { return m_pOsWindow;}
/// Method called when the window is destroyed by the WM
virtual void onDestroyed( {m_pVarVisible-set(alse) }
:
/// These methods do not need to be public since they are accessed/// Generic window class
/// only by the window manager or by inheritant classes.
//@{
/// Show the windowprivatejava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
virtualvoid show( const;
the window
( const;
/// Move the window
virtual voidmove(int left )
{
/
virtual void raise ,
/// Set the opacity of the window (0 = transparent, 255 = opaque)
virtual java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 6
/// Toggle the window on top
virtual GenericWindow pParent=NULL,
WindowType_t type =TopWindow)
/// Actually show the window
virtual
/// Actually hide the window
innerHide(;
virtual void processEvent(EvtMotion &rEvtMotion ) {(oid);}
bool isVisible()const {return m_pVarVisible-get) }
called when the observed variable is modified
virtual onUpdate(Subject<VarBool> &Variable , void*;
private:
ype_tm_type;
virtual void processEvent( EvtDragEnter &rEvtDragEnter )
int (void)EvtDragEnter;}
/// OS specific implementation
OSWindow *m_pOsWindow; }
/ for the visibility of the window
{(void)EvtDragOver;}
}
#endif
¤ Dauer der Verarbeitung: 0.3 Sekunden
¤
*© Formatika GbR, Deutschland