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 #pragma once
21 
22 #include <scdllapi.h>
23 #include <editutil.hxx>
24 #include <cppuhelper/weakref.hxx>
25 #include <svx/weldeditview.hxx>
26 #include <editeng/svxenum.hxx>
27 #include <unotools/weakref.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 
40 {
44 };
45 
47 {
48 public:
50  virtual void SetDrawingArea(weld::DrawingArea* pArea) override;
51  virtual ~ScEditWindow() override;
52 
53  void SetFont( const ScPatternAttr& rPattern );
54  void SetText( const EditTextObject& rTextObject );
55  std::unique_ptr<EditTextObject> CreateTextObject();
56  void SetCharAttributes();
57 
58  void InsertField( const SvxFieldItem& rFld );
59 
60  void SetNumType(SvxNumType eNumType);
61 
62  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
63 
64  ScHeaderEditEngine* GetEditEngine() const override;
65  void SetObjectSelectHdl( const Link<ScEditWindow&,void>& aLink) { aObjectSelectLink = aLink; }
66  void SetGetFocusHdl(const std::function<void (ScEditWindow&)>& rLink) { m_GetFocusLink = rLink; }
67 
68 protected:
69  virtual void makeEditEngine() override;
70  virtual bool KeyInput( const KeyEvent& rKEvt ) override;
71  virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
72  virtual void GetFocus() override;
73  virtual void LoseFocus() override;
74 
75 private:
77  bool mbRTL;
79 
81 
83  std::function<void (ScEditWindow&)> m_GetFocusLink;
84 
85 };
86 
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::function< void(ScEditWindow &)> m_GetFocusLink
Definition: tphfedit.hxx:83
void SetObjectSelectHdl(const Link< ScEditWindow &, void > &aLink)
Definition: tphfedit.hxx:65
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void SetText(const OUString &rStr)
SvxNumType
virtual EditEngine * GetEditEngine() const
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Link< ScEditWindow &, void > aObjectSelectLink
Definition: tphfedit.hxx:82
ScEditWindowLocation
Definition: tphfedit.hxx:39
weld::Window * mpDialog
Definition: tphfedit.hxx:78
virtual void GetFocus() override
void SetGetFocusHdl(const std::function< void(ScEditWindow &)> &rLink)
Definition: tphfedit.hxx:66
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:76
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
unotools::WeakReference< ScAccessibleEditObject > mxAcc
Definition: tphfedit.hxx:80
This base class provides an implementation of the AccessibleCell service.