Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / svx / source / sidebar / text / TextCharacterSpacingControl.hxx
blobf0ae669ee617c133b294f17568d4e31c3c2a31ff
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
42 public:
43 TextCharacterSpacingControl (
44 Window* pParent,
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);
51 //add
52 short GetLastCustomState();
53 long GetLastCustomValue();
54 //add end
56 private:
57 svx::sidebar::TextPropertyPanel& mrTextPropertyPanel;
58 SfxBindings* mpBindings;
60 ValueSetWithTextControl maVSSpacing;
62 FixedText maLastCus;
64 FixedText maFTSpacing;
65 ListBox maLBKerning;
66 FixedText maFTBy;
67 MetricField maEditKerning;
69 Image* mpImg;
70 Image* mpImgSel;
71 OUString* mpStr;
72 OUString* mpStrTip;
74 Image maImgCus;
75 Image maImgCusGrey;
76 OUString maStrCus;
77 OUString maStrCusE;
78 OUString maStrCusC;
79 OUString maStrCusN;
80 OUString maStrUnit;
82 long mnCustomKern;
83 short mnLastCus;
84 bool mbCusEnable;
85 bool mbVS;
87 void initial();
88 DECL_LINK(VSSelHdl, void*);
89 DECL_LINK(KerningSelectHdl, ListBox*);
90 DECL_LINK(KerningModifyHdl, MetricField*);
94 #endif
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */