1*6d739b60SAndrew Rist /**************************************************************
2*6d739b60SAndrew Rist  *
3*6d739b60SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*6d739b60SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*6d739b60SAndrew Rist  * distributed with this work for additional information
6*6d739b60SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*6d739b60SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*6d739b60SAndrew Rist  * "License"); you may not use this file except in compliance
9*6d739b60SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*6d739b60SAndrew Rist  *
11*6d739b60SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*6d739b60SAndrew Rist  *
13*6d739b60SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*6d739b60SAndrew Rist  * software distributed under the License is distributed on an
15*6d739b60SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*6d739b60SAndrew Rist  * KIND, either express or implied.  See the License for the
17*6d739b60SAndrew Rist  * specific language governing permissions and limitations
18*6d739b60SAndrew Rist  * under the License.
19*6d739b60SAndrew Rist  *
20*6d739b60SAndrew Rist  *************************************************************/
21*6d739b60SAndrew Rist 
22cdf0e10cSrcweir 
23cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
24cdf0e10cSrcweir #include "precompiled_framework.hxx"
25cdf0e10cSrcweir 
26cdf0e10cSrcweir //_________________________________________________________________________________________________________________
27cdf0e10cSrcweir //	my own includes
28cdf0e10cSrcweir //_________________________________________________________________________________________________________________
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include <uielement/panelwindow.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir namespace framework
33cdf0e10cSrcweir {
34cdf0e10cSrcweir 
PanelWindow(Window * pParent,WinBits nWinBits)35cdf0e10cSrcweir PanelWindow::PanelWindow( Window* pParent, WinBits nWinBits ) :
36cdf0e10cSrcweir     DockingWindow( pParent, nWinBits )
37cdf0e10cSrcweir {
38cdf0e10cSrcweir }
39cdf0e10cSrcweir 
~PanelWindow()40cdf0e10cSrcweir PanelWindow::~PanelWindow()
41cdf0e10cSrcweir {
42cdf0e10cSrcweir }
43cdf0e10cSrcweir 
getResourceURL() const44cdf0e10cSrcweir const ::rtl::OUString& PanelWindow::getResourceURL() const
45cdf0e10cSrcweir {
46cdf0e10cSrcweir     return m_aResourceURL;
47cdf0e10cSrcweir }
48cdf0e10cSrcweir 
setResourceURL(const::rtl::OUString & rResourceURL)49cdf0e10cSrcweir void PanelWindow::setResourceURL(const ::rtl::OUString& rResourceURL)
50cdf0e10cSrcweir {
51cdf0e10cSrcweir     m_aResourceURL = rResourceURL;
52cdf0e10cSrcweir }
53cdf0e10cSrcweir 
getContentWindow() const54cdf0e10cSrcweir Window* PanelWindow::getContentWindow() const
55cdf0e10cSrcweir {
56cdf0e10cSrcweir     return m_pContentWindow;
57cdf0e10cSrcweir }
58cdf0e10cSrcweir 
setContentWindow(Window * pContentWindow)59cdf0e10cSrcweir void PanelWindow::setContentWindow( Window* pContentWindow )
60cdf0e10cSrcweir {
61cdf0e10cSrcweir     m_pContentWindow = pContentWindow;
62cdf0e10cSrcweir     if ( m_pContentWindow != NULL )
63cdf0e10cSrcweir     {
64cdf0e10cSrcweir 		m_pContentWindow->SetParent(this);
65cdf0e10cSrcweir 		m_pContentWindow->SetSizePixel( GetOutputSizePixel() );
66cdf0e10cSrcweir 		m_pContentWindow->Show();
67cdf0e10cSrcweir     }
68cdf0e10cSrcweir }
69cdf0e10cSrcweir 
Command(const CommandEvent & rCEvt)70cdf0e10cSrcweir void PanelWindow::Command( const CommandEvent& rCEvt )
71cdf0e10cSrcweir {
72cdf0e10cSrcweir 	if ( m_aCommandHandler.IsSet() )
73cdf0e10cSrcweir 		m_aCommandHandler.Call( (void *)( &rCEvt ));
74cdf0e10cSrcweir     DockingWindow::Command( rCEvt );
75cdf0e10cSrcweir }
76cdf0e10cSrcweir 
StateChanged(StateChangedType nType)77cdf0e10cSrcweir void PanelWindow::StateChanged( StateChangedType nType )
78cdf0e10cSrcweir {
79cdf0e10cSrcweir     DockingWindow::StateChanged( nType );
80cdf0e10cSrcweir     if ( m_aStateChangedHandler.IsSet() )
81cdf0e10cSrcweir         m_aStateChangedHandler.Call( &nType );
82cdf0e10cSrcweir }
83cdf0e10cSrcweir 
DataChanged(const DataChangedEvent & rDCEvt)84cdf0e10cSrcweir void PanelWindow::DataChanged( const DataChangedEvent& rDCEvt )
85cdf0e10cSrcweir {
86cdf0e10cSrcweir     DockingWindow::DataChanged( rDCEvt );
87cdf0e10cSrcweir     if ( m_aDataChangedHandler.IsSet() )
88cdf0e10cSrcweir         m_aDataChangedHandler.Call( (void*)&rDCEvt );
89cdf0e10cSrcweir }
90cdf0e10cSrcweir 
Resize()91cdf0e10cSrcweir void PanelWindow::Resize()
92cdf0e10cSrcweir {
93cdf0e10cSrcweir     DockingWindow::Resize();
94cdf0e10cSrcweir     if ( m_pContentWindow )
95cdf0e10cSrcweir 		m_pContentWindow->SetSizePixel( GetOutputSizePixel() );
96cdf0e10cSrcweir }
97cdf0e10cSrcweir 
98cdf0e10cSrcweir }
99