20#ifndef INCLUDED_SVX_SOURCE_INC_STYLES_PREVIEW_WINDOW_HXX
21#define INCLUDED_SVX_SOURCE_INC_STYLES_PREVIEW_WINDOW_HXX
25#include <com/sun/star/frame/XDispatchProvider.hpp>
26#include <com/sun/star/frame/XFrame.hpp>
39 const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider);
83 :
Idle(
"StylesListUpdateTask")
89 virtual void Invoke()
override;
99 css::uno::Reference<css::frame::XFrame>
m_xFrame;
120 std::vector<std::pair<OUString, OUString>>&& aDefaultStyles,
121 const css::uno::Reference<css::frame::XFrame>& xFrame);
124 void Select(
const OUString& rStyleName);
139 std::vector<std::pair<OUString, OUString>>&& aDefaultStyles,
140 const css::uno::Reference<css::frame::XFrame>&
xFrame);
void DrawHighlight(vcl::RenderContext &rRenderContext, Color aFontBack)
void Paint(vcl::RenderContext &rRenderContext)
void DrawText(vcl::RenderContext &rRenderContext)
StyleItemController(std::pair< OUString, OUString > aStyleName)
static void DrawContentBackground(vcl::RenderContext &rRenderContext, const tools::Rectangle &aContentRect, const Color &aColor)
void DrawEntry(vcl::RenderContext &rRenderContext)
static constexpr unsigned LEFT_MARGIN
SfxStyleFamily m_eStyleFamily
std::pair< OUString, OUString > m_aStyleName
Listener for styles creation or modification.
~StylePoolChangeListener()
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
StylesPreviewWindow_Base * m_pPreviewControl
StylePoolChangeListener(StylesPreviewWindow_Base *pPreviewControl)
SfxStyleSheetBasePool * m_pStyleSheetPool
Listener for style selection.
StyleStatusListener(StylesPreviewWindow_Base *pPreviewControl, const css::uno::Reference< css::frame::XDispatchProvider > &xDispatchProvider)
void StateChangedAtStatusListener(SfxItemState eState, const SfxPoolItem *pState) override
StylesPreviewWindow_Base * m_pPreviewControl
virtual void Invoke() override
StylesListUpdateTask(StylesPreviewWindow_Base &rStylesList)
StylesPreviewWindow_Base & m_rStylesList
StylesPreviewWindow_Base(weld::Builder &xBuilder, std::vector< std::pair< OUString, OUString > > &&aDefaultStyles, const css::uno::Reference< css::frame::XFrame > &xFrame)
DECL_LINK(DoJsonProperty, const weld::json_prop_query &, bool)
std::vector< std::pair< OUString, OUString > > m_aDefaultStyles
DECL_LINK(DoCommand, const CommandEvent &, bool)
static constexpr unsigned STYLES_COUNT
void RequestStylesListUpdate()
StylesListUpdateTask m_aUpdateTask
OUString m_sSelectedStyle
~StylesPreviewWindow_Base()
std::unique_ptr< weld::IconView > m_xStylesView
static OString GetCachedPreviewJson(const std::pair< OUString, OUString > &rStyle)
css::uno::Reference< css::frame::XFrame > m_xFrame
std::vector< std::pair< OUString, OUString > > m_aAllStyles
bool Command(const CommandEvent &rEvent)
static VclPtr< VirtualDevice > GetCachedPreview(const std::pair< OUString, OUString > &rStyle)
void Select(const OUString &rStyleName)
DECL_LINK(Selected, weld::IconView &, void)
rtl::Reference< StyleStatusListener > m_xStatusListener
std::unique_ptr< StylePoolChangeListener > m_pStylePoolChangeListener
DECL_LINK(DoubleClick, weld::IconView &, bool)
~StylesPreviewWindow_Impl()
StylesPreviewWindow_Impl(vcl::Window *pParent, std::vector< std::pair< OUString, OUString > > &&aDefaultStyles, const css::uno::Reference< css::frame::XFrame > &xFrame)
void SetPriority(TaskPriority ePriority)
std::tuple< tools::JsonWriter &, const TreeIter &, std::string_view > json_prop_query
Reference< XFrame > xFrame