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