LibreOffice Module sfx2 (master) 1
backingwindow.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#ifndef INCLUDED_SFX2_SOURCE_DIALOG_BACKINGWINDOW_HXX
21#define INCLUDED_SFX2_SOURCE_DIALOG_BACKINGWINDOW_HXX
22
23#include <rtl/ustring.hxx>
24
26
27#include <recentdocsview.hxx>
29
31
32#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
33#include <com/sun/star/uno/XComponentContext.hpp>
34#include <com/sun/star/frame/XDispatchProvider.hpp>
35#include <com/sun/star/frame/XFrame.hpp>
36
37#include <memory>
38
39class BrandImage;
40
42{
43 css::uno::Reference<css::uno::XComponentContext> mxContext;
44 css::uno::Reference<css::frame::XDispatchProvider> mxDesktopDispatchProvider;
45 css::uno::Reference<css::frame::XFrame> mxFrame;
46
48 css::uno::Reference<css::datatransfer::dnd::XDropTargetListener> mxDropTargetListener;
49
50 std::unique_ptr<weld::Button> mxOpenButton;
51 std::unique_ptr<weld::ToggleButton> mxRecentButton;
52 std::unique_ptr<weld::Button> mxRemoteButton;
53 std::unique_ptr<weld::ToggleButton> mxTemplateButton;
54
55 std::unique_ptr<weld::Label> mxCreateLabel;
56 std::unique_ptr<weld::Label> mxAltHelpLabel;
57 std::unique_ptr<weld::ComboBox> mxFilter;
58 std::unique_ptr<weld::MenuButton> mxActions;
59
60 std::unique_ptr<weld::Button> mxWriterAllButton;
61 std::unique_ptr<weld::Button> mxCalcAllButton;
62 std::unique_ptr<weld::Button> mxImpressAllButton;
63 std::unique_ptr<weld::Button> mxDrawAllButton;
64 std::unique_ptr<weld::Button> mxDBAllButton;
65 std::unique_ptr<weld::Button> mxMathAllButton;
66 std::unique_ptr<BrandImage> mxBrandImage;
67 std::unique_ptr<weld::CustomWeld> mxBrandImageWeld;
68
69 std::unique_ptr<weld::Button> mxHelpButton;
70 std::unique_ptr<weld::Button> mxExtensionsButton;
71
72 std::unique_ptr<weld::Container> mxAllButtonsBox;
73 std::unique_ptr<weld::Container> mxButtonsBox;
74 std::unique_ptr<weld::Container> mxSmallButtonsBox;
75
76 std::unique_ptr<sfx2::RecentDocsView> mxAllRecentThumbnails;
77 std::unique_ptr<weld::CustomWeld> mxAllRecentThumbnailsWin;
78 std::unique_ptr<TemplateDefaultView> mxLocalView;
79 std::unique_ptr<weld::CustomWeld> mxLocalViewWin;
81
82 css::uno::Reference<css::datatransfer::dnd::XDropTarget> mxDropTarget;
83
85 std::unique_ptr<svt::AcceleratorExecute> mpAccExec;
86
87 void dispatchURL(const OUString& i_rURL, const OUString& i_rTarget = OUString("_default"),
88 const css::uno::Reference<css::frame::XDispatchProvider>& i_xProv
89 = css::uno::Reference<css::frame::XDispatchProvider>(),
90 const css::uno::Sequence<css::beans::PropertyValue>& = css::uno::Sequence<
91 css::beans::PropertyValue>());
92
93 DECL_LINK(ToggleHdl, weld::Toggleable&, void);
94 DECL_LINK(FilterHdl, weld::ComboBox&, void);
95 DECL_LINK(ClickHdl, weld::Button&, void);
96 DECL_LINK(ClickHelpHdl, weld::Button&, void);
97 DECL_LINK(MenuSelectHdl, const OUString&, void);
98 DECL_LINK(ExtLinkClickHdl, weld::Button&, void);
99 DECL_LINK(CreateContextMenuHdl, ThumbnailViewItem*, void);
100 DECL_LINK(OpenTemplateHdl, ThumbnailViewItem*, void);
101 DECL_LINK(EditTemplateHdl, ThumbnailViewItem*, void);
102
103 void initControls();
104
105 void initializeLocalView();
106
108
109 void DataChanged(const DataChangedEvent&) override;
110
111 template <typename WidgetClass> void setLargerFont(WidgetClass&, const vcl::Font&);
112 void ApplyStyleSettings();
113
114private:
115 void applyFilter();
116
117public:
118 explicit BackingWindow(vcl::Window* pParent);
119 virtual ~BackingWindow() override;
120 virtual void dispose() override;
121
122 virtual bool PreNotify(NotifyEvent& rNEvt) override;
123 virtual void GetFocus() override;
124
125 void setOwningFrame(const css::uno::Reference<css::frame::XFrame>& xFrame);
126
127 void clearRecentFileList();
128};
129
130#endif
131
132/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< sfx2::RecentDocsView > mxAllRecentThumbnails
std::unique_ptr< weld::Button > mxExtensionsButton
virtual bool PreNotify(NotifyEvent &rNEvt) override
std::unique_ptr< weld::CustomWeld > mxAllRecentThumbnailsWin
std::unique_ptr< weld::Button > mxDrawAllButton
std::unique_ptr< weld::Button > mxWriterAllButton
DECL_LINK(FilterHdl, weld::ComboBox &, void)
std::unique_ptr< weld::ToggleButton > mxRecentButton
std::unique_ptr< TemplateDefaultView > mxLocalView
void clearRecentFileList()
std::unique_ptr< weld::Container > mxSmallButtonsBox
DECL_LINK(CreateContextMenuHdl, ThumbnailViewItem *, void)
DECL_LINK(ClickHelpHdl, weld::Button &, void)
std::unique_ptr< weld::MenuButton > mxActions
std::unique_ptr< BrandImage > mxBrandImage
css::uno::Reference< css::datatransfer::dnd::XDropTarget > mxDropTarget
void setLargerFont(WidgetClass &, const vcl::Font &)
bool mbLocalViewInitialized
DECL_LINK(EditTemplateHdl, ThumbnailViewItem *, void)
css::uno::Reference< css::uno::XComponentContext > mxContext
std::unique_ptr< weld::Button > mxImpressAllButton
DECL_LINK(MenuSelectHdl, const OUString &, void)
std::unique_ptr< weld::Button > mxCalcAllButton
std::unique_ptr< weld::CustomWeld > mxBrandImageWeld
BackingWindow(vcl::Window *pParent)
DECL_LINK(ToggleHdl, weld::Toggleable &, void)
DECL_LINK(ExtLinkClickHdl, weld::Button &, void)
DECL_LINK(ClickHdl, weld::Button &, void)
std::unique_ptr< weld::Container > mxButtonsBox
void ApplyStyleSettings()
void checkInstalledModules()
std::unique_ptr< weld::Container > mxAllButtonsBox
std::unique_ptr< weld::ComboBox > mxFilter
std::unique_ptr< weld::Button > mxMathAllButton
std::unique_ptr< weld::Button > mxDBAllButton
std::unique_ptr< weld::Button > mxOpenButton
void DataChanged(const DataChangedEvent &) override
virtual ~BackingWindow() override
void dispatchURL(const OUString &i_rURL, const OUString &i_rTarget=OUString("_default"), const css::uno::Reference< css::frame::XDispatchProvider > &i_xProv=css::uno::Reference< css::frame::XDispatchProvider >(), const css::uno::Sequence< css::beans::PropertyValue > &=css::uno::Sequence< css::beans::PropertyValue >())
std::unique_ptr< weld::Label > mxAltHelpLabel
css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > mxDropTargetListener
helper for drag&drop.
void initializeLocalView()
std::unique_ptr< weld::ToggleButton > mxTemplateButton
std::unique_ptr< weld::Button > mxHelpButton
void setOwningFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
std::unique_ptr< weld::CustomWeld > mxLocalViewWin
virtual void GetFocus() override
DECL_LINK(OpenTemplateHdl, ThumbnailViewItem *, void)
css::uno::Reference< css::frame::XFrame > mxFrame
std::unique_ptr< weld::Button > mxRemoteButton
css::uno::Reference< css::frame::XDispatchProvider > mxDesktopDispatchProvider
std::unique_ptr< weld::Label > mxCreateLabel
std::unique_ptr< svt::AcceleratorExecute > mpAccExec
virtual void dispose() override