LibreOffice Module sc (master)  1
tphfedit.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 
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_TPHFEDIT_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_TPHFEDIT_HXX
22 
23 #include <scdllapi.h>
24 #include <editutil.hxx>
25 #include <cppuhelper/weakref.hxx>
26 #include <svx/weldeditview.hxx>
27 #include <editeng/svxenum.hxx>
28 
29 #include <functional>
30 
31 namespace com::sun::star::accessibility { class XAccessible; }
32 
33 class ScPatternAttr;
34 class EditView;
35 class EditTextObject;
36 class SvxFieldItem;
38 namespace vcl { class Window; }
39 
41 {
45 };
46 
48 {
49 public:
51  virtual void SetDrawingArea(weld::DrawingArea* pArea) override;
52  virtual ~ScEditWindow() override;
53 
54  void SetFont( const ScPatternAttr& rPattern );
55  void SetText( const EditTextObject& rTextObject );
56  std::unique_ptr<EditTextObject> CreateTextObject();
57  void SetCharAttributes();
58 
59  void InsertField( const SvxFieldItem& rFld );
60 
61  void SetNumType(SvxNumType eNumType);
62 
63  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
64 
65  ScHeaderEditEngine* GetEditEngine() const override;
66  void SetObjectSelectHdl( const Link<ScEditWindow&,void>& aLink) { aObjectSelectLink = aLink; }
67  void SetGetFocusHdl(const std::function<void (ScEditWindow&)>& rLink) { m_GetFocusLink = rLink; }
68 
69 protected:
70  virtual void makeEditEngine() override;
71  virtual bool KeyInput( const KeyEvent& rKEvt ) override;
72  virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
73  virtual void GetFocus() override;
74  virtual void LoseFocus() override;
75 
76 private:
78  bool mbRTL;
80 
81  css::uno::WeakReference< css::accessibility::XAccessible > xAcc;
83 
85  std::function<void (ScEditWindow&)> m_GetFocusLink;
86 
87 };
88 
89 #endif // INCLUDED_SC_SOURCE_UI_INC_TPHFEDIT_HXX
90 
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::function< void(ScEditWindow &)> m_GetFocusLink
Definition: tphfedit.hxx:85
void SetObjectSelectHdl(const Link< ScEditWindow &, void > &aLink)
Definition: tphfedit.hxx:66
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void SetText(const OUString &rStr)
ScAccessibleEditObject * pAcc
Definition: tphfedit.hxx:82
SvxNumType
virtual EditEngine * GetEditEngine() const
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Link< ScEditWindow &, void > aObjectSelectLink
Definition: tphfedit.hxx:84
ScEditWindowLocation
Definition: tphfedit.hxx:40
weld::Window * mpDialog
Definition: tphfedit.hxx:79
css::uno::WeakReference< css::accessibility::XAccessible > xAcc
Definition: tphfedit.hxx:81
virtual void GetFocus() override
void SetGetFocusHdl(const std::function< void(ScEditWindow &)> &rLink)
Definition: tphfedit.hxx:67
virtual bool KeyInput(const KeyEvent &rKEvt) override
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual void makeEditEngine()
virtual void LoseFocus() override
ScEditWindowLocation eLocation
Definition: tphfedit.hxx:77
#define SC_DLLPUBLIC
Definition: scdllapi.h:28
This base class provides an implementation of the AccessibleCell service.