bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / toolkit / controls / tkscrollbar.hxx
blob3abd331de39672d973dc1839b62a52f6dbaef824
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
20 #define INCLUDED_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
22 #include <toolkit/controls/unocontrolmodel.hxx>
23 #include <toolkit/controls/unocontrolbase.hxx>
24 #include <com/sun/star/awt/XScrollBar.hpp>
25 #include <com/sun/star/awt/XAdjustmentListener.hpp>
28 namespace toolkit
32 //= UnoControlScrollBarModel
34 class UnoControlScrollBarModel : public UnoControlModel
36 protected:
37 css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
38 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
40 public:
41 UnoControlScrollBarModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory );
42 UnoControlScrollBarModel( const UnoControlScrollBarModel& rModel ) : UnoControlModel( rModel ) {}
44 rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlScrollBarModel( *this ); }
46 // css::beans::XMultiPropertySet
47 css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
49 // css::io::XPersistObject
50 OUString SAL_CALL getServiceName() override;
52 // XServiceInfo
53 OUString SAL_CALL getImplementationName() override;
55 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
59 //= UnoControlScrollBarModel
61 class UnoScrollBarControl : public UnoControlBase,
62 public css::awt::XAdjustmentListener,
63 public css::awt::XScrollBar
65 private:
66 AdjustmentListenerMultiplexer maAdjustmentListeners;
68 public:
69 UnoScrollBarControl();
70 OUString GetComponentServiceName() override;
72 css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override { return UnoControlBase::queryInterface(rType); }
73 css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
74 void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
75 void SAL_CALL release() throw() override { OWeakAggObject::release(); }
76 void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) override;
77 void SAL_CALL disposing( const css::lang::EventObject& Source ) override { UnoControlBase::disposing( Source ); }
78 void SAL_CALL dispose( ) override;
80 // css::lang::XTypeProvider
81 css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
82 css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
84 // css::awt::XAdjustmentListener
85 void SAL_CALL adjustmentValueChanged( const css::awt::AdjustmentEvent& rEvent ) override;
87 // css::awt::XScrollBar
88 void SAL_CALL addAdjustmentListener( const css::uno::Reference< css::awt::XAdjustmentListener >& l ) override;
89 void SAL_CALL removeAdjustmentListener( const css::uno::Reference< css::awt::XAdjustmentListener >& l ) override;
90 void SAL_CALL setValue( sal_Int32 n ) override;
91 void SAL_CALL setValues( sal_Int32 nValue, sal_Int32 nVisible, sal_Int32 nMax ) override;
92 sal_Int32 SAL_CALL getValue( ) override;
93 void SAL_CALL setMaximum( sal_Int32 n ) override;
94 sal_Int32 SAL_CALL getMaximum( ) override;
95 void SAL_CALL setLineIncrement( sal_Int32 n ) override;
96 sal_Int32 SAL_CALL getLineIncrement( ) override;
97 void SAL_CALL setBlockIncrement( sal_Int32 n ) override;
98 sal_Int32 SAL_CALL getBlockIncrement( ) override;
99 void SAL_CALL setVisibleSize( sal_Int32 n ) override;
100 sal_Int32 SAL_CALL getVisibleSize( ) override;
101 void SAL_CALL setOrientation( sal_Int32 n ) override;
102 sal_Int32 SAL_CALL getOrientation( ) override;
104 // css::lang::XServiceInfo
105 OUString SAL_CALL getImplementationName() override;
107 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
111 } // namespacetoolkit
114 #endif // INCLUDED_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */