Update ooo320-m1
[ooovba.git] / fpicker / source / aqua / SalAquaPicker.hxx
blob53775d704508b88f089a38d6d86fa23ad92c7bd3
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SalAquaPicker.hxx,v $
10 * $Revision: 1.4 $
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 _SALAQUAFPICKER_HXX_
32 #define _SALAQUAFPICKER_HXX_
34 //_____________________________________________________________________________
35 // includes of other projects
36 //_____________________________________________________________________________
38 #include <osl/mutex.hxx>
40 #ifndef _RTL_USTRING_HXX
41 #include <rtl/ustring.hxx>
42 #endif
44 #ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HXX_
45 #include <com/sun/star/lang/IllegalArgumentException.hpp>
46 #endif
48 #ifndef _COM_SUN_STAR_UNO_RUNTIMEEXCEPTION_HXX_
49 #include <com/sun/star/uno/RuntimeException.hpp>
50 #endif
51 #include "ControlHelper.hxx"
53 #include <premac.h>
54 #import <Cocoa/Cocoa.h>
55 #include <postmac.h>
57 //----------------------------------------------------------
58 // class declaration
59 //----------------------------------------------------------
61 class SalAquaPicker
63 public:
64 // constructor
65 SalAquaPicker();
66 virtual ~SalAquaPicker();
68 int run();
69 int runandwaitforresult();
71 inline rtl::OUString getDisplayDirectory() { return m_sDisplayDirectory; }
73 inline ControlHelper* getControlHelper() const {
74 return m_pControlHelper;
77 protected:
79 rtl::OUString m_sDisplayDirectory;
81 NSSavePanel *m_pDialog;
83 ControlHelper *m_pControlHelper;
85 osl::Mutex m_rbHelperMtx;
87 // The type of dialog
88 enum NavigationServices_DialogType {
89 NAVIGATIONSERVICES_OPEN,
90 NAVIGATIONSERVICES_SAVE,
91 NAVIGATIONSERVICES_DIRECTORY
94 NavigationServices_DialogType m_nDialogType;
96 void implsetTitle( const ::rtl::OUString& aTitle )
97 throw( ::com::sun::star::uno::RuntimeException );
99 void implsetDisplayDirectory( const rtl::OUString& rDirectory )
100 throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException );
102 rtl::OUString implgetDisplayDirectory( )
103 throw( com::sun::star::uno::RuntimeException );
105 void implInitialize( );
109 #endif