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