LibreOffice Module svx (master)  1
linectrl.hxx
Go to the documentation of this file.
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_LINECTRL_HXX
20 #define INCLUDED_SVX_LINECTRL_HXX
21 
22 #include <sfx2/tbxctrl.hxx>
24 #include <svx/svxdllapi.h>
25 #include <memory>
26 
27 namespace svx {
28  class ToolboxButtonLineStyleUpdater;
29 }
30 
31 class XLineStyleItem;
33 
34 typedef std::function<bool(const OUString&, const css::uno::Any&)> LineStyleSelectFunction;
35 
36 // SvxLineStyleController:
38 {
39 private:
40  std::unique_ptr<svx::ToolboxButtonLineStyleUpdater> m_xBtnUpdater;
41 
43 
44 public:
45  SvxLineStyleToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext );
46 
47  // XInitialization
48  virtual void SAL_CALL initialize( const css::uno::Sequence<css::uno::Any>& rArguments ) override;
49 
50  // XServiceInfo
51  virtual OUString SAL_CALL getImplementationName() override;
52  virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
53 
54  virtual void SAL_CALL execute(sal_Int16 nKeyModifier) override;
55  virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& rEvent) override;
56 
57  virtual ~SvxLineStyleToolBoxControl() override;
58 
59  void setLineStyleSelectFunction(const LineStyleSelectFunction& aLineStyleSelectFunction);
60  void dispatchLineStyleCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
61 
62 private:
63  virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
64  virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) override;
65 
66 };
67 
68 // SvxLineWidthController:
69 
71 {
72  static MapUnit GetCoreMetric();
73 
74 public:
76 
77  SvxLineWidthToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
78  virtual ~SvxLineWidthToolBoxControl() override;
79 
80  virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
81  const SfxPoolItem* pState ) override;
82  virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window *pParent ) override;
83 };
84 
85 #endif
86 
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
LineStyleSelectFunction m_aLineStyleSelectFunction
Definition: linectrl.hxx:42
virtual OUString SAL_CALL getImplementationName() override=0
virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &Event) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override=0
sal_Int16 nId
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
std::unique_ptr< svx::ToolboxButtonLineStyleUpdater > m_xBtnUpdater
Definition: linectrl.hxx:40
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState)
virtual std::unique_ptr< WeldToolbarPopup > weldPopupWindow()
std::function< bool(const OUString &, const css::uno::Any &)> LineStyleSelectFunction
Definition: linectrl.hxx:32
virtual VclPtr< vcl::Window > createVclPopupWindow(vcl::Window *pParent)=0
virtual VclPtr< InterimItemWindow > CreateItemWindow(vcl::Window *pParent)
SfxItemState
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
MapUnit