LCOV - code coverage report
Current view: top level - sfx2/source/sidebar - Deck.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 1 0.0 %
Date: 2014-04-14 Functions: 0 1 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             : #ifndef INCLUDED_SFX2_SOURCE_SIDEBAR_DECK_HXX
      20             : #define INCLUDED_SFX2_SOURCE_SIDEBAR_DECK_HXX
      21             : 
      22             : #include "Panel.hxx"
      23             : 
      24             : #include <vcl/window.hxx>
      25             : #include <vcl/image.hxx>
      26             : #include <com/sun/star/ui/LayoutSize.hpp>
      27             : 
      28             : #include <boost/function.hpp>
      29             : #include <boost/scoped_ptr.hpp>
      30             : 
      31             : class ScrollBar;
      32             : 
      33             : namespace sfx2 { namespace sidebar {
      34             : 
      35             : class DeckDescriptor;
      36             : class DeckTitleBar;
      37             : 
      38             : 
      39             : /** This is the parent window of the panels.
      40             :     It displays the deck title.
      41             : */
      42             : class Deck
      43             :     : public Window
      44             : {
      45             : public:
      46             :     Deck (
      47             :         const DeckDescriptor& rDeckDescriptor,
      48             :         Window* pParentWindow,
      49             :         const ::boost::function<void(void)>& rCloserAction);
      50             :     virtual ~Deck (void);
      51             : 
      52             :     void Dispose (void);
      53             : 
      54             :     const ::rtl::OUString& GetId (void) const;
      55             :     DeckTitleBar* GetTitleBar (void) const;
      56             :     Rectangle GetContentArea (void) const;
      57             :     void SetPanels (const SharedPanelContainer& rPanels);
      58             :     const SharedPanelContainer& GetPanels (void) const;
      59             :     void RequestLayout (void);
      60             :     ::Window* GetPanelParentWindow (void);
      61             : 
      62             :     /** Try to make the panel completely visible.
      63             :         When the whole panel does not fit then make its top visible
      64             :         and it off at the bottom.
      65             :     */
      66             :     void ShowPanel (const Panel& rPanel);
      67             : 
      68             :     virtual void Paint (const Rectangle& rUpdateArea) SAL_OVERRIDE;
      69             :     virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE;
      70             :     virtual bool Notify (NotifyEvent& rEvent) SAL_OVERRIDE;
      71             : 
      72             :     void PrintWindowTree();
      73             :     static void PrintWindowSubTree (Window* pRoot, int nIndentation);
      74             : 
      75           0 :     sal_Int32 GetMinimalWidth() const { return mnMinimalWidth; }
      76             : 
      77             :     class ScrollContainerWindow : public Window
      78             :     {
      79             :     public:
      80             :         ScrollContainerWindow (Window* pParentWindow);
      81             :         virtual ~ScrollContainerWindow (void);
      82             :         virtual void Paint (const Rectangle& rUpdateArea) SAL_OVERRIDE;
      83             :         void SetSeparators (const ::std::vector<sal_Int32>& rSeparators);
      84             :     private:
      85             :         ::std::vector<sal_Int32> maSeparators;
      86             :     };
      87             : 
      88             : private:
      89             :     const ::rtl::OUString msTitle;
      90             :     const ::rtl::OUString msId;
      91             :     Image maIcon;
      92             :     const ::rtl::OUString msIconURL;
      93             :     const ::rtl::OUString msHighContrastIconURL;
      94             :     sal_Int32 mnMinimalWidth;
      95             :     SharedPanelContainer maPanels;
      96             :     ::boost::scoped_ptr<DeckTitleBar> mpTitleBar;
      97             :     ::boost::scoped_ptr<Window> mpScrollClipWindow;
      98             :     ::boost::scoped_ptr<ScrollContainerWindow> mpScrollContainer;
      99             :     ::boost::scoped_ptr<Window> mpFiller;
     100             :     ::boost::scoped_ptr<ScrollBar> mpVerticalScrollBar;
     101             : 
     102             :     DECL_LINK(HandleVerticalScrollBarChange,void*);
     103             :     bool ProcessWheelEvent (
     104             :         CommandEvent* pCommandEvent,
     105             :         NotifyEvent& rEvent);
     106             : };
     107             : 
     108             : 
     109             : } } // end of namespace sfx2::sidebar
     110             : 
     111             : #endif
     112             : 
     113             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10