1*46dbaceeSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*46dbaceeSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*46dbaceeSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*46dbaceeSAndrew Rist  * distributed with this work for additional information
6*46dbaceeSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*46dbaceeSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*46dbaceeSAndrew Rist  * "License"); you may not use this file except in compliance
9*46dbaceeSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*46dbaceeSAndrew Rist  *
11*46dbaceeSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*46dbaceeSAndrew Rist  *
13*46dbaceeSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*46dbaceeSAndrew Rist  * software distributed under the License is distributed on an
15*46dbaceeSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*46dbaceeSAndrew Rist  * KIND, either express or implied.  See the License for the
17*46dbaceeSAndrew Rist  * specific language governing permissions and limitations
18*46dbaceeSAndrew Rist  * under the License.
19*46dbaceeSAndrew Rist  *
20*46dbaceeSAndrew Rist  *************************************************************/
21*46dbaceeSAndrew Rist 
22*46dbaceeSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef EXTENSIONS_SOURCE_PROPCTRLR_TABORDER_HXX
25cdf0e10cSrcweir #define EXTENSIONS_SOURCE_PROPCTRLR_TABORDER_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <svtools/svtreebx.hxx>
28cdf0e10cSrcweir #include <com/sun/star/awt/XTabControllerModel.hpp>
29cdf0e10cSrcweir #include <com/sun/star/awt/XControlContainer.hpp>
30cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #ifndef _DIALOG_HXX //autogen
33cdf0e10cSrcweir #include <vcl/dialog.hxx>
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen
37cdf0e10cSrcweir #include <vcl/button.hxx>
38cdf0e10cSrcweir #endif
39cdf0e10cSrcweir #include <vcl/lstbox.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
42cdf0e10cSrcweir #include <vcl/fixed.hxx>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir 
45cdf0e10cSrcweir #ifndef _TOOLS_LIST_HXX
46cdf0e10cSrcweir #include <tools/list.hxx>
47cdf0e10cSrcweir #endif
48cdf0e10cSrcweir #include <comphelper/uno3.hxx>
49cdf0e10cSrcweir 
50cdf0e10cSrcweir //............................................................................
51cdf0e10cSrcweir namespace pcr
52cdf0e10cSrcweir {
53cdf0e10cSrcweir //............................................................................
54cdf0e10cSrcweir 
55cdf0e10cSrcweir     //========================================================================
56cdf0e10cSrcweir     //= TabOrderListBox
57cdf0e10cSrcweir     //========================================================================
58cdf0e10cSrcweir     class TabOrderListBox : public SvTreeListBox
59cdf0e10cSrcweir     {
60cdf0e10cSrcweir     public:
61cdf0e10cSrcweir         TabOrderListBox( Window* pParent, const ResId& rResId  );
62cdf0e10cSrcweir         virtual ~TabOrderListBox();
63cdf0e10cSrcweir 
64cdf0e10cSrcweir         void            MoveSelection( long nRelPos );
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     protected:
67cdf0e10cSrcweir         virtual void    ModelHasMoved(SvListEntry* pSource );
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     private:
70cdf0e10cSrcweir         using SvTreeListBox::MoveSelection;
71cdf0e10cSrcweir     };
72cdf0e10cSrcweir 
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     //========================================================================
75cdf0e10cSrcweir     //= TabOrderDialog
76cdf0e10cSrcweir     //========================================================================
77cdf0e10cSrcweir     class TabOrderDialog : public ModalDialog
78cdf0e10cSrcweir     {
79cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel >
80cdf0e10cSrcweir                                     m_xTempModel;
81cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel >
82cdf0e10cSrcweir                                     m_xModel;
83cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
84cdf0e10cSrcweir                                     m_xControlContainer;
85cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
86cdf0e10cSrcweir                                     m_xORB;
87cdf0e10cSrcweir 
88cdf0e10cSrcweir         FixedText                   aFT_Controls;
89cdf0e10cSrcweir         TabOrderListBox         aLB_Controls;
90cdf0e10cSrcweir 
91cdf0e10cSrcweir         OKButton                    aPB_OK;
92cdf0e10cSrcweir         CancelButton                aPB_CANCEL;
93cdf0e10cSrcweir         HelpButton                  aPB_HELP;
94cdf0e10cSrcweir 
95cdf0e10cSrcweir         PushButton                  aPB_MoveUp;
96cdf0e10cSrcweir         PushButton                  aPB_MoveDown;
97cdf0e10cSrcweir         PushButton                  aPB_AutoOrder;
98cdf0e10cSrcweir 
99cdf0e10cSrcweir         ImageList*                  pImageList;
100cdf0e10cSrcweir 
101cdf0e10cSrcweir         DECL_LINK( MoveUpClickHdl, Button* );
102cdf0e10cSrcweir         DECL_LINK( MoveDownClickHdl, Button* );
103cdf0e10cSrcweir         DECL_LINK( AutoOrderClickHdl, Button* );
104cdf0e10cSrcweir         DECL_LINK( OKClickHdl, Button* );
105cdf0e10cSrcweir 
106cdf0e10cSrcweir         void FillList();
107cdf0e10cSrcweir         Image GetImage(
108cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _rxSet
109cdf0e10cSrcweir         ) const;
110cdf0e10cSrcweir 
111cdf0e10cSrcweir     public:
112cdf0e10cSrcweir         TabOrderDialog(
113cdf0e10cSrcweir             Window* _pParent,
114cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel >& _rxTabModel,
115cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxControlCont,
116cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
117cdf0e10cSrcweir         );
118cdf0e10cSrcweir 
119cdf0e10cSrcweir         virtual ~TabOrderDialog();
120cdf0e10cSrcweir 
121cdf0e10cSrcweir         void SetModified();
122cdf0e10cSrcweir     };
123cdf0e10cSrcweir 
124cdf0e10cSrcweir //............................................................................
125cdf0e10cSrcweir }  // namespace pcr
126cdf0e10cSrcweir //............................................................................
127cdf0e10cSrcweir 
128cdf0e10cSrcweir #endif  // EXTENSIONS_SOURCE_PROPCTRLR_TABORDER_HXX
129