LCOV - code coverage report
Current view: top level - svx/source/sidebar/line - LinePropertyPanel.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 1 0.0 %
Date: 2014-11-03 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_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANEL_HXX
      20             : #define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANEL_HXX
      21             : 
      22             : #include <svx/xdash.hxx>
      23             : #include <vcl/ctrl.hxx>
      24             : #include <sfx2/sidebar/SidebarPanelBase.hxx>
      25             : #include <sfx2/sidebar/ControllerItem.hxx>
      26             : #include <vcl/fixed.hxx>
      27             : #include <vcl/field.hxx>
      28             : #include <boost/scoped_ptr.hpp>
      29             : #include <boost/scoped_array.hpp>
      30             : #include <svx/sidebar/PanelLayout.hxx>
      31             : #include <svx/xtable.hxx>
      32             : #include "LineWidthPopup.hxx"
      33             : 
      34             : 
      35             : class XLineStyleItem;
      36             : class XLineDashItem;
      37             : class XLineStartItem;
      38             : class XLineEndItem;
      39             : class XLineEndList;
      40             : class XDashList;
      41             : class ListBox;
      42             : class ToolBox;
      43             : class FloatingWindow;
      44             : 
      45             : namespace {
      46             :     #define SIDEBAR_LINE_WIDTH_GLOBAL_VALUE "PopupPanel_LineWidth"
      47             : } //end of anonymous namespace
      48             : 
      49             : namespace svx { namespace sidebar {
      50             : 
      51             : class PopupContainer;
      52             : class LineWidthControl;
      53             : 
      54             : 
      55             : class LinePropertyPanel
      56             : :   public PanelLayout,
      57             :     public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
      58             : {
      59             : public:
      60             :     static LinePropertyPanel* Create(
      61             :         vcl::Window* pParent,
      62             :         const css::uno::Reference<css::frame::XFrame>& rxFrame,
      63             :         SfxBindings* pBindings);
      64             : 
      65             :     virtual void DataChanged(
      66             :         const DataChangedEvent& rEvent) SAL_OVERRIDE;
      67             : 
      68             :     virtual void NotifyItemUpdate(
      69             :         const sal_uInt16 nSId,
      70             :         const SfxItemState eState,
      71             :         const SfxPoolItem* pState,
      72             :         const bool bIsEnabled) SAL_OVERRIDE;
      73             : 
      74           0 :     SfxBindings* GetBindings() { return mpBindings;}
      75             : 
      76             :     void SetWidth(long nWidth);
      77             :     void SetWidthIcon(int n);
      78             :     void SetWidthIcon();
      79             : 
      80             :     void EndLineWidthPopupMode (void);
      81             : 
      82             : private:
      83             :     //ui controls
      84             :     FixedText*                        mpFTWidth;
      85             :     ToolBox*                          mpTBWidth;
      86             :     FixedText*                        mpFTStyle;
      87             :     ListBox*                          mpLBStyle;
      88             :     FixedText*                        mpFTTrancparency;
      89             :     MetricField*                      mpMFTransparent;
      90             :     FixedText*                        mpFTArrow;
      91             :     ListBox*                          mpLBStart;
      92             :     ListBox*                          mpLBEnd;
      93             :     FixedText*                        mpFTEdgeStyle;
      94             :     ListBox*                          mpLBEdgeStyle;
      95             :     FixedText*                        mpFTCapStyle;
      96             :     ListBox*                          mpLBCapStyle;
      97             : 
      98             :     //ControllerItem
      99             :     ::sfx2::sidebar::ControllerItem                         maStyleControl;
     100             :     ::sfx2::sidebar::ControllerItem                         maDashControl;
     101             :     ::sfx2::sidebar::ControllerItem                         maWidthControl;
     102             :     ::sfx2::sidebar::ControllerItem                         maStartControl;
     103             :     ::sfx2::sidebar::ControllerItem                         maEndControl;
     104             :     ::sfx2::sidebar::ControllerItem                         maLineEndListControl;
     105             :     ::sfx2::sidebar::ControllerItem                         maLineStyleListControl;
     106             :     ::sfx2::sidebar::ControllerItem                         maTransControl;
     107             :     ::sfx2::sidebar::ControllerItem                         maEdgeStyle;
     108             :     ::sfx2::sidebar::ControllerItem                         maCapStyle;
     109             : 
     110             :     ::boost::scoped_ptr< XLineStyleItem >                   mpStyleItem;
     111             :     ::boost::scoped_ptr< XLineDashItem >                    mpDashItem;
     112             :     sal_uInt16                                              mnTrans;
     113             :     SfxMapUnit                                              meMapUnit;
     114             :     sal_Int32                                               mnWidthCoreValue;
     115             :     XLineEndListRef                                         mxLineEndList;
     116             :     XDashListRef                                            mxLineStyleList;
     117             :     ::boost::scoped_ptr< XLineStartItem >                   mpStartItem;
     118             :     ::boost::scoped_ptr< XLineEndItem >                     mpEndItem;
     119             : 
     120             :     //popup windows
     121             :     LineWidthPopup maLineWidthPopup;
     122             : 
     123             :     // images from resource
     124             :     Image                                                   maIMGNone;
     125             : 
     126             :     // multi-images
     127             :     ::boost::scoped_array<Image>                            mpIMGWidthIcon;
     128             : 
     129             :     css::uno::Reference< css::frame::XFrame >                   mxFrame;
     130             :     SfxBindings*                                            mpBindings;
     131             : 
     132             :     /// bitfield
     133             :     bool                mbWidthValuable : 1;
     134             : 
     135             :     void SetupIcons(void);
     136             :     void Initialize();
     137             :     void FillLineEndList();
     138             :     void FillLineStyleList();
     139             :     void SelectEndStyle(bool bStart);
     140             :     void SelectLineStyle();
     141             : 
     142             :     DECL_LINK(ImplWidthPopupModeEndHdl, FloatingWindow* );
     143             :     DECL_LINK(ChangeLineStyleHdl, void*);
     144             :     DECL_LINK(ToolboxWidthSelectHdl, ToolBox*);
     145             :     DECL_LINK(ChangeTransparentHdl , void *);
     146             :     DECL_LINK(ChangeStartHdl, void *);
     147             :     DECL_LINK(ChangeEndHdl, void *);
     148             :     DECL_LINK(ChangeEdgeStyleHdl, void *);
     149             :     DECL_LINK(ChangeCapStyleHdl, void *);
     150             : 
     151             :     // constructor/destuctor
     152             :     LinePropertyPanel(
     153             :         vcl::Window* pParent,
     154             :         const css::uno::Reference<css::frame::XFrame>& rxFrame,
     155             :         SfxBindings* pBindings);
     156             :     virtual ~LinePropertyPanel(void);
     157             : 
     158             :     PopupControl* CreateLineWidthPopupControl (PopupContainer* pParent);
     159             : };
     160             : 
     161             : } } // end of namespace svx::sidebar
     162             : 
     163             : #endif
     164             : 
     165             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10