xref: /trunk/main/cui/source/inc/optpath.hxx (revision c4eee24d)
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 #ifndef _SVX_OPTPATH_HXX
24 #define _SVX_OPTPATH_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <sfx2/tabdlg.hxx>
29 #ifndef _FIXED_HXX //autogen
30 #include <vcl/fixed.hxx>
31 #endif
32 #ifndef _GROUP_HXX //autogen
33 #include <vcl/group.hxx>
34 #endif
35 
36 #ifdef _SVX_OPTPATH_CXX
37 #include <svtools/headbar.hxx>
38 #else
39 class HeaderBar;
40 #endif
41 #include "ControlFocusHelper.hxx"
42 
43 #ifndef _COM_SUN_STAR_UI_XFOLDERPICKER_HPP_
44 #include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
45 #endif
46 #include <svtools/dialogclosedlistener.hxx>
47 
48 // forward ---------------------------------------------------------------
49 
50 class SvTabListBox;
51 namespace svx
52 {
53 	class OptHeaderTabListBox;
54 }
55 struct OptPath_Impl;
56 class SvxPathTabPage;
57 
58 // define ----------------------------------------------------------------
59 
60 #define SfxPathTabPage SvxPathTabPage
61 
62 // class SvxPathTabPage --------------------------------------------------
63 
64 class SvxPathTabPage : public SfxTabPage
65 {
66 private:
67     FixedLine           aStdBox;
68 	FixedText			aTypeText;
69 	FixedText			aPathText;
70 	SvxControlFocusHelper aPathCtrl;
71 	PushButton			aStandardBtn;
72 	PushButton      	aPathBtn;
73 
74 	HeaderBar*					pHeaderBar;
75 	::svx::OptHeaderTabListBox*	pPathBox;
76 	OptPath_Impl*				pImpl;
77 
78     ::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener;
79     ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFolderPicker > xFolderPicker;
80 
81 #ifdef _SVX_OPTPATH_CXX
82     void        ChangeCurrentEntry( const String& _rFolder );
83 
84     DECL_LINK(  PathHdl_Impl, PushButton * );
85     DECL_LINK(  StandardHdl_Impl, PushButton * );
86 
87     DECL_LINK(  PathSelect_Impl, svx::OptHeaderTabListBox * );
88     DECL_LINK(  HeaderSelect_Impl, HeaderBar * );
89     DECL_LINK(  HeaderEndDrag_Impl, HeaderBar * );
90 
91     DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* );
92 
93     void        GetPathList( sal_uInt16 _nPathHandle, String& _rInternalPath,
94                              String& _rUserPath, String& _rWritablePath, sal_Bool& _rReadOnly );
95     void        SetPathList( sal_uInt16 _nPathHandle,
96                              const String& _rUserPath, const String& _rWritablePath );
97 #endif
98 
99 public:
100 	SvxPathTabPage( Window* pParent, const SfxItemSet& rSet );
101 	~SvxPathTabPage();
102 
103 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rSet );
104 	static sal_uInt16*		GetRanges();
105 
106 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
107 	virtual	void 		Reset( const SfxItemSet& rSet );
108 	virtual void        FillUserData();
109 };
110 
111 #endif
112 
113