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_TEXTCHARACTERSPACINGCONTROL_HXX
20 : #define INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTCHARACTERSPACINGCONTROL_HXX
21 :
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>
27 :
28 :
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
33 :
34 : #define SIDEBAR_SPACING_GLOBAL_VALUE "PopupPanal_Spacing"
35 :
36 : #define SIDEBAR_SPACE_NORMAL 0
37 : #define SIDEBAR_SPACE_EXPAND 1
38 : #define SIDEBAR_SPACE_CONDENSED 2
39 :
40 : class TextCharacterSpacingControl:public svx::sidebar::PopupControl
41 : {
42 : public:
43 : TextCharacterSpacingControl (
44 : vcl::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);
50 :
51 : //add
52 0 : short GetLastCustomState() { return mnLastCus;}
53 0 : long GetLastCustomValue() { return mnCustomKern;}
54 : //add end
55 :
56 : private:
57 : svx::sidebar::TextPropertyPanel& mrTextPropertyPanel;
58 : SfxBindings* mpBindings;
59 :
60 : ValueSetWithTextControl maVSSpacing;
61 :
62 : FixedText maLastCus;
63 :
64 : FixedText maFTSpacing;
65 : ListBox maLBKerning;
66 : FixedText maFTBy;
67 : MetricField maEditKerning;
68 :
69 : Image* mpImg;
70 : Image* mpImgSel;
71 : OUString* mpStr;
72 : OUString* mpStrTip;
73 :
74 : Image maImgCus;
75 : Image maImgCusGrey;
76 : OUString maStrCus;
77 : OUString maStrCusE;
78 : OUString maStrCusC;
79 : OUString maStrCusN;
80 : OUString maStrUnit;
81 :
82 : long mnCustomKern;
83 : short mnLastCus;
84 : bool mbCusEnable;
85 : bool mbVS;
86 :
87 : void initial();
88 : DECL_LINK(VSSelHdl, void*);
89 : DECL_LINK(KerningSelectHdl, ListBox*);
90 : DECL_LINK(KerningModifyHdl, MetricField*);
91 : };
92 : }}
93 :
94 : #endif
95 :
96 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|