28#include <com/sun/star/awt/XWindowPeer.hpp>
29#include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
30#include <com/sun/star/ui/UIElementType.hpp>
33using namespace css::uno;
38 const OUString& rsResourceURL,
39 const css::uno::Reference<css::frame::XFrame>& rxFrame,
40 std::unique_ptr<PanelLayout> xControl,
41 const css::ui::LayoutSize& rLayoutSize)
43 Reference<ui::XUIElement> xUIElement (
53 OUString sResourceURL,
54 css::uno::Reference<css::frame::XFrame> xFrame,
55 std::unique_ptr<PanelLayout> xControl,
56 const css::ui::LayoutSize& rLayoutSize)
58 mxControl(
std::move(xControl)),
59 msResourceURL(
std::move(sResourceURL)),
64 css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer (
65 css::ui::ContextChangeEventMultiplexer::get(
66 ::comphelper::getProcessComponentContext()));
67 xMultiplexer->addContextChangeEventListener(
this,
mxFrame->getController());
90 css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer (
91 css::ui::ContextChangeEventMultiplexer::get(
92 ::comphelper::getProcessComponentContext()));
93 xMultiplexer->removeAllContextChangeEventListeners(
this);
100 const ui::ContextChangeEventObject& rEvent)
104 IContextChangeReceiver* pContextChangeReceiver
105 =
dynamic_cast<IContextChangeReceiver*
>(
mxControl.get());
106 if (pContextChangeReceiver !=
nullptr)
111 pContextChangeReceiver->HandleContextChange(aContext);
116 const css::lang::EventObject&)
136 return ui::UIElementType::TOOLPANEL;
145 const Reference<accessibility::XAccessible>&)
164 ILayoutableWindow* pLayoutableWindow =
dynamic_cast<ILayoutableWindow*
>(
mxControl.get());
165 if (pLayoutableWindow)
166 return pLayoutableWindow->GetHeightForWidth(nWidth);
182 return aSize.
Width();
189 SidebarModelUpdate* pModelUpdate =
dynamic_cast<SidebarModelUpdate*
>(
mxControl.get());
193 pModelUpdate->updateModel(
xModel);
css::ui::LayoutSize maLayoutSize
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static Application GetApplicationEnum(const OUString &rsApplicationName)
static Context GetContextEnum(const OUString &rsContextName)
Reference< XFrame > xFrame
Reference< XModel > xModel