39#include <drawview.hxx>
49 DropTargetHelper( this ),
53 SetSizePixel(
Size(0, 0));
65 DropTargetHelper::dispose();
72 return SdResId( STR_LAYER_BCKGRND );
75 return SdResId( STR_LAYER_BCKGRNDOBJ );
78 return SdResId( STR_LAYER_LAYOUT );
81 return SdResId( STR_LAYER_CONTROLS );
84 return SdResId( STR_LAYER_MEASURELINES );
118 return ( rName ==
SdResId(STR_LAYER_LAYOUT)
119 || rName ==
SdResId(STR_LAYER_CONTROLS)
120 || rName ==
SdResId(STR_LAYER_MEASURELINES)
121 || rName ==
SdResId(STR_LAYER_BCKGRND)
122 || rName ==
SdResId(STR_LAYER_BCKGRNDOBJ) );
137 pDispatcher->
Execute(SID_SWITCHLAYER, SfxCallMode::ASYNCHRON);
142 bool bSetPageID=
false;
147 sal_uInt16 aTabId =
GetPageId( PixelToLogic(aPosPixel) );
151 pDispatcher->
Execute(SID_INSERTLAYER, SfxCallMode::SYNCHRON);
178 bool bNewPrintable = bOldPrintable;
179 bool bNewVisible = bOldVisible;
180 bool bNewLocked = bOldLocked;
185 bNewPrintable = !bOldPrintable;
192 bNewVisible = !bOldVisible;
198 bNewLocked = !bOldLocked;
214 assert (pDrView &&
"Change layer attribute undo action is only working with a SdDrawView");
255 pDispatcher->
Execute( SID_MODIFYLAYER, SfxCallMode::SYNCHRON );
303 if ( rCEvt.
GetCommand() == CommandEventId::ContextMenu )
344 if (aNewName.isEmpty() ||
345 (rLayerAdmin.
GetLayer( aNewName ) && aLayerName != aNewName) )
349 VclMessageType::Warning, VclButtonsType::Ok,
350 SdResId(STR_WARN_NAME_DUPLICATE)));
384 assert (pDrView &&
"Rename layer undo action is only working with a SdDrawView");
420 pDispatcher->
Execute(SID_SWITCHLAYER, SfxCallMode::ASYNCHRON);
426 CallEventListeners (VclEventId::TabbarPageActivated,
432 CallEventListeners (VclEventId::TabbarPageDeactivated,
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
CommandEventId GetCommand() const
const Point & GetPosPixel() const
virtual SAL_DLLPRIVATE void SetChanged(bool bFlag=true) override
SAL_DLLPRIVATE::sd::DrawDocShell * GetDocSh() const
SdrLayerID GetLayerID(const OUString &rName) const
SdrLayer * GetLayer(sal_uInt16 i)
const OUString & GetTitle() const
const OUString & GetDescription() const
void SetName(const OUString &rNewName)
const SdrLayerAdmin & GetLayerAdmin() const
virtual bool IsTextEdit() const final override
bool IsLayerVisible(const OUString &rName) const
void SetLayerVisible(const OUString &rName, bool bShow)
void SetLayerLocked(const OUString &rName, bool bLock)
void SetLayerPrintable(const OUString &rName, bool bPrn)
bool IsLayerLocked(const OUString &rName) const
bool IsLayerPrintable(const OUString &rName) const
bool IsLayerVisible(const OUString &rName) const
bool IsLayerPrintable(const OUString &rName) const
void SetActiveLayer(const OUString &rName)
bool IsLayerLocked(const OUString &rName) const
SdrPageView * GetSdrPageView() const
const OUString & GetActiveLayer() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
void ExecutePopup(const OUString &rResName, vcl::Window *pWin=nullptr, const Point *pPos=nullptr)
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
SfxDispatcher * GetDispatcher()
weld::Window * GetFrameWeld() const
sal_uInt16 GetEditPageId() const
void SetAuxiliaryText(sal_uInt16 nPageId, const OUString &rText)
OUString GetAuxiliaryText(sal_uInt16 nPageId) const
virtual void SetPageText(sal_uInt16 nPageId, const OUString &rText)
const OUString & GetEditText() const
void SetMaxPageWidth(tools::Long nMaxWidth)
bool IsEditModeCanceled() const
virtual void InsertPage(sal_uInt16 nPageId, const OUString &rText, TabBarPageBits nBits=TabBarPageBits::NONE, sal_uInt16 nPos=TabBar::APPEND)
sal_uInt16 GetPageId(sal_uInt16 nPos) const
void SwitchPage(const Point &rPos)
sal_uInt16 GetCurPageId() const
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
virtual void dispose() override
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt, DropTargetHelper &rTargetHelper, ::sd::Window *pTargetWindow, sal_uInt16 nPage, SdrLayerID nLayer) override
AcceptDrop.
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt, DropTargetHelper &rTargetHelper, ::sd::Window *pTargetWindow, sal_uInt16 nPage, SdrLayerID nLayer) override
ExecuteDrop.
void ResetActualLayer()
Select new refreshed page, in case of a page order change (eg.
Derivative of sd::View; contains also a pointer to the document.
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
AcceptDrop-Event.
virtual void dispose() override
void SetLayerName(sal_uInt16 nPageId, const OUString &rText)
virtual void DoubleClick() override
void SendDeactivatePageEvent()
Inform all listeners of this control that the current layer has been deactivated.
virtual TabBarAllowRenamingReturnCode AllowRenaming() override
virtual void EndRenaming() override
OUString GetLayerName(sal_uInt16 nPageId) const
virtual void SetPageText(sal_uInt16 nPageId, const OUString &rText) override
LayerTabBar(DrawViewShell *pDrViewSh, vcl::Window *pParent)
default constructor
virtual bool StartRenaming() override
static bool IsLocalizedNameOfStandardLayer(std::u16string_view rName)
virtual void Command(const CommandEvent &rCEvt) override
static OUString convertToLocalizedName(const OUString &rName)
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
ExecuteDrop-Event.
virtual SD_DLLPUBLIC void MouseButtonDown(const MouseEvent &rMEvt) override
virtual void InsertPage(sal_uInt16 nPageId, const OUString &rText, TabBarPageBits nBits=TabBarPageBits::NONE, sal_uInt16 nPos=TabBar::APPEND) override
void SendActivatePageEvent()
Inform all listeners of this control that the current layer has been activated.
virtual ~LayerTabBar() override
DrawViewShell * pDrViewSh
static bool IsRealNameOfStandardLayer(std::u16string_view rName)
virtual void Select() override
virtual void ActivatePage() override
SD_DLLPUBLIC DrawDocShell * GetDocSh() const
::sd::View * GetView() const
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false) override
ends current text editing
SdDrawDocument & GetDoc() const
virtual void SetHelpId(const OUString &) override
constexpr OUStringLiteral HID_SD_TABBAR_LAYERS
OUString SdResId(TranslateId aId)
TabBarAllowRenamingReturnCode
constexpr OUStringLiteral sUNO_LayerName_measurelines
constexpr OUStringLiteral sUNO_LayerName_background_objects
constexpr OUStringLiteral sUNO_LayerName_layout
constexpr OUStringLiteral sUNO_LayerName_controls
constexpr OUStringLiteral sUNO_LayerName_background