10#ifndef INCLUDED_VCL_LAYOUT_HXX
11#define INCLUDED_VCL_LAYOUT_HXX
13#include <config_options.h>
79 , m_bHomogeneous(bHomogeneous)
80 , m_bVerticalContainer(false)
81 , m_nSpacing(nSpacing)
86 m_nSpacing = nSpacing;
94 m_bHomogeneous = bHomogeneous;
98 return m_bVerticalContainer;
100 virtual bool set_property(
const OUString &rKey,
const OUString &rValue)
override;
104 void accumulateMaxes(
const Size &rChildSize,
Size &rSize)
const;
105 Size finalizeMaxes(
const Size &rSize, sal_uInt16 nVisibleChildren)
const;
107 virtual Size calculateRequisition()
const override;
108 virtual void setAllocation(
const Size &rAllocation)
override;
124 :
VclBox(pParent, bHomogeneous, nSpacing)
126 m_bVerticalContainer =
true;
163 :
VclBox(pParent, bHomogeneous, nSpacing)
165 m_bVerticalContainer =
false;
212 :
VclBox(pParent, false,
Application::GetSettings().GetStyleSettings().GetDialogStyle().button_spacing)
216 virtual bool set_property(
const OUString &rKey,
const OUString &rValue)
override;
219 virtual Size calculateRequisition()
const override;
220 virtual void setAllocation(
const Size &rAllocation)
override;
221 Size addSpacing(
const Size &rSize, sal_uInt16 nVisibleChildren)
const;
231 Requisition calculatePrimarySecondaryRequisitions()
const;
241 m_bVerticalContainer =
true;
280 m_bVerticalContainer =
false;
326 Value() : m_nValue(0), m_bExpand(false) {}
330 Size calculateRequisitionForSpacings(sal_Int32 nRowSpacing, sal_Int32 nColSpacing)
const;
331 virtual Size calculateRequisition()
const override;
332 virtual void setAllocation(
const Size &rAllocation)
override;
337 , m_bRowHomogeneous(false), m_bColumnHomogeneous(false)
338 , m_nRowSpacing(0), m_nColumnSpacing(0)
343 return m_bRowHomogeneous;
347 return m_bColumnHomogeneous;
351 m_nRowSpacing = nSpacing;
355 m_nColumnSpacing = nSpacing;
359 return m_nRowSpacing;
363 return m_nColumnSpacing;
365 virtual bool set_property(
const OUString &rKey,
const OUString &rValue)
override;
368class UNLESS_MERGELIBS(VCL_DLLPUBLIC) VclBin :
public VclContainer
390 virtual void dispose()
override;
404 virtual Size calculateRequisition()
const override;
405 virtual void setAllocation(
const Size &rAllocation)
override;
406 virtual void set_position(
tools::Long nPosition)
override;
418 virtual Size calculateRequisition()
const override;
419 virtual void setAllocation(
const Size &rAllocation)
override;
420 virtual void set_position(
tools::Long nPosition)
override;
438 virtual void dispose()
override;
439 void set_label(
const OUString &rLabel);
440 OUString get_label()
const;
442 virtual const vcl::Window *get_child()
const override;
447 virtual Size calculateRequisition()
const override;
448 virtual void setAllocation(
const Size &rAllocation)
override;
449 virtual OUString getDefaultAccessibleName()
const override;
460 virtual void dispose()
override;
462 virtual const vcl::Window *get_child()
const override;
463 virtual bool set_property(
const OUString &rKey,
const OUString &rValue)
override;
464 bool get_expanded()
const;
465 void set_expanded(
bool bExpanded);
466 void set_label(
const OUString& rLabel);
467 OUString get_label()
const;
475 virtual Size calculateRequisition()
const override;
476 virtual void setAllocation(
const Size &rAllocation)
override;
488 virtual void dispose()
override;
490 virtual const vcl::Window *get_child()
const override;
491 virtual bool set_property(
const OUString &rKey,
const OUString &rValue)
override;
496 Size getVisibleChildSize()
const;
500 void doSetAllocation(
const Size &rAllocation,
bool bRetryOnFailure);
503 virtual Size calculateRequisition()
const override;
504 virtual void setAllocation(
const Size &rAllocation)
override;
505 int CalcBorderWidth()
const;
507 void InitScrollBars(
const Size &rRequest);
508 virtual bool EventNotify(
NotifyEvent& rNEvt)
override;
523 , m_bInitialAllocation(true)
527 virtual void setAllocation(
const Size &rAllocation)
override;
549 EnableChildTransparentMode();
550 SetPaintTransparent(
true);
555 GetParent()->Command(rCEvt);
560 virtual void dispose()
override;
567 m_aEventBoxHelper->Show();
570 virtual const vcl::Window *get_child()
const override;
571 virtual Size calculateRequisition()
const override;
572 virtual void setAllocation(
const Size &rAllocation)
override;
584 void trigger_queue_resize();
587 : m_bIgnoreHidden(false)
607 void set_ignore_hidden(
bool bIgnoreHidden);
610 return m_bIgnoreHidden;
617 void set_property(
const OUString &rKey,
const OUString &rValue);
621 ,
public DragSourceHelper
644 m_aPaintHdl.
Call(std::pair<vcl::RenderContext&, const tools::Rectangle&>(rRenderContext, rRect));
648 m_aResizeHdl.
Call(GetOutputSizePixel());
652 if (!m_aKeyPressHdl.
Call(rKEvt))
658 if (!m_aKeyReleaseHdl.
Call(rKEvt))
666 m_aStyleUpdatedHdl.
Call(*
this);
675 m_aStyleUpdatedHdl.
Call(*
this);
681 if (m_aCommandHdl.
Call(rEvent))
685 virtual void RequestHelp(
const HelpEvent& rHelpEvent)
override;
692 , DragSourceHelper(this)
693 , m_pFactoryFunction(nullptr)
694 , m_pUserData(nullptr)
701 if (!m_aMousePressHdl.
Call(rMEvt))
706 if (!m_aMouseReleaseHdl.
Call(rMEvt))
711 if (!m_aMouseMotionHdl.
Call(rMEvt))
714 virtual OUString GetSurroundingText()
const override;
715 virtual Selection GetSurroundingTextSelection()
const override;
716 virtual bool DeleteSurroundingText(
const Selection& rSelection)
override;
719 m_pFactoryFunction = pFactoryFunction;
720 m_pUserData = pUserData;
726 void SetPaintHdl(
const Link<std::pair<vcl::RenderContext&, const tools::Rectangle&>,
void>& rLink)
732 m_aResizeHdl = rLink;
736 m_aMousePressHdl = rLink;
740 m_aMouseMotionHdl = rLink;
744 m_aMouseReleaseHdl = rLink;
748 m_aKeyPressHdl = rLink;
752 m_aKeyReleaseHdl = rLink;
756 m_aStyleUpdatedHdl = rLink;
760 m_aCommandHdl = rLink;
764 m_aQueryTooltipHdl = rLink;
768 m_aGetSurroundingHdl = rLink;
772 m_aDeleteSurroundingHdl = rLink;
776 m_aStartDragHdl = rLink;
780 m_xTransferHelper = rHelper;
781 m_nDragAction = eDNDConstants;
Base class used mainly for the LibreOffice Desktop class.
virtual void StateChanged(StateChangedType nStateChange) override
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long getX() const
constexpr tools::Long getY() const
constexpr tools::Long getHeight() const
constexpr tools::Long getWidth() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
bool m_bVerticalContainer
virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const =0
void set_homogeneous(bool bHomogeneous)
virtual tools::Long getPrimaryDimension(const Size &rSize) const =0
virtual void setSecondaryDimension(Size &rSize, tools::Long) const =0
virtual tools::Long getSecondaryDimension(const Size &rSize) const =0
virtual void setPrimaryCoordinate(Point &rPos, tools::Long) const =0
virtual void setPrimaryDimension(Size &rSize, tools::Long) const =0
virtual tools::Long getPrimaryCoordinate(const Point &rPos) const =0
void set_spacing(int nSpacing)
VclBox(vcl::Window *pParent, bool bHomogeneous, int nSpacing)
bool get_orientation() const
Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, sidebar,...
virtual void setAllocation(const Size &rAllocation)=0
virtual Size calculateRequisition() const =0
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Link< std::pair< vcl::RenderContext &, const tools::Rectangle & >, void > m_aPaintHdl
void SetStyleUpdatedHdl(const Link< VclDrawingArea &, void > &rLink)
Link< const MouseEvent &, bool > m_aMouseReleaseHdl
void SetCommandHdl(const Link< const CommandEvent &, bool > &rLink)
rtl::Reference< TransferDataContainer > m_xTransferHelper
Link< const MouseEvent &, bool > m_aMouseMotionHdl
void * GetUserData() const
void SetMouseMoveHdl(const Link< const MouseEvent &, bool > &rLink)
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
void SetDeleteSurroundingHdl(const Link< const Selection &, bool > &rLink)
Link< VclDrawingArea &, void > m_aStyleUpdatedHdl
Link< const KeyEvent &, bool > m_aKeyPressHdl
virtual void KeyUp(const KeyEvent &rKEvt) override
Link< const CommandEvent &, bool > m_aCommandHdl
void SetQueryTooltipHdl(const Link< tools::Rectangle &, OUString > &rLink)
Link< const Size &, void > m_aResizeHdl
void SetMouseReleaseHdl(const Link< const MouseEvent &, bool > &rLink)
void SetMousePressHdl(const Link< const MouseEvent &, bool > &rLink)
virtual void MouseMove(const MouseEvent &rMEvt) override
void SetResizeHdl(const Link< const Size &, void > &rLink)
void SetDragHelper(const rtl::Reference< TransferDataContainer > &rHelper, sal_uInt8 eDNDConstants)
Link< VclDrawingArea *, bool > m_aStartDragHdl
void SetStartDragHdl(const Link< VclDrawingArea *, bool > &rLink)
Link< const Selection &, bool > m_aDeleteSurroundingHdl
void SetUITestFactory(FactoryFunction pFactoryFunction, void *pUserData)
void SetPaintHdl(const Link< std::pair< vcl::RenderContext &, const tools::Rectangle & >, void > &rLink)
void SetKeyReleaseHdl(const Link< const KeyEvent &, bool > &rLink)
virtual void StateChanged(StateChangedType nType) override
Link< const KeyEvent &, bool > m_aKeyReleaseHdl
Link< OUString &, int > m_aGetSurroundingHdl
VclDrawingArea(vcl::Window *pParent, WinBits nStyle)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
FactoryFunction m_pFactoryFunction
Link< tools::Rectangle &, OUString > m_aQueryTooltipHdl
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
virtual void Resize() override
Link< const MouseEvent &, bool > m_aMousePressHdl
void SetGetSurroundingHdl(const Link< OUString &, int > &rLink)
void SetKeyPressHdl(const Link< const KeyEvent &, bool > &rLink)
virtual void KeyInput(const KeyEvent &rKEvt) override
virtual void Command(const CommandEvent &rEvent) override
EventBoxHelper(vcl::Window *pParent)
virtual void Command(const CommandEvent &rCEvt) override
VclEventBox(vcl::Window *pParent)
VclPtr< EventBoxHelper > m_aEventBoxHelper
VclPtr< DisclosureButton > m_pDisclosureButton
DECL_LINK(ClickHdl, CheckBox &, void)
void SetExpandedHdl(const Link< VclExpander &, void > &rLink)
Link< VclExpander &, void > maExpandedHdl
DECL_LINK(WindowEventListener, VclWindowEvent &, void)
VclPtr< vcl::Window > m_pLabel
VclFrame(vcl::Window *pParent)
int get_column_spacing() const
bool get_column_homogeneous() const
bool m_bColumnHomogeneous
bool get_row_homogeneous() const
VclGrid(vcl::Window *pParent)
void set_row_spacing(int nSpacing)
void set_column_spacing(int nSpacing)
int get_row_spacing() const
virtual void setSecondaryDimension(Size &rSize, tools::Long nHeight) const override
virtual tools::Long getPrimaryDimension(const Size &rSize) const override
virtual tools::Long getSecondaryDimension(const Size &rSize) const override
virtual void setPrimaryCoordinate(Point &rPos, tools::Long nPos) const override
virtual tools::Long getPrimaryCoordinate(const Point &rPos) const override
virtual void setPrimaryDimension(Size &rSize, tools::Long nWidth) const override
virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const override
VclHBox(vcl::Window *pParent, bool bHomogeneous=false, int nSpacing=0)
DECL_LINK(SplitHdl, Splitter *, void)
VclPtr< Splitter > m_pSplitter
virtual void set_position(tools::Long nPosition)
tools::Long get_position() const
std::set< VclPtr< vcl::Window > > & get_widgets()
std::set< VclPtr< vcl::Window > > m_aWindows
void insert(vcl::Window *pWindow)
void erase(vcl::Window *pWindow)
const std::set< VclPtr< vcl::Window > > & get_widgets() const
bool get_ignore_hidden() const
VclSizeGroupMode get_mode() const
virtual void setPrimaryDimension(Size &rSize, tools::Long nHeight) const override
virtual tools::Long getPrimaryCoordinate(const Point &rPos) const override
virtual void setSecondaryDimension(Size &rSize, tools::Long nWidth) const override
virtual void setPrimaryCoordinate(Point &rPos, tools::Long nPos) const override
virtual tools::Long getSecondaryDimension(const Size &rSize) const override
virtual tools::Long getPrimaryDimension(const Size &rSize) const override
VclVBox(vcl::Window *pParent, bool bHomogeneous=false, int nSpacing=0)
virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const override
DECL_LINK(SplitHdl, Splitter *, void)
bool m_bInitialAllocation
VclViewport(vcl::Window *pParent)
WindowType GetType() const
virtual void SetSizePixel(const Size &rNewSize)
virtual void Command(const CommandEvent &rCEvt)
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
virtual void MouseButtonDown(const MouseEvent &rMEvt)
virtual void MouseButtonUp(const MouseEvent &rMEvt)
virtual void KeyInput(const KeyEvent &rKEvt)
virtual sal_uInt16 getDefaultAccessibleRole() const
virtual Size GetOptimalSize() const
virtual void MouseMove(const MouseEvent &rMEvt)
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
virtual Size GetSizePixel() const
virtual void DataChanged(const DataChangedEvent &rDCEvt)
virtual void SetPosPixel(const Point &rNewPos)
virtual void KeyUp(const KeyEvent &rKEvt)
virtual bool set_property(const OUString &rKey, const OUString &rValue)
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
VCL_DLLPUBLIC bool isLayoutEnabled(const vcl::Window *pWindow)
vcl::Window * firstLogicalChildOfParent(const vcl::Window *pTopLevel)
Size getLegacyBestSizeForChildren(const vcl::Window &rWindow)
vcl::Window * lastLogicalChildOfParent(const vcl::Window *pTopLevel)
void sort_native_button_order(const VclBox &rContainer)
vcl::Window * getNonLayoutParent(vcl::Window *pParent)
vcl::Window * prevLogicalChildOfParent(const vcl::Window *pTopLevel, const vcl::Window *pChild)
bool isContainerWindow(const vcl::Window &rWindow)
vcl::Window * nextLogicalChildOfParent(const vcl::Window *pTopLevel, const vcl::Window *pChild)
WinBits const WB_CLIPCHILDREN