ReactOS  0.4.13-dev-656-g74bcf30
CUiPanel Class Reference

#include <rosui.h>

Inheritance diagram for CUiPanel:
Collaboration diagram for CUiPanel:

Public Member Functions

 CUiPanel ()
 
virtual ~CUiPanel ()
 
virtual CUiBoxAsBox ()
 
virtual VOID ComputeMinimalSize (SIZE *size)
 
virtual VOID ComputeContentBounds (RECT *rect)
 
virtual DWORD_PTR CountSizableChildren ()
 
virtual HDWP OnParentSize (RECT parentRect, HDWP hDwp)
 
- Public Member Functions inherited from CUiPrimitive
virtual ~CUiPrimitive ()
 
- Public Member Functions inherited from CUiContainer
CUiCollectionChildren ()
 

Public Attributes

CUiMeasure m_Width
 
CUiMeasure m_Height
 
- Public Attributes inherited from CUiBox
CUiMargin m_Margin
 
CUiAlignment m_HorizontalAlignment
 
CUiAlignment m_VerticalAlignment
 

Additional Inherited Members

- Protected Member Functions inherited from CUiBox
 CUiBox ()
 
virtual VOID ComputeRect (RECT parentRect, RECT currentRect, RECT *newRect)
 
- Protected Attributes inherited from CUiPrimitive
CUiPrimitivem_Parent
 
- Protected Attributes inherited from CUiContainer
CUiCollection m_Children
 

Detailed Description

Definition at line 358 of file rosui.h.

Constructor & Destructor Documentation

◆ CUiPanel()

CUiPanel::CUiPanel ( )
inline

Definition at line 367 of file rosui.h.

368  {
371  }
CUiMeasure m_Height
Definition: rosui.h:365
static CUiMeasure FitParent()
Definition: rosui.h:209
CUiMeasure m_Width
Definition: rosui.h:364

◆ ~CUiPanel()

virtual CUiPanel::~CUiPanel ( )
inlinevirtual

Definition at line 373 of file rosui.h.

374  {
375  }

Member Function Documentation

◆ AsBox()

virtual CUiBox* CUiPanel::AsBox ( )
inlinevirtual

Reimplemented from CUiPrimitive.

Definition at line 377 of file rosui.h.

377 { return this; }

◆ ComputeContentBounds()

virtual VOID CUiPanel::ComputeContentBounds ( RECT rect)
inlinevirtual

Reimplemented from CUiBox.

Definition at line 391 of file rosui.h.

392  {
393  for (INT i = 0; i < m_Children.GetCount(); i++)
394  {
395  CUiBox * box = m_Children.Get(i)->AsBox();
396  if (box)
397  {
398  box->ComputeContentBounds(rect);
399  }
400  }
401  };
virtual CUiBox * AsBox()
Definition: rosui.h:336
Definition: rosui.h:233
INT GetCount() const
Definition: rosui.h:59
T * Get(INT i) const
Definition: rosui.h:64
int32_t INT
Definition: typedefs.h:56
& rect
Definition: startmenu.cpp:1413
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
CUiCollection m_Children
Definition: rosui.h:352
Definition: palette.c:467

Referenced by CUiSplitPanel::ComputeContentBounds().

◆ ComputeMinimalSize()

virtual VOID CUiPanel::ComputeMinimalSize ( SIZE size)
inlinevirtual

Reimplemented from CUiBox.

Definition at line 379 of file rosui.h.

380  {
381  for (INT i = 0; i < m_Children.GetCount(); i++)
382  {
383  CUiBox * box = m_Children.Get(i)->AsBox();
384  if (box)
385  {
386  box->ComputeMinimalSize(size);
387  }
388  }
389  };
virtual CUiBox * AsBox()
Definition: rosui.h:336
Definition: rosui.h:233
INT GetCount() const
Definition: rosui.h:59
T * Get(INT i) const
Definition: rosui.h:64
int32_t INT
Definition: typedefs.h:56
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizeiptr size
Definition: glext.h:5919
CUiCollection m_Children
Definition: rosui.h:352
Definition: palette.c:467

Referenced by CUiSplitPanel::ComputeMinimalSize(), and OnParentSize().

◆ CountSizableChildren()

virtual DWORD_PTR CUiPanel::CountSizableChildren ( )
inlinevirtual

Reimplemented from CUiBox.

Definition at line 403 of file rosui.h.

404  {
405  INT count = 0;
406  for (INT i = 0; i < m_Children.GetCount(); i++)
407  {
408  CUiBox * box = m_Children.Get(i)->AsBox();
409  if (box)
410  {
411  count += box->CountSizableChildren();
412  }
413  }
414  return count;
415  }
virtual CUiBox * AsBox()
Definition: rosui.h:336
Definition: rosui.h:233
GLuint GLuint GLsizei count
Definition: gl.h:1545
INT GetCount() const
Definition: rosui.h:59
T * Get(INT i) const
Definition: rosui.h:64
int32_t INT
Definition: typedefs.h:56
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
CUiCollection m_Children
Definition: rosui.h:352
Definition: palette.c:467

Referenced by CUiSplitPanel::CountSizableChildren(), and CMainWindow::OnSize().

◆ OnParentSize()

virtual HDWP CUiPanel::OnParentSize ( RECT  parentRect,
HDWP  hDwp 
)
inlinevirtual

Reimplemented from CUiBox.

Definition at line 417 of file rosui.h.

418  {
419  RECT rect = {0};
420 
421  SIZE content = {0};
423 
424  INT preferredWidth = m_Width.ComputeMeasure(parentRect.right - parentRect.left, content.cx);
425  INT preferredHeight = m_Height.ComputeMeasure(parentRect.bottom - parentRect.top, content.cy);
426 
427  rect.right = preferredWidth;
428  rect.bottom = preferredHeight;
429 
430  ComputeRect(parentRect, rect, &rect);
431 
432  for (INT i = 0; i < m_Children.GetCount(); i++)
433  {
434  CUiBox * box = m_Children.Get(i)->AsBox();
435  if (box)
436  {
437  hDwp = box->OnParentSize(rect, hDwp);
438  }
439  }
440 
441  return hDwp;
442  }
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:379
virtual CUiBox * AsBox()
Definition: rosui.h:336
Definition: rosui.h:233
INT GetCount() const
Definition: rosui.h:59
LONG top
Definition: windef.h:292
T * Get(INT i) const
Definition: rosui.h:64
CUiMeasure m_Height
Definition: rosui.h:365
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
int32_t INT
Definition: typedefs.h:56
& rect
Definition: startmenu.cpp:1413
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
INT ComputeMeasure(INT parent, INT content)
Definition: rosui.h:186
content
Definition: atl_ax.c:994
virtual VOID ComputeRect(RECT parentRect, RECT currentRect, RECT *newRect)
Definition: rosui.h:248
CUiMeasure m_Width
Definition: rosui.h:364
CUiCollection m_Children
Definition: rosui.h:352
LONG bottom
Definition: windef.h:294
Definition: palette.c:467

Referenced by CUiSplitPanel::OnParentSize(), and CMainWindow::OnSize().

Member Data Documentation

◆ m_Height

CUiMeasure CUiPanel::m_Height

Definition at line 365 of file rosui.h.

Referenced by CUiPanel(), and OnParentSize().

◆ m_Width

CUiMeasure CUiPanel::m_Width

Definition at line 364 of file rosui.h.

Referenced by CUiPanel(), and OnParentSize().


The documentation for this class was generated from the following file: