Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / extensions / source / propctrlr / pushbuttonnavigation.hxx
blob2ee906b0c406505c542e7414618f8d5dd3d44be9
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 .
20 #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX
21 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/beans/PropertyState.hpp>
25 #include <com/sun/star/form/FormButtonType.hpp>
28 namespace pcr
32 //= PushButtonNavigation
34 class PushButtonNavigation
36 protected:
37 css::uno::Reference< css::beans::XPropertySet >
38 m_xControlModel;
39 bool m_bIsPushButton;
41 public:
42 /** ctor
43 @param _rxControlModel
44 the control model which is or will be bound
46 explicit PushButtonNavigation(
47 const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel
50 /** returns the current value of the "ButtonType" property, taking into account
51 the "virtual" button types such as "move-to-next-record button".
53 css::uno::Any
54 getCurrentButtonType() const;
56 /** sets the current value of the "ButtonType" property, taking into account
57 the "virtual" button types such as "move-to-next-record button".
59 void setCurrentButtonType( const css::uno::Any& _rValue ) const;
61 /** retrieves the current state of the "ButtonType" property, taking into account
62 the "virtual" button types such as "move-to-next-record button".
64 css::beans::PropertyState
65 getCurrentButtonTypeState( ) const;
67 /** returns the current value of the "TargetURL" property, taking into account
68 that some URLs are special values caused by "virtual" ButtonTypes
70 css::uno::Any
71 getCurrentTargetURL() const;
73 /** sets the current value of the "TargetURL" property, taking into account
74 that some URLs are special values caused by "virtual" ButtonTypes
76 void setCurrentTargetURL( const css::uno::Any& _rValue ) const;
78 /** retrieves the current state of the "TargetURL" property, taking into account
79 that some URLs are special values caused by "virtual" ButtonTypes
81 css::beans::PropertyState
82 getCurrentTargetURLState( ) const;
84 /** determines whether the current button tpye is FormButtonType_URL
86 bool currentButtonTypeIsOpenURL() const;
88 /** determines whether the TargetURL property does currently denote a non-empty string
90 bool hasNonEmptyCurrentTargetURL() const;
92 private:
93 css::form::FormButtonType implGetCurrentButtonType() const;
97 } // namespace pcr
100 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */