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 .
20 #ifndef _PAD_HELPER_HXX_
21 #define _PAD_HELPER_HXX_
24 #include <tools/string.hxx>
25 #include <tools/resid.hxx>
26 #include <vcl/dialog.hxx>
27 #include <vcl/button.hxx>
28 #include <vcl/edit.hxx>
29 #include <vcl/fixed.hxx>
30 #include <vcl/lstbox.hxx>
31 #include <vcl/combobox.hxx>
33 #if defined SPA_DLLIMPLEMENTATION
34 #define SPA_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
36 #define SPA_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
44 class DelMultiListBox
: public MultiListBox
46 Link m_aDelPressedLink
;
48 DelMultiListBox( Window
* pParent
, const ResId
& rResId
) :
49 MultiListBox( pParent
, rResId
) {}
52 virtual long Notify( NotifyEvent
& rEvent
);
54 Link
setDelPressedLink( const Link
& rLink
)
56 Link
aOldLink( m_aDelPressedLink
);
57 m_aDelPressedLink
= rLink
;
60 const Link
& getDelPressedLink() const { return m_aDelPressedLink
; }
63 class DelListBox
: public ListBox
65 Link m_aDelPressedLink
;
67 DelListBox( Window
* pParent
, const ResId
& rResId
) :
68 ListBox( pParent
, rResId
) {}
71 virtual long Notify( NotifyEvent
& rEvent
);
73 Link
setDelPressedLink( const Link
& rLink
)
75 Link
aOldLink( m_aDelPressedLink
);
76 m_aDelPressedLink
= rLink
;
79 const Link
& getDelPressedLink() const { return m_aDelPressedLink
; }
82 class QueryString
: public ModalDialog
86 CancelButton m_aCancelButton
;
87 FixedText m_aFixedText
;
91 String
& m_rReturnValue
;
94 DECL_LINK( ClickBtnHdl
, Button
* );
97 QueryString( Window
*, String
&, String
&, const ::std::list
< String
>& rChoices
= ::std::list
<String
>() );
98 // parent window, Query text, initial value
102 sal_Bool
AreYouSure( Window
*, int nRid
= -1 );
104 ResId
PaResId( sal_uInt32 nId
);
106 void FindFiles( const String
& rDirectory
, ::std::list
< String
>& rResult
, const String
& rSuffixes
, bool bRecursive
= false );
108 Config
& getPadminRC();
111 bool chooseDirectory( String
& rInOutPath
);
113 } // namespace padmin
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */