LibreOffice Module cui (master) 1
iconcdlg.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#pragma once
20
21#include <rtl/ustring.hxx>
22#include <sfx2/tabdlg.hxx>
23#include <utility>
24
25// forward-declarations
27class SvxHpLinkDlg;
28class IconChoicePage;
29class SfxItemPool;
30class SfxItemSet;
31
32// Create-Function
33typedef std::unique_ptr<IconChoicePage> (*CreatePage)(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pAttrSet);
34
36{
37protected:
38 std::unique_ptr<weld::Builder> xBuilder;
39 std::unique_ptr<weld::Container> xContainer;
40
41private:
44
45protected:
46
47 IconChoicePage(weld::Container* pParent, const OUString& rUIXMLDescription, const OUString& rID, const SfxItemSet* pItemSet);
48
49public:
50 virtual ~IconChoicePage();
51
52 OUString GetHelpId() const { return xContainer->get_help_id(); }
53
54 const SfxItemSet& GetItemSet() const { return *pSet; }
55
56 virtual bool FillItemSet( SfxItemSet* ) = 0;
57 virtual void Reset( const SfxItemSet& ) = 0;
58
59 bool HasExchangeSupport() const { return bHasExchangeSupport; }
61
62 virtual void ActivatePage( const SfxItemSet& );
64 virtual bool QueryClose();
65};
66
69{
70 OUString sId;
71 std::unique_ptr<IconChoicePage> xPage;
72 bool bRefresh;
73
74 // constructor
75 IconChoicePageData(OUString aId, std::unique_ptr<IconChoicePage> xInPage)
76 : sId(std::move(aId))
77 , xPage(std::move(xInPage))
78 , bRefresh(false)
79 {}
80};
81
82/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SfxItemSet * pSet
Definition: iconcdlg.hxx:42
bool bHasExchangeSupport
Definition: iconcdlg.hxx:43
IconChoicePage(weld::Container *pParent, const OUString &rUIXMLDescription, const OUString &rID, const SfxItemSet *pItemSet)
Definition: iconcdlg.cxx:33
const SfxItemSet & GetItemSet() const
Definition: iconcdlg.hxx:54
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet)
Definition: iconcdlg.cxx:58
std::unique_ptr< weld::Builder > xBuilder
Definition: iconcdlg.hxx:38
virtual ~IconChoicePage()
Definition: iconcdlg.cxx:43
virtual bool FillItemSet(SfxItemSet *)=0
OUString GetHelpId() const
Definition: iconcdlg.hxx:52
bool HasExchangeSupport() const
Definition: iconcdlg.hxx:59
virtual bool QueryClose()
Definition: iconcdlg.cxx:63
virtual void Reset(const SfxItemSet &)=0
std::unique_ptr< weld::Container > xContainer
Definition: iconcdlg.hxx:39
void SetExchangeSupport()
Definition: iconcdlg.hxx:60
virtual void ActivatePage(const SfxItemSet &)
Definition: iconcdlg.cxx:53
std::unique_ptr< IconChoicePage >(* CreatePage)(weld::Container *pParent, SvxHpLinkDlg *pDlg, const SfxItemSet *pAttrSet)
Definition: iconcdlg.hxx:33
Data-structure for pages in dialog.
Definition: iconcdlg.hxx:69
std::unique_ptr< IconChoicePage > xPage
the TabPage itself
Definition: iconcdlg.hxx:71
IconChoicePageData(OUString aId, std::unique_ptr< IconChoicePage > xInPage)
Definition: iconcdlg.hxx:75
bool bRefresh
Flag: page has to be newly initialized.
Definition: iconcdlg.hxx:72
DeactivateRC