LibreOffice Module svx (master)  1
TextCharacterSpacingControl.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_SOURCE_SIDEBAR_TEXT_TEXTCHARACTERSPACINGCONTROL_HXX
20 #define INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTCHARACTERSPACINGCONTROL_HXX
21 
22 #include <sfx2/bindings.hxx>
23 #include <vcl/fixed.hxx>
24 #include <vcl/field.hxx>
25 #include <sfx2/tbxctrl.hxx>
26 
27 namespace svx {
28 #define SPACING_NOCUSTOM 0
29 #define SPACING_CLOSE_BY_CLICK_ICON -1
30 #define SPACING_CLOSE_BY_CUS_EDIT 1
31 
32 #define SIDEBAR_SPACING_GLOBAL_VALUE "PopupPanel_Spacing"
33 
35 {
36 public:
37  explicit TextCharacterSpacingControl(sal_uInt16 nId, vcl::Window* pParent);
38  virtual ~TextCharacterSpacingControl() override;
39  virtual void dispose() override;
40 
41  long GetLastCustomValue() const { return mnCustomKern;}
42 
43 private:
45 
52 
53  sal_uInt16 const mnId;
55  short mnLastCus;
56 
57  void Initialize();
58  void ExecuteCharacterSpacing(long nValue, bool bClose = true);
59 
60  DECL_LINK(PredefinedValuesHdl, Button*, void);
61  DECL_LINK(KerningModifyHdl, Edit&, void);
62 
63  MapUnit GetCoreMetric() const;
64 };
65 }
66 
67 #endif
68 
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
TextCharacterSpacingControl(sal_uInt16 nId, vcl::Window *pParent)
sal_Int16 nId
sal_Int16 const nValue
Definition: fmsrccfg.cxx:82
DECL_LINK(PredefinedValuesHdl, Button *, void)
MapUnit
void ExecuteCharacterSpacing(long nValue, bool bClose=true)