LibreOffice Module sd (master) 1
|
#include <LayoutMenu.hxx>
Public Member Functions | |
LayoutMenu (weld::Widget *pParent, ViewShellBase &rViewShellBase, css::uno::Reference< css::ui::XSidebar > xSidebar) | |
Create a new layout menu. More... | |
virtual | ~LayoutMenu () override |
void | Dispose () |
AutoLayout | GetSelectedAutoLayout () const |
Return a numerical value representing the currently selected layout. More... | |
virtual css::ui::LayoutSize | GetHeightForWidth (const sal_Int32 nWidth) override |
void | InvalidateContent () |
Call this method when the set of displayed layouts is not up-to-date anymore. More... | |
void | ShowContextMenu (const Point *pPos) |
The context menu is requested over this ShowContextMenu() method. More... | |
virtual void | DataChanged (const DataChangedEvent &rEvent) override |
Call Fill() when switching to or from high contrast mode so that the correct set of icons is displayed. More... | |
![]() | |
PanelLayout (weld::Widget *pParent, const OUString &rID, const OUString &rUIXMLDescription) | |
void | SetPanel (sfx2::sidebar::Panel *pPanel) |
virtual | ~PanelLayout () |
Size | get_preferred_size () const |
void | queue_resize () |
Private Member Functions | |
void | Fill () |
Fill the value set with the layouts that are applicable to the current main view shell. More... | |
void | Clear () |
Remove all items from the value set. More... | |
void | AssignLayoutToSelectedSlides (AutoLayout aLayout) |
Assign the given layout to all selected slides of a slide sorter. More... | |
void | InsertPageWithLayout (AutoLayout aLayout) |
Insert a new page with the given layout. More... | |
SfxRequest | CreateRequest (sal_uInt16 nSlotId, AutoLayout aLayout) |
Create a request structure that can be used with the SID_INSERTPAGE and SID_MODIFYPAGE slots. More... | |
void | UpdateSelection () |
Select the layout that is used by the current page. More... | |
void | implConstruct (DrawDocShell &rDocumentShell) |
DECL_LINK (ClickHandler, ValueSet *, void) | |
When clicked then set the current page of the view in the center pane. More... | |
DECL_LINK (StateChangeHandler, const OUString &, void) | |
DECL_LINK (EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent &, void) | |
void | OnMenuItemSelected (std::u16string_view ident) |
Private Attributes | |
ViewShellBase & | mrBase |
std::unique_ptr< LayoutValueSet > | mxLayoutValueSet |
std::unique_ptr< weld::CustomWeld > | mxLayoutValueSetWin |
css::uno::Reference< css::frame::XStatusListener > | mxListener |
If we are asked for the preferred window size, then use this many columns for the calculation. More... | |
bool | mbIsMainViewChangePending |
css::uno::Reference< css::ui::XSidebar > | mxSidebar |
bool | mbIsDisposed |
Additional Inherited Members | |
![]() | |
virtual void | DataChanged (const DataChangedEvent &rEvent) |
virtual void | DumpAsPropertyTree (tools::JsonWriter &) |
virtual weld::Window * | GetFrameWeld () const |
![]() | |
std::unique_ptr< weld::Builder > | m_xBuilder |
std::unique_ptr< weld::Container > | m_xContainer |
sfx2::sidebar::Panel * | m_pPanel |
Definition at line 53 of file LayoutMenu.hxx.
sd::sidebar::LayoutMenu::LayoutMenu | ( | weld::Widget * | pParent, |
ViewShellBase & | rViewShellBase, | ||
css::uno::Reference< css::ui::XSidebar > | xSidebar | ||
) |
Create a new layout menu.
Depending on the given flag it displays its own scroll bar or lets a surrounding window handle that.
i_pParent | the parent node in the control tree |
i_rPanelViewShell | the view shell of the task pane. |
Definition at line 158 of file LayoutMenu.cxx.
References sfx2::sidebar::Theme::Color_PanelBackground, sfx2::sidebar::Theme::GetColor(), SdDrawDocument::GetDocSh(), sd::ViewShellBase::GetDocument(), implConstruct(), mrBase, mxLayoutValueSet, SAL_INFO, WB_FLATVALUESET, WB_ITEMBORDER, and WB_TABSTOP.
|
overridevirtual |
Definition at line 208 of file LayoutMenu.cxx.
References Dispose(), mxLayoutValueSet, mxLayoutValueSetWin, and SAL_INFO.
|
private |
Assign the given layout to all selected slides of a slide sorter.
The specified layout is assigned to the current page of the view shell in the center pane.
If no slide sorter is active then this call is ignored. The slide sorter in the center pane is preferred if the choice exists.
Definition at line 377 of file LayoutMenu.cxx.
References SfxRequest::AppendItem(), SfxShell::ExecuteSlot(), sd::ViewShell::GetActualPage(), sd::DrawViewShell::GetEditMode(), sd::ViewShellBase::GetMainViewShell(), sd::ViewShell::GetShellType(), SfxViewShell::GetViewFrame(), MasterPage, mrBase, sd::ViewShell::ST_IMPRESS, sd::ViewShell::ST_NOTES, and sd::ViewShell::ST_SLIDE_SORTER.
Referenced by OnMenuItemSelected().
|
private |
Remove all items from the value set.
Definition at line 559 of file LayoutMenu.cxx.
References mxLayoutValueSet, and nId.
|
private |
Create a request structure that can be used with the SID_INSERTPAGE and SID_MODIFYPAGE slots.
The parameters are set so that the given layout is assigned to the current page of the main view shell.
nSlotId | Supported slots are SID_INSERTPAGE and SID_MODIFYPAGE. |
aLayout | Layout of the page to insert or to assign. |
Definition at line 461 of file LayoutMenu.cxx.
References SfxRequest::AppendItem(), sd::ViewShell::GetActualPage(), sd::ViewShellBase::GetDocument(), SdrModel::GetLayerAdmin(), SdrLayerAdmin::GetLayerID(), sd::ViewShellBase::GetMainViewShell(), SfxViewShell::GetViewFrame(), SdrLayerIDSet::IsSet(), mrBase, sUNO_LayerName_background, sUNO_LayerName_background_objects, and SdrPage::TRG_GetMasterPageVisibleLayers().
Referenced by InsertPageWithLayout().
|
overridevirtual |
Call Fill() when switching to or from high contrast mode so that the correct set of icons is displayed.
Reimplemented from PanelLayout.
Definition at line 717 of file LayoutMenu.cxx.
References sfx2::sidebar::Theme::Color_PanelBackground, PanelLayout::DataChanged(), Fill(), sfx2::sidebar::Theme::GetColor(), and mxLayoutValueSet.
|
private |
When clicked then set the current page of the view in the center pane.
|
private |
|
private |
void sd::sidebar::LayoutMenu::Dispose | ( | ) |
Definition at line 216 of file LayoutMenu.cxx.
References Clear(), sd::ViewShellBase::GetEventMultiplexer(), LINK, mbIsDisposed, mrBase, mxListener, and SAL_INFO.
Referenced by ~LayoutMenu().
|
private |
Fill the value set with the layouts that are applicable to the current main view shell.
Definition at line 496 of file LayoutMenu.cxx.
References Clear(), Image::GetBitmapEx(), SdDrawDocument::GetDefaultWritingMode(), sd::ViewShellBase::GetDocument(), sd::ViewShellBase::GetDrawController(), sd::sidebar::handout, i, SvtCJKOptions::IsVerticalTextEnabled(), BitmapEx::Mirror(), mrBase, sd::framework::FrameworkHelper::msHandoutViewURL, sd::framework::FrameworkHelper::msImpressViewURL, sd::framework::FrameworkHelper::msNotesViewURL, sd::framework::FrameworkHelper::msSlideSorterURL, mxLayoutValueSet, sd::sidebar::notes, SdResId(), and sd::sidebar::standard.
Referenced by DataChanged(), and InvalidateContent().
|
overridevirtual |
Definition at line 248 of file LayoutMenu.cxx.
References Size::AdjustHeight(), Size::AdjustWidth(), Image::GetSizePixel(), Size::Height(), mxLayoutValueSet, and Size::Width().
AutoLayout sd::sidebar::LayoutMenu::GetSelectedAutoLayout | ( | ) | const |
Return a numerical value representing the currently selected layout.
Definition at line 234 of file LayoutMenu.cxx.
References AUTOLAYOUT_NONE, and mxLayoutValueSet.
Referenced by OnMenuItemSelected().
|
private |
Definition at line 178 of file LayoutMenu.cxx.
References SfxViewShell::GetController(), SdDrawDocument::GetDocSh(), sd::ViewShellBase::GetDocument(), sd::ViewShellBase::GetEventMultiplexer(), HID_SD_TASK_PANE_PREVIEW_LAYOUTS, InvalidateContent(), LINK, mrBase, mxLayoutValueSet, mxListener, SdResId(), WB_ITEMBORDER, WB_MENUSTYLEVALUESET, WB_NO_DIRECTSELECT, and WB_TABSTOP.
Referenced by LayoutMenu().
|
private |
Insert a new page with the given layout.
The page is inserted via the main view shell, i.e. its SID_INSERTPAGE slot is called. If it does not support this slot then inserting a new page does not take place. The new page is inserted after the currently active one (the one returned by ViewShell::GetActualPage().)
Definition at line 318 of file LayoutMenu.cxx.
References CreateRequest(), SfxDispatcher::Execute(), SfxRequest::GetArgs(), SfxViewFrame::GetDispatcher(), sd::ViewShellBase::GetMainViewShell(), SfxViewShell::GetViewFrame(), mrBase, and UpdateSelection().
Referenced by OnMenuItemSelected().
void sd::sidebar::LayoutMenu::InvalidateContent | ( | ) |
Call this method when the set of displayed layouts is not up-to-date anymore.
It will re-assemble this set according to the current settings.
Definition at line 342 of file LayoutMenu.cxx.
References Fill(), mxSidebar, and UpdateSelection().
Referenced by implConstruct().
|
private |
Definition at line 612 of file LayoutMenu.cxx.
References AssignLayoutToSelectedSlides(), GetSelectedAutoLayout(), InsertPageWithLayout(), and u.
Referenced by ShowContextMenu().
void sd::sidebar::LayoutMenu::ShowContextMenu | ( | const Point * | pPos | ) |
The context menu is requested over this ShowContextMenu() method.
Definition at line 566 of file LayoutMenu.cxx.
References tools::Rectangle::Center(), Application::CreateBuilder(), SfxViewFrame::GetDispatcher(), SfxViewShell::GetViewFrame(), mrBase, mxLayoutValueSet, OnMenuItemSelected(), SfxDispatcher::QueryState(), and SD_MOD.
Referenced by sd::sidebar::LayoutValueSet::Command().
|
private |
Select the layout that is used by the current page.
Definition at line 634 of file LayoutMenu.cxx.
References AUTOLAYOUT_END, SdPage::GetAutoLayout(), sd::ViewShell::getCurrentPage(), sd::ViewShellBase::GetMainViewShell(), mrBase, mxLayoutValueSet, and nId.
Referenced by InsertPageWithLayout(), and InvalidateContent().
|
private |
Definition at line 105 of file LayoutMenu.hxx.
Referenced by Dispose().
|
private |
Definition at line 103 of file LayoutMenu.hxx.
|
private |
Definition at line 94 of file LayoutMenu.hxx.
Referenced by AssignLayoutToSelectedSlides(), CreateRequest(), Dispose(), Fill(), implConstruct(), InsertPageWithLayout(), LayoutMenu(), ShowContextMenu(), and UpdateSelection().
|
private |
Definition at line 96 of file LayoutMenu.hxx.
Referenced by Clear(), DataChanged(), Fill(), GetHeightForWidth(), GetSelectedAutoLayout(), implConstruct(), LayoutMenu(), ShowContextMenu(), UpdateSelection(), and ~LayoutMenu().
|
private |
Definition at line 97 of file LayoutMenu.hxx.
Referenced by ~LayoutMenu().
|
private |
If we are asked for the preferred window size, then use this many columns for the calculation.
Definition at line 102 of file LayoutMenu.hxx.
Referenced by Dispose(), and implConstruct().
|
private |
Definition at line 104 of file LayoutMenu.hxx.
Referenced by InvalidateContent().