xref: /aoo41x/main/cui/source/inc/optpath.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SVX_OPTPATH_HXX
28 #define _SVX_OPTPATH_HXX
29 
30 // include ---------------------------------------------------------------
31 
32 #include <sfx2/tabdlg.hxx>
33 #ifndef _FIXED_HXX //autogen
34 #include <vcl/fixed.hxx>
35 #endif
36 #ifndef _GROUP_HXX //autogen
37 #include <vcl/group.hxx>
38 #endif
39 
40 #ifdef _SVX_OPTPATH_CXX
41 #include <svtools/headbar.hxx>
42 #else
43 class HeaderBar;
44 #endif
45 #include "ControlFocusHelper.hxx"
46 
47 #ifndef _COM_SUN_STAR_UI_XFOLDERPICKER_HPP_
48 #include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
49 #endif
50 #include <svtools/dialogclosedlistener.hxx>
51 
52 // forward ---------------------------------------------------------------
53 
54 class SvTabListBox;
55 namespace svx
56 {
57 	class OptHeaderTabListBox;
58 }
59 struct OptPath_Impl;
60 class SvxPathTabPage;
61 
62 // define ----------------------------------------------------------------
63 
64 #define SfxPathTabPage SvxPathTabPage
65 
66 // class SvxPathTabPage --------------------------------------------------
67 
68 class SvxPathTabPage : public SfxTabPage
69 {
70 private:
71     FixedLine           aStdBox;
72 	FixedText			aTypeText;
73 	FixedText			aPathText;
74 	SvxControlFocusHelper aPathCtrl;
75 	PushButton			aStandardBtn;
76 	PushButton      	aPathBtn;
77 
78 	HeaderBar*					pHeaderBar;
79 	::svx::OptHeaderTabListBox*	pPathBox;
80 	OptPath_Impl*				pImpl;
81 
82     ::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener;
83     ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFolderPicker > xFolderPicker;
84 
85 #ifdef _SVX_OPTPATH_CXX
86     void        ChangeCurrentEntry( const String& _rFolder );
87 
88     DECL_LINK(  PathHdl_Impl, PushButton * );
89     DECL_LINK(  StandardHdl_Impl, PushButton * );
90 
91     DECL_LINK(  PathSelect_Impl, svx::OptHeaderTabListBox * );
92     DECL_LINK(  HeaderSelect_Impl, HeaderBar * );
93     DECL_LINK(  HeaderEndDrag_Impl, HeaderBar * );
94 
95     DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* );
96 
97     void        GetPathList( sal_uInt16 _nPathHandle, String& _rInternalPath,
98                              String& _rUserPath, String& _rWritablePath, sal_Bool& _rReadOnly );
99     void        SetPathList( sal_uInt16 _nPathHandle,
100                              const String& _rUserPath, const String& _rWritablePath );
101 #endif
102 
103 public:
104 	SvxPathTabPage( Window* pParent, const SfxItemSet& rSet );
105 	~SvxPathTabPage();
106 
107 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rSet );
108 	static sal_uInt16*		GetRanges();
109 
110 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
111 	virtual	void 		Reset( const SfxItemSet& rSet );
112 	virtual void        FillUserData();
113 };
114 
115 #endif
116 
117