1 2 // MARKER(update_precomp.py): autogen include statement, do not remove 3 #include "precompiled_framework.hxx" 4 5 //_________________________________________________________________________________________________________________ 6 // my own includes 7 //_________________________________________________________________________________________________________________ 8 9 #include <uielement/panelwindow.hxx> 10 11 namespace framework 12 { 13 14 PanelWindow::PanelWindow( Window* pParent, WinBits nWinBits ) : 15 DockingWindow( pParent, nWinBits ) 16 { 17 } 18 19 PanelWindow::~PanelWindow() 20 { 21 } 22 23 const ::rtl::OUString& PanelWindow::getResourceURL() const 24 { 25 return m_aResourceURL; 26 } 27 28 void PanelWindow::setResourceURL(const ::rtl::OUString& rResourceURL) 29 { 30 m_aResourceURL = rResourceURL; 31 } 32 33 Window* PanelWindow::getContentWindow() const 34 { 35 return m_pContentWindow; 36 } 37 38 void PanelWindow::setContentWindow( Window* pContentWindow ) 39 { 40 m_pContentWindow = pContentWindow; 41 if ( m_pContentWindow != NULL ) 42 { 43 m_pContentWindow->SetParent(this); 44 m_pContentWindow->SetSizePixel( GetOutputSizePixel() ); 45 m_pContentWindow->Show(); 46 } 47 } 48 49 void PanelWindow::Command( const CommandEvent& rCEvt ) 50 { 51 if ( m_aCommandHandler.IsSet() ) 52 m_aCommandHandler.Call( (void *)( &rCEvt )); 53 DockingWindow::Command( rCEvt ); 54 } 55 56 void PanelWindow::StateChanged( StateChangedType nType ) 57 { 58 DockingWindow::StateChanged( nType ); 59 if ( m_aStateChangedHandler.IsSet() ) 60 m_aStateChangedHandler.Call( &nType ); 61 } 62 63 void PanelWindow::DataChanged( const DataChangedEvent& rDCEvt ) 64 { 65 DockingWindow::DataChanged( rDCEvt ); 66 if ( m_aDataChangedHandler.IsSet() ) 67 m_aDataChangedHandler.Call( (void*)&rDCEvt ); 68 } 69 70 void PanelWindow::Resize() 71 { 72 DockingWindow::Resize(); 73 if ( m_pContentWindow ) 74 m_pContentWindow->SetSizePixel( GetOutputSizePixel() ); 75 } 76 77 } 78