1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2008 by Sun Microsystems, Inc. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * $RCSfile: layoutmanager.hxx,v $ 10 * $Revision: 1.34 $ 11 * 12 * This file is part of OpenOffice.org. 13 * 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. 17 * 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). 23 * 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. 28 * 29 ************************************************************************/ 30 31 #ifndef __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_ 32 #define __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_ 33 34 //_________________________________________________________________________________________________________________ 35 // my own includes 36 //_________________________________________________________________________________________________________________ 37 38 //_________________________________________________________________________________________________________________ 39 // interface includes 40 //_________________________________________________________________________________________________________________ 41 42 #include <com/sun/star/ui/XUIElement.hpp> 43 #include <com/sun/star/ui/DockingArea.hpp> 44 45 //_________________________________________________________________________________________________________________ 46 // other includes 47 //_________________________________________________________________________________________________________________ 48 49 #include <rtl/ustring.hxx> 50 #include <vcl/toolbox.hxx> 51 52 //_________________________________________________________________________________________________________________ 53 // namespace 54 //_________________________________________________________________________________________________________________ 55 56 namespace framework 57 { 58 59 struct DockedData 60 { 61 DockedData() : m_aPos( LONG_MAX, LONG_MAX ), 62 m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ), 63 m_bLocked( false ) {} 64 65 Point m_aPos; 66 Size m_aSize; 67 sal_Int16 m_nDockedArea; 68 bool m_bLocked; 69 }; 70 71 struct FloatingData 72 { 73 FloatingData() : m_aPos( LONG_MAX, LONG_MAX ), 74 m_nLines( 1 ), 75 m_bIsHorizontal( true ) {} 76 77 Point m_aPos; 78 Size m_aSize; 79 sal_Int16 m_nLines; 80 bool m_bIsHorizontal; 81 }; 82 83 struct UIElement 84 { 85 UIElement() : m_bFloating( false ), 86 m_bVisible( true ), 87 m_bUserActive( false ), 88 m_bCreateNewRowCol0( false ), 89 m_bDeactiveHide( false ), 90 m_bMasterHide( false ), 91 m_bContextSensitive( false ), 92 m_bContextActive( true ), 93 m_bNoClose( false ), 94 m_bSoftClose( false ), 95 m_bStateRead( false ), 96 m_nStyle( BUTTON_SYMBOL ) 97 {} 98 99 UIElement( const rtl::OUString& rName, 100 const rtl::OUString& rType, 101 const com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement, 102 bool bFloating = false 103 ) : m_aType( rType ), 104 m_aName( rName ), 105 m_xUIElement( rUIElement ), 106 m_bFloating( bFloating ), 107 m_bVisible( true ), 108 m_bUserActive( false ), 109 m_bCreateNewRowCol0( false ), 110 m_bDeactiveHide( false ), 111 m_bMasterHide( false ), 112 m_bContextSensitive( false ), 113 m_bContextActive( true ), 114 m_bNoClose( false ), 115 m_bSoftClose( false ), 116 m_bStateRead( false ), 117 m_nStyle( BUTTON_SYMBOL ) {} 118 119 bool operator< ( const UIElement& aUIElement ) const; 120 UIElement& operator=( const UIElement& rUIElement ); 121 122 rtl::OUString m_aType; 123 rtl::OUString m_aName; 124 rtl::OUString m_aUIName; 125 com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement; 126 bool m_bFloating, 127 m_bVisible, 128 m_bUserActive, 129 m_bCreateNewRowCol0, 130 m_bDeactiveHide, 131 m_bMasterHide, 132 m_bContextSensitive, 133 m_bContextActive; 134 bool m_bNoClose, 135 m_bSoftClose, 136 m_bStateRead; 137 sal_Int16 m_nStyle; 138 DockedData m_aDockedData; 139 FloatingData m_aFloatingData; 140 }; 141 142 typedef std::vector< UIElement > UIElementVector; 143 144 } // namespace framework 145 146 #endif // __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_ 147