ReactOS 0.4.15-dev-7196-g0fe0b40
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 VOID AppendTabOrderWindow (int Direction, ATL::CSimpleArray< HWND > &TabOrderList)
 
virtual ~CUiWindow ()
 
VOID GetWindowTextW (CStringW &szText)
 
- Public Member Functions inherited from CUiPrimitive
virtual ~CUiPrimitive ()
 
virtual CUiBoxAsBox ()
 
virtual VOID ComputeMinimalSize (SIZE *size)
 
virtual VOID ComputeContentBounds (RECT *rect)
 
virtual DWORD_PTR CountSizableChildren ()
 
virtual HDWP OnParentSize (RECT parentRect, HDWP hDwp)
 

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 482 of file rosui.h.

Constructor & Destructor Documentation

◆ ~CUiWindow()

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

Definition at line 552 of file rosui.h.

553 {
554 if (T::IsWindow())
555 {
556 T::DestroyWindow();
557 }
558 }

Member Function Documentation

◆ AppendTabOrderWindow()

template<class T = CWindow>
virtual VOID CUiWindow< T >::AppendTabOrderWindow ( int  Direction,
ATL::CSimpleArray< HWND > &  TabOrderList 
)
inlinevirtual

Reimplemented in CApplicationView.

Definition at line 546 of file rosui.h.

547 {
548 TabOrderList.Add(T::m_hWnd);
549 return;
550 }
BOOL Add(const T &t)
Definition: atlsimpcoll.h:58

Referenced by CApplicationView::AppendTabOrderWindow(), and CMainWindow::HandleTabOrder().

◆ AsBox()

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

Reimplemented from CUiPrimitive.

Definition at line 486 of file rosui.h.

487 {
488 return this;
489 }

◆ ComputeContentBounds()

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

Reimplemented from CUiBox.

Definition at line 505 of file rosui.h.

506 {
507 RECT r;
508 ::GetWindowRect(T::m_hWnd, &r);
509 rect->left = min(rect->left, r.left);
510 rect->top = min(rect->top, r.top);
511 rect->right = max(rect->right, r.right);
512 rect->bottom = max(rect->bottom, r.bottom);
513 };
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define min(a, b)
Definition: monoChain.cc:55
& rect
Definition: startmenu.cpp:1413
#define max(a, b)
Definition: svc.c:63
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 498 of file rosui.h.

499 {
500 // TODO: Maybe use WM_GETMINMAXINFO?
502 };
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:323
GLsizeiptr size
Definition: glext.h:5919

◆ CountSizableChildren()

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

Reimplemented from CUiBox.

Definition at line 516 of file rosui.h.

517 {
518 return 1;
519 };

Referenced by CApplicationView::OnSize().

◆ GetWindow()

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

Definition at line 492 of file rosui.h.

493 {
494 return T::m_hWnd;
495 }

Referenced by CApplicationView::OnCommand(), and CApplicationView::ProcessWindowMessage().

◆ GetWindowTextW()

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

Definition at line 561 of file rosui.h.

562 {
563 INT length = CWindow::GetWindowTextLengthW() + 1;
564 CWindow::GetWindowTextW(szText.GetBuffer(length), length);
565 szText.ReleaseBuffer();
566 }
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
int32_t INT
Definition: typedefs.h:58

Referenced by CApplicationView::OnCommand().

◆ OnParentSize()

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

Reimplemented from CUiBox.

Definition at line 522 of file rosui.h.

523 {
524 RECT rect;
525
526 ::GetWindowRect(T::m_hWnd, &rect);
527
528 ComputeRect(parentRect, rect, &rect);
529
530 if (hDwp)
531 {
532 return ::DeferWindowPos(
533 hDwp, T::m_hWnd, NULL, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
535 }
536 else
537 {
538 T::SetWindowPos(
539 NULL, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
541 return NULL;
542 }
543 };
virtual VOID ComputeRect(RECT parentRect, RECT currentRect, RECT *newRect)
Definition: rosui.h:268
#define NULL
Definition: types.h:112
#define SWP_NOACTIVATE
Definition: winuser.h:1241
#define SWP_DEFERERASE
Definition: winuser.h:1251
#define SWP_NOZORDER
Definition: winuser.h:1246

Referenced by CApplicationView::OnSize().


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