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