merge the formfield patch from ooo-build
[ooovba.git] / forms / source / component / navigationbar.hxx
blob991d9301e44d207a489e5a2e974889d78bef5ab0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: navigationbar.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
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.
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).
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.
29 ************************************************************************/
31 #ifndef FORMS_COMPONENT_NAVIGATION_BAR_HXX
32 #define FORMS_COMPONENT_NAVIGATION_BAR_HXX
34 #include "FormComponent.hxx"
35 #include <com/sun/star/io/XPersistObject.hpp>
36 #include <comphelper/proparrhlp.hxx>
37 #include <comphelper/propertycontainerhelper.hxx>
38 #include <cppuhelper/implbase1.hxx>
39 #include <cppuhelper/interfacecontainer.hxx>
40 #include <com/sun/star/container/XSet.hpp>
41 #include <com/sun/star/container/XContainer.hpp>
42 #include "formcontrolfont.hxx"
44 #include <set>
46 //.........................................................................
47 namespace frm
49 //.........................................................................
51 //==================================================================
52 // ONavigationBarModel
53 //==================================================================
54 typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XControlModel
55 > ONavigationBarModel_BASE;
57 class ONavigationBarModel
58 :public OControlModel
59 ,public FontControlModel
60 ,public OPropertyContainerHelper
61 ,public ONavigationBarModel_BASE
63 // <properties>
64 ::com::sun::star::uno::Any m_aTabStop;
65 ::com::sun::star::uno::Any m_aBackgroundColor;
66 ::rtl::OUString m_sDefaultControl;
67 ::rtl::OUString m_sHelpText;
68 ::rtl::OUString m_sHelpURL;
69 sal_Int16 m_nIconSize;
70 sal_Int16 m_nBorder;
71 sal_Int32 m_nDelay;
72 sal_Bool m_bEnabled;
73 sal_Bool m_bEnableVisible;
74 sal_Bool m_bShowPosition;
75 sal_Bool m_bShowNavigation;
76 sal_Bool m_bShowActions;
77 sal_Bool m_bShowFilterSort;
78 sal_Int16 m_nWritingMode;
79 sal_Int16 m_nContextWritingMode;
80 // </properties>
82 public:
83 DECLARE_DEFAULT_LEAF_XTOR( ONavigationBarModel );
85 // XServiceInfo - static version
86 static ::rtl::OUString SAL_CALL getImplementationName_Static();
87 static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static();
88 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory );
90 protected:
91 // UNO
92 DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarModel, OControlModel );
93 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException);
95 // XServiceInfo
96 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
97 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
99 // XTypeProvider
100 DECLARE_XTYPEPROVIDER()
102 // OComponentHelper
103 virtual void SAL_CALL disposing();
105 // XPersistObject
106 virtual ::rtl::OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException);
107 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);
108 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);
110 // XPropertySet
111 virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
112 virtual sal_Bool SAL_CALL convertFastPropertyValue(::com::sun::star::uno::Any& rConvertedValue, ::com::sun::star::uno::Any& rOldValue,
113 sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
114 throw(::com::sun::star::lang::IllegalArgumentException);
115 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) throw ( ::com::sun::star::uno::Exception);
117 // XPropertyState
118 virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle( sal_Int32 nHandle ) const;
120 // OControlModel's property handling
121 virtual void describeFixedProperties(
122 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
123 ) const;
125 // prevent method hiding
126 using OControlModel::disposing;
127 using OControlModel::getFastPropertyValue;
129 protected:
130 DECLARE_XCLONEABLE();
132 private:
133 void implInitPropertyContainer();
136 //.........................................................................
137 } // namespace frm
138 //.........................................................................
140 #endif // FORMS_COMPONENT_NAVIGATION_BAR_HXX