namespace sd::sidebar
{ class MasterPageDescriptor; class MasterPageContainerChangeEvent;
/** This container manages the master pages used by the MasterPagesSelector controls.Itusesinternallyasingletonimplementationobject. Therefore,allMasterPageContainerobjectoperatoronthesamesetof masterpages.EachMasterPageContainer,however,hasitsown PreviewSizevalueandthuscanindependentlyswitchbetweenlargeand smallpreviews.
enum PreviewSize
{
SMALL,
LARGE
}; /** There are two different preview sizes, a small one and a large one. Whichoneisusedbythecalledcontainercanbechangedwiththis method. Whenthepreviewsizeischangedthenallchangelistenersare notifiedofthis.
*/ void SetPreviewSize(PreviewSize eSize);
/** This method is typically called for entries in the container for whichGetPreviewState()returnsOS_CREATABLE.Thecreationofthe previewisthenscheduledtobeexecutedasynchronouslyatalater pointintime.Whenthepreviewisavailablethechangelisteners willbenotified.
*/ bool RequestPreview(Token aToken);
/** Each entry of the container is either the first page of a template documentorisamasterpageofanImpressdocument.
*/ enum Origin
{
MASTERPAGE, // Master page of a document. TEMPLATE, // First page of a template file. DEFAULT, // Empty master page with default style.
UNKNOWN
};
/** Put the master page identified and described by the given parameters intothecontainer.Whentherealreadyisamasterpagewiththe givenURL,pagename,orobjectpointer(whenthatisnotNULL)then theexistingentryisreplaced/updatedbythegivenone.Otherwise anewentryisinserted.
*/
Token PutMasterPage(const std::shared_ptr<MasterPageDescriptor>& rDescriptor); void AcquireToken(Token aToken); void ReleaseToken(Token aToken);
/** This and the GetTokenForIndex() methods can be used to iterate over allmembersofthecontainer.
*/ int GetTokenCount() const;
/** Determine whether the container has a member for the given token.
*/ bool HasToken(Token aToken) const;
/** Return a token for an index in the range 0<=index<GetTokenCount().
*/
Token GetTokenForIndex(int nIndex);
/** Return a preview for the specified token. When the preview is not presentthenthePreviewProviderassociatedwiththetokenis executedonlywhenthatisnotexpensive.Itistheresponsibility ofthecallertocallRequestPreview()todothesame (asynchronously)forexpensivePreviewProviders. CallGetPreviewState()tofindoutifthatisnecessary. @paramaToken Thistokenspecifiesforwhichmasterpagetoreturnthepreview. TokensarereturnedforexamplebytheGetTokenFor...()methods. @return Thereturnedimageistherequestedprevieworasubstitution.
*/
Image GetPreviewForToken(Token aToken);
private: class Implementation;
std::shared_ptr<Implementation> mpImpl;
PreviewSize mePreviewSize;
};
/** For some changes to the set of master pages in a MasterPageContainer or tothedatastoredforeachmasterpageoneormoreeventsaresentto registeredlisteners. Eacheventhasaneventtypeandatokenthattellsthelistenerwhere thechangetookplace.
*/ class MasterPageContainerChangeEvent
{ public: enumclass EventType
{ // A master page was added to the container.
CHILD_ADDED, // A master page was removed from the container.
CHILD_REMOVED, // The preview of a master page has changed.
PREVIEW_CHANGED, // The size of a preview has changed.
SIZE_CHANGED, // Some of the data stored for a master page has changed.
DATA_CHANGED, // The TemplateIndex of a master page has changed.
INDEX_CHANGED,
} meEventType;
// Token of the container entry whose data changed or which was added or // removed.
MasterPageContainer::Token maChildToken;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.