lok: calc - send other views our selection in their co-ordinates.
[LibreOffice.git] / include / sfx2 / frmdescr.hxx
blob196a2ccc9356a5bd923ba67809f3683b9d5fb342
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SFX2_FRMDESCR_HXX
20 #define INCLUDED_SFX2_FRMDESCR_HXX
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>
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.
39 enum class ScrollingMode
41 Yes,
42 No,
43 Auto
46 #define SIZE_NOT_SET -1L
48 class SfxItemSet;
50 class SFX2_DLLPUBLIC SfxFrameDescriptor
52 INetURLObject aURL;
53 OUString aName;
54 Size aMargin;
55 ScrollingMode eScroll;
56 bool bHasBorder;
57 bool bHasBorderSet;
58 std::unique_ptr<SfxItemSet> m_pArgs;
60 public:
61 SfxFrameDescriptor();
62 ~SfxFrameDescriptor();
64 // FileName/URL
65 SfxItemSet* GetArgs();
66 const INetURLObject& GetURL() const
67 { return aURL; }
68 void SetURL( const OUString& rURL );
69 void SetActualURL( const OUString& rURL );
71 // FrameName
72 const OUString& GetName() const
73 { return aName; }
74 void SetName( const OUString& rName )
75 { aName = rName; }
77 // Margin, Scrolling
78 const Size& GetMargin() const
79 { return aMargin; }
80 void SetMargin( const Size& rMargin )
81 { aMargin = rMargin; }
82 ScrollingMode GetScrollingMode() const
83 { return eScroll; }
84 void SetScrollingMode( ScrollingMode eMode )
85 { eScroll = eMode; }
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; }
96 void ResetBorder()
97 { bHasBorder = false; bHasBorderSet = false; }
100 #endif // INCLUDED_SFX2_FRMDESCR_HXX
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */