Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_FRAMEWORK_INC_UIELEMENT_UIELEMENT_HXX
21 : #define INCLUDED_FRAMEWORK_INC_UIELEMENT_UIELEMENT_HXX
22 :
23 : #include <com/sun/star/ui/XUIElement.hpp>
24 : #include <com/sun/star/ui/DockingArea.hpp>
25 : #include <com/sun/star/awt/Point.hpp>
26 : #include <com/sun/star/awt/Size.hpp>
27 :
28 : #include <rtl/ustring.hxx>
29 : #include <vcl/toolbox.hxx>
30 :
31 : namespace framework
32 : {
33 :
34 : struct DockedData
35 : {
36 0 : DockedData() : m_aPos( SAL_MAX_INT32, SAL_MAX_INT32 ),
37 : m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ),
38 0 : m_bLocked( false ) {}
39 :
40 : com::sun::star::awt::Point m_aPos;
41 : com::sun::star::awt::Size m_aSize;
42 : sal_Int16 m_nDockedArea;
43 : bool m_bLocked;
44 : };
45 :
46 : struct FloatingData
47 : {
48 0 : FloatingData() : m_aPos( SAL_MAX_INT32, SAL_MAX_INT32 ),
49 : m_nLines( 1 ),
50 0 : m_bIsHorizontal( true ) {}
51 :
52 : com::sun::star::awt::Point m_aPos;
53 : com::sun::star::awt::Size m_aSize;
54 : sal_Int16 m_nLines;
55 : bool m_bIsHorizontal;
56 : };
57 :
58 0 : struct UIElement
59 : {
60 0 : UIElement() : m_bFloating( false ),
61 : m_bVisible( true ),
62 : m_bUserActive( false ),
63 : m_bCreateNewRowCol0( false ),
64 : m_bDeactiveHide( false ),
65 : m_bMasterHide( false ),
66 : m_bContextSensitive( false ),
67 : m_bContextActive( true ),
68 : m_bNoClose( false ),
69 : m_bSoftClose( false ),
70 : m_bStateRead( false ),
71 0 : m_nStyle( BUTTON_SYMBOL )
72 0 : {}
73 :
74 0 : UIElement( const OUString& rName,
75 : const OUString& rType,
76 : const com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement,
77 : bool bFloating = false
78 : ) : m_aType( rType ),
79 : m_aName( rName ),
80 : m_xUIElement( rUIElement ),
81 : m_bFloating( bFloating ),
82 : m_bVisible( true ),
83 : m_bUserActive( false ),
84 : m_bCreateNewRowCol0( false ),
85 : m_bDeactiveHide( false ),
86 : m_bMasterHide( false ),
87 : m_bContextSensitive( false ),
88 : m_bContextActive( true ),
89 : m_bNoClose( false ),
90 : m_bSoftClose( false ),
91 : m_bStateRead( false ),
92 0 : m_nStyle( BUTTON_SYMBOL ) {}
93 :
94 : bool operator< ( const UIElement& aUIElement ) const;
95 : UIElement& operator=( const UIElement& rUIElement );
96 :
97 : OUString m_aType;
98 : OUString m_aName;
99 : OUString m_aUIName;
100 : com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement;
101 : bool m_bFloating,
102 : m_bVisible,
103 : m_bUserActive,
104 : m_bCreateNewRowCol0,
105 : m_bDeactiveHide,
106 : m_bMasterHide,
107 : m_bContextSensitive,
108 : m_bContextActive;
109 : bool m_bNoClose,
110 : m_bSoftClose,
111 : m_bStateRead;
112 : sal_Int16 m_nStyle;
113 : DockedData m_aDockedData;
114 : FloatingData m_aFloatingData;
115 : };
116 :
117 : typedef std::vector< UIElement > UIElementVector;
118 :
119 : } // namespace framework
120 :
121 : #endif // INCLUDED_FRAMEWORK_INC_UIELEMENT_UIELEMENT_HXX
122 :
123 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|