1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 #ifndef _SVX_SIDEBAR_CHARACTER_SPACING_CONTROL_HXX_ 22 #define _SVX_SIDEBAR_CHARACTER_SPACING_CONTROL_HXX_ 23 24 #include "svx/sidebar/PopupControl.hxx" 25 #include "svx/sidebar/ValueSetWithTextControl.hxx" 26 #include <sfx2/bindings.hxx> 27 #include <svtools/ctrlbox.hxx> 28 #include <svtools/ctrltool.hxx> 29 #include "TextPropertyPanel.hxx" 30 #include <vcl/fixed.hxx> 31 32 33 namespace svx { namespace sidebar { 34 #define SPACING_NOCUSTOM 0 35 #define SPACING_CLOSE_BY_CLICK_ICON -1 36 #define SPACING_CLOSE_BY_CUS_EDIT 1 37 38 #define SIDEBAR_SPACING_GLOBAL_VALUE String("PopupPanal_Spacing", 18, RTL_TEXTENCODING_ASCII_US) 39 40 #define SIDEBAR_SPACE_NORMAL 0 41 #define SIDEBAR_SPACE_EXPAND 1 42 #define SIDEBAR_SPACE_CONDENSED 2 43 44 class TextCharacterSpacingControl:public svx::sidebar::PopupControl 45 { 46 public: 47 TextCharacterSpacingControl ( 48 Window* pParent, 49 svx::sidebar::TextPropertyPanel& rPanel, 50 SfxBindings* pBindings); 51 virtual ~TextCharacterSpacingControl(); 52 void ToGetFocus(); 53 void Rearrange(bool bLBAvailable,bool bAvailable, long nKerning); 54 //virtual void Paint(const Rectangle& rect); 55 56 //add 57 short GetLastCustomState(); 58 long GetLastCustomValue(); 59 //add end 60 61 private: 62 svx::sidebar::TextPropertyPanel& mrTextPropertyPanel; 63 SfxBindings* mpBindings; 64 65 ValueSetWithTextControl maVSSpacing; 66 67 FixedText maLastCus; 68 // Control maBorder; 69 70 FixedText maFTSpacing; 71 ListBox maLBKerning; 72 FixedText maFTBy; 73 MetricField maEditKerning; 74 75 Image* mpImg; 76 Image* mpImgSel; 77 XubString* mpStr; 78 XubString* mpStrTip; 79 80 Image maImgCus; 81 Image maImgCusGrey; 82 XubString maStrCus; 83 XubString maStrCusE; //add 84 XubString maStrCusC; //add 85 XubString maStrCusN; //add 86 XubString maStrUnit; //add 87 88 long mnCustomKern; 89 short mnLastCus; 90 bool mbCusEnable; 91 bool mbVS; 92 93 void initial(); 94 DECL_LINK(VSSelHdl, void*); 95 DECL_LINK(KerningSelectHdl, ListBox*); 96 DECL_LINK(KerningModifyHdl, MetricField*); 97 }; 98 }} 99 100 #endif 101