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