1*62024513SAndre Fischer /************************************************************** 2*62024513SAndre Fischer * 3*62024513SAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 4*62024513SAndre Fischer * or more contributor license agreements. See the NOTICE file 5*62024513SAndre Fischer * distributed with this work for additional information 6*62024513SAndre Fischer * regarding copyright ownership. The ASF licenses this file 7*62024513SAndre Fischer * to you under the Apache License, Version 2.0 (the 8*62024513SAndre Fischer * "License"); you may not use this file except in compliance 9*62024513SAndre Fischer * with the License. You may obtain a copy of the License at 10*62024513SAndre Fischer * 11*62024513SAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 12*62024513SAndre Fischer * 13*62024513SAndre Fischer * Unless required by applicable law or agreed to in writing, 14*62024513SAndre Fischer * software distributed under the License is distributed on an 15*62024513SAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*62024513SAndre Fischer * KIND, either express or implied. See the License for the 17*62024513SAndre Fischer * specific language governing permissions and limitations 18*62024513SAndre Fischer * under the License. 19*62024513SAndre Fischer * 20*62024513SAndre Fischer *************************************************************/ 21*62024513SAndre Fischer 22*62024513SAndre Fischer #ifndef SD_SIDEBAR_NAVIGATOR_WRAPPER_HXX 23*62024513SAndre Fischer #define SD_SIDEBAR_NAVIGATOR_WRAPPER_HXX 24*62024513SAndre Fischer 25*62024513SAndre Fischer #include <sfx2/sidebar/ILayoutableWindow.hxx> 26*62024513SAndre Fischer #include <vcl/ctrl.hxx> 27*62024513SAndre Fischer #include "navigatr.hxx" 28*62024513SAndre Fischer 29*62024513SAndre Fischer 30*62024513SAndre Fischer class SfxBindings; 31*62024513SAndre Fischer namespace sd { class ViewShellBase; } 32*62024513SAndre Fischer 33*62024513SAndre Fischer namespace css = ::com::sun::star; 34*62024513SAndre Fischer 35*62024513SAndre Fischer namespace sd { namespace sidebar { 36*62024513SAndre Fischer 37*62024513SAndre Fischer /** Present the navigator as control that can be displayed inside the 38*62024513SAndre Fischer sidebar. 39*62024513SAndre Fischer This wrapper has two main responsibilities: 40*62024513SAndre Fischer - Watch for document changes and update the navigator when one 41*62024513SAndre Fischer happens. 42*62024513SAndre Fischer - Forward size changes from sidebar to navigator. 43*62024513SAndre Fischer */ 44*62024513SAndre Fischer class NavigatorWrapper 45*62024513SAndre Fischer : public Control, 46*62024513SAndre Fischer public sfx2::sidebar::ILayoutableWindow 47*62024513SAndre Fischer { 48*62024513SAndre Fischer public: 49*62024513SAndre Fischer NavigatorWrapper ( 50*62024513SAndre Fischer ::Window* pParent, 51*62024513SAndre Fischer sd::ViewShellBase& rViewShellBase, 52*62024513SAndre Fischer SfxBindings* pBindings); 53*62024513SAndre Fischer 54*62024513SAndre Fischer virtual ~NavigatorWrapper (void); 55*62024513SAndre Fischer 56*62024513SAndre Fischer // Control 57*62024513SAndre Fischer virtual void Resize (void); 58*62024513SAndre Fischer 59*62024513SAndre Fischer // From ILayoutableWindow 60*62024513SAndre Fischer virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth); 61*62024513SAndre Fischer 62*62024513SAndre Fischer private: 63*62024513SAndre Fischer ViewShellBase& mrViewShellBase; 64*62024513SAndre Fischer SdNavigatorWin maNavigator; 65*62024513SAndre Fischer 66*62024513SAndre Fischer void UpdateNavigator (void); 67*62024513SAndre Fischer }; 68*62024513SAndre Fischer 69*62024513SAndre Fischer 70*62024513SAndre Fischer } } // end of namespace sd::sidebar 71*62024513SAndre Fischer 72*62024513SAndre Fischer #endif 73