1*23e9c6caSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*23e9c6caSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*23e9c6caSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*23e9c6caSAndrew Rist * distributed with this work for additional information 6*23e9c6caSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*23e9c6caSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*23e9c6caSAndrew Rist * "License"); you may not use this file except in compliance 9*23e9c6caSAndrew Rist * with the License. You may obtain a copy of the License at 10*23e9c6caSAndrew Rist * 11*23e9c6caSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*23e9c6caSAndrew Rist * 13*23e9c6caSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*23e9c6caSAndrew Rist * software distributed under the License is distributed on an 15*23e9c6caSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*23e9c6caSAndrew Rist * KIND, either express or implied. See the License for the 17*23e9c6caSAndrew Rist * specific language governing permissions and limitations 18*23e9c6caSAndrew Rist * under the License. 19*23e9c6caSAndrew Rist * 20*23e9c6caSAndrew Rist *************************************************************/ 21*23e9c6caSAndrew Rist 22*23e9c6caSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _PAD_HELPER_HXX_ 25cdf0e10cSrcweir #define _PAD_HELPER_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifndef __SGI_STL_LIST 28cdf0e10cSrcweir #include <list> 29cdf0e10cSrcweir #endif 30cdf0e10cSrcweir #include <tools/string.hxx> 31cdf0e10cSrcweir #ifndef _RESID_HXX 32cdf0e10cSrcweir #include <tools/resid.hxx> 33cdf0e10cSrcweir #endif 34cdf0e10cSrcweir #include <vcl/dialog.hxx> 35cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX 36cdf0e10cSrcweir #include <vcl/button.hxx> 37cdf0e10cSrcweir #endif 38cdf0e10cSrcweir #include <vcl/edit.hxx> 39cdf0e10cSrcweir #include <vcl/fixed.hxx> 40cdf0e10cSrcweir #ifndef _SV_LISTBOX_HXX 41cdf0e10cSrcweir #include <vcl/lstbox.hxx> 42cdf0e10cSrcweir #endif 43cdf0e10cSrcweir #include <vcl/combobox.hxx> 44cdf0e10cSrcweir 45cdf0e10cSrcweir #if defined SPA_DLLIMPLEMENTATION 46cdf0e10cSrcweir #define SPA_DLLPUBLIC SAL_DLLPUBLIC_EXPORT 47cdf0e10cSrcweir #else 48cdf0e10cSrcweir #define SPA_DLLPUBLIC SAL_DLLPUBLIC_IMPORT 49cdf0e10cSrcweir #endif 50cdf0e10cSrcweir 51cdf0e10cSrcweir 52cdf0e10cSrcweir class Config; 53cdf0e10cSrcweir 54cdf0e10cSrcweir #define PSPRINT_PPDDIR "driver" 55cdf0e10cSrcweir 56cdf0e10cSrcweir namespace padmin 57cdf0e10cSrcweir { 58cdf0e10cSrcweir class DelMultiListBox : public MultiListBox 59cdf0e10cSrcweir { 60cdf0e10cSrcweir Link m_aDelPressedLink; 61cdf0e10cSrcweir public: DelMultiListBox(Window * pParent,const ResId & rResId)62cdf0e10cSrcweir DelMultiListBox( Window* pParent, const ResId& rResId ) : 63cdf0e10cSrcweir MultiListBox( pParent, rResId ) {} ~DelMultiListBox()64cdf0e10cSrcweir ~DelMultiListBox() {} 65cdf0e10cSrcweir 66cdf0e10cSrcweir virtual long Notify( NotifyEvent& rEvent ); 67cdf0e10cSrcweir setDelPressedLink(const Link & rLink)68cdf0e10cSrcweir Link setDelPressedLink( const Link& rLink ) 69cdf0e10cSrcweir { 70cdf0e10cSrcweir Link aOldLink( m_aDelPressedLink ); 71cdf0e10cSrcweir m_aDelPressedLink = rLink; 72cdf0e10cSrcweir return aOldLink; 73cdf0e10cSrcweir } getDelPressedLink() const74cdf0e10cSrcweir const Link& getDelPressedLink() const { return m_aDelPressedLink; } 75cdf0e10cSrcweir }; 76cdf0e10cSrcweir 77cdf0e10cSrcweir class DelListBox : public ListBox 78cdf0e10cSrcweir { 79cdf0e10cSrcweir Link m_aDelPressedLink; 80cdf0e10cSrcweir public: DelListBox(Window * pParent,const ResId & rResId)81cdf0e10cSrcweir DelListBox( Window* pParent, const ResId& rResId ) : 82cdf0e10cSrcweir ListBox( pParent, rResId ) {} ~DelListBox()83cdf0e10cSrcweir ~DelListBox() {} 84cdf0e10cSrcweir 85cdf0e10cSrcweir virtual long Notify( NotifyEvent& rEvent ); 86cdf0e10cSrcweir setDelPressedLink(const Link & rLink)87cdf0e10cSrcweir Link setDelPressedLink( const Link& rLink ) 88cdf0e10cSrcweir { 89cdf0e10cSrcweir Link aOldLink( m_aDelPressedLink ); 90cdf0e10cSrcweir m_aDelPressedLink = rLink; 91cdf0e10cSrcweir return aOldLink; 92cdf0e10cSrcweir } getDelPressedLink() const93cdf0e10cSrcweir const Link& getDelPressedLink() const { return m_aDelPressedLink; } 94cdf0e10cSrcweir }; 95cdf0e10cSrcweir 96cdf0e10cSrcweir class QueryString : public ModalDialog 97cdf0e10cSrcweir { 98cdf0e10cSrcweir private: 99cdf0e10cSrcweir OKButton m_aOKButton; 100cdf0e10cSrcweir CancelButton m_aCancelButton; 101cdf0e10cSrcweir FixedText m_aFixedText; 102cdf0e10cSrcweir Edit m_aEdit; 103cdf0e10cSrcweir ComboBox m_aComboBox; 104cdf0e10cSrcweir 105cdf0e10cSrcweir String& m_rReturnValue; 106cdf0e10cSrcweir bool m_bUseEdit; 107cdf0e10cSrcweir 108cdf0e10cSrcweir DECL_LINK( ClickBtnHdl, Button* ); 109cdf0e10cSrcweir 110cdf0e10cSrcweir public: 111cdf0e10cSrcweir QueryString( Window*, String &, String &, const ::std::list< String >& rChoices = ::std::list<String>() ); 112cdf0e10cSrcweir // parent window, Query text, initial value 113cdf0e10cSrcweir ~QueryString(); 114cdf0e10cSrcweir }; 115cdf0e10cSrcweir 116cdf0e10cSrcweir sal_Bool AreYouSure( Window*, int nRid = -1 ); 117cdf0e10cSrcweir 118cdf0e10cSrcweir ResId PaResId( sal_uInt32 nId ); 119cdf0e10cSrcweir 120cdf0e10cSrcweir void FindFiles( const String& rDirectory, ::std::list< String >& rResult, const String& rSuffixes, bool bRecursive = false ); 121cdf0e10cSrcweir 122cdf0e10cSrcweir Config& getPadminRC(); 123cdf0e10cSrcweir void freePadminRC(); 124cdf0e10cSrcweir 125cdf0e10cSrcweir bool chooseDirectory( String& rInOutPath ); 126cdf0e10cSrcweir 127cdf0e10cSrcweir } // namespace padmin 128cdf0e10cSrcweir 129cdf0e10cSrcweir #endif 130