LibreOffice Module sfx2 (master) 1
frmdescr.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_SFX2_FRMDESCR_HXX
20#define INCLUDED_SFX2_FRMDESCR_HXX
21
22#include <memory>
23#include <rtl/ustring.hxx>
24#include <sal/config.h>
25#include <sfx2/dllapi.h>
26#include <tools/gen.hxx>
27#include <tools/urlobj.hxx>
28
29// The SfxFrame descriptors build a recursive structure, that covers all the
30// required data in-order to display the frame document.
31// Through a SfxFrameSetDescriptor access is given to the whole underlying
32// structure. Due to the nature of the SfxFrames document, the
33// SfxFramesSetDescriptor is not only the content of this document, but also
34// describes the view on it. The FrameSet is made up of lines, which in turn,
35// contains the actual window . A line can be horizontally or vertically
36// aligned, from which also the alignment of the FrameSet is given.
37
38
39enum class ScrollingMode
40{
41 Yes,
42 No,
43 Auto
44};
45
46#define SIZE_NOT_SET -1L
47
48class SfxItemSet;
49
51{
53 OUString aName;
58 std::unique_ptr<SfxItemSet> m_pArgs;
59
60public:
63
64 // FileName/URL
65 SfxItemSet* GetArgs();
66 const INetURLObject& GetURL() const
67 { return aURL; }
68 void SetURL( std::u16string_view rURL );
69 void SetActualURL();
70
71 // FrameName
72 const OUString& GetName() const
73 { return aName; }
74 void SetName( const OUString& rName )
75 { aName = rName; }
76
77 // Margin, Scrolling
78 const Size& GetMargin() const
79 { return aMargin; }
80 void SetMargin( const Size& rMargin )
81 { aMargin = rMargin; }
83 { return eScroll; }
85 { eScroll = eMode; }
86
87 // FrameBorder
88 bool HasFrameBorder() const
89 { return bHasBorder; }
90 bool IsFrameBorderOn() const
91 { return bHasBorder; }
92 void SetFrameBorder( bool bBorder )
93 { bHasBorder = bBorder; bHasBorderSet = true; }
94 bool IsFrameBorderSet() const
95 { return bHasBorderSet; }
97 { bHasBorder = false; bHasBorderSet = false; }
98};
99
100#endif // INCLUDED_SFX2_FRMDESCR_HXX
101
102/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SfxItemSet > m_pArgs
Definition: frmdescr.hxx:58
void SetScrollingMode(ScrollingMode eMode)
Definition: frmdescr.hxx:84
void SetName(const OUString &rName)
Definition: frmdescr.hxx:74
ScrollingMode eScroll
Definition: frmdescr.hxx:55
void SetFrameBorder(bool bBorder)
Definition: frmdescr.hxx:92
INetURLObject aURL
Definition: frmdescr.hxx:52
const Size & GetMargin() const
Definition: frmdescr.hxx:78
const OUString & GetName() const
Definition: frmdescr.hxx:72
bool IsFrameBorderSet() const
Definition: frmdescr.hxx:94
void SetMargin(const Size &rMargin)
Definition: frmdescr.hxx:80
bool IsFrameBorderOn() const
Definition: frmdescr.hxx:90
bool HasFrameBorder() const
Definition: frmdescr.hxx:88
const INetURLObject & GetURL() const
Definition: frmdescr.hxx:66
ScrollingMode GetScrollingMode() const
Definition: frmdescr.hxx:82
URL aURL
#define SFX2_DLLPUBLIC
Definition: dllapi.h:29
ScrollingMode
Definition: frmdescr.hxx:40
OUString aName
Mode eMode
No
Yes