1cdf0e10cSrcweir /*************************************************************************
2cdf0e10cSrcweir  *
3cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4cdf0e10cSrcweir  *
5cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6cdf0e10cSrcweir  *
7cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8cdf0e10cSrcweir  *
9cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10cdf0e10cSrcweir  *
11cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14cdf0e10cSrcweir  *
15cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20cdf0e10cSrcweir  *
21cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25cdf0e10cSrcweir  *
26cdf0e10cSrcweir  ************************************************************************/
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #ifndef _SALGTKFILEPICKER_HXX_
29cdf0e10cSrcweir #define _SALGTKFILEPICKER_HXX_
30cdf0e10cSrcweir 
31cdf0e10cSrcweir //_______________________________________________________________________________________________________________________
32cdf0e10cSrcweir //	includes of other projects
33cdf0e10cSrcweir //_______________________________________________________________________________________________________________________
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <cppuhelper/compbase10.hxx>
36cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp>
37cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/XFilePickerNotifier.hpp>
38cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/XFilterManager.hpp>
39cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/XFilterGroupManager.hpp>
40cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
41cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/XFilePreview.hpp>
42cdf0e10cSrcweir #include <com/sun/star/beans/StringPair.hpp>
43cdf0e10cSrcweir 
44cdf0e10cSrcweir #ifndef _SALGTKPICKER_HXX_
45cdf0e10cSrcweir #include "SalGtkPicker.hxx"
46cdf0e10cSrcweir #endif
47cdf0e10cSrcweir 
48cdf0e10cSrcweir #include <memory>
49cdf0e10cSrcweir 
50cdf0e10cSrcweir #ifndef _RTL_USTRING_H_
51cdf0e10cSrcweir #include <rtl/ustring.hxx>
52cdf0e10cSrcweir #endif
53cdf0e10cSrcweir 
54cdf0e10cSrcweir #include <list>
55cdf0e10cSrcweir 
56cdf0e10cSrcweir //----------------------------------------------------------
57cdf0e10cSrcweir // Implementation class for the XFilePicker Interface
58cdf0e10cSrcweir //----------------------------------------------------------
59cdf0e10cSrcweir 
60cdf0e10cSrcweir //----------------------------------------------------------
61cdf0e10cSrcweir // forward declarations
62cdf0e10cSrcweir //----------------------------------------------------------
63cdf0e10cSrcweir 
64cdf0e10cSrcweir using namespace rtl;
65cdf0e10cSrcweir 
66cdf0e10cSrcweir struct FilterEntry;
67cdf0e10cSrcweir struct ElementEntry_Impl;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir typedef ::std::list < FilterEntry >		FilterList;
70cdf0e10cSrcweir typedef ::std::list < ElementEntry_Impl >	ElementList;
71cdf0e10cSrcweir typedef ::com::sun::star::beans::StringPair	UnoFilterEntry;
72cdf0e10cSrcweir typedef ::com::sun::star::uno::Sequence< UnoFilterEntry >	UnoFilterList;	// can be transported more effectively
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 
75cdf0e10cSrcweir //----------------------------------------------------------
76cdf0e10cSrcweir // class declaration
77cdf0e10cSrcweir //----------------------------------------------------------
78cdf0e10cSrcweir 
79cdf0e10cSrcweir class SalGtkFilePicker :
80cdf0e10cSrcweir         public SalGtkPicker,
81cdf0e10cSrcweir 	public cppu::WeakComponentImplHelper10<
82cdf0e10cSrcweir         ::com::sun::star::ui::dialogs::XFilterManager,
83cdf0e10cSrcweir         ::com::sun::star::ui::dialogs::XFilterGroupManager,
84cdf0e10cSrcweir         ::com::sun::star::ui::dialogs::XFilePickerControlAccess,
85cdf0e10cSrcweir         ::com::sun::star::ui::dialogs::XFilePickerNotifier,
86cdf0e10cSrcweir         ::com::sun::star::ui::dialogs::XFilePreview,
87cdf0e10cSrcweir         ::com::sun::star::ui::dialogs::XFilePicker2,
88cdf0e10cSrcweir 	::com::sun::star::lang::XInitialization,
89cdf0e10cSrcweir         ::com::sun::star::util::XCancellable,
90cdf0e10cSrcweir 	::com::sun::star::lang::XEventListener,
91cdf0e10cSrcweir 	::com::sun::star::lang::XServiceInfo >
92cdf0e10cSrcweir {
93cdf0e10cSrcweir 	public:
94cdf0e10cSrcweir 
95cdf0e10cSrcweir 		// constructor
96cdf0e10cSrcweir 		SalGtkFilePicker( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceMgr );
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
99cdf0e10cSrcweir 		// XFilePickerNotifier
100cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 		virtual void SAL_CALL addFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
103cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
104cdf0e10cSrcweir 		virtual void SAL_CALL removeFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
105cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
106cdf0e10cSrcweir 
107cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
108cdf0e10cSrcweir 		// XExecutableDialog functions
109cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
110cdf0e10cSrcweir 
111cdf0e10cSrcweir 		virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
112cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
113cdf0e10cSrcweir 
114cdf0e10cSrcweir 		virtual sal_Int16 SAL_CALL execute(  )
115cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
116cdf0e10cSrcweir 
117cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
118cdf0e10cSrcweir 		// XFilePicker functions
119cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
120cdf0e10cSrcweir 
121cdf0e10cSrcweir 		virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode )
122cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
123cdf0e10cSrcweir 
124cdf0e10cSrcweir 		virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName )
125cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
126cdf0e10cSrcweir 
127cdf0e10cSrcweir 		virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory )
128cdf0e10cSrcweir 			throw( com::sun::star::lang::IllegalArgumentException,
129cdf0e10cSrcweir 				::com::sun::star::uno::RuntimeException );
130cdf0e10cSrcweir 
131cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getDisplayDirectory(  )
132cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
133cdf0e10cSrcweir 
134cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles(  )
135cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
136cdf0e10cSrcweir 
137cdf0e10cSrcweir  		//------------------------------------------------------------------------------------
138cdf0e10cSrcweir 		// XFilePicker2 functions
139cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
140cdf0e10cSrcweir 
141cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedFiles()
142cdf0e10cSrcweir 				throw (::com::sun::star::uno::RuntimeException);
143cdf0e10cSrcweir 
144cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
145cdf0e10cSrcweir 		// XFilterManager functions
146cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
147cdf0e10cSrcweir 
148cdf0e10cSrcweir 		virtual void SAL_CALL appendFilter( const ::rtl::OUString& aTitle, const ::rtl::OUString& aFilter )
149cdf0e10cSrcweir 			throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
150cdf0e10cSrcweir 
151cdf0e10cSrcweir 		virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle )
152cdf0e10cSrcweir 			throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
153cdf0e10cSrcweir 
154cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getCurrentFilter(  )
155cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
156cdf0e10cSrcweir 
157cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
158cdf0e10cSrcweir 		// XFilterGroupManager functions
159cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
160cdf0e10cSrcweir 
161cdf0e10cSrcweir 		virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aFilters )
162cdf0e10cSrcweir 		        throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
163cdf0e10cSrcweir 
164cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
165cdf0e10cSrcweir 		// XFilePickerControlAccess functions
166cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
167cdf0e10cSrcweir 
168cdf0e10cSrcweir 		virtual void SAL_CALL setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const ::com::sun::star::uno::Any& aValue )
169cdf0e10cSrcweir 		        throw (::com::sun::star::uno::RuntimeException);
170cdf0e10cSrcweir 
171cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction )
172cdf0e10cSrcweir 		        throw (::com::sun::star::uno::RuntimeException);
173cdf0e10cSrcweir 
174cdf0e10cSrcweir 		virtual void SAL_CALL enableControl( sal_Int16 nControlId, sal_Bool bEnable )
175cdf0e10cSrcweir 			throw(::com::sun::star::uno::RuntimeException );
176cdf0e10cSrcweir 
177cdf0e10cSrcweir 		virtual void SAL_CALL setLabel( sal_Int16 nControlId, const ::rtl::OUString& aLabel )
178cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
179cdf0e10cSrcweir 
180cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 nControlId )
181cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
182cdf0e10cSrcweir 
183cdf0e10cSrcweir 		//------------------------------------------------
184cdf0e10cSrcweir 		// XFilePreview
185cdf0e10cSrcweir 		//------------------------------------------------
186cdf0e10cSrcweir 
187cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSupportedImageFormats(  )
188cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getTargetColorDepth(  )
191cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
192cdf0e10cSrcweir 
193cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAvailableWidth(  )
194cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
195cdf0e10cSrcweir 
196cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getAvailableHeight(  )
197cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
198cdf0e10cSrcweir 
199cdf0e10cSrcweir 		virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage )
200cdf0e10cSrcweir 			throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
201cdf0e10cSrcweir 
202cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL setShowState( sal_Bool bShowState )
203cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
204cdf0e10cSrcweir 
205cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL getShowState(  )
206cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
207cdf0e10cSrcweir 
208cdf0e10cSrcweir 		//------------------------------------------------
209cdf0e10cSrcweir 		// XInitialization
210cdf0e10cSrcweir 		//------------------------------------------------
211cdf0e10cSrcweir 
212cdf0e10cSrcweir 		virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
213cdf0e10cSrcweir 			throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
214cdf0e10cSrcweir 
215cdf0e10cSrcweir 		//------------------------------------------------
216cdf0e10cSrcweir 		// XCancellable
217cdf0e10cSrcweir 		//------------------------------------------------
218cdf0e10cSrcweir 
219cdf0e10cSrcweir 		virtual void SAL_CALL cancel( )
220cdf0e10cSrcweir 			throw( ::com::sun::star::uno::RuntimeException );
221cdf0e10cSrcweir 
222cdf0e10cSrcweir 		//------------------------------------------------
223cdf0e10cSrcweir 		// XEventListener
224cdf0e10cSrcweir 		//------------------------------------------------
225cdf0e10cSrcweir 
226cdf0e10cSrcweir         using cppu::WeakComponentImplHelperBase::disposing;
227cdf0e10cSrcweir 		virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
228cdf0e10cSrcweir 			throw(::com::sun::star::uno::RuntimeException);
229cdf0e10cSrcweir 
230cdf0e10cSrcweir 		//------------------------------------------------
231cdf0e10cSrcweir 		// XServiceInfo
232cdf0e10cSrcweir 		//------------------------------------------------
233cdf0e10cSrcweir 
234cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getImplementationName(	 )
235cdf0e10cSrcweir 			throw(::com::sun::star::uno::RuntimeException);
236cdf0e10cSrcweir 
237cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
238cdf0e10cSrcweir 			throw(::com::sun::star::uno::RuntimeException);
239cdf0e10cSrcweir 
240cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  )
241cdf0e10cSrcweir 			throw(::com::sun::star::uno::RuntimeException);
242cdf0e10cSrcweir 
243cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
244cdf0e10cSrcweir 		// FilePicker Event functions
245cdf0e10cSrcweir 		//------------------------------------------------------------------------------------
246cdf0e10cSrcweir 
247cdf0e10cSrcweir 		void SAL_CALL fileSelectionChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
248cdf0e10cSrcweir 		void SAL_CALL directoryChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
249cdf0e10cSrcweir 		rtl::OUString SAL_CALL helpRequested( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent ) const;
250cdf0e10cSrcweir 		void SAL_CALL controlStateChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
251cdf0e10cSrcweir 
252cdf0e10cSrcweir 	private:
253cdf0e10cSrcweir 		// prevent copy and assignment
254cdf0e10cSrcweir 		SalGtkFilePicker( const SalGtkFilePicker& );
255cdf0e10cSrcweir 		SalGtkFilePicker& operator=( const SalGtkFilePicker& );
256cdf0e10cSrcweir 
257cdf0e10cSrcweir 		sal_Bool FilterNameExists( const ::rtl::OUString& rTitle );
258cdf0e10cSrcweir 		sal_Bool FilterNameExists( const UnoFilterList& _rGroupedFilters );
259cdf0e10cSrcweir 
260cdf0e10cSrcweir 		void ensureFilterList( const ::rtl::OUString& _rInitialCurrentFilter );
261cdf0e10cSrcweir 
262cdf0e10cSrcweir 		// to instanciate own services
263cdf0e10cSrcweir 		::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr;
264cdf0e10cSrcweir 
265cdf0e10cSrcweir 	private:
266cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >
267cdf0e10cSrcweir             m_xListener;
268cdf0e10cSrcweir         ::rtl::OUString msPlayLabel;
269cdf0e10cSrcweir 		FilterList *m_pFilterList;
270cdf0e10cSrcweir 		GtkWidget  *m_pVBox;
271cdf0e10cSrcweir 
272cdf0e10cSrcweir         GtkWidget  *m_pFilterExpander;
273cdf0e10cSrcweir         GtkWidget  *m_pFilterView;
274cdf0e10cSrcweir         GtkListStore *m_pFilterStore;
275cdf0e10cSrcweir 
276cdf0e10cSrcweir 		enum {
277cdf0e10cSrcweir 			AUTOEXTENSION,
278cdf0e10cSrcweir 			PASSWORD,
279cdf0e10cSrcweir 			FILTEROPTIONS,
280cdf0e10cSrcweir 			READONLY,
281cdf0e10cSrcweir 			LINK,
282cdf0e10cSrcweir 			PREVIEW,
283cdf0e10cSrcweir 			SELECTION,
284cdf0e10cSrcweir 			TOGGLE_LAST
285cdf0e10cSrcweir 		      };
286cdf0e10cSrcweir 
287cdf0e10cSrcweir 		GtkWidget  *m_pToggles[ TOGGLE_LAST ];
288cdf0e10cSrcweir 
289cdf0e10cSrcweir 		bool mbToggleVisibility[TOGGLE_LAST];
290cdf0e10cSrcweir 		bool mbToggleChecked[TOGGLE_LAST];
291cdf0e10cSrcweir 
292cdf0e10cSrcweir 		static const rtl::OString m_ToggleLabels[TOGGLE_LAST];
293cdf0e10cSrcweir 
294cdf0e10cSrcweir 		enum {
295cdf0e10cSrcweir 			PLAY,
296cdf0e10cSrcweir 			BUTTON_LAST };
297cdf0e10cSrcweir 
298cdf0e10cSrcweir 		GtkWidget  *m_pButtons[ BUTTON_LAST ];
299cdf0e10cSrcweir 
300cdf0e10cSrcweir 		enum {
301cdf0e10cSrcweir 			VERSION,
302cdf0e10cSrcweir 			TEMPLATE,
303cdf0e10cSrcweir 			IMAGE_TEMPLATE,
304cdf0e10cSrcweir 			LIST_LAST
305cdf0e10cSrcweir 		      };
306cdf0e10cSrcweir 
307cdf0e10cSrcweir 		GtkWidget *m_pHBoxs[ LIST_LAST ];
308cdf0e10cSrcweir         GtkWidget *m_pAligns[ LIST_LAST ];
309cdf0e10cSrcweir 		GtkWidget *m_pLists[ LIST_LAST ];
310cdf0e10cSrcweir 		GtkWidget *m_pListLabels[ LIST_LAST ];
311cdf0e10cSrcweir 		bool mbListVisibility[ LIST_LAST ];
312cdf0e10cSrcweir 		bool mbButtonVisibility[ BUTTON_LAST ];
313cdf0e10cSrcweir         gulong mnHID_FolderChange;
314cdf0e10cSrcweir         gulong mnHID_SelectionChange;
315cdf0e10cSrcweir 
316cdf0e10cSrcweir 		::rtl::OUString	m_aCurrentFilter;
317*e5d951fcSPedro Giffuni 		::rtl::OUString	m_aInitialFilter;
318cdf0e10cSrcweir 
319cdf0e10cSrcweir         bool bVersionWidthUnset;
320cdf0e10cSrcweir         sal_Bool mbPreviewState;
321cdf0e10cSrcweir         gulong mHID_Preview;
322cdf0e10cSrcweir         GtkWidget* m_pPreview;
323*e5d951fcSPedro Giffuni 		GtkFileFilter* m_pPseudoFilter;
324cdf0e10cSrcweir         sal_Int32 m_PreviewImageWidth;
325cdf0e10cSrcweir         sal_Int32 m_PreviewImageHeight;
326cdf0e10cSrcweir 
327cdf0e10cSrcweir         GtkWidget  *getWidget( sal_Int16 nControlId, GType *pType = NULL);
328cdf0e10cSrcweir 
329cdf0e10cSrcweir 		void SetCurFilter( const OUString& rFilter );
330cdf0e10cSrcweir 		void SetFilters();
331cdf0e10cSrcweir         void UpdateFilterfromUI();
332cdf0e10cSrcweir 
333cdf0e10cSrcweir         void implChangeType( GtkTreeSelection *selection );
334*e5d951fcSPedro Giffuni 		GtkFileFilter * implAddFilter( const OUString& rFilter, const OUString& rType );
335*e5d951fcSPedro Giffuni 		void implAddFilterGroup( const OUString& rFilter,
336cdf0e10cSrcweir 					 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair>& _rFilters );
337cdf0e10cSrcweir         void updateCurrentFilterFromName(const gchar* filtername);
338cdf0e10cSrcweir         void unselect_type();
339cdf0e10cSrcweir         void InitialMapping();
340cdf0e10cSrcweir 
341cdf0e10cSrcweir 		void HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nControlAction,
342cdf0e10cSrcweir             const ::com::sun::star::uno::Any& rValue);
343cdf0e10cSrcweir 		::com::sun::star::uno::Any HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nControlAction) const;
344cdf0e10cSrcweir 
345cdf0e10cSrcweir         static void expander_changed_cb( GtkExpander *expander, SalGtkFilePicker *pobjFP );
346cdf0e10cSrcweir 		static void preview_toggled_cb (GtkObject *cb, SalGtkFilePicker *pobjFP);
347cdf0e10cSrcweir 		static void filter_changed_cb (GtkFileChooser *file_chooser, GParamSpec *pspec, SalGtkFilePicker *pobjFP);
348cdf0e10cSrcweir         static void type_changed_cb( GtkTreeSelection *selection, SalGtkFilePicker *pobjFP );
349cdf0e10cSrcweir 		static void folder_changed_cb (GtkFileChooser *file_chooser, SalGtkFilePicker *pobjFP);
350cdf0e10cSrcweir 		static void selection_changed_cb (GtkFileChooser *file_chooser, SalGtkFilePicker *pobjFP);
351cdf0e10cSrcweir 		static void update_preview_cb (GtkFileChooser *file_chooser, SalGtkFilePicker *pobjFP);
352cdf0e10cSrcweir         static void dialog_mapped_cb(GtkWidget *widget, SalGtkFilePicker *pobjFP);
353cdf0e10cSrcweir 	public:
354cdf0e10cSrcweir 		 virtual ~SalGtkFilePicker();
355cdf0e10cSrcweir 
356cdf0e10cSrcweir };
357cdf0e10cSrcweir /* vi:set tabstop=4 shiftwidth=4 expandtab: */
358cdf0e10cSrcweir #endif // _SALGTKFILEPICKER_HXX_
359