GuiLayout.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 <Mstn\MstnTypes.h>
13 
14 using namespace Bentley::UIFramework;
15 
17 
18 //=======================================================================================
25 //=======================================================================================
27  {
28 public:
31  MSCORE_EXPORT static GuiLayoutHelperP Create (MSDialogP gdP);
32 
33  // LayoutControl virtual methods
34 
37  MSCORE_EXPORT virtual void Move(const BPoint& point) override;
38 
41  MSCORE_EXPORT virtual void Resize(const BSize &size) override;
42 
45  MSCORE_EXPORT virtual void SetGeometry(const BRect &rect) override;
46 
48  MSCORE_EXPORT virtual void ShowIfNotHidden() override;
49 
53  MSCORE_EXPORT void WindowSizeDoLayout(const BSize& size);
54 
59  MSCORE_EXPORT bool CheckMinMaxSize (BSize &size);
60 
62  MSCORE_EXPORT void Refresh();
63 
65  MSCORE_EXPORT void SuspendLayout();
66 
68  MSCORE_EXPORT void ResumeLayout();
69 
71  MSCORE_EXPORT bool IsSuspended();
72 
73  };
74 
75 
76 //=======================================================================================
80 //=======================================================================================
82  {
83 public:
89  MSCORE_EXPORT static GuiLayoutControlP Create (GuiLayoutHelperP layoutHelperP,
90  DialogItemP diP,
92  BSize minSize = BSize(0,0));
93 
94  // LayoutControl virtual methods
95 
98  MSCORE_EXPORT virtual BSize GetDesiredSize() const override;
99 
102  MSCORE_EXPORT virtual BSize GetDesiredMinimumSize() const override;
103 
106  MSCORE_EXPORT virtual BSize GetMinimumSize() const override;
107 
110  MSCORE_EXPORT virtual void Move(const BPoint& point) override;
111 
114  MSCORE_EXPORT virtual void Resize(const BSize &size) override;
115 
118  MSCORE_EXPORT virtual void SetGeometry(const BRect &rect) override;
119 
121  MSCORE_EXPORT virtual void ShowIfNotHidden() override;
122 
125  MSCORE_EXPORT virtual void ItemSizeChanged();
126 
129  MSCORE_EXPORT virtual void VisibleChanged();
130 
131  };
132 
133 //=======================================================================================
137 //=======================================================================================
139  {
140 public:
147  MSCORE_EXPORT static GuiLayoutLabel* Create (GuiLayoutHelperP layoutHelperP,
148  DialogItemP diP,
150  bool attachedToItem = false);
151 
154  MSCORE_EXPORT virtual void Move (const BPoint& point) override;
155 
158  MSCORE_EXPORT virtual void Resize (const BSize &size) override;
159 
162  MSCORE_EXPORT virtual void SetGeometry (const BRect &rect) override;
163 
165  MSCORE_EXPORT virtual void ShowIfNotHidden() override;
166 
170  MSCORE_EXPORT virtual int GetHeightForWidth (int width) const override;
171 
173  MSCORE_EXPORT void GetLabel (WStringR label);
174 
175  };
176 
177 //=======================================================================================
182 //=======================================================================================
184  {
185 public:
192  MSCORE_EXPORT static GuiLayoutContainerPanel* Create (GuiLayoutHelperP layoutHelperP,
193  DialogItemP diP,
195  BSize minSize = BSize(0,0));
196 
199  MSCORE_EXPORT virtual BSize GetDesiredMinimumSize() const override;
200 
203  MSCORE_EXPORT virtual BSize GetMinimumSize() const override;
204 
207  MSCORE_EXPORT virtual BSize GetMaximumSize() const override;
208 
211  MSCORE_EXPORT virtual void Move (const BPoint& point) override;
212 
215  MSCORE_EXPORT virtual void Resize (const BSize &size) override;
216 
219  MSCORE_EXPORT virtual void SetGeometry (const BRect &rect) override;
220 
222  MSCORE_EXPORT virtual void ShowIfNotHidden() override;
223 
227  MSCORE_EXPORT virtual int GetHeightForWidth (int width) const override;
228 
229  };
230 
231 //=======================================================================================
236 //=======================================================================================
238  {
239 public:
246  MSCORE_EXPORT static GuiLayoutTabPageList* Create (GuiLayoutHelperP layoutHelperP,
247  DialogItemP diP,
249  BSize minSize = BSize(0,0));
250 
253  MSCORE_EXPORT virtual BSize GetDesiredMinimumSize() const override;
254 
257  MSCORE_EXPORT virtual BSize GetMinimumSize() const override;
258 
261  MSCORE_EXPORT virtual BSize GetMaximumSize() const override;
262 
265  MSCORE_EXPORT virtual void Move (const BPoint& point) override;
266 
269  MSCORE_EXPORT virtual void Resize (const BSize &size) override;
270 
273  MSCORE_EXPORT virtual void SetGeometry (const BRect &rect) override;
274 
276  MSCORE_EXPORT virtual void ShowIfNotHidden() override;
277 
281  MSCORE_EXPORT virtual int GetHeightForWidth (int width) const override;
282 
283  };
284 //=======================================================================================
289 //=======================================================================================
291  {
292 public:
298  MSCORE_EXPORT static GuiLayoutSeparator* Create (GuiLayoutHelperP layoutHelperP,
299  DialogItemP diP,
301  BSize minSize = BSize(0,0));
302 
304  MSCORE_EXPORT virtual BSize GetDesiredSize() const override;
305 
306  };
307 
308 //=======================================================================================
314 //=======================================================================================
316  {
317 public:
325  MSCORE_EXPORT static GuiSplitterHandle* Create (GuiLayoutHelperP layoutHelperP,
326  SplitterLayout* layoutP,
327  DialogItemP diP,
329  BSize minSize = BSize(0,0));
330 
331  // LayoutControl virtual methods
334  MSCORE_EXPORT virtual BSize GetDesiredMinimumSize() const override;
335 
338  MSCORE_EXPORT virtual BSize GetMinimumSize() const override;
339 
342  MSCORE_EXPORT virtual void Move (const BPoint& point) override;
343 
346  MSCORE_EXPORT virtual void Resize (const BSize &size) override;
347 
350  MSCORE_EXPORT virtual void SetGeometry (const BRect &rect) override;
351 
353  MSCORE_EXPORT virtual void ShowIfNotHidden() override;
354 
358  MSCORE_EXPORT virtual int MoveSplitter(int pos) override;
359 
365  MSCORE_EXPORT virtual bool PositionWasBound (int givenPosition, int boundPosition, SplitterBoundType boundType) override;
366 
367  };
368 
370 
372 
373 //=======================================================================================
380 //=======================================================================================
382 (
383 MSDialogP dbP
384 );
385 
386 //=======================================================================================
396 //=======================================================================================
397 MSCORE_EXPORT void mdlDialog_setLayoutManager
398 (
399 MSDialogP dbP,
400 LayoutManager* layoutManagerP
401 );
402 
403 //=======================================================================================
410 //=======================================================================================
412 (
413 RawItemHdrP containerP, /* => Container to set LayoutManager for */
414 LayoutManager* layoutManagerP /* => LayoutManager to manage the layout of the child items */
415 );
416 
417 //=======================================================================================
424 //=======================================================================================
426 (
427 RawItemHdrP tabPageP, /* => TabPage to set LayoutManager for */
428 LayoutManager* layoutManagerP /* => LayoutManager to manage the layout of the child items */
429 );
430 
432 
The SizePolicy class is a layout attribute describing horizontal and vertical resizing policy...
Definition: SizePolicy.h:50
The LayoutControl class is the abstract base class of all user interface elements for layout manager ...
Definition: LayoutControl.h:54
#define END_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:30
StatusInt mdlDialog_containerSetLayoutManager(RawItemHdrP containerP, LayoutManager *layoutManagerP)
Sets the LayoutManager for the Container that will manage the layout of the Container's dialog items...
GuiLayoutTabPageList is the layout wrapper for a TabPageList dialog item in the dialog.
Definition: GuiLayout.h:237
Definition: LayoutEnums.r.h:73
#define BEGIN_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:29
GuiLayoutSeparator is the layout wrapper for a Separator dialog item in the dialog.
Definition: GuiLayout.h:290
The BRect class defines a rectangle using integer precision.
Definition: BRect.h:71
The BPoint class defines a point in the plane using integer precision.
Definition: BPoint.h:34
StatusInt mdlDialog_tabPageSetLayoutManager(RawItemHdrP tabPageP, LayoutManager *layoutManagerP)
Sets the LayoutManager for the TabPage that will manage the layout of the TabPage's dialog items...
The BSize class defines the size of a two - dimensional object using integer point precision...
Definition: BSize.h:38
Definition: GuiLayout.h:26
GuiLayoutContainerPanel is the layout wrapper for a ContainerPanel dialog item in the dialog...
Definition: GuiLayout.h:183
GuiLayoutLabel is the layout wrapper for a Label dialog item in the dialog.
Definition: GuiLayout.h:138
#define BEGIN_EXTERN_C
Definition: Bentley.h:164
GuiSplitterHandle is the handle used in a SplitterLayout, which easily lays out a control on either s...
Definition: GuiLayout.h:315
#define END_EXTERN_C
Definition: Bentley.h:165
The LayoutManager class is the base class of the layout managers.
Definition: LayoutManager.h:46
int StatusInt
Definition: Bentley.h:222
GuiLayoutControl is the layout wrapper for a dialog item (control) in the dialog. ...
Definition: GuiLayout.h:81
LayoutManager * mdlDialog_getLayoutManager(MSDialogP dbP)
Gets the LayoutManager object pointer for this MSDialog.
void mdlDialog_setLayoutManager(MSDialogP dbP, LayoutManager *layoutManagerP)
Sets the LayoutManager object pointer for this MSDialog.
SplitterBoundType
SetToMin - The position of the Splitter set to Minimum.
Definition: LayoutEnums.h:155
A SplitterLayout lets the user control the size of child controls or layouts by dragging the boundary...
Definition: SplitterLayout.h:54
SplitterHandle represents the Sash between two layout items managed by a SplitterLayout.
Definition: SplitterLayout.h:191
size_type size() const
Definition: stdcxx/bstdmap.h:214
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
Definition: LayoutEnums.r.h:71
Definition: LayoutEnums.r.h:70

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