Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / vcl / layout.hxx
blob753d86f8039d844683555acbee2b4fa7cc710bd3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_VCL_LAYOUT_HXX
11 #define INCLUDED_VCL_LAYOUT_HXX
13 #include <vcl/dllapi.h>
14 #include <vcl/button.hxx>
15 #include <vcl/dialog.hxx>
16 #include <vcl/fixed.hxx>
17 #include <vcl/scrbar.hxx>
18 #include <vcl/split.hxx>
19 #include <vcl/vclmedit.hxx>
20 #include <vcl/window.hxx>
21 #include <vcl/vclptr.hxx>
22 #include <vcl/IContext.hxx>
23 #include <set>
25 class VCL_DLLPUBLIC VclContainer : public vcl::Window,
26 public vcl::IContext
28 public:
29 VclContainer(vcl::Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN);
31 //These take into account the external margins of the rWindow widget
32 //while GetOptimalSize/get_preferred_size and SetPosSizePixel are
33 //oblivious to them
34 static Size getLayoutRequisition(const vcl::Window &rWindow);
35 static void setLayoutPosSize(vcl::Window &rWindow, const Point &rPos, const Size &rSize);
37 //applies the allocation pos and size onto rWindow via setLayoutPosSize taking into account
38 //the rWindows alignment desires within that allocation
39 static void setLayoutAllocation(vcl::Window &rWindow, const Point &rPos, const Size &rSize);
41 virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override;
42 protected:
43 //these are the two that need to be implemented by
44 //containers, figure out how much space you want...
45 virtual Size calculateRequisition() const = 0;
46 //..and decide what to do when set to this size
47 virtual void setAllocation(const Size &rAllocation) = 0;
49 virtual sal_uInt16 getDefaultAccessibleRole() const override;
51 // evtl. support for screenshot context menu
52 virtual void Command(const CommandEvent& rCEvt) override;
54 public:
55 //you don't want to override these
56 virtual Size GetOptimalSize() const override;
57 virtual void SetPosSizePixel(const Point& rNewPos, const Size& rNewSize) override;
58 virtual void SetPosPixel(const Point& rAllocPos) override;
59 virtual void SetSizePixel(const Size& rAllocation) override;
60 private:
61 bool m_bLayoutDirty;
64 class VCL_DLLPUBLIC VclBox : public VclContainer
66 protected:
67 bool m_bHomogeneous;
68 bool m_bVerticalContainer;
69 int m_nSpacing;
70 public:
71 VclBox(vcl::Window *pParent, bool bHomogeneous, int nSpacing)
72 : VclContainer(pParent)
73 , m_bHomogeneous(bHomogeneous)
74 , m_bVerticalContainer(false)
75 , m_nSpacing(nSpacing)
78 void set_spacing(int nSpacing)
80 m_nSpacing = nSpacing;
82 int get_spacing() const
84 return m_nSpacing;
86 void set_homogeneous(bool bHomogeneous)
88 m_bHomogeneous = bHomogeneous;
90 virtual bool set_property(const OString &rKey, const OUString &rValue) override;
91 protected:
92 virtual sal_uInt16 getDefaultAccessibleRole() const override;
93 void accumulateMaxes(const Size &rChildSize, Size &rSize) const;
94 Size finalizeMaxes(const Size &rSize, sal_uInt16 nVisibleChildren) const;
96 virtual Size calculateRequisition() const override;
97 virtual void setAllocation(const Size &rAllocation) override;
99 virtual long getPrimaryDimension(const Size &rSize) const = 0;
100 virtual void setPrimaryDimension(Size &rSize, long) const = 0;
101 virtual long getPrimaryCoordinate(const Point &rPos) const = 0;
102 virtual void setPrimaryCoordinate(Point &rPos, long) const = 0;
103 virtual long getSecondaryDimension(const Size &rSize) const = 0;
104 virtual void setSecondaryDimension(Size &rSize, long) const = 0;
106 virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const = 0;
109 class VCL_DLLPUBLIC VclVBox : public VclBox
111 public:
112 VclVBox(vcl::Window *pParent, bool bHomogeneous = false, int nSpacing = 0)
113 : VclBox(pParent, bHomogeneous, nSpacing)
115 m_bVerticalContainer = true;
117 protected:
118 virtual long getPrimaryDimension(const Size &rSize) const override
120 return rSize.getHeight();
122 virtual void setPrimaryDimension(Size &rSize, long nHeight) const override
124 rSize.setHeight(nHeight);
126 virtual long getPrimaryCoordinate(const Point &rPos) const override
128 return rPos.getY();
130 virtual void setPrimaryCoordinate(Point &rPos, long nPos) const override
132 rPos.setY(nPos);
134 virtual long getSecondaryDimension(const Size &rSize) const override
136 return rSize.getWidth();
138 virtual void setSecondaryDimension(Size &rSize, long nWidth) const override
140 rSize.setWidth(nWidth);
142 virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const override
144 return rWindow.get_expand() || rWindow.get_vexpand();
148 class VCL_DLLPUBLIC VclHBox : public VclBox
150 public:
151 VclHBox(vcl::Window *pParent, bool bHomogeneous = false, int nSpacing = 0)
152 : VclBox(pParent, bHomogeneous, nSpacing)
154 m_bVerticalContainer = false;
156 protected:
157 virtual long getPrimaryDimension(const Size &rSize) const override
159 return rSize.getWidth();
161 virtual void setPrimaryDimension(Size &rSize, long nWidth) const override
163 rSize.setWidth(nWidth);
165 virtual long getPrimaryCoordinate(const Point &rPos) const override
167 return rPos.getX();
169 virtual void setPrimaryCoordinate(Point &rPos, long nPos) const override
171 rPos.setX(nPos);
173 virtual long getSecondaryDimension(const Size &rSize) const override
175 return rSize.getHeight();
177 virtual void setSecondaryDimension(Size &rSize, long nHeight) const override
179 rSize.setHeight(nHeight);
181 virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const override
183 return rWindow.get_expand() || rWindow.get_hexpand();
187 enum class VclButtonBoxStyle
189 Default,
190 Spread,
191 Edge,
192 Start,
193 End,
194 Center
197 class VCL_DLLPUBLIC VclButtonBox : public VclBox
199 public:
200 VclButtonBox(vcl::Window *pParent)
201 : VclBox(pParent, false, 0/*nSpacing*/)
202 , m_eLayoutStyle(VclButtonBoxStyle::Default)
205 virtual bool set_property(const OString &rKey, const OUString &rValue) override;
206 void sort_native_button_order();
207 protected:
208 virtual Size calculateRequisition() const override;
209 virtual void setAllocation(const Size &rAllocation) override;
210 Size addSpacing(const Size &rSize, sal_uInt16 nVisibleChildren) const;
211 private:
212 VclButtonBoxStyle m_eLayoutStyle;
213 struct Requisition
215 std::vector<long> m_aMainGroupDimensions;
216 std::vector<long> m_aSubGroupDimensions;
217 Size m_aMainGroupSize;
218 Size m_aSubGroupSize;
220 Requisition calculatePrimarySecondaryRequisitions() const;
221 Size addReqGroups(const VclButtonBox::Requisition &rReq) const;
224 class VCL_DLLPUBLIC VclVButtonBox : public VclButtonBox
226 public:
227 VclVButtonBox(vcl::Window *pParent)
228 : VclButtonBox(pParent)
230 m_bVerticalContainer = true;
232 protected:
233 virtual long getPrimaryDimension(const Size &rSize) const override
235 return rSize.getHeight();
237 virtual void setPrimaryDimension(Size &rSize, long nHeight) const override
239 rSize.setHeight(nHeight);
241 virtual long getPrimaryCoordinate(const Point &rPos) const override
243 return rPos.getY();
245 virtual void setPrimaryCoordinate(Point &rPos, long nPos) const override
247 rPos.setY(nPos);
249 virtual long getSecondaryDimension(const Size &rSize) const override
251 return rSize.getWidth();
253 virtual void setSecondaryDimension(Size &rSize, long nWidth) const override
255 rSize.setWidth(nWidth);
257 virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const override
259 return rWindow.get_expand() || rWindow.get_vexpand();
263 class VCL_DLLPUBLIC VclHButtonBox : public VclButtonBox
265 public:
266 VclHButtonBox(vcl::Window *pParent)
267 : VclButtonBox(pParent)
269 m_bVerticalContainer = false;
271 protected:
272 virtual long getPrimaryDimension(const Size &rSize) const override
274 return rSize.getWidth();
276 virtual void setPrimaryDimension(Size &rSize, long nWidth) const override
278 rSize.setWidth(nWidth);
280 virtual long getPrimaryCoordinate(const Point &rPos) const override
282 return rPos.getX();
284 virtual void setPrimaryCoordinate(Point &rPos, long nPos) const override
286 rPos.setX(nPos);
288 virtual long getSecondaryDimension(const Size &rSize) const override
290 return rSize.getHeight();
292 virtual void setSecondaryDimension(Size &rSize, long nHeight) const override
294 rSize.setHeight(nHeight);
296 virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const override
298 return rWindow.get_expand() || rWindow.get_hexpand();
302 class VCL_DLLPUBLIC VclGrid : public VclContainer
304 private:
305 bool m_bRowHomogeneous;
306 bool m_bColumnHomogeneous;
307 int m_nRowSpacing;
308 int m_nColumnSpacing;
310 public:
311 struct Value
313 long m_nValue;
314 bool m_bExpand;
315 Value() : m_nValue(0), m_bExpand(false) {}
317 private:
319 Size calculateRequisitionForSpacings(sal_Int32 nRowSpacing, sal_Int32 nColSpacing) const;
320 virtual Size calculateRequisition() const override;
321 virtual void setAllocation(const Size &rAllocation) override;
322 public:
323 VclGrid(vcl::Window *pParent)
324 : VclContainer(pParent)
325 , m_bRowHomogeneous(false), m_bColumnHomogeneous(false)
326 , m_nRowSpacing(0), m_nColumnSpacing(0)
329 bool get_row_homogeneous() const
331 return m_bRowHomogeneous;
333 bool get_column_homogeneous() const
335 return m_bColumnHomogeneous;
337 void set_row_spacing(int nSpacing)
339 m_nRowSpacing = nSpacing;
341 void set_column_spacing(int nSpacing)
343 m_nColumnSpacing = nSpacing;
345 int get_row_spacing() const
347 return m_nRowSpacing;
349 int get_column_spacing() const
351 return m_nColumnSpacing;
353 virtual bool set_property(const OString &rKey, const OUString &rValue) override;
356 class VCL_DLLPUBLIC VclBin : public VclContainer
358 public:
359 VclBin(vcl::Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN)
360 : VclContainer(pParent, nStyle)
363 virtual vcl::Window *get_child();
364 virtual const vcl::Window *get_child() const;
365 virtual Size calculateRequisition() const override;
366 virtual void setAllocation(const Size &rAllocation) override;
369 class VCL_DLLPUBLIC VclVPaned : public VclContainer
371 private:
372 VclPtr<Splitter> m_pSplitter;
373 long m_nPosition;
374 DECL_LINK(SplitHdl, Splitter*, void);
375 void arrange(const Size& rAllocation, long nFirstHeight, long nSecondHeight);
376 public:
377 VclVPaned(vcl::Window *pParent);
378 virtual ~VclVPaned() override { disposeOnce(); }
379 virtual void dispose() override;
380 virtual Size calculateRequisition() const override;
381 virtual void setAllocation(const Size &rAllocation) override;
382 long get_position() const { return m_nPosition; }
383 void set_position(long nPosition) { m_nPosition = nPosition; }
386 class VCL_DLLPUBLIC VclFrame : public VclBin
388 private:
389 VclPtr<vcl::Window> m_pLabel;
390 private:
391 friend class VclBuilder;
392 void designate_label(vcl::Window *pWindow);
393 DECL_LINK(WindowEventListener, VclWindowEvent&, void);
394 public:
395 VclFrame(vcl::Window *pParent)
396 : VclBin(pParent)
397 , m_pLabel(nullptr)
400 virtual ~VclFrame() override;
401 virtual void dispose() override;
402 void set_label(const OUString &rLabel);
403 OUString get_label() const;
404 virtual vcl::Window *get_child() override;
405 virtual const vcl::Window *get_child() const override;
406 vcl::Window *get_label_widget();
407 const vcl::Window *get_label_widget() const;
408 protected:
409 virtual Size calculateRequisition() const override;
410 virtual void setAllocation(const Size &rAllocation) override;
411 virtual OUString getDefaultAccessibleName() const override;
414 class VCL_DLLPUBLIC VclAlignment : public VclBin
416 public:
417 VclAlignment(vcl::Window *pParent)
418 : VclBin(pParent)
419 , m_nBottomPadding(0)
420 , m_nLeftPadding(0)
421 , m_nRightPadding(0)
422 , m_nTopPadding(0)
423 , m_fXAlign(0.0)
424 , m_fXScale(1.0)
425 , m_fYAlign(0.0)
426 , m_fYScale(1.0)
429 virtual bool set_property(const OString &rKey, const OUString &rValue) override;
430 protected:
431 virtual Size calculateRequisition() const override;
432 virtual void setAllocation(const Size &rAllocation) override;
433 private:
434 sal_Int32 m_nBottomPadding;
435 sal_Int32 m_nLeftPadding;
436 sal_Int32 m_nRightPadding;
437 sal_Int32 m_nTopPadding;
438 float m_fXAlign;
439 float m_fXScale;
440 float m_fYAlign;
441 float m_fYScale;
444 class VCL_DLLPUBLIC VclExpander : public VclBin
446 public:
447 VclExpander(vcl::Window *pParent)
448 : VclBin(pParent)
449 , m_bResizeTopLevel(true)
450 , m_pDisclosureButton(VclPtr<DisclosureButton>::Create(this))
452 m_pDisclosureButton->SetToggleHdl(LINK(this, VclExpander, ClickHdl));
453 m_pDisclosureButton->Show();
455 virtual ~VclExpander() override { disposeOnce(); }
456 virtual void dispose() override;
457 virtual vcl::Window *get_child() override;
458 virtual const vcl::Window *get_child() const override;
459 virtual bool set_property(const OString &rKey, const OUString &rValue) override;
460 bool get_expanded() const
462 return m_pDisclosureButton->IsChecked();
464 void set_expanded(bool bExpanded)
466 m_pDisclosureButton->Check(bExpanded);
468 void set_label(const OUString& rLabel)
470 m_pDisclosureButton->SetText(rLabel);
472 virtual void StateChanged(StateChangedType nType) override;
473 void SetExpandedHdl( const Link<VclExpander&,void>& rLink ) { maExpandedHdl = rLink; }
474 protected:
475 virtual Size calculateRequisition() const override;
476 virtual void setAllocation(const Size &rAllocation) override;
477 private:
478 bool m_bResizeTopLevel;
479 VclPtr<DisclosureButton> m_pDisclosureButton;
480 Link<VclExpander&,void> maExpandedHdl;
481 DECL_DLLPRIVATE_LINK(ClickHdl, CheckBox&, void);
484 class VCL_DLLPUBLIC VclScrolledWindow : public VclBin
486 public:
487 VclScrolledWindow(vcl::Window *pParent );
488 virtual ~VclScrolledWindow() override { disposeOnce(); }
489 virtual void dispose() override;
490 virtual vcl::Window *get_child() override;
491 virtual const vcl::Window *get_child() const override;
492 virtual bool set_property(const OString &rKey, const OUString &rValue) override;
493 ScrollBar& getVertScrollBar() { return *m_pVScroll; }
494 ScrollBar& getHorzScrollBar() { return *m_pHScroll; }
495 Size getVisibleChildSize() const;
496 //set to true to disable the built-in scrolling callbacks to allow the user
497 //to override it
498 void setUserManagedScrolling(bool bUserManagedScrolling) { m_bUserManagedScrolling = bUserManagedScrolling;}
499 protected:
500 virtual Size calculateRequisition() const override;
501 virtual void setAllocation(const Size &rAllocation) override;
502 DECL_LINK(ScrollBarHdl, ScrollBar*, void);
503 void InitScrollBars(const Size &rRequest);
504 virtual bool EventNotify(NotifyEvent& rNEvt) override;
505 private:
506 bool m_bUserManagedScrolling;
507 VclPtr<ScrollBar> m_pVScroll;
508 VclPtr<ScrollBar> m_pHScroll;
509 VclPtr<ScrollBarBox> m_aScrollBarBox;
512 class VCL_DLLPUBLIC VclViewport : public VclBin
514 public:
515 VclViewport(vcl::Window *pParent)
516 : VclBin(pParent, WB_HIDE | WB_CLIPCHILDREN)
519 protected:
520 virtual void setAllocation(const Size &rAllocation) override;
523 //Enforces that its children are always the same size as itself.
524 //Intercepts any Commands intended for its children.
526 //by default the Commands are discarded, inherit from this
527 //and implement "Command" to get them
528 class VCL_DLLPUBLIC VclEventBox : public VclBin
530 private:
531 //Any Commands an EventBoxHelper receives are forwarded to its parent
532 //The VclEventBox ensures that m_aEventBoxHelper is the
533 //first child and is transparent, but covers the rest of the children
534 class EventBoxHelper : public vcl::Window
536 public:
537 EventBoxHelper(vcl::Window* pParent)
538 : Window(pParent, 0)
540 SetSizePixel(pParent->GetSizePixel());
541 EnableChildTransparentMode();
542 SetPaintTransparent(true);
543 SetBackground();
545 virtual void Command(const CommandEvent& rCEvt) override
547 GetParent()->Command(rCEvt);
551 VclPtr<EventBoxHelper> m_aEventBoxHelper;
552 protected:
553 virtual void dispose() override;
554 virtual ~VclEventBox() override;
555 public:
556 VclEventBox(vcl::Window* pParent)
557 : VclBin(pParent)
558 , m_aEventBoxHelper(VclPtr<EventBoxHelper>::Create(this))
560 m_aEventBoxHelper->Show();
562 virtual vcl::Window *get_child() override;
563 virtual const vcl::Window *get_child() const override;
564 virtual Size calculateRequisition() const override;
565 virtual void setAllocation(const Size &rAllocation) override;
567 virtual void Command(const CommandEvent& rCEvt) override;
570 enum class VclSizeGroupMode
572 NONE,
573 Horizontal,
574 Vertical,
575 Both
578 class VCL_DLLPUBLIC VclSizeGroup
580 private:
581 std::set< VclPtr<vcl::Window> > m_aWindows;
582 bool m_bIgnoreHidden;
583 VclSizeGroupMode m_eMode;
585 void trigger_queue_resize();
586 public:
587 VclSizeGroup()
588 : m_bIgnoreHidden(false)
589 , m_eMode(VclSizeGroupMode::Horizontal)
592 void insert(vcl::Window *pWindow)
594 m_aWindows.insert(VclPtr<vcl::Window>(pWindow));
596 void erase(vcl::Window *pWindow)
598 m_aWindows.erase(VclPtr<vcl::Window>(pWindow));
600 const std::set< VclPtr<vcl::Window> >& get_widgets() const
602 return m_aWindows;
604 std::set< VclPtr<vcl::Window> >& get_widgets()
606 return m_aWindows;
608 void set_ignore_hidden(bool bIgnoreHidden);
609 bool get_ignore_hidden() const
611 return m_bIgnoreHidden;
613 void set_mode(VclSizeGroupMode eMode);
614 VclSizeGroupMode get_mode() const
616 return m_eMode;
618 bool set_property(const OString &rKey, const OUString &rValue);
621 enum class VclButtonsType
623 NONE,
625 Close,
626 Cancel,
627 YesNo,
628 OkCancel
631 enum class VclMessageType
633 Info,
634 Warning,
635 Question,
636 Error
639 class VCL_DLLPUBLIC MessageDialog : public Dialog
641 private:
642 VclButtonsType m_eButtonsType;
643 VclMessageType m_eMessageType;
644 VclPtr<VclBox> m_pOwnedContentArea;
645 VclPtr<VclButtonBox> m_pOwnedActionArea;
646 VclPtr<VclGrid> m_pGrid;
647 VclPtr<FixedImage> m_pImage;
648 VclPtr<VclMultiLineEdit> m_pPrimaryMessage;
649 VclPtr<VclMultiLineEdit> m_pSecondaryMessage;
650 std::vector<VclPtr<PushButton> > m_aOwnedButtons;
651 std::map< VclPtr<const vcl::Window>, short> m_aResponses;
652 OUString m_sPrimaryString;
653 OUString m_sSecondaryString;
654 DECL_DLLPRIVATE_LINK(ButtonHdl, Button *, void);
655 void setButtonHandlers(VclButtonBox *pButtonBox);
656 short get_response(const vcl::Window *pWindow) const;
657 void create_owned_areas();
659 friend class VclPtr<MessageDialog>;
660 MessageDialog(vcl::Window* pParent, WinBits nStyle);
661 public:
663 MessageDialog(vcl::Window* pParent,
664 const OUString &rMessage,
665 VclMessageType eMessageType = VclMessageType::Error,
666 VclButtonsType eButtonsType = VclButtonsType::Ok);
667 MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription);
668 virtual bool set_property(const OString &rKey, const OUString &rValue) override;
669 virtual short Execute() override;
670 ///Emitted when an action widget is clicked
671 virtual void response(short nResponseId);
672 OUString const & get_primary_text() const;
673 OUString const & get_secondary_text() const;
674 void set_primary_text(const OUString &rPrimaryString);
675 void set_secondary_text(const OUString &rSecondaryString);
676 virtual ~MessageDialog() override;
677 virtual void dispose() override;
679 static void SetMessagesWidths(vcl::Window *pParent, VclMultiLineEdit *pPrimaryMessage,
680 VclMultiLineEdit *pSecondaryMessage);
683 VCL_DLLPUBLIC Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize);
685 //Get first window of a pTopLevel window as
686 //if any intermediate layout widgets didn't exist
687 //i.e. acts like pChild = pChild->GetWindow(GetWindowType::FirstChild);
688 //in a flat hierarchy where dialogs only have one layer
689 //of children
690 VCL_DLLPUBLIC vcl::Window* firstLogicalChildOfParent(vcl::Window *pTopLevel);
692 //Get next window after pChild of a pTopLevel window as
693 //if any intermediate layout widgets didn't exist
694 //i.e. acts like pChild = pChild->GetWindow(GetWindowType::Next);
695 //in a flat hierarchy where dialogs only have one layer
696 //of children
697 VCL_DLLPUBLIC vcl::Window* nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChild);
699 //Get previous window before pChild of a pTopLevel window as
700 //if any intermediate layout widgets didn't exist
701 //i.e. acts like pChild = pChild->GetWindow(GetWindowType::Prev);
702 //in a flat hierarchy where dialogs only have one layer
703 //of children
704 VCL_DLLPUBLIC vcl::Window* prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChild);
706 //Returns true is the Window has a single child which is a container
707 VCL_DLLPUBLIC bool isLayoutEnabled(const vcl::Window *pWindow);
709 inline bool isContainerWindow(const vcl::Window &rWindow)
711 WindowType eType = rWindow.GetType();
712 return eType == WindowType::CONTAINER || eType == WindowType::SCROLLWINDOW ||
713 (eType == WindowType::DOCKINGWINDOW && ::isLayoutEnabled(&rWindow));
716 inline bool isContainerWindow(const vcl::Window *pWindow)
718 return pWindow && isContainerWindow(*pWindow);
721 //Returns true if the containing dialog is doing its initial
722 //layout and isn't visible yet
723 VCL_DLLPUBLIC bool isInitialLayout(const vcl::Window *pWindow);
725 // retro-fitting utilities
727 //Get a Size which is large enough to contain all children with
728 //an equal amount of space at top left and bottom right
729 Size getLegacyBestSizeForChildren(const vcl::Window &rWindow);
731 //Get first parent which is not a layout widget
732 VCL_DLLPUBLIC vcl::Window* getNonLayoutParent(vcl::Window *pParent);
734 //return true if this window and its stack of containers are all shown
735 bool isVisibleInLayout(const vcl::Window *pWindow);
737 //return true if this window and its stack of containers are all enabled
738 bool isEnabledInLayout(const vcl::Window *pWindow);
740 #endif
742 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */