LibreOffice Module sd (master) 1
|
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>
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 () | |
SdPage * | GetPage () 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... | |
VisualState & | GetVisualState () |
::tools::Rectangle | GetBoundingBox () const |
Point | GetLocation (const bool bIgnoreLocation) const |
void | SetBoundingBox (const ::tools::Rectangle &rBoundingBox) |
Private Member Functions | |
PageDescriptor (const PageDescriptor &rDescriptor)=delete | |
PageDescriptor & | operator= (const PageDescriptor &rDescriptor)=delete |
Private Attributes | |
SdPage * | mpPage |
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 |
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.
Enumerator | |
---|---|
ST_Visible | |
ST_Selected | |
ST_WasSelected | |
ST_Focused | |
ST_MouseOver | |
ST_Current | |
ST_Excluded |
Definition at line 87 of file SlsPageDescriptor.hxx.
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.
rxPage | The page that is represented by the new PageDescriptor object. |
pPage | The page pointer can in some situations not be detected from rxPage, e.g. after undo of page deletion. Therefore supply it separately. |
nIndex | This 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). |
sd::slidesorter::model::PageDescriptor::~PageDescriptor | ( | ) |
Definition at line 57 of file SlsPageDescriptor.cxx.
|
privatedelete |
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().
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.
Definition at line 182 of file SlsPageDescriptor.cxx.
References mbIsSelected, and mpPage.
Point sd::slidesorter::model::PageDescriptor::GetLocation | ( | const bool | bIgnoreLocation | ) | const |
Definition at line 211 of file SlsPageDescriptor.cxx.
|
inline |
Return the page that is represented by the descriptor as SdPage pointer .
Definition at line 70 of file SlsPageDescriptor.hxx.
References mpPage.
|
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.
|
inline |
Definition at line 110 of file SlsPageDescriptor.hxx.
References maVisualState.
|
inline |
Return the page that is represented by the descriptor as XDrawPage reference.
Definition at line 74 of file SlsPageDescriptor.hxx.
References mxPage.
bool sd::slidesorter::model::PageDescriptor::HasState | ( | const State | eState | ) | const |
Definition at line 95 of file SlsPageDescriptor.cxx.
References mbIsSelected, and mpPage.
|
privatedelete |
void sd::slidesorter::model::PageDescriptor::SetBoundingBox | ( | const ::tools::Rectangle & | rBoundingBox | ) |
Definition at line 219 of file SlsPageDescriptor.cxx.
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.
void sd::slidesorter::model::PageDescriptor::SetPageIndex | ( | const sal_Int32 | nIndex | ) |
Definition at line 61 of file SlsPageDescriptor.cxx.
References mnIndex.
bool sd::slidesorter::model::PageDescriptor::SetState | ( | const State | eState, |
const bool | bStateValue | ||
) |
Definition at line 126 of file SlsPageDescriptor.cxx.
References mbIsSelected, and mpPage.
bool sd::slidesorter::model::PageDescriptor::UpdateMasterPage | ( | ) |
Definition at line 67 of file SlsPageDescriptor.cxx.
References mpPage.
bool sd::slidesorter::model::PageDescriptor::UpdateTransitionFlag | ( | ) |
Definition at line 81 of file SlsPageDescriptor.cxx.
References mpPage.
|
private |
Definition at line 126 of file SlsPageDescriptor.hxx.
|
private |
Definition at line 127 of file SlsPageDescriptor.hxx.
Referenced by GetVisualState().
|
private |
Definition at line 135 of file SlsPageDescriptor.hxx.
|
private |
Definition at line 133 of file SlsPageDescriptor.hxx.
|
private |
Definition at line 132 of file SlsPageDescriptor.hxx.
|
private |
Definition at line 134 of file SlsPageDescriptor.hxx.
|
private |
Definition at line 129 of file SlsPageDescriptor.hxx.
|
private |
Definition at line 131 of file SlsPageDescriptor.hxx.
|
private |
Definition at line 130 of file SlsPageDescriptor.hxx.
|
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().
|
private |
Definition at line 119 of file SlsPageDescriptor.hxx.
|
private |
Definition at line 117 of file SlsPageDescriptor.hxx.
Referenced by GetPage().
|
private |
Definition at line 118 of file SlsPageDescriptor.hxx.
Referenced by GetXDrawPage().