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 _SALGTKFOLDERPICKER_HXX_
25 #define _SALGTKFOLDERPICKER_HXX_
26 
27 //_______________________________________________________________________________________________________________________
28 //	includes of other projects
29 //_______________________________________________________________________________________________________________________
30 
31 #ifndef _CPPUHELPER_COMPBASE3_HXX_
32 #include <cppuhelper/implbase3.hxx>
33 #endif
34 
35 #ifndef _SALGTKPICKER_HXX_
36 #include "SalGtkPicker.hxx"
37 #endif
38 
39 #include <memory>
40 
41 #ifndef _RTL_USTRING_H_
42 #include <rtl/ustring.hxx>
43 #endif
44 
45 #include <list>
46 
47 //----------------------------------------------------------
48 // class declaration
49 //----------------------------------------------------------
50 
51 class SalGtkFolderPicker :
52         public SalGtkPicker,
53 	public cppu::WeakImplHelper3<
54 	::com::sun::star::ui::dialogs::XFolderPicker,
55 	::com::sun::star::lang::XServiceInfo,
56         ::com::sun::star::util::XCancellable >
57 {
58 	public:
59 
60 		// constructor
61 		SalGtkFolderPicker( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceMgr );
62 
63 		//------------------------------------------------------------------------------------
64 		// XExecutableDialog functions
65 		//------------------------------------------------------------------------------------
66 
67 		virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
68 			throw( ::com::sun::star::uno::RuntimeException );
69 
70 		virtual sal_Int16 SAL_CALL execute(  )
71 			throw( ::com::sun::star::uno::RuntimeException );
72 
73 		//------------------------------------------------------------------------------------
74 		// XFolderPicker functions
75 		//------------------------------------------------------------------------------------
76 
77 		virtual void SAL_CALL setDisplayDirectory( const rtl::OUString& rDirectory )
78 			throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException );
79 
80 		virtual rtl::OUString SAL_CALL getDisplayDirectory(  )
81 			throw( com::sun::star::uno::RuntimeException );
82 
83 		virtual rtl::OUString SAL_CALL getDirectory( )
84 			throw( com::sun::star::uno::RuntimeException );
85 
86 		virtual void SAL_CALL setDescription( const rtl::OUString& rDescription )
87 			throw( com::sun::star::uno::RuntimeException );
88 
89 
90 		//------------------------------------------------
91 		// XServiceInfo
92 		//------------------------------------------------
93 
94 		virtual ::rtl::OUString SAL_CALL getImplementationName(	 )
95 			throw(::com::sun::star::uno::RuntimeException);
96 
97 		virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
98 			throw(::com::sun::star::uno::RuntimeException);
99 
100 		virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  )
101 			throw(::com::sun::star::uno::RuntimeException);
102 
103 		//------------------------------------------------
104 		// XCancellable
105 		//------------------------------------------------
106 
107 		virtual void SAL_CALL cancel( )
108 			throw( ::com::sun::star::uno::RuntimeException );
109 
110 		//------------------------------------------------
111 		// XEventListener
112 		//------------------------------------------------
113 
114 		virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
115 			throw(::com::sun::star::uno::RuntimeException);
116 
117 	private:
118 		// prevent copy and assignment
119 		SalGtkFolderPicker( const SalGtkFolderPicker& );
120 		SalGtkFolderPicker& operator=( const SalGtkFolderPicker& );
121 	private:
122 		// to instanciate own services
123 		::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr;
124 
125 #if 0
126 	public:
127 		 virtual ~SalGtkFolderPicker();
128 #endif
129 };
130 
131 #endif // _SALGTKFOLDERPICKER_HXX_
132