162024513SAndre Fischer /************************************************************** 262024513SAndre Fischer * 362024513SAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 462024513SAndre Fischer * or more contributor license agreements. See the NOTICE file 562024513SAndre Fischer * distributed with this work for additional information 662024513SAndre Fischer * regarding copyright ownership. The ASF licenses this file 762024513SAndre Fischer * to you under the Apache License, Version 2.0 (the 862024513SAndre Fischer * "License"); you may not use this file except in compliance 962024513SAndre Fischer * with the License. You may obtain a copy of the License at 1062024513SAndre Fischer * 1162024513SAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 1262024513SAndre Fischer * 1362024513SAndre Fischer * Unless required by applicable law or agreed to in writing, 1462024513SAndre Fischer * software distributed under the License is distributed on an 1562024513SAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1662024513SAndre Fischer * KIND, either express or implied. See the License for the 1762024513SAndre Fischer * specific language governing permissions and limitations 1862024513SAndre Fischer * under the License. 1962024513SAndre Fischer * 2062024513SAndre Fischer *************************************************************/ 2162024513SAndre Fischer 2262024513SAndre Fischer #include "precompiled_sd.hxx" 2362024513SAndre Fischer 2462024513SAndre Fischer #include "NavigatorWrapper.hxx" 2562024513SAndre Fischer #include "navigatr.hrc" 2662024513SAndre Fischer #include "ViewShellBase.hxx" 2762024513SAndre Fischer 28*37fee4fdSAndre Fischer #include <sfx2/sidebar/Theme.hxx> 29*37fee4fdSAndre Fischer 3062024513SAndre Fischer #include <boost/bind.hpp> 3162024513SAndre Fischer 3262024513SAndre Fischer 3362024513SAndre Fischer namespace sd { namespace sidebar { 3462024513SAndre Fischer 3562024513SAndre Fischer NavigatorWrapper::NavigatorWrapper ( 3662024513SAndre Fischer ::Window* pParent, 3762024513SAndre Fischer sd::ViewShellBase& rViewShellBase, 3862024513SAndre Fischer SfxBindings* pBindings) 3962024513SAndre Fischer : Control(pParent, 0), 4062024513SAndre Fischer mrViewShellBase(rViewShellBase), 4162024513SAndre Fischer maNavigator( 4262024513SAndre Fischer this, 4362024513SAndre Fischer NULL, 4462024513SAndre Fischer SdResId(FLT_NAVIGATOR), 4562024513SAndre Fischer pBindings, 4662024513SAndre Fischer ::boost::bind(&NavigatorWrapper::UpdateNavigator, this)) 4762024513SAndre Fischer { 4862024513SAndre Fischer maNavigator.SetPosSizePixel( 4962024513SAndre Fischer Point(0,0), 5062024513SAndre Fischer GetSizePixel()); 51*37fee4fdSAndre Fischer maNavigator.SetBackground(sfx2::sidebar::Theme::GetWallpaper(sfx2::sidebar::Theme::Paint_PanelBackground)); 5262024513SAndre Fischer maNavigator.Show(); 5362024513SAndre Fischer } 5462024513SAndre Fischer 5562024513SAndre Fischer 5662024513SAndre Fischer 5762024513SAndre Fischer 5862024513SAndre Fischer NavigatorWrapper::~NavigatorWrapper (void) 5962024513SAndre Fischer { 6062024513SAndre Fischer } 6162024513SAndre Fischer 6262024513SAndre Fischer 6362024513SAndre Fischer 6462024513SAndre Fischer 6562024513SAndre Fischer void NavigatorWrapper::Resize (void) 6662024513SAndre Fischer { 6762024513SAndre Fischer maNavigator.SetSizePixel(GetSizePixel()); 6862024513SAndre Fischer } 6962024513SAndre Fischer 7062024513SAndre Fischer 7162024513SAndre Fischer 7262024513SAndre Fischer 7362024513SAndre Fischer css::ui::LayoutSize NavigatorWrapper::GetHeightForWidth (const sal_Int32 nWidth) 7462024513SAndre Fischer { 7562024513SAndre Fischer (void)nWidth; 7662024513SAndre Fischer 7762024513SAndre Fischer return css::ui::LayoutSize(-1,-1,-1); 7862024513SAndre Fischer } 7962024513SAndre Fischer 8062024513SAndre Fischer 8162024513SAndre Fischer 8262024513SAndre Fischer 8362024513SAndre Fischer void NavigatorWrapper::UpdateNavigator (void) 8462024513SAndre Fischer { 8562024513SAndre Fischer maNavigator.InitTreeLB(mrViewShellBase.GetDocument()); 8662024513SAndre Fischer } 8762024513SAndre Fischer 8862024513SAndre Fischer 8962024513SAndre Fischer } } // end of namespace sd::sidebar 90