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