1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SALAQUAFPICKER_HXX_ 25 #define _SALAQUAFPICKER_HXX_ 26 27 //_____________________________________________________________________________ 28 // includes of other projects 29 //_____________________________________________________________________________ 30 31 #include <osl/mutex.hxx> 32 33 #ifndef _RTL_USTRING_HXX 34 #include <rtl/ustring.hxx> 35 #endif 36 37 #ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HXX_ 38 #include <com/sun/star/lang/IllegalArgumentException.hpp> 39 #endif 40 41 #ifndef _COM_SUN_STAR_UNO_RUNTIMEEXCEPTION_HXX_ 42 #include <com/sun/star/uno/RuntimeException.hpp> 43 #endif 44 #include "ControlHelper.hxx" 45 46 #include <premac.h> 47 #import <Cocoa/Cocoa.h> 48 #include <postmac.h> 49 50 //---------------------------------------------------------- 51 // class declaration 52 //---------------------------------------------------------- 53 54 class SalAquaPicker 55 { 56 public: 57 // constructor 58 SalAquaPicker(); 59 virtual ~SalAquaPicker(); 60 61 int run(); 62 int runandwaitforresult(); 63 getDisplayDirectory()64 inline rtl::OUString getDisplayDirectory() { return m_sDisplayDirectory; } 65 getControlHelper() const66 inline ControlHelper* getControlHelper() const { 67 return m_pControlHelper; 68 } 69 70 protected: 71 72 rtl::OUString m_sDisplayDirectory; 73 74 NSSavePanel *m_pDialog; 75 76 ControlHelper *m_pControlHelper; 77 78 osl::Mutex m_rbHelperMtx; 79 80 // The type of dialog 81 enum NavigationServices_DialogType { 82 NAVIGATIONSERVICES_OPEN, 83 NAVIGATIONSERVICES_SAVE, 84 NAVIGATIONSERVICES_DIRECTORY 85 }; 86 87 NavigationServices_DialogType m_nDialogType; 88 89 void implsetTitle( const ::rtl::OUString& aTitle ) 90 throw( ::com::sun::star::uno::RuntimeException ); 91 92 void implsetDisplayDirectory( const rtl::OUString& rDirectory ) 93 throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException ); 94 95 rtl::OUString implgetDisplayDirectory( ) 96 throw( com::sun::star::uno::RuntimeException ); 97 98 void implInitialize( ); 99 100 }; 101 102 #endif 103