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 28 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_TABORDER_HXX 29 #define EXTENSIONS_SOURCE_PROPCTRLR_TABORDER_HXX 30 31 #include <svtools/svtreebx.hxx> 32 #include <com/sun/star/awt/XTabControllerModel.hpp> 33 #include <com/sun/star/awt/XControlContainer.hpp> 34 #include <com/sun/star/beans/XPropertySet.hpp> 35 36 #ifndef _DIALOG_HXX //autogen 37 #include <vcl/dialog.hxx> 38 #endif 39 40 #ifndef _BUTTON_HXX //autogen 41 #include <vcl/button.hxx> 42 #endif 43 #include <vcl/lstbox.hxx> 44 45 #ifndef _FIXED_HXX //autogen 46 #include <vcl/fixed.hxx> 47 #endif 48 49 #ifndef _TOOLS_LIST_HXX 50 #include <tools/list.hxx> 51 #endif 52 #include <comphelper/uno3.hxx> 53 54 //............................................................................ 55 namespace pcr 56 { 57 //............................................................................ 58 59 //======================================================================== 60 //= TabOrderListBox 61 //======================================================================== 62 class TabOrderListBox : public SvTreeListBox 63 { 64 public: 65 TabOrderListBox( Window* pParent, const ResId& rResId ); 66 virtual ~TabOrderListBox(); 67 68 void MoveSelection( long nRelPos ); 69 70 protected: 71 virtual void ModelHasMoved(SvListEntry* pSource ); 72 73 private: 74 using SvTreeListBox::MoveSelection; 75 }; 76 77 78 //======================================================================== 79 //= TabOrderDialog 80 //======================================================================== 81 class TabOrderDialog : public ModalDialog 82 { 83 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > 84 m_xTempModel; 85 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > 86 m_xModel; 87 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > 88 m_xControlContainer; 89 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > 90 m_xORB; 91 92 FixedText aFT_Controls; 93 TabOrderListBox aLB_Controls; 94 95 OKButton aPB_OK; 96 CancelButton aPB_CANCEL; 97 HelpButton aPB_HELP; 98 99 PushButton aPB_MoveUp; 100 PushButton aPB_MoveDown; 101 PushButton aPB_AutoOrder; 102 103 ImageList* pImageList; 104 105 DECL_LINK( MoveUpClickHdl, Button* ); 106 DECL_LINK( MoveDownClickHdl, Button* ); 107 DECL_LINK( AutoOrderClickHdl, Button* ); 108 DECL_LINK( OKClickHdl, Button* ); 109 110 void FillList(); 111 Image GetImage( 112 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _rxSet 113 ) const; 114 115 public: 116 TabOrderDialog( 117 Window* _pParent, 118 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel >& _rxTabModel, 119 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxControlCont, 120 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB 121 ); 122 123 virtual ~TabOrderDialog(); 124 125 void SetModified(); 126 }; 127 128 //............................................................................ 129 } // namespace pcr 130 //............................................................................ 131 132 #endif // EXTENSIONS_SOURCE_PROPCTRLR_TABORDER_HXX 133