/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ #ifndef INCLUDED_SFX2_TABDLG_HXX #define INCLUDED_SFX2_TABDLG_HXX
/** prepare to leave the current page. Calls the DeactivatePage method of the current page, (if necessary), handles the item sets to copy. @return sal_True if it is allowed to leave the current page, sal_False otherwise
*/ bool PrepareLeaveCurrentPage();
/** Called before user cancels the dialog. Calls DeactivatePage of all tab pages with IsCancelMode() set to true
*/ void PrepareCancel();
/** save the position of the TabDialog and which tab page is the currently active one
*/ void SavePosAndId(); public:
SfxTabDialogController(weld::Widget* pParent, const OUString& rUIXMLDescription, const OUString& rID, const SfxItemSet * = nullptr, bool bEditFmt = false); virtual ~SfxTabDialogController() override;
void AddTabPage(const OUString& rName, // Name of the label for the existing page in the notebook .ui
CreateTabPage pCreateFunc, // != 0
GetTabPageRanges pRangesFunc); // can be 0
void AddTabPage(const OUString& rName, // Name of the label for the existing page in the notebook .ui
sal_uInt16 nPageCreateId); // Identifier of the Factory Method to create the page
void AddTabPage(const OUString& rName, // Name of the label for the new page to create const OUString& rLabel, // UI Label for the new page to create
CreateTabPage pCreateFunc); // != 0
void AddTabPage(const OUString& rName, // Name of the label for the new page to create const OUString& rLabel, // UI Label for the new page to create
sal_uInt16 nPageCreateId); // Identifier of the Factory Method to create the page
void RemoveTabPage( const OUString& rName ); // Name of the label for the page in the notebook .ui
enumclass DeactivateRC {
KeepPage = 0x00, // Error handling; page does not change // 2. Fill an itemset for update // parent examples, this pointer can be NULL all the time!
LeavePage = 0x01, // Set, refresh and update other Page
RefreshSet = 0x02
}; namespace o3tl { template<> struct typed_flags<DeactivateRC> : is_typed_flags<DeactivateRC, 0x03> {};
}
class SFX2_DLLPUBLIC SfxTabPage : public BuilderPage
{ friendclass SfxTabDialog; friendclass SfxTabDialogController;
virtualbool FillItemSet( SfxItemSet* ); virtualvoid Reset( const SfxItemSet* ); // Allows to postpone some initialization to the first activation virtualbool DeferResetToFirstActivation();
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.