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