merge the formfield patch from ooo-build
[ooovba.git] / extensions / source / propctrlr / pushbuttonnavigation.hxx
blob127642f7ce0e69f0d0b476e30cc58acbaa1536b6
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: pushbuttonnavigation.hxx,v $
10 * $Revision: 1.5 $
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 EXTENSIONS_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX
32 #define EXTENSIONS_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/beans/PropertyState.hpp>
37 //............................................................................
38 namespace pcr
40 //............................................................................
42 //========================================================================
43 //= PushButtonNavigation
44 //========================================================================
45 class PushButtonNavigation
47 protected:
48 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
49 m_xControlModel;
50 sal_Bool m_bIsPushButton;
52 public:
53 /** ctor
54 @param _rxControlModel
55 the control model which is or will be bound
57 PushButtonNavigation(
58 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel
61 /** returns the current value of the "ButtonType" property, taking into account
62 the "virtual" button types such as "move-to-next-record button".
64 ::com::sun::star::uno::Any
65 getCurrentButtonType() const SAL_THROW(());
67 /** sets the current value of the "ButtonType" property, taking into account
68 the "virtual" button types such as "move-to-next-record button".
70 void setCurrentButtonType( const ::com::sun::star::uno::Any& _rValue ) const SAL_THROW(());
72 /** retrieves the current state of the "ButtonType" property, taking into account
73 the "virtual" button types such as "move-to-next-record button".
75 ::com::sun::star::beans::PropertyState
76 getCurrentButtonTypeState( ) const SAL_THROW(());
78 /** returns the current value of the "TargetURL" property, taking into account
79 that some URLs are special values caused by "virtual" ButtonTypes
81 ::com::sun::star::uno::Any
82 getCurrentTargetURL() const SAL_THROW(());
84 /** sets the current value of the "TargetURL" property, taking into account
85 that some URLs are special values caused by "virtual" ButtonTypes
87 void setCurrentTargetURL( const ::com::sun::star::uno::Any& _rValue ) const SAL_THROW(());
89 /** retrieves the current state of the "TargetURL" property, taking into account
90 that some URLs are special values caused by "virtual" ButtonTypes
92 ::com::sun::star::beans::PropertyState
93 getCurrentTargetURLState( ) const SAL_THROW(());
95 /** determines whether the current button tpye is FormButtonType_URL
97 bool currentButtonTypeIsOpenURL() const;
99 /** determines whether the TargetURL property does currently denote a non-empty string
101 bool hasNonEmptyCurrentTargetURL() const;
103 private:
104 sal_Int32 implGetCurrentButtonType() const SAL_THROW(( ::com::sun::star::uno::Exception ));
107 //............................................................................
108 } // namespace pcr
109 //............................................................................
111 #endif // EXTENSIONS_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX