LibreOffice Module sw (master)  1
condedit.hxx
Go to the documentation of this file.
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 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_CONDEDIT_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_CONDEDIT_HXX
21 
22 #include <vcl/transfer.hxx>
23 #include <vcl/weld.hxx>
24 #include <swdllapi.h>
25 
26 class ConditionEdit;
27 
29 {
30 private:
32 
33  SAL_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
34  SAL_DLLPRIVATE virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
35 
36 public:
38 };
39 
41 {
42  std::unique_ptr<weld::Entry> m_xControl;
44  bool bBrackets, bEnableDrop;
45 
46 public:
47  ConditionEdit(std::unique_ptr<weld::Entry> xControl);
48 
49  OUString get_text() const { return m_xControl->get_text(); }
50  void set_text(const OUString& rText) { m_xControl->set_text(rText); }
51  void set_visible(bool bVisible) { m_xControl->set_visible(bVisible); }
52  void set_accessible_name(const OUString& rName) { m_xControl->set_accessible_name(rName); }
53  bool get_sensitive() const { return m_xControl->get_sensitive(); }
54  void save_value() { m_xControl->save_value(); }
55  bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); }
56  void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
57  void connect_changed(const Link<weld::Entry&, void>& rLink) { m_xControl->connect_changed(rLink); }
58  void replace_selection(const OUString& rText) { m_xControl->replace_selection(rText); }
59  void hide() { m_xControl->hide(); }
60  weld::Entry& get_widget() { return *m_xControl; }
61 
62  void ShowBrackets(bool bShow) { bBrackets = bShow; }
63  bool GetBrackets() const { return bBrackets; }
64  void SetDropEnable(bool bFlag) { bEnableDrop = bFlag; }
65  bool GetDropEnable() const { return bEnableDrop; }
66 };
67 
68 #endif
69 
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
weld::Entry & get_widget()
Definition: condedit.hxx:60
void save_value()
Definition: condedit.hxx:54
signed char sal_Int8
void hide()
Definition: condedit.hxx:59
bool bEnableDrop
Definition: condedit.hxx:44
void connect_changed(const Link< weld::Entry &, void > &rLink)
Definition: condedit.hxx:57
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt)
void SetDropEnable(bool bFlag)
Definition: condedit.hxx:64
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt)
void set_visible(bool bVisible)
Definition: condedit.hxx:51
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
bool get_value_changed_from_saved() const
Definition: condedit.hxx:55
void set_accessible_name(const OUString &rName)
Definition: condedit.hxx:52
void set_sensitive(bool bSensitive)
Definition: condedit.hxx:56
void set_text(const OUString &rText)
Definition: condedit.hxx:50
ConditionEditDropTarget m_aDropTargetHelper
Definition: condedit.hxx:43
bool get_sensitive() const
Definition: condedit.hxx:53
bool GetDropEnable() const
Definition: condedit.hxx:65
OUString get_text() const
Definition: condedit.hxx:49
std::unique_ptr< weld::Entry > m_xControl
Definition: condedit.hxx:42
bool GetBrackets() const
Definition: condedit.hxx:63
ConditionEdit & m_rEdit
Definition: condedit.hxx:31
void ShowBrackets(bool bShow)
Definition: condedit.hxx:62
void replace_selection(const OUString &rText)
Definition: condedit.hxx:58