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 : virtual void dispose() SAL_OVERRIDE;
49 : void Rearrange(bool bLBAvailable,bool bAvailable, long nKerning);
50 : //virtual void Paint(const Rectangle& rect);
51 :
52 : //add
53 0 : short GetLastCustomState() { return mnLastCus;}
54 0 : long GetLastCustomValue() { return mnCustomKern;}
55 : //add end
56 :
57 : private:
58 : svx::sidebar::TextPropertyPanel& mrTextPropertyPanel;
59 : SfxBindings* mpBindings;
60 :
61 : VclPtr<ValueSetWithTextControl> maVSSpacing;
62 :
63 : VclPtr<FixedText> maLastCus;
64 :
65 : VclPtr<FixedText> maFTSpacing;
66 : VclPtr<ListBox> maLBKerning;
67 : VclPtr<FixedText> maFTBy;
68 : VclPtr<MetricField> maEditKerning;
69 :
70 : Image* mpImg;
71 : Image* mpImgSel;
72 : OUString* mpStr;
73 : OUString* mpStrTip;
74 :
75 : Image maImgCus;
76 : Image maImgCusGrey;
77 : OUString maStrCus;
78 : OUString maStrCusE;
79 : OUString maStrCusC;
80 : OUString maStrCusN;
81 : OUString maStrUnit;
82 :
83 : long mnCustomKern;
84 : short mnLastCus;
85 : bool mbCusEnable;
86 : bool mbVS;
87 :
88 : void initial();
89 : DECL_LINK(VSSelHdl, void*);
90 : DECL_LINK(KerningSelectHdl, ListBox*);
91 : DECL_LINK(KerningModifyHdl, MetricField*);
92 : };
93 : }}
94 :
95 : #endif
96 :
97 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|