LibreOffice Module sd (master) 1
futext.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 "fuconstr.hxx"
23#include <svx/svdotext.hxx>
24#include <unotools/weakref.hxx>
25
26class FontList;
27class OutlinerView;
28
29namespace sd {
30
34class FuText
35 : public FuConstruct
36{
37public:
38
39 static rtl::Reference<FuPoor> Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
40 virtual void DoExecute( SfxRequest& rReq ) override;
41
42 virtual bool KeyInput(const KeyEvent& rKEvt) override;
43 virtual bool MouseMove(const MouseEvent& rMEvt) override;
44 virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
45 virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
46 virtual bool RequestHelp(const HelpEvent& rHEvt) override;
47 virtual void ReceiveRequest(SfxRequest& rReq) override;
48 virtual void DoubleClick(const MouseEvent& rMEvt) override;
49
50 virtual void Activate() override;
51 virtual void Deactivate() override;
52
53 void SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag);
54 void DeleteDefaultText();
55 SdrTextObj* GetTextObj() { return mxTextObj.get().get(); }
56
57 virtual rtl::Reference<SdrObject> CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override;
58
65 virtual bool cancel() override;
66
67 static void ChangeFontSize( bool, OutlinerView*, const FontList*, ::sd::View* );
68
69 void InvalidateBindings();
70
71
72protected:
73 FuText (ViewShell* pViewSh,
74 ::sd::Window* pWin,
75 ::sd::View* pView,
76 SdDrawDocument* pDoc,
77 SfxRequest& rReq);
78
79private:
80 virtual void disposing() override;
81
86
88
92};
93
94} // end of namespace sd
95
96/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class for text functions.
Definition: futext.hxx:36
SdrTextObj * GetTextObj()
Definition: futext.hxx:55
virtual void DoubleClick(const MouseEvent &rMEvt) override
Response of doubleclick.
Definition: futext.cxx:1273
void InvalidateBindings()
Definition: futext.cxx:1408
void ImpSetAttributesFitToSizeVertical(SdrTextObj *pTxtObj)
Definition: futext.cxx:554
virtual rtl::Reference< SdrObject > CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle &rRectangle) override
Removed the insertion of default text and putting a new text object directly into edit mode.
Definition: futext.cxx:1281
virtual void Activate() override
activates the function
Definition: futext.cxx:954
SfxRequest & rRequest
Definition: futext.hxx:87
virtual void disposing() override
Definition: futext.cxx:151
void ImpSetAttributesFitToSize(SdrTextObj *pTxtObj)
Definition: futext.cxx:543
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: futext.cxx:484
bool bFirstObjCreated
Definition: futext.hxx:84
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: futext.cxx:246
void SetInEditMode(const MouseEvent &rMEvt, bool bQuickDrag)
Sets the object into the edit mode.
Definition: futext.cxx:988
bool bJustEndedEdit
Definition: futext.hxx:85
void ImpSetAttributesForNewTextObject(SdrTextObj *pTxtObj)
Definition: futext.cxx:510
::unotools::WeakReference< SdrTextObj > mxTextObj
Definition: futext.hxx:83
virtual bool RequestHelp(const HelpEvent &rHEvt) override
Definition: futext.cxx:1161
virtual bool KeyInput(const KeyEvent &rKEvt) override
handle keyboard events
Definition: futext.cxx:881
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: futext.cxx:564
virtual void Deactivate() override
deactivates the function
Definition: futext.cxx:973
virtual void ReceiveRequest(SfxRequest &rReq) override
Definition: futext.cxx:1206
virtual void DoExecute(SfxRequest &rReq) override
Definition: futext.cxx:180
static void ChangeFontSize(bool, OutlinerView *, const FontList *, ::sd::View *)
Definition: futext.cxx:1345
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: futext.cxx:145
void DeleteDefaultText()
Text entry is started, if necessary delete the default text.
Definition: futext.cxx:1124
FuText(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
base class for text functions
Definition: futext.cxx:137
virtual bool cancel() override
is called when the current function should be aborted.
Definition: futext.cxx:1328
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
rtl::Reference< interface_type > SAL_CALL get() const