1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_BACKGRND_HXX
20 #define _SVX_BACKGRND_HXX
22 #include <vcl/group.hxx>
23 #include <svtools/stdctrl.hxx>
24 #include <vcl/graph.hxx>
25 #include <svtools/valueset.hxx>
26 #include <svx/dlgctrl.hxx>
28 //------------------------------------------------------------------------
31 class BackgroundPreviewImpl
;
32 class SvxOpenGraphicDialog
;
33 struct SvxBackgroundTable_Impl
;
34 struct SvxBackgroundPara_Impl
;
35 struct SvxBackgroundPage_Impl
;
37 /** class SvxBackgroundTabPage --------------------------------------------
38 {k:\svx\prototyp\dialog\backgrnd.bmp}
40 With this TabPage a Brush (e. g. for a frame's background color)
43 <SvxBrushItem>: <SID_ATTR_BRUSH>;
46 class SvxBackgroundTabPage
: public SvxTabPage
48 using TabPage::DeactivatePage
;
50 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rAttrSet
);
51 static sal_uInt16
* GetRanges();
53 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
54 virtual void Reset( const SfxItemSet
& rSet
);
55 virtual void FillUserData();
56 virtual void PointChanged( Window
* pWindow
, RECT_POINT eRP
);
58 /// Shift-ListBox activation
60 /// for the Writer (cells/rows/tables)
61 void ShowTblControl();
62 /// for the Writer (paragraph/characters)
63 void ShowParaControl(sal_Bool bCharOnly
= sal_False
);
65 void EnableTransparency(sal_Bool bColor
, sal_Bool bGraphic
);
66 virtual void PageCreated (SfxAllItemSet aSet
);
68 virtual int DeactivatePage( SfxItemSet
* pSet
= 0 );
71 SvxBackgroundTabPage( Window
* pParent
, const SfxItemSet
& rCoreSet
);
72 ~SvxBackgroundTabPage();
76 const String aStrBrowse
;
77 const String aStrUnlinked
;
82 ValueSet aBackgroundColorSet
;
83 FixedLine aBackgroundColorBox
;
84 BackgroundPreviewImpl
* pPreviewWin1
;
86 FixedText aColTransFT
;///<color transparency
87 MetricField aColTransMF
;
89 // Background Bitmap ----------------------------------
91 PushButton aBtnBrowse
;
93 FixedLine aGbPosition
;
94 RadioButton aBtnPosition
;
97 SvxRectCtl aWndPosition
;
100 FixedLine aGraphTransFL
;///<transparency of graphics
101 MetricField aGraphTransMF
;
103 BackgroundPreviewImpl
* pPreviewWin2
;
105 // DDListBox for Writer -------------------------------
106 //------------------------------------------------------
108 sal_uInt16 nHtmlMode
;
109 sal_Bool bAllowShowSelector
: 1;
110 sal_Bool bIsGraphicValid
: 1;
111 sal_Bool bLinkOnly
: 1;
112 sal_Bool bResized
: 1;
113 sal_Bool bColTransparency
: 1;
114 sal_Bool bGraphTransparency
: 1;
116 String aBgdGraphicPath
;
117 String aBgdGraphicFilter
;
119 SvxBackgroundPage_Impl
* pPageImpl
;
120 SvxOpenGraphicDialog
* pImportDlg
;
122 SvxBackgroundTable_Impl
* pTableBck_Impl
;///< Items for Sw-Table must be corrected
123 SvxBackgroundPara_Impl
* pParaBck_Impl
;///< also for the paragraph style
125 #ifdef _SVX_BACKGRND_CXX
126 void FillColorValueSets_Impl();
127 void ShowColorUI_Impl();
128 void ShowBitmapUI_Impl();
129 sal_Bool
LoadLinkedGraphic_Impl();
130 void RaiseLoadError_Impl();
131 void SetGraphicPosition_Impl( SvxGraphicPosition ePos
);
132 SvxGraphicPosition
GetGraphicPosition_Impl();
133 void FillControls_Impl(const SvxBrushItem
& rBgdAttr
,
134 const String
& rUserData
);
135 sal_Bool
FillItemSetWithWallpaperItem( SfxItemSet
& rCoreSet
, sal_uInt16 nSlot
);
136 void ResetFromWallpaperItem( const SfxItemSet
& rSet
);
138 DECL_LINK( LoadTimerHdl_Impl
, Timer
* );
139 DECL_LINK(SelectHdl_Impl
, void *);
140 DECL_LINK(BrowseHdl_Impl
, void *);
141 DECL_LINK( RadioClickHdl_Impl
, RadioButton
* );
142 DECL_LINK( FileClickHdl_Impl
, CheckBox
* );
143 DECL_LINK(BackgroundColorHdl_Impl
, void *);
144 DECL_LINK( TblDestinationHdl_Impl
, ListBox
* );
145 DECL_LINK( ParaDestinationHdl_Impl
, ListBox
* );
149 #endif // #ifndef _SVX_BACKGRND_HXX
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */