LibreOffice Module sd (master) 1
SlsPageDescriptor.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#pragma once
21
23#include <tools/gen.hxx>
24#include <com/sun/star/uno/Reference.hxx>
25
26#include <memory>
27
28namespace com::sun::star::drawing { class XDrawPage; }
29
30class SdPage;
31class SdrPage;
32
33namespace sd::slidesorter::model {
34
46 : public ::std::enable_shared_from_this<PageDescriptor>
47{
48public:
62 const css::uno::Reference<css::drawing::XDrawPage>& rxPage,
63 SdPage* pPage,
64 const sal_Int32 nIndex);
65
67
70 SdPage* GetPage() const { return mpPage;}
71
74 const css::uno::Reference<css::drawing::XDrawPage>& GetXDrawPage() const { return mxPage;}
75
81 sal_Int32 GetPageIndex() const { return mnIndex;}
82 void SetPageIndex (const sal_Int32 nIndex);
83
84 bool UpdateMasterPage();
86
89
90 bool HasState (const State eState) const;
91
92 bool SetState (const State eState, const bool bStateValue);
93
103 bool GetCoreSelection();
104
108 void SetCoreSelection();
109
111
113 Point GetLocation (const bool bIgnoreLocation) const;
114 void SetBoundingBox (const ::tools::Rectangle& rBoundingBox);
115
116private:
118 css::uno::Reference<css::drawing::XDrawPage> mxPage;
120
124 sal_Int32 mnIndex;
125
128
129 bool mbIsSelected : 1;
131 bool mbIsVisible : 1;
132 bool mbIsFocused : 1;
133 bool mbIsCurrent : 1;
136
137 PageDescriptor (const PageDescriptor& rDescriptor) = delete;
138
139 PageDescriptor& operator= (const PageDescriptor& rDescriptor) = delete;
140};
141
142} // end of namespace ::sd::slidesorter::model
143
144/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Each PageDescriptor object represents the preview of one draw page, slide, or master page of a Draw o...
bool HasState(const State eState) const
SdPage * GetPage() const
Return the page that is represented by the descriptor as SdPage pointer .
PageDescriptor & operator=(const PageDescriptor &rDescriptor)=delete
bool SetState(const State eState, const bool bStateValue)
::tools::Rectangle GetBoundingBox() const
void SetCoreSelection()
Set the selection flags of the SdPage objects to the corresponding selection states of the page descr...
void SetPageIndex(const sal_Int32 nIndex)
Point GetLocation(const bool bIgnoreLocation) const
PageDescriptor(const css::uno::Reference< css::drawing::XDrawPage > &rxPage, SdPage *pPage, const sal_Int32 nIndex)
Create a PageDescriptor for the given SdPage object.
bool GetCoreSelection()
Set the internal mbIsSelected flag to the selection state of the page.
css::uno::Reference< css::drawing::XDrawPage > mxPage
const css::uno::Reference< css::drawing::XDrawPage > & GetXDrawPage() const
Return the page that is represented by the descriptor as XDrawPage reference.
sal_Int32 mnIndex
This index is displayed as page number in the view.
void SetBoundingBox(const ::tools::Rectangle &rBoundingBox)
sal_Int32 GetPageIndex() const
Returns the index of the page as it is displayed in the view as page number.
PageDescriptor(const PageDescriptor &rDescriptor)=delete
This class gives access to values related to the visualization of page objects.
State