Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / extensions / source / propctrlr / pushbuttonnavigation.hxx
blob1b93c14752885c728b3b6041ba93dcd61c4d5a29
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 final
36 css::uno::Reference< css::beans::XPropertySet >
37 m_xControlModel;
38 bool m_bIsPushButton;
40 public:
41 /** ctor
42 @param _rxControlModel
43 the control model which is or will be bound
45 explicit PushButtonNavigation(
46 const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel
49 /** returns the current value of the "ButtonType" property, taking into account
50 the "virtual" button types such as "move-to-next-record button".
52 css::uno::Any
53 getCurrentButtonType() const;
55 /** sets the current value of the "ButtonType" property, taking into account
56 the "virtual" button types such as "move-to-next-record button".
58 void setCurrentButtonType( const css::uno::Any& _rValue ) const;
60 /** retrieves the current state of the "ButtonType" property, taking into account
61 the "virtual" button types such as "move-to-next-record button".
63 css::beans::PropertyState
64 getCurrentButtonTypeState( ) const;
66 /** returns the current value of the "TargetURL" property, taking into account
67 that some URLs are special values caused by "virtual" ButtonTypes
69 css::uno::Any
70 getCurrentTargetURL() const;
72 /** sets the current value of the "TargetURL" property, taking into account
73 that some URLs are special values caused by "virtual" ButtonTypes
75 void setCurrentTargetURL( const css::uno::Any& _rValue ) const;
77 /** retrieves the current state of the "TargetURL" property, taking into account
78 that some URLs are special values caused by "virtual" ButtonTypes
80 css::beans::PropertyState
81 getCurrentTargetURLState( ) const;
83 /** determines whether the current button type is FormButtonType_URL
85 bool currentButtonTypeIsOpenURL() const;
87 /** determines whether the TargetURL property does currently denote a non-empty string
89 bool hasNonEmptyCurrentTargetURL() const;
91 private:
92 css::form::FormButtonType implGetCurrentButtonType() const;
96 } // namespace pcr
99 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_PUSHBUTTONNAVIGATION_HXX
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */