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: helper.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 ************************************************************************/
31 #ifndef _PAD_HELPER_HXX_
32 #define _PAD_HELPER_HXX_
34 #ifndef __SGI_STL_LIST
37 #include <tools/string.hxx>
39 #include <tools/resid.hxx>
41 #include <vcl/dialog.hxx>
42 #ifndef _SV_BUTTON_HXX
43 #include <vcl/button.hxx>
45 #include <vcl/edit.hxx>
46 #include <vcl/fixed.hxx>
47 #ifndef _SV_LISTBOX_HXX
48 #include <vcl/lstbox.hxx>
50 #include <vcl/combobox.hxx>
54 #define PSPRINT_PPDDIR "driver"
58 class DelMultiListBox
: public MultiListBox
60 Link m_aDelPressedLink
;
62 DelMultiListBox( Window
* pParent
, const ResId
& rResId
) :
63 MultiListBox( pParent
, rResId
) {}
66 virtual long Notify( NotifyEvent
& rEvent
);
68 Link
setDelPressedLink( const Link
& rLink
)
70 Link
aOldLink( m_aDelPressedLink
);
71 m_aDelPressedLink
= rLink
;
74 const Link
& getDelPressedLink() const { return m_aDelPressedLink
; }
77 class DelListBox
: public ListBox
79 Link m_aDelPressedLink
;
81 DelListBox( Window
* pParent
, const ResId
& rResId
) :
82 ListBox( pParent
, rResId
) {}
85 virtual long Notify( NotifyEvent
& rEvent
);
87 Link
setDelPressedLink( const Link
& rLink
)
89 Link
aOldLink( m_aDelPressedLink
);
90 m_aDelPressedLink
= rLink
;
93 const Link
& getDelPressedLink() const { return m_aDelPressedLink
; }
96 class QueryString
: public ModalDialog
100 CancelButton m_aCancelButton
;
101 FixedText m_aFixedText
;
103 ComboBox m_aComboBox
;
105 String
& m_rReturnValue
;
108 DECL_LINK( ClickBtnHdl
, Button
* );
111 QueryString( Window
*, String
&, String
&, const ::std::list
< String
>& rChoices
= ::std::list
<String
>() );
112 // parent window, Query text, initial value
116 BOOL
AreYouSure( Window
*, int nRid
= -1 );
118 ResId
PaResId( sal_uInt32 nId
);
120 void FindFiles( const String
& rDirectory
, ::std::list
< String
>& rResult
, const String
& rSuffixes
, bool bRecursive
= false );
122 Config
& getPadminRC();
125 bool chooseDirectory( String
& rInOutPath
);
127 } // namespace padmin