DockLayout.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include <UI/UIFramework.h>
12 
14 
15 class LayoutControl;
16 class LayoutItem;
17 
18 //=======================================================================================
23 //=======================================================================================
25  {
32  };
33 
34 //=======================================================================================
44 //=======================================================================================
45 class DockLayout : public LayoutManager
46  {
47 public:
52  DLLEXPORT static DockLayout* Create (LayoutControl *parent, int spacing = -1);
53 
57  DLLEXPORT static DockLayout* Create (int spacing = -1);
58 
63 
67  DLLEXPORT void AddLayout (LayoutManager *layout, LayoutDockPosition position);
68 
71  DLLEXPORT virtual bool HasHeightForWidth() const override;
72 
75  DLLEXPORT virtual int GetHeightForWidth (int width) const override;
76 
78  DLLEXPORT virtual BSize GetMinimumSize() const override;
79 
81  DLLEXPORT virtual BSize GetDesiredSize() const override;
82 
85  DLLEXPORT virtual void SetGeometry (const BRect &rect) override;
86 
88  DLLEXPORT virtual size_t Count() const override;
89 
93  DLLEXPORT virtual LayoutItem *ItemAt (int index) const override;
94 
98  DLLEXPORT virtual LayoutItem *TakeAt (int index) override;
99 
102  DLLEXPORT virtual LayoutOrientations GetExpandingOrientations() const override;
103 
104  };
105 
Definition: DockLayout.h:31
Definition: DockLayout.h:29
The LayoutControl class is the abstract base class of all user interface elements for layout manager ...
Definition: LayoutControl.h:54
virtual int GetHeightForWidth(int width) const override
Returns the preferred height for this layout item, given the width.
virtual LayoutItem * TakeAt(int index) override
Removes the item at index from the layout, and returns the item.
virtual size_t Count() const override
Returns the number of items in this layout.
void AddLayout(LayoutManager *layout, LayoutDockPosition position)
Adds a nested child layout to the DockLayout Layout Manager.
LayoutFlags - Creates a "Flags" class out of an enum with constructors and operator overloading...
Definition: LayoutFlags.h:43
The LayoutItem class provides an abstract item that a LayoutManager manipulates.
Definition: LayoutItem.h:52
The BRect class defines a rectangle using integer precision.
Definition: BRect.h:71
static DockLayout * Create(LayoutControl *parent, int spacing=-1)
Creates a DockLayout Layout Manager.
The BSize class defines the size of a two - dimensional object using integer point precision...
Definition: BSize.h:38
virtual BSize GetDesiredSize() const override
Returns the desired size for this layout.
#define BEGIN_BENTLEY_UIFRAMEWORK_NAMESPACE
Definition: UIFramework.h:14
Definition: DockLayout.h:30
#define DLLEXPORT
Definition: basedefs.h:137
Definition: DockLayout.h:28
LayoutDockPosition
LayoutDockPosition - position of the docked content along the top, bottom, left or right edge...
Definition: DockLayout.h:24
#define END_BENTLEY_UIFRAMEWORK_NAMESPACE
Definition: UIFramework.h:15
virtual BSize GetMinimumSize() const override
Returns the minimum size for this layout.
The LayoutManager class is the base class of the layout managers.
Definition: LayoutManager.h:46
virtual bool HasHeightForWidth() const override
Returns whether this layout's preferred height depends on its width.
DockLayout arranges items according to a specified dock position.
Definition: DockLayout.h:45
Definition: DockLayout.h:26
void AddControl(LayoutControl *ctl, LayoutDockPosition position)
Adds a control to the DockLayout Layout Manager.
Definition: DockLayout.h:27
virtual LayoutItem * ItemAt(int index) const override
Retrieves the item at index in the layout and returns the item.
virtual void SetGeometry(const BRect &rect) override
Sets the geometry for this layout to the given rectangle.
virtual LayoutOrientations GetExpandingOrientations() const override
Returns whether this layout item can make use of more space than GetDesiredSize().

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.