ReactOS  0.4.14-dev-554-g2f8d847
CUiWindow< T > Class Template Reference

#include <rosui.h>

Inheritance diagram for CUiWindow< T >:
Collaboration diagram for CUiWindow< T >:

Public Member Functions

virtual CUiBoxAsBox ()
 
HWND GetWindow ()
 
virtual VOID ComputeMinimalSize (SIZE *size)
 
virtual VOID ComputeContentBounds (RECT *rect)
 
virtual DWORD_PTR CountSizableChildren ()
 
virtual HDWP OnParentSize (RECT parentRect, HDWP hDwp)
 
virtual ~CUiWindow ()
 
VOID GetWindowTextW (ATL::CStringW &szText)
 
- Public Member Functions inherited from CUiPrimitive
virtual ~CUiPrimitive ()
 

Additional Inherited Members

- Public Attributes inherited from CUiBox
CUiMargin m_Margin
 
CUiAlignment m_HorizontalAlignment
 
CUiAlignment m_VerticalAlignment
 
- Protected Member Functions inherited from CUiBox
 CUiBox ()
 
virtual VOID ComputeRect (RECT parentRect, RECT currentRect, RECT *newRect)
 
- Protected Attributes inherited from CUiPrimitive
CUiPrimitivem_Parent
 

Detailed Description

template<class T = CWindow>
class CUiWindow< T >

Definition at line 446 of file rosui.h.

Constructor & Destructor Documentation

◆ ~CUiWindow()

template<class T = CWindow>
virtual CUiWindow< T >::~CUiWindow ( )
inlinevirtual

Definition at line 496 of file rosui.h.

497  {
499  }
BOOL WINAPI DestroyWindow(_In_ HWND)

Member Function Documentation

◆ AsBox()

template<class T = CWindow>
virtual CUiBox* CUiWindow< T >::AsBox ( )
inlinevirtual

Reimplemented from CUiPrimitive.

Definition at line 452 of file rosui.h.

452 { return this; }

◆ ComputeContentBounds()

template<class T = CWindow>
virtual VOID CUiWindow< T >::ComputeContentBounds ( RECT rect)
inlinevirtual

Reimplemented from CUiBox.

Definition at line 462 of file rosui.h.

463  {
464  RECT r;
465  ::GetWindowRect(T::m_hWnd, &r);
466  rect->left = min(rect->left, r.left);
467  rect->top = min(rect->top, r.top);
468  rect->right = max(rect->right, r.right);
469  rect->bottom = max(rect->bottom, r.bottom);
470  };
#define max(a, b)
Definition: svc.c:63
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
& rect
Definition: startmenu.cpp:1413
#define min(a, b)
Definition: monoChain.cc:55
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)

◆ ComputeMinimalSize()

template<class T = CWindow>
virtual VOID CUiWindow< T >::ComputeMinimalSize ( SIZE size)
inlinevirtual

Reimplemented from CUiBox.

Definition at line 456 of file rosui.h.

457  {
458  // TODO: Maybe use WM_GETMINMAXINFO?
460  };
GLsizeiptr size
Definition: glext.h:5919
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:303

◆ CountSizableChildren()

template<class T = CWindow>
virtual DWORD_PTR CUiWindow< T >::CountSizableChildren ( )
inlinevirtual

Reimplemented from CUiBox.

Definition at line 472 of file rosui.h.

473  {
474  return 1;
475  };

Referenced by CMainWindow::OnSize().

◆ GetWindow()

template<class T = CWindow>
HWND CUiWindow< T >::GetWindow ( )
inline

Definition at line 454 of file rosui.h.

454 { return T::m_hWnd; }

Referenced by CMainWindow::UpdateApplicationsList().

◆ GetWindowTextW()

template<class T = CWindow>
VOID CUiWindow< T >::GetWindowTextW ( ATL::CStringW szText)
inline

Definition at line 501 of file rosui.h.

502  {
505  szText.ReleaseBuffer();
506  }
int32_t INT
Definition: typedefs.h:56
static const WCHAR szText[]
Definition: dialog.c:139
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
int WINAPI GetWindowTextLengthW(_In_ HWND)
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1408

Referenced by CMainWindow::OnCommand().

◆ OnParentSize()

template<class T = CWindow>
virtual HDWP CUiWindow< T >::OnParentSize ( RECT  parentRect,
HDWP  hDwp 
)
inlinevirtual

Reimplemented from CUiBox.

Definition at line 477 of file rosui.h.

478  {
479  RECT rect;
480 
481  ::GetWindowRect(T::m_hWnd, &rect);
482 
483  ComputeRect(parentRect, rect, &rect);
484 
485  if (hDwp)
486  {
487  return ::DeferWindowPos(hDwp, T::m_hWnd, NULL, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOACTIVATE | SWP_NOZORDER);
488  }
489  else
490  {
491  T::SetWindowPos(NULL, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOACTIVATE | SWP_NOZORDER | SWP_DEFERERASE);
492  return NULL;
493  }
494  };
#define SWP_NOZORDER
Definition: winuser.h:1232
& rect
Definition: startmenu.cpp:1413
smooth NULL
Definition: ftsmooth.c:416
virtual VOID ComputeRect(RECT parentRect, RECT currentRect, RECT *newRect)
Definition: rosui.h:248
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define SWP_DEFERERASE
Definition: winuser.h:1237
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)

Referenced by CMainWindow::OnSize().


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