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_FORMS_SOURCE_COMPONENT_NAVIGATIONBAR_HXX
21 : #define INCLUDED_FORMS_SOURCE_COMPONENT_NAVIGATIONBAR_HXX
22 :
23 : #include "FormComponent.hxx"
24 : #include <com/sun/star/io/XPersistObject.hpp>
25 : #include <comphelper/proparrhlp.hxx>
26 : #include <comphelper/propertycontainerhelper.hxx>
27 : #include <cppuhelper/implbase1.hxx>
28 : #include <cppuhelper/interfacecontainer.hxx>
29 : #include <com/sun/star/container/XSet.hpp>
30 : #include <com/sun/star/container/XContainer.hpp>
31 : #include "formcontrolfont.hxx"
32 :
33 : #include <set>
34 :
35 :
36 : namespace frm
37 : {
38 :
39 : typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XControlModel
40 : > ONavigationBarModel_BASE;
41 :
42 : class ONavigationBarModel
43 : :public OControlModel
44 : ,public FontControlModel
45 : ,public OPropertyContainerHelper
46 : ,public ONavigationBarModel_BASE
47 : {
48 : // <properties>
49 : ::com::sun::star::uno::Any m_aTabStop;
50 : ::com::sun::star::uno::Any m_aBackgroundColor;
51 : OUString m_sDefaultControl;
52 : OUString m_sHelpText;
53 : OUString m_sHelpURL;
54 : sal_Int16 m_nIconSize;
55 : sal_Int16 m_nBorder;
56 : sal_Int32 m_nDelay;
57 : bool m_bEnabled;
58 : bool m_bEnableVisible;
59 : bool m_bShowPosition;
60 : bool m_bShowNavigation;
61 : bool m_bShowActions;
62 : bool m_bShowFilterSort;
63 : sal_Int16 m_nWritingMode;
64 : sal_Int16 m_nContextWritingMode;
65 : // </properties>
66 :
67 : public:
68 : DECLARE_DEFAULT_LEAF_XTOR( ONavigationBarModel );
69 :
70 : // XServiceInfo - static version
71 : static OUString SAL_CALL getImplementationName_Static();
72 : static ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static();
73 :
74 : protected:
75 : // UNO
76 20791 : DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarModel, OControlModel )
77 : virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 :
79 : // XServiceInfo
80 : virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
82 :
83 : // XTypeProvider
84 : DECLARE_XTYPEPROVIDER()
85 :
86 : // OComponentHelper
87 : virtual void SAL_CALL disposing() SAL_OVERRIDE;
88 :
89 : // XPersistObject
90 : virtual OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
91 : virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
92 : virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 :
94 : // XPropertySet
95 : virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const SAL_OVERRIDE;
96 : virtual sal_Bool SAL_CALL convertFastPropertyValue(::com::sun::star::uno::Any& rConvertedValue, ::com::sun::star::uno::Any& rOldValue,
97 : sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
98 : throw(::com::sun::star::lang::IllegalArgumentException) SAL_OVERRIDE;
99 : virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) throw ( ::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE;
100 :
101 : // XPropertyState
102 : virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle( sal_Int32 nHandle ) const SAL_OVERRIDE;
103 :
104 : // OControlModel's property handling
105 : virtual void describeFixedProperties(
106 : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
107 : ) const SAL_OVERRIDE;
108 :
109 : // prevent method hiding
110 : using OControlModel::disposing;
111 : using OControlModel::getFastPropertyValue;
112 :
113 : protected:
114 : virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
115 :
116 : private:
117 : void implInitPropertyContainer();
118 : };
119 :
120 :
121 : } // namespace frm
122 :
123 :
124 : #endif // INCLUDED_FORMS_SOURCE_COMPONENT_NAVIGATIONBAR_HXX
125 :
126 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|