LibreOffice Module sw (master)  1
unotools.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 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_UNOTOOLS_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_UNOTOOLS_HXX
21 
22 #include <vcl/button.hxx>
23 #include <vcl/edit.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/layout.hxx>
26 #include <vcl/idle.hxx>
27 #include <vcl/weld.hxx>
28 #include <vcl/customweld.hxx>
29 #include "actctrl.hxx"
30 #include <com/sun/star/frame/XController.hpp>
31 #include <com/sun/star/text/XTextCursor.hpp>
32 #include <com/sun/star/awt/XControl.hpp>
33 #include <swdllapi.h>
34 
35 #define EX_SHOW_ONLINE_LAYOUT 0x001
36 
37 // hard zoom value
38 #define EX_SHOW_BUSINESS_CARDS 0x02
39 //don't modify page size
40 #define EX_SHOW_DEFAULT_PAGE 0x04
41 
42 class SwView;
43 
45 {
47  css::uno::Reference< css::frame::XModel > m_xModel;
48  css::uno::Reference< css::frame::XController > m_xController;
49  css::uno::Reference< css::text::XTextCursor > m_xCursor;
50 
53 
54  OUString m_sArgumentURL;
55 
57 
58  sal_uInt32 const m_nStyleFlags;
59 
61 
62  DECL_DLLPRIVATE_LINK( TimeoutHdl, Timer*, void );
63  void PopupHdl(const OString& rId);
64 
65  SAL_DLLPRIVATE void CreateControl();
66  SAL_DLLPRIVATE void DisposeControl();
67 
68 public:
69  SwOneExampleFrame(sal_uInt32 nStyleFlags,
70  const Link<SwOneExampleFrame&,void>* pInitalizedLink,
71  const OUString* pURL = nullptr);
72  virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
73  virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
74  virtual bool ContextMenu(const CommandEvent& rCEvt) override;
75  virtual ~SwOneExampleFrame() override;
76 
77  css::uno::Reference< css::frame::XModel > & GetModel() {return m_xModel;}
78  css::uno::Reference< css::frame::XController > & GetController() {return m_xController;}
79  css::uno::Reference< css::text::XTextCursor > & GetTextCursor() {return m_xCursor;}
80 
81  void ClearDocument();
82 
83  bool IsInitialized() const {return m_bIsInitialized;}
84 
85  bool CreatePopup(const Point& rPt);
86 };
87 
88 #endif
89 
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::frame::XModel > m_xModel
Definition: unotools.hxx:47
SwView *const m_pModuleView
Definition: unotools.hxx:56
virtual bool ContextMenu(const CommandEvent &)
css::uno::Reference< css::text::XTextCursor > & GetTextCursor()
Definition: unotools.hxx:79
css::uno::Reference< css::text::XTextCursor > m_xCursor
Definition: unotools.hxx:49
OUString m_sArgumentURL
Definition: unotools.hxx:54
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
css::uno::Reference< css::frame::XController > m_xController
Definition: unotools.hxx:48
Link< SwOneExampleFrame &, void > m_aInitializedLink
Definition: unotools.hxx:52
sal_uInt32 const m_nStyleFlags
Definition: unotools.hxx:58
css::uno::Reference< css::frame::XModel > & GetModel()
Definition: unotools.hxx:77
css::uno::Reference< css::frame::XController > & GetController()
Definition: unotools.hxx:78
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea)
bool IsInitialized() const
Definition: unotools.hxx:83
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0
Definition: view.hxx:146
ScopedVclPtr< VirtualDevice > m_xVirDev
Definition: unotools.hxx:46