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