LCOV - code coverage report
Current view: top level - sd/source/ui/inc/taskpane - ILayoutableWindow.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 4 100.0 %
Date: 2012-08-25 Functions: 4 5 80.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef SD_TOOLPANEL_I_LAYOUTABLE_WINDOW_HXX
      30                 :            : #define SD_TOOLPANEL_I_LAYOUTABLE_WINDOW_HXX
      31                 :            : 
      32                 :            : #include <tools/gen.hxx>
      33                 :            : #include <sal/types.h>
      34                 :            : 
      35                 :            : class Window;
      36                 :            : 
      37                 :            : namespace sd { namespace toolpanel {
      38                 :            : 
      39                 :            : 
      40                 :         47 : class ILayouter
      41                 :            : {
      42                 :            : public:
      43                 :            :     /** This method is called by layoutable controls when they have to be
      44                 :            :         resized.
      45                 :            :     */
      46                 :            :     virtual void RequestResize (void) = 0;
      47                 :            : 
      48                 :            : protected:
      49                 :         47 :     ~ILayouter() {}
      50                 :            : };
      51                 :            : 
      52                 :            : 
      53                 :            : 
      54                 :            : /** This interface has to be implemented by windows that want to be
      55                 :            :     layouted by a SubToolPanel or ScrollablePanel object.
      56                 :            : */
      57                 :         47 : class ILayoutableWindow
      58                 :            : {
      59                 :            : public:
      60         [ -  + ]:         47 :     virtual ~ILayoutableWindow (void) {};
      61                 :            : 
      62                 :            :     /** Return the preferred size without constraints on either the
      63                 :            :         height or the width.
      64                 :            :         The size the window will later be set to may but does not have
      65                 :            :         to be equal to this size.
      66                 :            :     */
      67                 :            :     virtual Size GetPreferredSize (void) = 0;
      68                 :            : 
      69                 :            :     /** Return the preferred width with the constraint, that the
      70                 :            :         window will be set to the given height.
      71                 :            :         The width the window will later be set to may but does not have
      72                 :            :         to be equal to this width.
      73                 :            :     */
      74                 :            :     virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight) = 0;
      75                 :            : 
      76                 :            :     /** Return the preferred height with the constraint, that the
      77                 :            :         window will be set to the given width.
      78                 :            :         The height the window will later be set to may but does not have
      79                 :            :         to be equal to this height.
      80                 :            :     */
      81                 :            :     virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth) = 0;
      82                 :            : 
      83                 :            :     /** Return whether the window is generally resizable.  When used by
      84                 :            :         a VerticalLayouter then the width will always be resized and
      85                 :            :         the return value of this method determines whether the height
      86                 :            :         may be modified as well.
      87                 :            :     */
      88                 :            :     virtual bool IsResizable (void) = 0;
      89                 :            : 
      90                 :            :     /** Return the window so that its size and position can be set.
      91                 :            :         @return
      92                 :            :             Returns the window which is layouted or NULL to indicate
      93                 :            :             that the object is in an invalid state.
      94                 :            :     */
      95                 :            :     virtual ::Window* GetWindow (void) = 0;
      96                 :            : 
      97                 :            :     /** Return the minimal width of the window.
      98                 :            :     */
      99                 :            :     virtual sal_Int32 GetMinimumWidth (void) = 0;
     100                 :            : };
     101                 :            : 
     102                 :            : 
     103                 :            : 
     104                 :            : } } // end of namespace ::sd::toolpanel
     105                 :            : 
     106                 :            : #endif
     107                 :            : 
     108                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10