LCOV - code coverage report
Current view: top level - svx/source/sidebar/text - TextPropertyPanel.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 2 0.0 %
Date: 2014-11-03 Functions: 0 2 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_TEXT_TEXTPROPERTYPANEL_HXX
      20             : #define INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTPROPERTYPANEL_HXX
      21             : 
      22             : #include <sfx2/sidebar/SidebarPanelBase.hxx>
      23             : #include <sfx2/sidebar/ControllerItem.hxx>
      24             : #include <sfx2/sidebar/IContextChangeReceiver.hxx>
      25             : #include <sfx2/sidebar/EnumContext.hxx>
      26             : #include <svtools/ctrlbox.hxx>
      27             : #include <editeng/fhgtitem.hxx>
      28             : 
      29             : #include <com/sun/star/ui/XSidebar.hpp>
      30             : #include <com/sun/star/frame/XToolbarController.hpp>
      31             : 
      32             : #include "TextCharacterSpacingPopup.hxx"
      33             : #include "TextUnderlinePopup.hxx"
      34             : #include <svx/sidebar/PanelLayout.hxx>
      35             : 
      36             : class ToolBox;
      37             : 
      38             : namespace svx { namespace sidebar {
      39             : 
      40             : class PopupControl;
      41             : class PopupContainer;
      42             : 
      43             : class TextPropertyPanel
      44             :     : public PanelLayout,
      45             :       public ::sfx2::sidebar::IContextChangeReceiver,
      46             :       public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
      47             : {
      48             : public:
      49             :     static TextPropertyPanel* Create (
      50             :         vcl::Window* pParent,
      51             :         const css::uno::Reference<css::frame::XFrame>& rxFrame,
      52             :         SfxBindings* pBindings,
      53             :         const ::sfx2::sidebar::EnumContext& rContext);
      54             : 
      55             :     virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE;
      56             : 
      57           0 :     ::sfx2::sidebar::ControllerItem& GetSpaceController() { return maSpacingControl;}
      58             :     long GetSelFontSize();
      59             :     void EndSpacingPopupMode (void);
      60             :     void EndUnderlinePopupMode (void);
      61           0 :     Color& GetUnderlineColor() { return meUnderlineColor;}
      62             : 
      63             : 
      64             :     virtual void HandleContextChange (
      65             :         const ::sfx2::sidebar::EnumContext aContext) SAL_OVERRIDE;
      66             : 
      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             : private:
      75             :     //ui controls
      76             :     ToolBox* mpToolBoxFont;
      77             :     ToolBox* mpToolBoxIncDec;
      78             :     ToolBox* mpToolBoxSpacing;
      79             :     ToolBox* mpToolBoxFontColorSw;
      80             :     ToolBox* mpToolBoxFontColor;
      81             : 
      82             :     //control items
      83             :     ::sfx2::sidebar::ControllerItem maFontSizeControl;
      84             :     ::sfx2::sidebar::ControllerItem maUnderlineControl;
      85             :     ::sfx2::sidebar::ControllerItem maSpacingControl;
      86             : 
      87             :     FontUnderline               meUnderline;
      88             :     Color                       meUnderlineColor;
      89             :     bool                        mbKernAvailable;
      90             :     bool                        mbKernLBAvailable;
      91             :     long                        mlKerning;
      92             :     SvxFontHeightItem*          mpHeightItem;
      93             : 
      94             :     TextCharacterSpacingPopup maCharSpacePopup;
      95             :     TextUnderlinePopup maUnderlinePopup;
      96             : 
      97             :     ::sfx2::sidebar::EnumContext maContext;
      98             :     SfxBindings* mpBindings;
      99             : 
     100             :     TextPropertyPanel (
     101             :         vcl::Window* pParent,
     102             :         const css::uno::Reference<css::frame::XFrame>& rxFrame,
     103             :         SfxBindings* pBindings,
     104             :         const ::sfx2::sidebar::EnumContext& rContext);
     105             :     virtual ~TextPropertyPanel (void);
     106             : 
     107             : 
     108             :     PopupControl* CreateCharacterSpacingControl (PopupContainer* pParent);
     109             :     PopupControl* CreateUnderlinePopupControl (PopupContainer* pParent);
     110             :     DECL_LINK(SpacingClickHdl, ToolBox*);
     111             :     DECL_LINK(UnderlineClickHdl, ToolBox* );
     112             : 
     113             :     void SetupToolboxItems (void);
     114             :     void InitToolBoxFont();
     115             :     void InitToolBoxSpacing();
     116             : };
     117             : 
     118             : } } // end of namespace ::svx::sidebar
     119             : 
     120             : #endif
     121             : 
     122             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10