35 Reference<lang::XMultiComponentFactory>
xFactory (rxContext->getServiceManager());
40 "com.sun.star.comp.Draw.PresenterHelper",
51 const Reference<XResourceId>& rxPaneId,
52 const OUString& rsViewURL,
53 const OUString& rsTitle,
54 const OUString& rsAccessibleTitle,
67 pDescriptor->mxPaneId = rxPaneId;
68 pDescriptor->msViewURL = rsViewURL;
69 pDescriptor->mxPane =
nullptr;
70 if (rsTitle.indexOf(
'%') < 0)
72 pDescriptor->msTitle = rsTitle;
73 pDescriptor->msTitleTemplate.clear();
77 pDescriptor->msTitleTemplate = rsTitle;
78 pDescriptor->msTitle.clear();
80 pDescriptor->msAccessibleTitleTemplate = rsAccessibleTitle;
81 pDescriptor->maViewInitialization = rViewInitialization;
82 pDescriptor->mbIsActive =
true;
83 pDescriptor->mbIsOpaque = bIsOpaque;
84 pDescriptor->mbIsSprite =
false;
91 for (
const auto& rxPane :
maPanes)
92 if (rxPane->mxPaneId.is())
104 Reference<XResourceId> xPaneId (rxPane->getResourceId());
106 sPaneURL = xPaneId->getResourceURL();
110 PreparePane(xPaneId, OUString(), OUString(), OUString(),
115 Reference<awt::XWindow> xWindow (rxPane->getWindow());
116 pDescriptor->mxContentWindow = xWindow;
117 pDescriptor->mxPaneId = xPaneId;
118 pDescriptor->mxPane = rxPane;
119 pDescriptor->mxPane->SetTitle(pDescriptor->msTitle);
122 xWindow->addEventListener(
this);
131 const Reference<XResourceId>& rxPaneId,
132 const Reference<awt::XWindow>& rxBorderWindow)
138 sPaneURL = rxPaneId->getResourceURL();
143 pDescriptor->mxBorderWindow = rxBorderWindow;
152 const Reference<XView>& rxView)
159 Reference<XResourceId> xViewId (rxView->getResourceId());
162 Reference<XResourceId> xPaneId (xViewId->getAnchor());
164 sPaneURL = xPaneId->getResourceURL();
170 pDescriptor->mxView = rxView;
173 if (pDescriptor->maViewInitialization)
174 pDescriptor->maViewInitialization(rxView);
192 if (pDescriptor->mxContentWindow.is())
193 pDescriptor->mxContentWindow->removeEventListener(
this);
194 pDescriptor->mxContentWindow =
nullptr;
195 pDescriptor->mxBorderWindow =
nullptr;
196 pDescriptor->mxPane =
nullptr;
197 pDescriptor->mxView =
nullptr;
198 pDescriptor->mbIsActive =
false;
211 Reference<XResourceId> xViewId (rxView->getResourceId());
214 Reference<XResourceId> xPaneId (xViewId->getAnchor());
216 sPaneURL = xPaneId->getResourceURL();
222 pDescriptor->mxView =
nullptr;
230 const Reference<awt::XWindow>& rxBorderWindow)
233 [&rxBorderWindow](
const SharedPaneDescriptor& rxPane) {
return rxPane->mxBorderWindow == rxBorderWindow; });
240 const Reference<awt::XWindow>& rxContentWindow)
243 [&rxContentWindow](
const SharedPaneDescriptor& rxPane) {
return rxPane->mxContentWindow == rxContentWindow; });
250 const OUString& rsPaneURL)
253 [&rsPaneURL](
const SharedPaneDescriptor& rxPane) {
return rxPane->mxPaneId->getResourceURL() == rsPaneURL; });
260 const Reference<XResourceId>& rxPaneId)
262 if ( ! rxPaneId.is())
266 [&rxPaneId](
const SharedPaneDescriptor& rxPane) {
return rxPaneId->compareTo(rxPane->mxPaneId) == 0; });
273 const OUString& rsViewURL)
286 if (pDescriptor->mxPaneId.is())
287 return pDescriptor->mxPaneId->getResourceURL();
297 PaneList::iterator iEnd (
maPanes.end());
298 auto iPane = std::find_if(
maPanes.begin(), iEnd,
300 OSL_ASSERT(iPane!=iEnd);
308 maPanes.push_back(rpDescriptor);
314 const css::lang::EventObject& rEvent)
virtual void SAL_CALL disposing() override
void SetActivationState(const bool bIsActive)
SharedPaneDescriptor FindPaneId(const css::uno::Reference< css::drawing::framework::XResourceId > &rxPaneId)
Find the pane whose resource id is identical to the given one.
SharedPaneDescriptor StoreView(const css::uno::Reference< css::drawing::framework::XView > &rxView)
css::uno::Reference< css::drawing::XPresenterHelper > mxPresenterHelper
void ToTop(const SharedPaneDescriptor &rpDescriptor)
Reference< drawing::XPresenterHelper > mxPresenterHelper
SharedPaneDescriptor RemoveView(const css::uno::Reference< css::drawing::framework::XView > &rxView)
SharedPaneDescriptor FindContentWindow(const css::uno::Reference< css::awt::XWindow > &rxBorderWindow)
Find the pane whose border window is identical to the given content window.
SharedPaneDescriptor RemovePane(const css::uno::Reference< css::drawing::framework::XResourceId > &rxPaneId)
::std::function< void(const css::uno::Reference< css::drawing::framework::XView > &)> ViewInitializationFunction
SharedPaneDescriptor FindBorderWindow(const css::uno::Reference< css::awt::XWindow > &rxBorderWindow)
Find the pane whose border window is identical to the given border window.
SharedPaneDescriptor FindViewURL(const OUString &rsViewURL)
SharedPaneDescriptor FindPaneURL(const OUString &rsPaneURL)
Find the pane whose pane URL is identical to the given URL string.
SharedPaneDescriptor StorePane(const rtl::Reference< PresenterPaneBase > &rxPane)
SharedPaneDescriptor StoreBorderWindow(const css::uno::Reference< css::drawing::framework::XResourceId > &rxPaneId, const css::uno::Reference< css::awt::XWindow > &rxBorderWindow)
OUString GetPaneURLForViewURL(const OUString &rsViewURL)
std::shared_ptr< PaneDescriptor > SharedPaneDescriptor
::cppu::WeakComponentImplHelper< css::lang::XEventListener > PresenterPaneContainerInterfaceBase
virtual ~PresenterPaneContainer() override
PresenterPaneContainer(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
Reference< XSingleServiceFactory > xFactory
void PreparePane(const css::uno::Reference< css::drawing::framework::XResourceId > &rxPaneId, const OUString &rsViewURL, const OUString &rsTitle, const OUString &rsAccessibleTitle, const bool bIsOpaque, const ViewInitializationFunction &rViewInitialization)