LibreOffice Module sd (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
sd::slidesorter::model::PageDescriptor Class Reference

Each PageDescriptor object represents the preview of one draw page, slide, or master page of a Draw or Impress document as they are displayed in the slide sorter. More...

#include <SlsPageDescriptor.hxx>

Inheritance diagram for sd::slidesorter::model::PageDescriptor:
[legend]
Collaboration diagram for sd::slidesorter::model::PageDescriptor:
[legend]

Public Types

enum  State {
  ST_Visible ,
  ST_Selected ,
  ST_WasSelected ,
  ST_Focused ,
  ST_MouseOver ,
  ST_Current ,
  ST_Excluded
}
 

Public Member Functions

 PageDescriptor (const css::uno::Reference< css::drawing::XDrawPage > &rxPage, SdPage *pPage, const sal_Int32 nIndex)
 Create a PageDescriptor for the given SdPage object. More...
 
 ~PageDescriptor ()
 
SdPageGetPage () const
 Return the page that is represented by the descriptor as SdPage pointer . More...
 
const css::uno::Reference< css::drawing::XDrawPage > & GetXDrawPage () const
 Return the page that is represented by the descriptor as XDrawPage reference. More...
 
sal_Int32 GetPageIndex () const
 Returns the index of the page as it is displayed in the view as page number. More...
 
void SetPageIndex (const sal_Int32 nIndex)
 
bool UpdateMasterPage ()
 
bool UpdateTransitionFlag ()
 
bool HasState (const State eState) const
 
bool SetState (const State eState, const bool bStateValue)
 
bool GetCoreSelection ()
 Set the internal mbIsSelected flag to the selection state of the page. More...
 
void SetCoreSelection ()
 Set the selection flags of the SdPage objects to the corresponding selection states of the page descriptors. More...
 
VisualStateGetVisualState ()
 
::tools::Rectangle GetBoundingBox () const
 
Point GetLocation (const bool bIgnoreLocation) const
 
void SetBoundingBox (const ::tools::Rectangle &rBoundingBox)
 

Private Member Functions

 PageDescriptor (const PageDescriptor &rDescriptor)=delete
 
PageDescriptoroperator= (const PageDescriptor &rDescriptor)=delete
 

Private Attributes

SdPagempPage
 
css::uno::Reference< css::drawing::XDrawPage > mxPage
 
SdrPage const * mpMasterPage
 
sal_Int32 mnIndex
 This index is displayed as page number in the view. More...
 
::tools::Rectangle maBoundingBox
 
VisualState maVisualState
 
bool mbIsSelected: 1
 
bool mbWasSelected: 1
 
bool mbIsVisible: 1
 
bool mbIsFocused: 1
 
bool mbIsCurrent: 1
 
bool mbIsMouseOver: 1
 
bool mbHasTransition: 1
 

Detailed Description

Each PageDescriptor object represents the preview of one draw page, slide, or master page of a Draw or Impress document as they are displayed in the slide sorter.

This class gives access to some associated information like prerendered preview or position on the screen.

Bounding boxes of page objects come in four varieties: Model and screen/pixel coordinates and the bounding boxes of the actual page objects and the larger bounding boxes that include page names and fade symbol.

Definition at line 45 of file SlsPageDescriptor.hxx.

Member Enumeration Documentation

◆ State

Enumerator
ST_Visible 
ST_Selected 
ST_WasSelected 
ST_Focused 
ST_MouseOver 
ST_Current 
ST_Excluded 

Definition at line 87 of file SlsPageDescriptor.hxx.

Constructor & Destructor Documentation

◆ PageDescriptor() [1/2]

sd::slidesorter::model::PageDescriptor::PageDescriptor ( const css::uno::Reference< css::drawing::XDrawPage > &  rxPage,
SdPage pPage,
const sal_Int32  nIndex 
)

Create a PageDescriptor for the given SdPage object.

Parameters
rxPageThe page that is represented by the new PageDescriptor object.
pPageThe page pointer can in some situations not be detected from rxPage, e.g. after undo of page deletion. Therefore supply it separately.
nIndexThis index is displayed in the view as page number. It is not necessarily the page index (not even when you add or subtract 1 or use (x-1)/2 magic).

◆ ~PageDescriptor()

sd::slidesorter::model::PageDescriptor::~PageDescriptor ( )

Definition at line 57 of file SlsPageDescriptor.cxx.

◆ PageDescriptor() [2/2]

sd::slidesorter::model::PageDescriptor::PageDescriptor ( const PageDescriptor rDescriptor)
privatedelete

Member Function Documentation

◆ GetBoundingBox()

tools::Rectangle sd::slidesorter::model::PageDescriptor::GetBoundingBox ( ) const

Definition at line 203 of file SlsPageDescriptor.cxx.

References tools::Rectangle::Move(), Point::X(), and Point::Y().

◆ GetCoreSelection()

bool sd::slidesorter::model::PageDescriptor::GetCoreSelection ( )

Set the internal mbIsSelected flag to the selection state of the page.

Use this method to synchronize a page descriptor with the page it describes and determine whether a redraw to update the selection indicator is necessary.

Returns
When the two selection states were different <TRUE> is returned. When they were the same this method returns <FALSE>.

Definition at line 182 of file SlsPageDescriptor.cxx.

References mbIsSelected, and mpPage.

◆ GetLocation()

Point sd::slidesorter::model::PageDescriptor::GetLocation ( const bool  bIgnoreLocation) const

Definition at line 211 of file SlsPageDescriptor.cxx.

◆ GetPage()

SdPage * sd::slidesorter::model::PageDescriptor::GetPage ( ) const
inline

Return the page that is represented by the descriptor as SdPage pointer .

Definition at line 70 of file SlsPageDescriptor.hxx.

References mpPage.

◆ GetPageIndex()

sal_Int32 sd::slidesorter::model::PageDescriptor::GetPageIndex ( ) const
inline

Returns the index of the page as it is displayed in the view as page number.

The value may differ from the index returned by the XDrawPage when there are hidden slides and the XIndexAccess used to access the model filters them out.

Definition at line 81 of file SlsPageDescriptor.hxx.

References mnIndex.

◆ GetVisualState()

VisualState & sd::slidesorter::model::PageDescriptor::GetVisualState ( )
inline

Definition at line 110 of file SlsPageDescriptor.hxx.

References maVisualState.

◆ GetXDrawPage()

const css::uno::Reference< css::drawing::XDrawPage > & sd::slidesorter::model::PageDescriptor::GetXDrawPage ( ) const
inline

Return the page that is represented by the descriptor as XDrawPage reference.

Definition at line 74 of file SlsPageDescriptor.hxx.

References mxPage.

◆ HasState()

bool sd::slidesorter::model::PageDescriptor::HasState ( const State  eState) const

Definition at line 95 of file SlsPageDescriptor.cxx.

References mbIsSelected, and mpPage.

◆ operator=()

PageDescriptor & sd::slidesorter::model::PageDescriptor::operator= ( const PageDescriptor rDescriptor)
privatedelete

◆ SetBoundingBox()

void sd::slidesorter::model::PageDescriptor::SetBoundingBox ( const ::tools::Rectangle rBoundingBox)

Definition at line 219 of file SlsPageDescriptor.cxx.

◆ SetCoreSelection()

void sd::slidesorter::model::PageDescriptor::SetCoreSelection ( )

Set the selection flags of the SdPage objects to the corresponding selection states of the page descriptors.

Definition at line 190 of file SlsPageDescriptor.cxx.

References mpPage.

◆ SetPageIndex()

void sd::slidesorter::model::PageDescriptor::SetPageIndex ( const sal_Int32  nIndex)

Definition at line 61 of file SlsPageDescriptor.cxx.

References mnIndex.

◆ SetState()

bool sd::slidesorter::model::PageDescriptor::SetState ( const State  eState,
const bool  bStateValue 
)

Definition at line 126 of file SlsPageDescriptor.cxx.

References mbIsSelected, and mpPage.

◆ UpdateMasterPage()

bool sd::slidesorter::model::PageDescriptor::UpdateMasterPage ( )

Definition at line 67 of file SlsPageDescriptor.cxx.

References mpPage.

◆ UpdateTransitionFlag()

bool sd::slidesorter::model::PageDescriptor::UpdateTransitionFlag ( )

Definition at line 81 of file SlsPageDescriptor.cxx.

References mpPage.

Member Data Documentation

◆ maBoundingBox

::tools::Rectangle sd::slidesorter::model::PageDescriptor::maBoundingBox
private

Definition at line 126 of file SlsPageDescriptor.hxx.

◆ maVisualState

VisualState sd::slidesorter::model::PageDescriptor::maVisualState
private

Definition at line 127 of file SlsPageDescriptor.hxx.

Referenced by GetVisualState().

◆ mbHasTransition

bool sd::slidesorter::model::PageDescriptor::mbHasTransition
private

Definition at line 135 of file SlsPageDescriptor.hxx.

◆ mbIsCurrent

bool sd::slidesorter::model::PageDescriptor::mbIsCurrent
private

Definition at line 133 of file SlsPageDescriptor.hxx.

◆ mbIsFocused

bool sd::slidesorter::model::PageDescriptor::mbIsFocused
private

Definition at line 132 of file SlsPageDescriptor.hxx.

◆ mbIsMouseOver

bool sd::slidesorter::model::PageDescriptor::mbIsMouseOver
private

Definition at line 134 of file SlsPageDescriptor.hxx.

◆ mbIsSelected

bool sd::slidesorter::model::PageDescriptor::mbIsSelected
private

Definition at line 129 of file SlsPageDescriptor.hxx.

◆ mbIsVisible

bool sd::slidesorter::model::PageDescriptor::mbIsVisible
private

Definition at line 131 of file SlsPageDescriptor.hxx.

◆ mbWasSelected

bool sd::slidesorter::model::PageDescriptor::mbWasSelected
private

Definition at line 130 of file SlsPageDescriptor.hxx.

◆ mnIndex

sal_Int32 sd::slidesorter::model::PageDescriptor::mnIndex
private

This index is displayed as page number in the view.

It may or may not be the actual page index.

Definition at line 124 of file SlsPageDescriptor.hxx.

Referenced by GetPageIndex().

◆ mpMasterPage

SdrPage const* sd::slidesorter::model::PageDescriptor::mpMasterPage
private

Definition at line 119 of file SlsPageDescriptor.hxx.

◆ mpPage

SdPage* sd::slidesorter::model::PageDescriptor::mpPage
private

Definition at line 117 of file SlsPageDescriptor.hxx.

Referenced by GetPage().

◆ mxPage

css::uno::Reference<css::drawing::XDrawPage> sd::slidesorter::model::PageDescriptor::mxPage
private

Definition at line 118 of file SlsPageDescriptor.hxx.

Referenced by GetXDrawPage().


The documentation for this class was generated from the following files: