1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTCHARACTERSPACINGCONTROL_HXX
20 #define INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTCHARACTERSPACINGCONTROL_HXX
22 #include "svx/sidebar/PopupControl.hxx"
23 #include "svx/sidebar/ValueSetWithTextControl.hxx"
24 #include <sfx2/bindings.hxx>
25 #include "TextPropertyPanel.hxx"
26 #include <vcl/fixed.hxx>
29 namespace svx
{ namespace sidebar
{
30 #define SPACING_NOCUSTOM 0
31 #define SPACING_CLOSE_BY_CLICK_ICON -1
32 #define SPACING_CLOSE_BY_CUS_EDIT 1
34 #define SIDEBAR_SPACING_GLOBAL_VALUE "PopupPanal_Spacing"
36 #define SIDEBAR_SPACE_NORMAL 0
37 #define SIDEBAR_SPACE_EXPAND 1
38 #define SIDEBAR_SPACE_CONDENSED 2
40 class TextCharacterSpacingControl
:public svx::sidebar::PopupControl
43 TextCharacterSpacingControl (
45 svx::sidebar::TextPropertyPanel
& rPanel
,
46 SfxBindings
* pBindings
);
47 virtual ~TextCharacterSpacingControl();
48 void Rearrange(bool bLBAvailable
,bool bAvailable
, long nKerning
);
49 //virtual void Paint(const Rectangle& rect);
52 short GetLastCustomState();
53 long GetLastCustomValue();
57 svx::sidebar::TextPropertyPanel
& mrTextPropertyPanel
;
58 SfxBindings
* mpBindings
;
60 ValueSetWithTextControl maVSSpacing
;
64 FixedText maFTSpacing
;
67 MetricField maEditKerning
;
88 DECL_LINK(VSSelHdl
, void*);
89 DECL_LINK(KerningSelectHdl
, ListBox
*);
90 DECL_LINK(KerningModifyHdl
, MetricField
*);
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */