Commit 1e34cf51 authored by Cyril Deguet's avatar Cyril Deguet
Browse files

* all: split GenericWindow into GenericWindow (general interface for

  windows) and TopWindow (implementation for top-level windows)
parent a5ca00dc
...@@ -112,6 +112,8 @@ SOURCES_skins2 = \ ...@@ -112,6 +112,8 @@ SOURCES_skins2 = \
src/theme_loader.hpp \ src/theme_loader.hpp \
src/tooltip.cpp \ src/tooltip.cpp \
src/tooltip.hpp \ src/tooltip.hpp \
src/top_window.cpp \
src/top_window.hpp \
src/var_manager.cpp \ src/var_manager.cpp \
src/var_manager.hpp \ src/var_manager.hpp \
src/vlcproc.cpp \ src/vlcproc.cpp \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cmd_layout.cpp * cmd_layout.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: cmd_layout.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $ * $Id$
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
*****************************************************************************/ *****************************************************************************/
#include "cmd_layout.hpp" #include "cmd_layout.hpp"
#include "../src/generic_window.hpp" #include "../src/top_window.hpp"
#include "../src/generic_layout.hpp" #include "../src/generic_layout.hpp"
#include "../src/theme.hpp" #include "../src/theme.hpp"
...@@ -42,7 +42,7 @@ void CmdLayout::execute() ...@@ -42,7 +42,7 @@ void CmdLayout::execute()
{ {
return; return;
} }
GenericWindow *pWindow = TopWindow *pWindow =
getIntf()->p_sys->p_theme->getWindowById( m_windowId ); getIntf()->p_sys->p_theme->getWindowById( m_windowId );
GenericLayout *pLayout = GenericLayout *pLayout =
getIntf()->p_sys->p_theme->getLayoutById( m_layoutId ); getIntf()->p_sys->p_theme->getLayoutById( m_layoutId );
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#define CMD_SHOW_WINDOW_HPP #define CMD_SHOW_WINDOW_HPP
#include "cmd_generic.hpp" #include "cmd_generic.hpp"
#include "../src/generic_window.hpp" #include "../src/top_window.hpp"
#include "../src/window_manager.hpp" #include "../src/window_manager.hpp"
...@@ -35,7 +35,7 @@ class CmdShowWindow: public CmdGeneric ...@@ -35,7 +35,7 @@ class CmdShowWindow: public CmdGeneric
{ {
public: public:
CmdShowWindow( intf_thread_t *pIntf, WindowManager &rWinManager, CmdShowWindow( intf_thread_t *pIntf, WindowManager &rWinManager,
GenericWindow &rWin ): TopWindow &rWin ):
CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) {} CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) {}
virtual ~CmdShowWindow() {} virtual ~CmdShowWindow() {}
...@@ -49,7 +49,7 @@ class CmdShowWindow: public CmdGeneric ...@@ -49,7 +49,7 @@ class CmdShowWindow: public CmdGeneric
/// Reference to the window manager /// Reference to the window manager
WindowManager &m_rWinManager; WindowManager &m_rWinManager;
/// Reference to the window /// Reference to the window
GenericWindow &m_rWin; TopWindow &m_rWin;
}; };
...@@ -58,7 +58,7 @@ class CmdHideWindow: public CmdGeneric ...@@ -58,7 +58,7 @@ class CmdHideWindow: public CmdGeneric
{ {
public: public:
CmdHideWindow( intf_thread_t *pIntf, WindowManager &rWinManager, CmdHideWindow( intf_thread_t *pIntf, WindowManager &rWinManager,
GenericWindow &rWin ): TopWindow &rWin ):
CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) {} CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) {}
virtual ~CmdHideWindow() {} virtual ~CmdHideWindow() {}
...@@ -72,7 +72,7 @@ class CmdHideWindow: public CmdGeneric ...@@ -72,7 +72,7 @@ class CmdHideWindow: public CmdGeneric
/// Reference to the window manager /// Reference to the window manager
WindowManager &m_rWinManager; WindowManager &m_rWinManager;
/// Reference to the window /// Reference to the window
GenericWindow &m_rWin; TopWindow &m_rWin;
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ctrl_generic.cpp * ctrl_generic.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: ctrl_generic.cpp,v 1.2 2004/02/29 16:49:55 asmax Exp $ * $Id$
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "ctrl_generic.hpp" #include "ctrl_generic.hpp"
#include "../src/generic_layout.hpp" #include "../src/generic_layout.hpp"
#include "../src/generic_window.hpp" #include "../src/top_window.hpp"
#include "../src/os_graphics.hpp" #include "../src/os_graphics.hpp"
#include "../utils/position.hpp" #include "../utils/position.hpp"
#include "../utils/var_bool.hpp" #include "../utils/var_bool.hpp"
...@@ -101,7 +101,7 @@ void CtrlGeneric::releaseMouse() const ...@@ -101,7 +101,7 @@ void CtrlGeneric::releaseMouse() const
void CtrlGeneric::notifyTooltipChange() const void CtrlGeneric::notifyTooltipChange() const
{ {
GenericWindow *pWin = getWindow(); TopWindow *pWin = getWindow();
if( pWin ) if( pWin )
{ {
// Notify the window // Notify the window
...@@ -110,7 +110,7 @@ void CtrlGeneric::notifyTooltipChange() const ...@@ -110,7 +110,7 @@ void CtrlGeneric::notifyTooltipChange() const
} }
GenericWindow *CtrlGeneric::getWindow() const TopWindow *CtrlGeneric::getWindow() const
{ {
if( m_pLayout ) if( m_pLayout )
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ctrl_generic.hpp * ctrl_generic.hpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: ctrl_generic.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $ * $Id$
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr> * Olivier Teulière <ipkiss@via.ecp.fr>
...@@ -35,7 +35,7 @@ class EvtGeneric; ...@@ -35,7 +35,7 @@ class EvtGeneric;
class OSGraphics; class OSGraphics;
class GenericLayout; class GenericLayout;
class Position; class Position;
class GenericWindow; class TopWindow;
class VarBool; class VarBool;
...@@ -96,7 +96,7 @@ class CtrlGeneric: public SkinObject, public Observer<VarBool> ...@@ -96,7 +96,7 @@ class CtrlGeneric: public SkinObject, public Observer<VarBool>
virtual void notifyTooltipChange() const; virtual void notifyTooltipChange() const;
/// Get the associated window, if any /// Get the associated window, if any
virtual GenericWindow *getWindow() const; virtual TopWindow *getWindow() const;
/// Overload this method if you want to do something special when /// Overload this method if you want to do something special when
/// the Position object is set /// the Position object is set
......
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
#include "../events/evt_generic.hpp" #include "../events/evt_generic.hpp"
#include "../events/evt_mouse.hpp" #include "../events/evt_mouse.hpp"
#include "../events/evt_motion.hpp" #include "../events/evt_motion.hpp"
#include "../src/generic_window.hpp" #include "../src/top_window.hpp"
#include "../src/window_manager.hpp" #include "../src/window_manager.hpp"
#include "../utils/position.hpp" #include "../utils/position.hpp"
CtrlMove::CtrlMove( intf_thread_t *pIntf, WindowManager &rWindowManager, CtrlMove::CtrlMove( intf_thread_t *pIntf, WindowManager &rWindowManager,
CtrlFlat &rCtrl, GenericWindow &rWindow, CtrlFlat &rCtrl, TopWindow &rWindow,
const UString &rHelp, VarBool *pVisible ): const UString &rHelp, VarBool *pVisible ):
CtrlFlat( pIntf, rHelp, pVisible ), m_fsm( pIntf ), CtrlFlat( pIntf, rHelp, pVisible ), m_fsm( pIntf ),
m_rWindowManager( rWindowManager ), m_rWindowManager( rWindowManager ),
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ctrl_move.hpp * ctrl_move.hpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: ctrl_move.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp $ * $Id$
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr> * Olivier Teulière <ipkiss@via.ecp.fr>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "../utils/fsm.hpp" #include "../utils/fsm.hpp"
#include "ctrl_flat.hpp" #include "ctrl_flat.hpp"
class GenericWindow; class TopWindow;
class WindowManager; class WindowManager;
...@@ -38,7 +38,7 @@ class CtrlMove: public CtrlFlat ...@@ -38,7 +38,7 @@ class CtrlMove: public CtrlFlat
{ {
public: public:
CtrlMove( intf_thread_t *pIntf, WindowManager &rWindowManager, CtrlMove( intf_thread_t *pIntf, WindowManager &rWindowManager,
CtrlFlat &rCtrl, GenericWindow &rWindow, CtrlFlat &rCtrl, TopWindow &rWindow,
const UString &rHelp, VarBool *pVisible ); const UString &rHelp, VarBool *pVisible );
virtual ~CtrlMove() {} virtual ~CtrlMove() {}
...@@ -69,7 +69,7 @@ class CtrlMove: public CtrlFlat ...@@ -69,7 +69,7 @@ class CtrlMove: public CtrlFlat
/// Decorated CtrlFlat /// Decorated CtrlFlat
CtrlFlat &m_rCtrl; CtrlFlat &m_rCtrl;
/// The window moved by this control /// The window moved by this control
GenericWindow &m_rWindow; TopWindow &m_rWindow;
/// The last received event /// The last received event
EvtGeneric *m_pEvt; EvtGeneric *m_pEvt;
/// Position of the click that started the move /// Position of the click that started the move
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ctrl_slider.cpp * ctrl_slider.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: ctrl_slider.cpp,v 1.5 2004/03/02 21:45:15 ipkiss Exp $ * $Id$
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "../events/evt_mouse.hpp" #include "../events/evt_mouse.hpp"
#include "../events/evt_scroll.hpp" #include "../events/evt_scroll.hpp"
#include "../src/generic_bitmap.hpp" #include "../src/generic_bitmap.hpp"
#include "../src/generic_window.hpp" #include "../src/top_window.hpp"
#include "../src/os_factory.hpp" #include "../src/os_factory.hpp"
#include "../src/os_graphics.hpp" #include "../src/os_graphics.hpp"
#include "../utils/position.hpp" #include "../utils/position.hpp"
...@@ -342,7 +342,7 @@ void CtrlSliderBg::handleEvent( EvtGeneric &rEvent ) ...@@ -342,7 +342,7 @@ void CtrlSliderBg::handleEvent( EvtGeneric &rEvent )
// Forward the clic to the cursor // Forward the clic to the cursor
EvtMouse evt( getIntf(), x, y, EvtMouse::kLeft, EvtMouse::kDown ); EvtMouse evt( getIntf(), x, y, EvtMouse::kLeft, EvtMouse::kDown );
GenericWindow *pWin = getWindow(); TopWindow *pWin = getWindow();
if( pWin ) if( pWin )
{ {
EvtEnter evtEnter( getIntf() ); EvtEnter evtEnter( getIntf() );
......
...@@ -27,10 +27,9 @@ ...@@ -27,10 +27,9 @@
#include "../src/os_graphics.hpp" #include "../src/os_graphics.hpp"
CtrlVideo::CtrlVideo( intf_thread_t *pIntf, WindowManager &rWindowManager, CtrlVideo::CtrlVideo( intf_thread_t *pIntf, const UString &rHelp,
const UString &rHelp, VarBool *pVisible ): VarBool *pVisible ):
CtrlGeneric( pIntf, rHelp, pVisible ), m_rWindowManager( rWindowManager ), CtrlGeneric( pIntf, rHelp, pVisible ), m_pVout( NULL )
m_pVout( NULL )
{ {
} }
...@@ -80,8 +79,7 @@ void CtrlVideo::draw( OSGraphics &rImage, int xDest, int yDest ) ...@@ -80,8 +79,7 @@ void CtrlVideo::draw( OSGraphics &rImage, int xDest, int yDest )
if (!m_pVout) if (!m_pVout)
{ {
m_pVout = new VoutWindow( getIntf(), pPos->getLeft(), m_pVout = new VoutWindow( getIntf(), pPos->getLeft(),
pPos->getTop(), m_rWindowManager, false, pPos->getTop(), false, false, *pParent );
false, *pParent );
m_pVout->resize( pPos->getWidth(), pPos->getHeight() ); m_pVout->resize( pPos->getWidth(), pPos->getHeight() );
m_pVout->show(); m_pVout->show();
} }
......
...@@ -27,14 +27,13 @@ ...@@ -27,14 +27,13 @@
#include "ctrl_generic.hpp" #include "ctrl_generic.hpp"
class VoutWindow; class VoutWindow;
class WindowManager;
/// Control video /// Control video
class CtrlVideo: public CtrlGeneric class CtrlVideo: public CtrlGeneric
{ {
public: public:
CtrlVideo( intf_thread_t *pIntf, WindowManager &rWindowManager, CtrlVideo( intf_thread_t *pIntf, const UString &rHelp,
const UString &rHelp, VarBool *pVisible ); VarBool *pVisible );
virtual ~CtrlVideo(); virtual ~CtrlVideo();
/// Handle an event on the control /// Handle an event on the control
...@@ -50,8 +49,6 @@ class CtrlVideo: public CtrlGeneric ...@@ -50,8 +49,6 @@ class CtrlVideo: public CtrlGeneric
virtual void draw( OSGraphics &rImage, int xDest, int yDest ); virtual void draw( OSGraphics &rImage, int xDest, int yDest );
private: private:
/// Window manager
WindowManager &m_rWindowManager;
/// Vout window /// Vout window
VoutWindow *m_pVout; VoutWindow *m_pVout;
}; };
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include "../src/png_bitmap.hpp" #include "../src/png_bitmap.hpp"
#include "../src/os_factory.hpp" #include "../src/os_factory.hpp"
#include "../src/generic_bitmap.hpp" #include "../src/generic_bitmap.hpp"
#include "../src/generic_window.hpp" #include "../src/top_window.hpp"
#include "../src/vout_window.hpp"
#include "../src/anchor.hpp" #include "../src/anchor.hpp"
#include "../src/ft2_font.hpp" #include "../src/ft2_font.hpp"
#include "../src/theme.hpp" #include "../src/theme.hpp"
...@@ -149,18 +148,18 @@ void Builder::addFont( const BuilderData::Font &rData ) ...@@ -149,18 +148,18 @@ void Builder::addFont( const BuilderData::Font &rData )
void Builder::addWindow( const BuilderData::Window &rData ) void Builder::addWindow( const BuilderData::Window &rData )
{ {
GenericWindow *pWin = TopWindow *pWin =
new GenericWindow( getIntf(), rData.m_xPos, rData.m_yPos, new TopWindow( getIntf(), rData.m_xPos, rData.m_yPos,
m_pTheme->getWindowManager(), m_pTheme->getWindowManager(),
rData.m_dragDrop, rData.m_playOnDrop ); rData.m_dragDrop, rData.m_playOnDrop );
m_pTheme->m_windows[rData.m_id] = GenericWindowPtr( pWin ); m_pTheme->m_windows[rData.m_id] = TopWindowPtr( pWin );
} }
void Builder::addLayout( const BuilderData::Layout &rData ) void Builder::addLayout( const BuilderData::Layout &rData )
{ {
GenericWindow *pWin = m_pTheme->m_windows[rData.m_windowId].get(); TopWindow *pWin = m_pTheme->m_windows[rData.m_windowId].get();
if( pWin == NULL ) if( pWin == NULL )
{ {
msg_Err( getIntf(), "unknown window id: %s", rData.m_windowId.c_str() ); msg_Err( getIntf(), "unknown window id: %s", rData.m_windowId.c_str() );
...@@ -186,7 +185,7 @@ void Builder::addLayout( const BuilderData::Layout &rData ) ...@@ -186,7 +185,7 @@ void Builder::addLayout( const BuilderData::Layout &rData )
void Builder::addAnchor( const BuilderData::Anchor &rData ) void Builder::addAnchor( const BuilderData::Anchor &rData )
{ {
GenericWindow *pWin = m_pTheme->m_windows[rData.m_windowId].get(); TopWindow *pWin = m_pTheme->m_windows[rData.m_windowId].get();
if( pWin == NULL ) if( pWin == NULL )
{ {
msg_Err( getIntf(), "unknown window id: %s", rData.m_windowId.c_str() ); msg_Err( getIntf(), "unknown window id: %s", rData.m_windowId.c_str() );
...@@ -335,7 +334,7 @@ void Builder::addImage( const BuilderData::Image &rData ) ...@@ -335,7 +334,7 @@ void Builder::addImage( const BuilderData::Image &rData )
return; return;
} }
GenericWindow *pWindow = m_pTheme->m_windows[rData.m_windowId].get(); TopWindow *pWindow = m_pTheme->m_windows[rData.m_windowId].get();
if( pWindow == NULL ) if( pWindow == NULL )
{ {
msg_Err( getIntf(), "unknown window id: %s", rData.m_windowId.c_str() ); msg_Err( getIntf(), "unknown window id: %s", rData.m_windowId.c_str() );
...@@ -570,9 +569,8 @@ void Builder::addVideo( const BuilderData::Video &rData ) ...@@ -570,9 +569,8 @@ void Builder::addVideo( const BuilderData::Video &rData )
return; return;
} }
CtrlVideo *pVideo = CtrlVideo *pVideo = new CtrlVideo( getIntf(),
new CtrlVideo( getIntf(), m_pTheme->getWindowManager(), UString( getIntf(), rData.m_help.c_str() ), NULL);
UString( getIntf(), rData.m_help.c_str() ), NULL);
// Compute the position of the control // Compute the position of the control
const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom, const Position pos = makePosition( rData.m_leftTop, rData.m_rightBottom,
......
...@@ -118,7 +118,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme ) ...@@ -118,7 +118,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
{ {
int leftPos = rAction.find( ".show()" ); int leftPos = rAction.find( ".show()" );
string windowId = rAction.substr( 0, leftPos ); string windowId = rAction.substr( 0, leftPos );
GenericWindow *pWin = pTheme->getWindowById( windowId ); TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin ) if( pWin )
{ {
pCommand = new CmdShowWindow( getIntf(), pTheme->getWindowManager(), pCommand = new CmdShowWindow( getIntf(), pTheme->getWindowManager(),
...@@ -133,7 +133,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme ) ...@@ -133,7 +133,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
{ {
int leftPos = rAction.find( ".hide()" ); int leftPos = rAction.find( ".hide()" );
string windowId = rAction.substr( 0, leftPos ); string windowId = rAction.substr( 0, leftPos );
GenericWindow *pWin = pTheme->getWindowById( windowId ); TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin ) if( pWin )
{ {
pCommand = new CmdHideWindow( getIntf(), pTheme->getWindowManager(), pCommand = new CmdHideWindow( getIntf(), pTheme->getWindowManager(),
...@@ -210,7 +210,7 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme ) ...@@ -210,7 +210,7 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
{ {
int leftPos = rName.find( ".isVisible" ); int leftPos = rName.find( ".isVisible" );
string windowId = rName.substr( 0, leftPos ); string windowId = rName.substr( 0, leftPos );
GenericWindow *pWin = pTheme->getWindowById( windowId ); TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin ) if( pWin )
{ {
return &pWin->getVisibleVar(); return &pWin->getVisibleVar();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* generic_layout.cpp * generic_layout.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: generic_layout.cpp,v 1.2 2004/02/29 16:49:55 asmax Exp $ * $Id$
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
*****************************************************************************/ *****************************************************************************/
#include "generic_layout.hpp" #include "generic_layout.hpp"
#include "generic_window.hpp" #include "top_window.hpp"
#include "os_factory.hpp" #include "os_factory.hpp"
#include "os_graphics.hpp" #include "os_graphics.hpp"
#include "../controls/ctrl_generic.hpp" #include "../controls/ctrl_generic.hpp"
...@@ -52,7 +52,7 @@ GenericLayout::~GenericLayout() ...@@ -52,7 +52,7 @@ GenericLayout::~GenericLayout()
} }
void GenericLayout::setWindow( GenericWindow *pWindow ) void GenericLayout::setWindow( TopWindow *pWindow )
{ {
m_pWindow = pWindow; m_pWindow = pWindow;
} }
...@@ -61,7 +61,7 @@ void GenericLayout::setWindow( GenericWindow *pWindow ) ...@@ -61,7 +61,7 @@ void GenericLayout::setWindow( GenericWindow *pWindow )
void GenericLayout::onControlCapture( const CtrlGeneric &rCtrl ) void GenericLayout::onControlCapture( const CtrlGeneric &rCtrl )
{ {
// Just forward the request to the window // Just forward the request to the window
GenericWindow *pWindow = getWindow(); TopWindow *pWindow = getWindow();
if( pWindow ) if( pWindow )
{ {
pWindow->onControlCapture( rCtrl ); pWindow->onControlCapture( rCtrl );
...@@ -72,7 +72,7 @@ void GenericLayout::onControlCapture( const CtrlGeneric &rCtrl ) ...@@ -72,7 +72,7 @@ void GenericLayout::onControlCapture( const CtrlGeneric &rCtrl )
void GenericLayout::onControlRelease( const CtrlGeneric &rCtrl ) void GenericLayout::onControlRelease( const CtrlGeneric &rCtrl )
{ {
// Just forward the request to the window // Just forward the request to the window