1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 /* 3 * This file is part of the LibreOffice project. 4 * 5 * This Source Code Form is subject to the terms of the Mozilla Public 6 * License, v. 2.0. If a copy of the MPL was not distributed with this 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 * 9 * This file incorporates work covered by the following license notice: 10 * 11 * Licensed to the Apache Software Foundation (ASF) under one or more 12 * contributor license agreements. See the NOTICE file distributed 13 * with this work for additional information regarding copyright 14 * ownership. The ASF licenses this file to you under the Apache 15 * License, Version 2.0 (the "License"); you may not use this file 16 * except in compliance with the License. You may obtain a copy of 17 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 18 */ 19 20 #ifndef INCLUDED_SD_SOURCE_UI_INC_PANEDOCKINGWINDOW_HXX 21 #define INCLUDED_SD_SOURCE_UI_INC_PANEDOCKINGWINDOW_HXX 22 23 #include <sfx2/titledockwin.hxx> 24 25 namespace sd { 26 27 class PaneDockingWindow : public ::sfx2::TitledDockingWindow 28 { 29 public: 30 /** Create a new docking window. 31 @param pBindings 32 Used, among others, to determine the ViewShellBase and 33 PaneManager that manage the new docking window. 34 @param pChildWindow 35 This child window is the logical container for the new docking 36 window. 37 @param pParent 38 The parent window of the new docking window. 39 @param rsTitle 40 the initial title 41 */ 42 PaneDockingWindow ( 43 SfxBindings *pBindings, 44 SfxChildWindow *pChildWindow, 45 vcl::Window* pParent, 46 const OUString& rsTitle); 47 48 virtual ~PaneDockingWindow() override; 49 virtual void StateChanged( StateChangedType nType ) override; 50 virtual void MouseButtonDown (const MouseEvent& rEvent) override; 51 /** When docked the given range is passed to the parent SplitWindow. 52 */ 53 void SetValidSizeRange (const Range& rValidSizeRange); 54 55 enum Orientation { HorizontalOrientation, VerticalOrientation, UnknownOrientation }; 56 /** When the PaneDockingWindow is docked and managed by a split window 57 it can derive its orientation from the orientation of the split 58 window and return either HorizontalOrientation or 59 VerticalOrientation. 60 Otherwise UnknownOrientation is returned. 61 */ 62 Orientation GetOrientation() const; 63 }; 64 65 } // end of namespace ::sd 66 67 #endif 68 69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 70