1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dialogs.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #ifndef _DIALOG_HXX //autogen
35 #include <vcl/dialog.hxx>
37 #ifndef _BUTTON_HXX //autogen
38 #include <vcl/button.hxx>
40 #ifndef _EDIT_HXX //autogen
41 #include <vcl/edit.hxx>
43 #ifndef _FIELD_HXX //autogen
44 #include <vcl/field.hxx>
46 #include <vcl/fixed.hxx>
47 #include <vcl/tabdlg.hxx>
48 #include <vcl/tabctrl.hxx>
49 #include <vcl/tabpage.hxx>
50 #include <tools/config.hxx>
51 #ifndef _TOOLS_LIST_HXX
52 #include <tools/list.hxx>
54 #include <vcl/lstbox.hxx>
55 #include <vcl/floatwin.hxx>
56 #include <vcl/toolbox.hxx>
57 #include <svtools/ctrltool.hxx>
58 #include <svtools/ctrlbox.hxx>
62 #ifndef _BASIC_TTRESHLP_HXX
63 #include <basic/ttstrhlp.hxx>
66 class AboutDialog
: public ModalDialog
{
67 FixedText a1
,a4
,aVersionString
;
70 AboutDialog (Window
*, const ResId
&);
73 class FindDialog
: public ModalDialog
{
79 DECL_LINK( ButtonClick
, Button
* );
81 FindDialog (Window
*, const ResId
&, String
&);
84 class ReplaceDialog
: public ModalDialog
{
93 DECL_LINK( ButtonClick
, Button
* );
95 ReplaceDialog (Window
*, const ResId
&, String
&, String
&);
98 ////////////////////////////////////////////////////////////////////
100 class ConfEdit
: public PushButton
107 void Init( Config
&aConf
);
110 ConfEdit( Window
* pParent
, USHORT nResText
, USHORT nResEdit
, USHORT nResButton
, const ByteString
& aKN
, Config
&aConf
);
111 ConfEdit( Window
* pParent
, USHORT nResEdit
, USHORT nResButton
, const ByteString
& aKN
, Config
&aConf
);
112 void Save( Config
&aConf
);
113 void Reload( Config
&aConf
);
115 String
GetValue() { return aEdit
.GetText(); };
116 void SetModifyHdl( Link aLink
) { aEdit
.SetModifyHdl( aLink
); };
120 class OptConfEdit
: public ConfEdit
125 DECL_LINK( ToggleHdl
, CheckBox
* );
127 OptConfEdit( Window
* pParent
, USHORT nResCheck
, USHORT nResEdit
, USHORT nResButton
, const ByteString
& aKN
, ConfEdit
& rBaseEdit
, Config
& aConf
);
128 void Reload( Config
&aConf
);
129 DECL_LINK( BaseModifyHdl
, Edit
* );
133 class OptionsDialog
: public TabDialog
139 CancelButton aCancel
;
140 DECL_LINK( OKClick
, Button
* );
145 OptionsDialog( Window
* pParent
, const ResId
& );
147 virtual BOOL
Close();
150 DECL_LINK( ActivatePageHdl
, TabControl
* );
153 class ProfileOptions
: public TabPage
157 FixedLine aFlProfile
;
159 PushButton aPbNewProfile
;
160 PushButton aPbDelProfile
;
167 CheckBox aAutoReload
;
169 CheckBox aStopOnSyntaxError
;
173 DECL_LINK( Select
, ComboBox
* );
174 DECL_LINK( DelProfile
, Button
* );
175 DECL_LINK( NewProfile
, Button
* );
176 DECL_LINK( CheckButtonsHdl
, ComboBox
* );
178 void ReloadProfile();
182 ProfileOptions( Window
*, Config
&rConfig
);
183 void Save( Config
&rConfig
);
187 class CrashreportOptions
: public TabPage
189 FixedLine aFLCrashreport
;
190 CheckBox aCBUseProxy
;
194 NumericField aNFCRPort
;
196 CheckBox aCBAllowContact
;
200 DECL_LINK( CheckProxy
, void*);
201 DECL_LINK( CheckResponse
, void*);
204 CrashreportOptions( Window
*, Config
&aConfig
);
205 void Save( Config
&aConfig
);
208 class MiscOptions
: public TabPage
210 FixedLine aFLCommunication
;
214 NumericField aNFTTPort
;
215 FixedText aFTUNOPort
;
216 NumericField aNFUNOPort
;
218 FixedText aTimeoutText
;
219 TimeField aServerTimeout
;
221 NumericField aTFMaxLRU
;
222 FixedText aFTProgDir
;
224 PushButton aPBProgDir
;
226 DECL_LINK( Click
, void*);
229 MiscOptions( Window
*, Config
&aConfig
);
230 void Save( Config
&aConfig
);
233 class FontOptions
: public TabPage
235 FixedText aFTFontName
;
236 FontNameBox aFontName
;
238 FontStyleBox aFontStyle
;
240 FontSizeBox aFontSize
;
241 FixedText aFTPreview
;
245 DECL_LINK( FontNameChanged
, void* );
246 DECL_LINK( FontStyleChanged
, void* );
247 DECL_LINK( FontSizeChanged
, void* );
249 void UpdatePreview();
252 FontOptions( Window
*, Config
&aConfig
);
253 void Save( Config
&aConfig
);
257 DECLARE_LIST( StringList
, String
* )
258 #define C_KEY_ALLE CByteString("All")
259 #define C_KEY_AKTUELL CByteString("Current")
260 #define C_KEY_TYPE CByteString("Type")
261 #define C_KEY_DELETE CByteString("Deleted Groups")
263 class GenericOptions
: public TabPage
269 PushButton aPbNewArea
;
270 PushButton aPbDelArea
;
274 PushButton aPbSelectPath
;
275 PushButton aPbNewValue
;
276 PushButton aPbDelValue
;
279 BOOL bShowSelectPath
;
280 AutoTimer aMoveTimer
;
281 DECL_LINK( MoveButtons
, AutoTimer
* );
283 ByteString aLastGroupName
;
285 String
ReadKey( const ByteString
&aGroup
, const ByteString
&aKey
);
287 StringList
* GetAllGroups();
290 void ShowSelectPath( const String aType
);
292 DECL_LINK( LoadGroup
, ComboBox
* );
293 DECL_LINK( DelGroup
, Button
* );
294 DECL_LINK( NewGroup
, Button
* );
295 DECL_LINK( SelectPath
, Button
* );
296 DECL_LINK( DelValue
, Button
* );
297 DECL_LINK( NewValue
, Button
* );
298 DECL_LINK( CheckButtonsHdl
, ComboBox
* );
301 GenericOptions( Window
*, Config
&aConfig
);
303 void Save( Config
&aConfig
);
310 class DisplayHidDlg
: public FloatingWindow
314 FixedText aFtControls
;
315 MultiListBox aMlbControls
;
317 MultiListBox aMlbSlots
;
318 PushButton aPbKopieren
;
319 PushButton aPbBenennen
;
320 PushButton aPbSelectAll
;
323 DockingWindow
* pControls
;
324 DockingWindow
* pSlots
;
329 DECL_LINK( Select
, void* );
330 DECL_LINK( SelectAll
, PushButton
* );
331 DECL_LINK( CopyToClipboard
, void* );
334 DisplayHidDlg( Window
* pParent
);
335 virtual ~DisplayHidDlg();
337 virtual void Resize();
339 void AddData( WinInfoRec
* pWinInfo
);
344 class VarEditDialog
: public ModelessDialog
347 FixedText aFixedTextRID_FT_NAME
;
348 FixedText aFixedTextRID_FT_CONTENT
;
349 FixedText aFixedTextRID_FT_NEW_CONTENT
;
350 FixedText aFixedTextRID_FT_NAME_VALUE
;
351 FixedText aFixedTextRID_FT_CONTENT_VALUE
;
353 RadioButton aRadioButtonRID_RB_NEW_BOOL_T
;
354 RadioButton aRadioButtonRID_RB_NEW_BOOL_F
;
355 NumericField aNumericFieldRID_NF_NEW_INTEGER
;
356 NumericField aNumericFieldRID_NF_NEW_LONG
;
357 Edit aEditRID_ED_NEW_STRING
;
359 OKButton aOKButtonRID_OK
;
360 CancelButton aCancelButtonRID_CANCEL
;
364 DECL_LINK( OKClick
, Button
* );
366 // BOOL bCompare = FALSE;
367 // String aCompareString;
370 VarEditDialog( Window
* pParent
, SbxVariable
*pPVar
);