Branch data 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 EXTENSIONS_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX
21 : : #define EXTENSIONS_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX
22 : :
23 : : #include <com/sun/star/beans/XPropertySet.hpp>
24 : : #include <com/sun/star/beans/PropertyState.hpp>
25 : :
26 : : //............................................................................
27 : : namespace pcr
28 : : {
29 : : //............................................................................
30 : :
31 : : //========================================================================
32 : : //= PushButtonNavigation
33 : : //========================================================================
34 : 0 : class PushButtonNavigation
35 : : {
36 : : protected:
37 : : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
38 : : m_xControlModel;
39 : : sal_Bool m_bIsPushButton;
40 : :
41 : : public:
42 : : /** ctor
43 : : @param _rxControlModel
44 : : the control model which is or will be bound
45 : : */
46 : : PushButtonNavigation(
47 : : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel
48 : : );
49 : :
50 : : /** returns the current value of the "ButtonType" property, taking into account
51 : : the "virtual" button types such as "move-to-next-record button".
52 : : */
53 : : ::com::sun::star::uno::Any
54 : : getCurrentButtonType() const SAL_THROW(());
55 : :
56 : : /** sets the current value of the "ButtonType" property, taking into account
57 : : the "virtual" button types such as "move-to-next-record button".
58 : : */
59 : : void setCurrentButtonType( const ::com::sun::star::uno::Any& _rValue ) const SAL_THROW(());
60 : :
61 : : /** retrieves the current state of the "ButtonType" property, taking into account
62 : : the "virtual" button types such as "move-to-next-record button".
63 : : */
64 : : ::com::sun::star::beans::PropertyState
65 : : getCurrentButtonTypeState( ) const SAL_THROW(());
66 : :
67 : : /** returns the current value of the "TargetURL" property, taking into account
68 : : that some URLs are special values caused by "virtual" ButtonTypes
69 : : */
70 : : ::com::sun::star::uno::Any
71 : : getCurrentTargetURL() const SAL_THROW(());
72 : :
73 : : /** sets the current value of the "TargetURL" property, taking into account
74 : : that some URLs are special values caused by "virtual" ButtonTypes
75 : : */
76 : : void setCurrentTargetURL( const ::com::sun::star::uno::Any& _rValue ) const SAL_THROW(());
77 : :
78 : : /** retrieves the current state of the "TargetURL" property, taking into account
79 : : that some URLs are special values caused by "virtual" ButtonTypes
80 : : */
81 : : ::com::sun::star::beans::PropertyState
82 : : getCurrentTargetURLState( ) const SAL_THROW(());
83 : :
84 : : /** determines whether the current button tpye is FormButtonType_URL
85 : : */
86 : : bool currentButtonTypeIsOpenURL() const;
87 : :
88 : : /** determines whether the TargetURL property does currently denote a non-empty string
89 : : */
90 : : bool hasNonEmptyCurrentTargetURL() const;
91 : :
92 : : private:
93 : : sal_Int32 implGetCurrentButtonType() const SAL_THROW(( ::com::sun::star::uno::Exception ));
94 : : };
95 : :
96 : : //............................................................................
97 : : } // namespace pcr
98 : : //............................................................................
99 : :
100 : : #endif // EXTENSIONS_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX
101 : :
102 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|