LCOV - code coverage report
Current view: top level - libreoffice/sd/source/ui/inc/taskpane - ILayoutableWindow.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 4 0.0 %
Date: 2012-12-27 Functions: 0 5 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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 SD_TOOLPANEL_I_LAYOUTABLE_WINDOW_HXX
      21             : #define SD_TOOLPANEL_I_LAYOUTABLE_WINDOW_HXX
      22             : 
      23             : #include <tools/gen.hxx>
      24             : #include <sal/types.h>
      25             : 
      26             : class Window;
      27             : 
      28             : namespace sd { namespace toolpanel {
      29             : 
      30             : 
      31           0 : class ILayouter
      32             : {
      33             : public:
      34             :     /** This method is called by layoutable controls when they have to be
      35             :         resized.
      36             :     */
      37             :     virtual void RequestResize (void) = 0;
      38             : 
      39             : protected:
      40           0 :     ~ILayouter() {}
      41             : };
      42             : 
      43             : 
      44             : 
      45             : /** This interface has to be implemented by windows that want to be
      46             :     layouted by a SubToolPanel or ScrollablePanel object.
      47             : */
      48           0 : class ILayoutableWindow
      49             : {
      50             : public:
      51           0 :     virtual ~ILayoutableWindow (void) {};
      52             : 
      53             :     /** Return the preferred size without constraints on either the
      54             :         height or the width.
      55             :         The size the window will later be set to may but does not have
      56             :         to be equal to this size.
      57             :     */
      58             :     virtual Size GetPreferredSize (void) = 0;
      59             : 
      60             :     /** Return the preferred width with the constraint, that the
      61             :         window will be set to the given height.
      62             :         The width the window will later be set to may but does not have
      63             :         to be equal to this width.
      64             :     */
      65             :     virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight) = 0;
      66             : 
      67             :     /** Return the preferred height with the constraint, that the
      68             :         window will be set to the given width.
      69             :         The height the window will later be set to may but does not have
      70             :         to be equal to this height.
      71             :     */
      72             :     virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth) = 0;
      73             : 
      74             :     /** Return whether the window is generally resizable.  When used by
      75             :         a VerticalLayouter then the width will always be resized and
      76             :         the return value of this method determines whether the height
      77             :         may be modified as well.
      78             :     */
      79             :     virtual bool IsResizable (void) = 0;
      80             : 
      81             :     /** Return the window so that its size and position can be set.
      82             :         @return
      83             :             Returns the window which is layouted or NULL to indicate
      84             :             that the object is in an invalid state.
      85             :     */
      86             :     virtual ::Window* GetWindow (void) = 0;
      87             : 
      88             :     /** Return the minimal width of the window.
      89             :     */
      90             :     virtual sal_Int32 GetMinimumWidth (void) = 0;
      91             : };
      92             : 
      93             : 
      94             : 
      95             : } } // end of namespace ::sd::toolpanel
      96             : 
      97             : #endif
      98             : 
      99             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10