ReactOS  0.4.15-dev-1392-g3014417
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 362 of file rosui.h.

Constructor & Destructor Documentation

◆ CUiPanel()

CUiPanel::CUiPanel ( )
inline

Definition at line 371 of file rosui.h.

372  {
375  }
CUiMeasure m_Height
Definition: rosui.h:369
static CUiMeasure FitParent()
Definition: rosui.h:213
CUiMeasure m_Width
Definition: rosui.h:368

◆ ~CUiPanel()

virtual CUiPanel::~CUiPanel ( )
inlinevirtual

Definition at line 377 of file rosui.h.

378  {
379  }

Member Function Documentation

◆ AsBox()

virtual CUiBox* CUiPanel::AsBox ( )
inlinevirtual

Reimplemented from CUiPrimitive.

Definition at line 381 of file rosui.h.

381 { return this; }

◆ ComputeContentBounds()

virtual VOID CUiPanel::ComputeContentBounds ( RECT rect)
inlinevirtual

Reimplemented from CUiBox.

Definition at line 395 of file rosui.h.

396  {
397  for (INT i = 0; i < m_Children.GetCount(); i++)
398  {
399  CUiBox * box = m_Children.Get(i)->AsBox();
400  if (box)
401  {
402  box->ComputeContentBounds(rect);
403  }
404  }
405  };
virtual CUiBox * AsBox()
Definition: rosui.h:340
Definition: rosui.h:237
INT GetCount() const
Definition: rosui.h:59
T * Get(INT i) const
Definition: rosui.h:64
int32_t INT
Definition: typedefs.h:58
& 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:356
Definition: palette.c:467

Referenced by CUiSplitPanel::ComputeContentBounds().

◆ ComputeMinimalSize()

virtual VOID CUiPanel::ComputeMinimalSize ( SIZE size)
inlinevirtual

Reimplemented from CUiBox.

Definition at line 383 of file rosui.h.

384  {
385  for (INT i = 0; i < m_Children.GetCount(); i++)
386  {
387  CUiBox * box = m_Children.Get(i)->AsBox();
388  if (box)
389  {
390  box->ComputeMinimalSize(size);
391  }
392  }
393  };
virtual CUiBox * AsBox()
Definition: rosui.h:340
Definition: rosui.h:237
INT GetCount() const
Definition: rosui.h:59
T * Get(INT i) const
Definition: rosui.h:64
int32_t INT
Definition: typedefs.h:58
GLsizeiptr size
Definition: glext.h:5919
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:356
Definition: palette.c:467

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

◆ CountSizableChildren()

virtual DWORD_PTR CUiPanel::CountSizableChildren ( )
inlinevirtual

Reimplemented from CUiBox.

Definition at line 407 of file rosui.h.

408  {
409  INT count = 0;
410  for (INT i = 0; i < m_Children.GetCount(); i++)
411  {
412  CUiBox * box = m_Children.Get(i)->AsBox();
413  if (box)
414  {
415  count += box->CountSizableChildren();
416  }
417  }
418  return count;
419  }
virtual CUiBox * AsBox()
Definition: rosui.h:340
Definition: rosui.h:237
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:58
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:356
Definition: palette.c:467

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

◆ OnParentSize()

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

Reimplemented from CUiBox.

Definition at line 421 of file rosui.h.

422  {
423  RECT rect = {0};
424 
425  SIZE content = {0};
427 
428  INT preferredWidth = m_Width.ComputeMeasure(parentRect.right - parentRect.left, content.cx);
429  INT preferredHeight = m_Height.ComputeMeasure(parentRect.bottom - parentRect.top, content.cy);
430 
431  rect.right = preferredWidth;
432  rect.bottom = preferredHeight;
433 
434  ComputeRect(parentRect, rect, &rect);
435 
436  for (INT i = 0; i < m_Children.GetCount(); i++)
437  {
438  CUiBox * box = m_Children.Get(i)->AsBox();
439  if (box)
440  {
441  hDwp = box->OnParentSize(rect, hDwp);
442  }
443  }
444 
445  return hDwp;
446  }
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:383
virtual CUiBox * AsBox()
Definition: rosui.h:340
Definition: rosui.h:237
INT GetCount() const
Definition: rosui.h:59
LONG top
Definition: windef.h:307
T * Get(INT i) const
Definition: rosui.h:64
CUiMeasure m_Height
Definition: rosui.h:369
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
int32_t INT
Definition: typedefs.h:58
& rect
Definition: startmenu.cpp:1413
INT ComputeMeasure(INT parent, INT content)
Definition: rosui.h:190
content
Definition: atl_ax.c:993
virtual VOID ComputeRect(RECT parentRect, RECT currentRect, RECT *newRect)
Definition: rosui.h:252
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
CUiMeasure m_Width
Definition: rosui.h:368
CUiCollection m_Children
Definition: rosui.h:356
LONG bottom
Definition: windef.h:309
Definition: palette.c:467

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

Member Data Documentation

◆ m_Height

CUiMeasure CUiPanel::m_Height

Definition at line 369 of file rosui.h.

Referenced by CUiPanel(), and OnParentSize().

◆ m_Width

CUiMeasure CUiPanel::m_Width

Definition at line 368 of file rosui.h.

Referenced by CUiPanel(), and OnParentSize().


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