1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef TOOLKIT_AWT_VCLXSPINBUTTON_HXX 24 #define TOOLKIT_AWT_VCLXSPINBUTTON_HXX 25 26 #include <toolkit/awt/vclxwindow.hxx> 27 #include <toolkit/helper/listenermultiplexer.hxx> 28 #include <cppuhelper/implbase1.hxx> 29 #include <comphelper/uno3.hxx> 30 #include <com/sun/star/awt/XSpinValue.hpp> 31 32 //........................................................................ 33 namespace toolkit 34 { 35 //........................................................................ 36 37 //==================================================================== 38 //= VCLXSpinButton 39 //==================================================================== 40 typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XSpinValue 41 > VCLXSpinButton_Base; 42 43 class VCLXSpinButton :public VCLXWindow 44 ,public VCLXSpinButton_Base 45 { 46 private: 47 AdjustmentListenerMultiplexer maAdjustmentListeners; 48 49 public: 50 VCLXSpinButton(); 51 52 protected: 53 ~VCLXSpinButton( ); 54 55 // XInterface 56 DECLARE_XINTERFACE() 57 58 // XTypeProvider 59 DECLARE_XTYPEPROVIDER() 60 61 // XComponent 62 void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); 63 64 // XSpinValue 65 virtual void SAL_CALL addAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& listener ) throw (::com::sun::star::uno::RuntimeException); 66 virtual void SAL_CALL removeAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& listener ) throw (::com::sun::star::uno::RuntimeException); 67 virtual void SAL_CALL setValue( sal_Int32 n ) throw (::com::sun::star::uno::RuntimeException); 68 virtual void SAL_CALL setValues( sal_Int32 minValue, sal_Int32 maxValue, sal_Int32 currentValue ) throw (::com::sun::star::uno::RuntimeException); 69 virtual sal_Int32 SAL_CALL getValue( ) throw (::com::sun::star::uno::RuntimeException); 70 virtual void SAL_CALL setMinimum( sal_Int32 minValue ) throw (::com::sun::star::uno::RuntimeException); 71 virtual void SAL_CALL setMaximum( sal_Int32 maxValue ) throw (::com::sun::star::uno::RuntimeException); 72 virtual sal_Int32 SAL_CALL getMinimum( ) throw (::com::sun::star::uno::RuntimeException); 73 virtual sal_Int32 SAL_CALL getMaximum( ) throw (::com::sun::star::uno::RuntimeException); 74 virtual void SAL_CALL setSpinIncrement( sal_Int32 spinIncrement ) throw (::com::sun::star::uno::RuntimeException); 75 virtual sal_Int32 SAL_CALL getSpinIncrement( ) throw (::com::sun::star::uno::RuntimeException); 76 virtual void SAL_CALL setOrientation( sal_Int32 orientation ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); 77 virtual sal_Int32 SAL_CALL getOrientation( ) throw (::com::sun::star::uno::RuntimeException); 78 79 // VclWindowPeer 80 virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); 81 virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); 82 83 // VCLXWindow 84 void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); 85 86 private: 87 VCLXSpinButton( const VCLXSpinButton& ); // never implemented 88 VCLXSpinButton& operator=( const VCLXSpinButton& ); // never implemented 89 }; 90 91 //........................................................................ 92 } // namespacetoolkit 93 //........................................................................ 94 95 #endif // TOOLKIT_INC_TOOLKIT_AWT_VCLXSPINBUTTON_HXX 96 97