Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / cui / source / inc / border.hxx
blob0980420412106b3e977383d77149bbb1c1d4c865
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef _SVX_BORDER_HXX
20 #define _SVX_BORDER_HXX
22 #include <svtools/ctrlbox.hxx>
23 #include <vcl/group.hxx>
24 #include <vcl/field.hxx>
25 #include <vcl/fixed.hxx>
26 #include <svtools/valueset.hxx>
27 #include <sfx2/tabdlg.hxx>
28 #include <svx/frmsel.hxx>
30 // forward ---------------------------------------------------------------
32 namespace editeng
34 class SvxBorderLine;
37 #include <svx/flagsdef.hxx>
39 class SvxBorderTabPage : public SfxTabPage
41 using TabPage::DeactivatePage;
43 public:
44 static SfxTabPage* Create( Window* pParent,
45 const SfxItemSet& rAttrSet);
46 static sal_uInt16* GetRanges();
48 virtual sal_Bool FillItemSet( SfxItemSet& rCoreAttrs );
49 virtual void Reset( const SfxItemSet& );
51 void HideShadowControls();
52 virtual void PageCreated (SfxAllItemSet aSet);
53 protected:
54 virtual int DeactivatePage( SfxItemSet* pSet = 0 );
55 virtual void DataChanged( const DataChangedEvent& rDCEvt );
57 private:
58 SvxBorderTabPage( Window* pParent, const SfxItemSet& rCoreAttrs );
59 ~SvxBorderTabPage();
61 // Controls
62 FixedLine aFlBorder;
63 FixedText aDefaultFT;
64 ValueSet aWndPresets;
65 FixedText aUserDefFT;
66 svx::FrameSelector aFrameSel;
68 FixedLine aFlSep1;
69 FixedLine aFlLine;
70 FixedText aStyleFT;
71 LineListBox aLbLineStyle;
72 FixedText aColorFT;
73 ColorListBox aLbLineColor;
74 FixedText aWidthFT;
75 MetricField aLineWidthMF;
77 FixedLine aFlSep2;
78 FixedLine aDistanceFL;
79 FixedText aLeftFT;
80 MetricField aLeftMF;
81 FixedText aRightFT;
82 MetricField aRightMF;
83 FixedText aTopFT;
84 MetricField aTopMF;
85 FixedText aBottomFT;
86 MetricField aBottomMF;
87 CheckBox aSynchronizeCB;
89 FixedLine aFlShadow;
90 FixedText aFtShadowPos;
91 ValueSet aWndShadows;
92 FixedText aFtShadowSize;
93 MetricField aEdShadowSize;
94 FixedText aFtShadowColor;
95 ColorListBox aLbShadowColor;
98 FixedLine aPropertiesFL;///< properties - "Merge with next paragraph" in Writer
99 CheckBox aMergeWithNextCB;
100 // #i29550#
101 CheckBox aMergeAdjacentBordersCB;
103 ImageList aShadowImgLstH;
104 ImageList aShadowImgLst;
105 ImageList aBorderImgLstH;
106 ImageList aBorderImgLst;
108 long nMinValue; ///< minimum distance
109 int nSWMode; ///< table, textframe, paragraph
111 bool mbHorEnabled; ///< true = Inner horizontal border enabled.
112 bool mbVerEnabled; ///< true = Inner vertical border enabled.
113 bool mbTLBREnabled; ///< true = Top-left to bottom-right border enabled.
114 bool mbBLTREnabled; ///< true = Bottom-left to top-right border enabled.
115 bool mbUseMarginItem;
116 bool mbSync;
118 #ifdef _SVX_BORDER_CXX
119 // Handler
120 DECL_LINK( SelStyleHdl_Impl, ListBox* pLb );
121 DECL_LINK( SelColHdl_Impl, ListBox* pLb );
122 DECL_LINK( SelPreHdl_Impl, void* );
123 DECL_LINK( SelSdwHdl_Impl, void* );
124 DECL_LINK( LinesChanged_Impl, void* );
125 DECL_LINK( ModifyDistanceHdl_Impl, MetricField*);
126 DECL_LINK( ModifyWidthHdl_Impl, void*);
127 DECL_LINK( SyncHdl_Impl, CheckBox*);
129 sal_uInt16 GetPresetImageId( sal_uInt16 nValueSetIdx ) const;
130 sal_uInt16 GetPresetStringId( sal_uInt16 nValueSetIdx ) const;
132 void FillPresetVS();
133 void FillShadowVS();
134 void FillValueSets();
136 // Filler
137 void FillLineListBox_Impl();
139 /// share for individual Frame-/Core-Line
140 void ResetFrameLine_Impl( svx::FrameBorderType eBorder,
141 const editeng::SvxBorderLine* pCurLine,
142 bool bValid );
143 #endif
147 #endif
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */