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 
22 #include "svx/sidebar/PopupControl.hxx"
23 #include "LineWidthValueSet.hxx"
24 #include <svl/poolitem.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/field.hxx>
27 
28 class SfxBindings;
29 
30 namespace svx { namespace sidebar {
31 
32 class LinePropertyPanel;
33 
34 class LineWidthControl
35     : public svx::sidebar::PopupControl
36 {
37 public:
38 	LineWidthControl (Window* pParent, LinePropertyPanel& rPanel);
39 	virtual ~LineWidthControl (void);
40 
41 	virtual void GetFocus();
42 	virtual void Paint(const Rectangle& rect);
43 
44 	void SetWidthSelect( long lValue, bool bValuable, SfxMapUnit eMapUnit);
45 	ValueSet& GetValueSet();
46 	bool IsCloseByEdit();
47 	long GetTmpCustomWidth();
48 
49 private:
50 	LinePropertyPanel& mrLinePropertyPanel;
51 	SfxBindings*		                mpBindings;
52 	LineWidthValueSet maVSWidth;
53 	FixedText			                maFTCus;
54 	FixedText			                maFTWidth;
55 	MetricField			                maMFWidth;
56 	SfxMapUnit			                meMapUnit;
57 	XubString*			                rStr;
58 	XubString			                mstrPT;	//
59 	long				                mnCustomWidth;
60 	bool				                mbCustom;
61 	bool				                mbColseByEdit;
62 	long				                mnTmpCusomWidth;
63 	bool				                mbVSFocus;
64 
65 	Image				                maIMGCus;
66 	Image				                maIMGCusGray;
67 
68     void Initialize();
69 	DECL_LINK(VSSelectHdl, void *);
70 	DECL_LINK(MFModifyHdl, void *);
71 };
72 
73 } } // end of namespace svx::sidebar
74 
75 // eof
76