1*6d739b60SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
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
22*6d739b60SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_framework.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir //_________________________________________________________________________________________________________________
28cdf0e10cSrcweir // my own includes
29cdf0e10cSrcweir //_________________________________________________________________________________________________________________
30cdf0e10cSrcweir
31cdf0e10cSrcweir #include "panelmanager.hxx"
32cdf0e10cSrcweir #include "services.h"
33cdf0e10cSrcweir #include "services/modelwinservice.hxx"
34cdf0e10cSrcweir
35cdf0e10cSrcweir //_________________________________________________________________________________________________________________
36cdf0e10cSrcweir // interface includes
37cdf0e10cSrcweir //_________________________________________________________________________________________________________________
38cdf0e10cSrcweir
39cdf0e10cSrcweir
40cdf0e10cSrcweir //_________________________________________________________________________________________________________________
41cdf0e10cSrcweir // other includes
42cdf0e10cSrcweir //_________________________________________________________________________________________________________________
43cdf0e10cSrcweir
44cdf0e10cSrcweir #include <vcl/svapp.hxx>
45cdf0e10cSrcweir #include <toolkit/unohlp.hxx>
46cdf0e10cSrcweir
47cdf0e10cSrcweir //_________________________________________________________________________________________________________________
48cdf0e10cSrcweir // namespace
49cdf0e10cSrcweir //_________________________________________________________________________________________________________________
50cdf0e10cSrcweir
51cdf0e10cSrcweir using namespace ::com::sun::star;
52cdf0e10cSrcweir
53cdf0e10cSrcweir namespace framework
54cdf0e10cSrcweir {
55cdf0e10cSrcweir
56cdf0e10cSrcweir //_________________________________________________________________________________________________________________
57cdf0e10cSrcweir // non exported definitions
58cdf0e10cSrcweir //_________________________________________________________________________________________________________________
59cdf0e10cSrcweir
60cdf0e10cSrcweir //_________________________________________________________________________________________________________________
61cdf0e10cSrcweir // declarations
62cdf0e10cSrcweir //_________________________________________________________________________________________________________________
63cdf0e10cSrcweir
64cdf0e10cSrcweir
PanelManager(const::com::sun::star::uno::Reference<::com::sun::star::lang::XMultiServiceFactory> & rSMGR,const::com::sun::star::uno::Reference<::com::sun::star::frame::XFrame> & rFrame)65cdf0e10cSrcweir PanelManager::PanelManager(
66cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMGR,
67cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) :
68cdf0e10cSrcweir m_xSMGR( rSMGR ),
69cdf0e10cSrcweir m_xFrame( rFrame )
70cdf0e10cSrcweir {
71cdf0e10cSrcweir m_aPanels[PANEL_TOP] = 0;
72cdf0e10cSrcweir m_aPanels[PANEL_BOTTOM] = 0;
73cdf0e10cSrcweir m_aPanels[PANEL_LEFT] = 0;
74cdf0e10cSrcweir m_aPanels[PANEL_RIGHT] = 0;
75cdf0e10cSrcweir }
76cdf0e10cSrcweir
~PanelManager()77cdf0e10cSrcweir PanelManager::~PanelManager()
78cdf0e10cSrcweir {
79cdf0e10cSrcweir }
80cdf0e10cSrcweir
81cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
82cdf0e10cSrcweir // Creation and layouting
83cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
createPanels()84cdf0e10cSrcweir bool PanelManager::createPanels()
85cdf0e10cSrcweir {
86cdf0e10cSrcweir if ( m_xFrame.is() )
87cdf0e10cSrcweir {
88cdf0e10cSrcweir vos::OGuard aGuard( Application::GetSolarMutex() );
89cdf0e10cSrcweir uno::Reference< awt::XWindow > xWindow( m_xFrame->getContainerWindow(), uno::UNO_QUERY );
90cdf0e10cSrcweir if ( xWindow.is() )
91cdf0e10cSrcweir {
92cdf0e10cSrcweir // destroy old panel windows
93cdf0e10cSrcweir delete m_aPanels[PANEL_TOP ];
94cdf0e10cSrcweir delete m_aPanels[PANEL_BOTTOM];
95cdf0e10cSrcweir delete m_aPanels[PANEL_LEFT ];
96cdf0e10cSrcweir delete m_aPanels[PANEL_RIGHT ];
97cdf0e10cSrcweir
98cdf0e10cSrcweir m_aPanels[PANEL_TOP ] = new Panel( m_xSMGR, xWindow, PANEL_TOP );
99cdf0e10cSrcweir m_aPanels[PANEL_BOTTOM] = new Panel( m_xSMGR, xWindow, PANEL_BOTTOM );
100cdf0e10cSrcweir m_aPanels[PANEL_LEFT ] = new Panel( m_xSMGR, xWindow, PANEL_LEFT );
101cdf0e10cSrcweir m_aPanels[PANEL_RIGHT ] = new Panel( m_xSMGR, xWindow, PANEL_RIGHT );
102cdf0e10cSrcweir return true;
103cdf0e10cSrcweir }
104cdf0e10cSrcweir }
105cdf0e10cSrcweir
106cdf0e10cSrcweir return false;
107cdf0e10cSrcweir }
108cdf0e10cSrcweir
getPreferredSize() const109cdf0e10cSrcweir awt::Rectangle PanelManager::getPreferredSize() const
110cdf0e10cSrcweir {
111cdf0e10cSrcweir return awt::Rectangle();
112cdf0e10cSrcweir }
113cdf0e10cSrcweir
layoutPanels(const awt::Rectangle)114cdf0e10cSrcweir void PanelManager::layoutPanels( const awt::Rectangle /*newSize*/ )
115cdf0e10cSrcweir {
116cdf0e10cSrcweir }
117cdf0e10cSrcweir
118cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
119cdf0e10cSrcweir // Panel functions
120cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
findDockingWindow(const::rtl::OUString &)121cdf0e10cSrcweir UIElement* PanelManager::findDockingWindow( const ::rtl::OUString& /*rResourceName*/ )
122cdf0e10cSrcweir {
123cdf0e10cSrcweir return NULL;
124cdf0e10cSrcweir }
125cdf0e10cSrcweir
addDockingWindow(const::rtl::OUString &,const::com::sun::star::uno::Reference<::com::sun::star::ui::XUIElement> &)126cdf0e10cSrcweir bool PanelManager::addDockingWindow( const ::rtl::OUString& /*rResourceName*/, const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& /*xUIElement*/ )
127cdf0e10cSrcweir {
128cdf0e10cSrcweir return false;
129cdf0e10cSrcweir }
130cdf0e10cSrcweir
destroyDockingWindow(const::rtl::OUString &)131cdf0e10cSrcweir bool PanelManager::destroyDockingWindow( const ::rtl::OUString& /*rResourceName*/ )
132cdf0e10cSrcweir {
133cdf0e10cSrcweir return false;
134cdf0e10cSrcweir }
135cdf0e10cSrcweir
136cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
137cdf0e10cSrcweir // XDockableWindowListener
138cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
startDocking(const awt::DockingEvent &)139cdf0e10cSrcweir void SAL_CALL PanelManager::startDocking( const awt::DockingEvent& )
140cdf0e10cSrcweir throw (uno::RuntimeException)
141cdf0e10cSrcweir {
142cdf0e10cSrcweir }
143cdf0e10cSrcweir
docking(const awt::DockingEvent &)144cdf0e10cSrcweir awt::DockingData SAL_CALL PanelManager::docking( const awt::DockingEvent& )
145cdf0e10cSrcweir throw (uno::RuntimeException)
146cdf0e10cSrcweir {
147cdf0e10cSrcweir return awt::DockingData();
148cdf0e10cSrcweir }
149cdf0e10cSrcweir
endDocking(const awt::EndDockingEvent &)150cdf0e10cSrcweir void SAL_CALL PanelManager::endDocking( const awt::EndDockingEvent& )
151cdf0e10cSrcweir throw (uno::RuntimeException)
152cdf0e10cSrcweir {
153cdf0e10cSrcweir }
154cdf0e10cSrcweir
prepareToggleFloatingMode(const lang::EventObject &)155cdf0e10cSrcweir sal_Bool SAL_CALL PanelManager::prepareToggleFloatingMode( const lang::EventObject& )
156cdf0e10cSrcweir throw (uno::RuntimeException)
157cdf0e10cSrcweir {
158cdf0e10cSrcweir return false;
159cdf0e10cSrcweir }
160cdf0e10cSrcweir
toggleFloatingMode(const lang::EventObject &)161cdf0e10cSrcweir void SAL_CALL PanelManager::toggleFloatingMode( const lang::EventObject& )
162cdf0e10cSrcweir throw (uno::RuntimeException)
163cdf0e10cSrcweir {
164cdf0e10cSrcweir }
165cdf0e10cSrcweir
closed(const lang::EventObject &)166cdf0e10cSrcweir void SAL_CALL PanelManager::closed( const lang::EventObject& )
167cdf0e10cSrcweir throw (uno::RuntimeException)
168cdf0e10cSrcweir {
169cdf0e10cSrcweir }
170cdf0e10cSrcweir
endPopupMode(const awt::EndPopupModeEvent &)171cdf0e10cSrcweir void SAL_CALL PanelManager::endPopupMode( const awt::EndPopupModeEvent& )
172cdf0e10cSrcweir throw (uno::RuntimeException)
173cdf0e10cSrcweir {
174cdf0e10cSrcweir }
175cdf0e10cSrcweir
176cdf0e10cSrcweir } // namespace framework
177