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 #ifndef SD_SIDEBAR_NAVIGATOR_WRAPPER_HXX 2362024513SAndre Fischer #define SD_SIDEBAR_NAVIGATOR_WRAPPER_HXX 2462024513SAndre Fischer 2562024513SAndre Fischer #include <sfx2/sidebar/ILayoutableWindow.hxx> 2662024513SAndre Fischer #include <vcl/ctrl.hxx> 2762024513SAndre Fischer #include "navigatr.hxx" 2862024513SAndre Fischer 2962024513SAndre Fischer 3062024513SAndre Fischer class SfxBindings; 3162024513SAndre Fischer namespace sd { class ViewShellBase; } 3262024513SAndre Fischer 3362024513SAndre Fischer namespace css = ::com::sun::star; 3462024513SAndre Fischer 3562024513SAndre Fischer namespace sd { namespace sidebar { 3662024513SAndre Fischer 3762024513SAndre Fischer /** Present the navigator as control that can be displayed inside the 3862024513SAndre Fischer sidebar. 3962024513SAndre Fischer This wrapper has two main responsibilities: 4062024513SAndre Fischer - Watch for document changes and update the navigator when one 4162024513SAndre Fischer happens. 4262024513SAndre Fischer - Forward size changes from sidebar to navigator. 4362024513SAndre Fischer */ 4462024513SAndre Fischer class NavigatorWrapper 4562024513SAndre Fischer : public Control, 4662024513SAndre Fischer public sfx2::sidebar::ILayoutableWindow 4762024513SAndre Fischer { 4862024513SAndre Fischer public: 4962024513SAndre Fischer NavigatorWrapper ( 5062024513SAndre Fischer ::Window* pParent, 5162024513SAndre Fischer sd::ViewShellBase& rViewShellBase, 5262024513SAndre Fischer SfxBindings* pBindings); 5362024513SAndre Fischer 5462024513SAndre Fischer virtual ~NavigatorWrapper (void); 5562024513SAndre Fischer 5662024513SAndre Fischer // Control 5762024513SAndre Fischer virtual void Resize (void); 58*441705dbSAndre Fischer virtual void GetFocus (void); 5962024513SAndre Fischer 6062024513SAndre Fischer // From ILayoutableWindow 6162024513SAndre Fischer virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth); 6262024513SAndre Fischer 6362024513SAndre Fischer private: 6462024513SAndre Fischer ViewShellBase& mrViewShellBase; 6562024513SAndre Fischer SdNavigatorWin maNavigator; 6662024513SAndre Fischer 6762024513SAndre Fischer void UpdateNavigator (void); 6862024513SAndre Fischer }; 6962024513SAndre Fischer 7062024513SAndre Fischer 7162024513SAndre Fischer } } // end of namespace sd::sidebar 7262024513SAndre Fischer 7362024513SAndre Fischer #endif 74