merge the formfield patch from ooo-build
[ooovba.git] / extensions / source / propctrlr / taborder.hxx
blob2d272c10454f73bb38a4cbc05c061156e34cacca
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: taborder.hxx,v $
10 * $Revision: 1.6 $
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 ************************************************************************/
31 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_TABORDER_HXX
32 #define EXTENSIONS_SOURCE_PROPCTRLR_TABORDER_HXX
34 #include <svtools/svtreebx.hxx>
35 #include <com/sun/star/awt/XTabControllerModel.hpp>
36 #include <com/sun/star/awt/XControlContainer.hpp>
37 #include <com/sun/star/beans/XPropertySet.hpp>
39 #ifndef _DIALOG_HXX //autogen
40 #include <vcl/dialog.hxx>
41 #endif
43 #ifndef _BUTTON_HXX //autogen
44 #include <vcl/button.hxx>
45 #endif
46 #include <vcl/lstbox.hxx>
48 #ifndef _FIXED_HXX //autogen
49 #include <vcl/fixed.hxx>
50 #endif
52 #ifndef _TOOLS_LIST_HXX
53 #include <tools/list.hxx>
54 #endif
55 #include <comphelper/uno3.hxx>
57 //............................................................................
58 namespace pcr
60 //............................................................................
62 //========================================================================
63 //= TabOrderListBox
64 //========================================================================
65 class TabOrderListBox : public SvTreeListBox
67 public:
68 TabOrderListBox( Window* pParent, const ResId& rResId );
69 virtual ~TabOrderListBox();
71 void MoveSelection( long nRelPos );
73 protected:
74 virtual void ModelHasMoved(SvListEntry* pSource );
76 private:
77 using SvTreeListBox::MoveSelection;
81 //========================================================================
82 //= TabOrderDialog
83 //========================================================================
84 class TabOrderDialog : public ModalDialog
86 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel >
87 m_xTempModel;
88 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel >
89 m_xModel;
90 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
91 m_xControlContainer;
92 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
93 m_xORB;
95 FixedText aFT_Controls;
96 TabOrderListBox aLB_Controls;
98 OKButton aPB_OK;
99 CancelButton aPB_CANCEL;
100 HelpButton aPB_HELP;
102 PushButton aPB_MoveUp;
103 PushButton aPB_MoveDown;
104 PushButton aPB_AutoOrder;
106 ImageList* pImageList;
108 DECL_LINK( MoveUpClickHdl, Button* );
109 DECL_LINK( MoveDownClickHdl, Button* );
110 DECL_LINK( AutoOrderClickHdl, Button* );
111 DECL_LINK( OKClickHdl, Button* );
113 void FillList();
114 Image GetImage(
115 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _rxSet
116 ) const;
118 public:
119 TabOrderDialog(
120 Window* _pParent,
121 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel >& _rxTabModel,
122 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxControlCont,
123 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
126 virtual ~TabOrderDialog();
128 void SetModified();
131 //............................................................................
132 } // namespace pcr
133 //............................................................................
135 #endif // EXTENSIONS_SOURCE_PROPCTRLR_TABORDER_HXX