ReactOS  0.4.12-dev-685-gf36cbf7
rosui.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS UI Layout Engine
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * FILE: base/applications/rapps/include/rosui.h
5  * PURPOSE: ATL Layout engine for RAPPS
6  * COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com)
7  */
8 #pragma once
9 
10 #include <atlwin.h>
11 
12 template<class T, INT GrowthRate = 10>
14 {
15 protected:
17 
18 public:
20  {
21  m_hDpa = DPA_Create(GrowthRate);
22  }
23 
25  {
27  }
28 
29 private:
31  {
33  return (INT) self->OnRemoveItem(reinterpret_cast<T*>(ptr));
34  }
35 
37  {
39  return self->OnCompareItems(reinterpret_cast<T*>(p1), reinterpret_cast<T*>(p2));
40  }
41 
42 public:
43  virtual BOOL OnRemoveItem(T * ptr)
44  {
45  return TRUE;
46  }
47 
48  virtual INT OnCompareItems(T * p1, T * p2)
49  {
50  INT_PTR t = (reinterpret_cast<INT_PTR>(p2) - reinterpret_cast<INT_PTR>(p1));
51  if (t > 0)
52  return 1;
53  if (t < 0)
54  return -1;
55  return 0;
56  }
57 
58 public:
59  INT GetCount() const
60  {
61  return DPA_GetPtrCount(m_hDpa);
62  }
63 
64  T* Get(INT i) const
65  {
66  return (T*) DPA_GetPtr(m_hDpa, i);
67  }
68 
70  {
71  return DPA_SetPtr(m_hDpa, i, ptr);
72  }
73 
74  INT Insert(INT at, T* ptr)
75  {
76  return DPA_InsertPtr(m_hDpa, at, ptr);
77  }
78 
80  {
81  return DPA_InsertPtr(m_hDpa, DA_LAST, ptr);
82  }
83 
84  INT IndexOf(T* ptr) const
85  {
86  return DPA_GetPtrIndex(m_hDpa, ptr);
87  }
88 
90  {
91  INT i = IndexOf(ptr);
92  if (i < 0)
93  return FALSE;
94  return RemoveAt(i);
95  }
96 
98  {
99  T* ptr = (T*) DPA_GetPtr(m_hDpa, i);
100  OnRemoveItem(ptr);
101  return DPA_DeletePtr(m_hDpa, i);
102  }
103 
105  {
107  return DPA_DeleteAllPtrs(m_hDpa);
108  }
109 
111  {
112  return DPA_Sort(m_hDpa, s_OnCompareItems, (LPARAM)this);
113  }
114 
116  {
117  return DPA_Search(m_hDpa, s_OnCompareItems, (LPARAM)this);
118  }
119 };
120 
121 class CUiRect
122  : public RECT
123 {
124 public:
126  {
127  left = right = top = bottom = 0;
128  }
129 
131  {
132  left = l;
133  right = r;
134  top = t;
135  bottom = b;
136  }
137 };
138 
140  : public CUiRect
141 {
142 public:
144  {
145  }
146 
148  : CUiRect(all, all, all, all)
149  {
150  }
151 
152  CUiMargin(INT horz, INT vert)
153  : CUiRect(horz, vert, horz, vert)
154  {
155  }
156 };
157 
159 {
160 public:
162  {
167  };
168 
169 private:
172 
173 public:
175  {
177  m_Value = 0;
178  }
179 
181  {
182  m_Type = type;
183  m_Value = value;
184  }
185 
187  {
188  switch (m_Type)
189  {
190  case Type_FitContent:
191  return content;
192  case Type_Fixed:
193  return m_Value;
194  case Type_Percent:
195  return max(content, parent * m_Value / 100);
196  case Type_FitParent:
197  return parent;
198  }
199 
200  return 0;
201  }
202 
203 public:
205  {
206  return CUiMeasure(Type_FitContent, 0);
207  }
208 
210  {
211  return CUiMeasure(Type_FitParent, 0);
212  }
213 
215  {
216  return CUiMeasure(Type_Fixed, pixels);
217  }
218 
219  static CUiMeasure Percent(INT percent)
220  {
221  return CUiMeasure(Type_Percent, percent);
222  }
223 };
224 
226 {
231 };
232 
233 class CUiBox
234 {
235 public:
237 
240 
241 protected:
243  {
246  }
247 
248  virtual VOID ComputeRect(RECT parentRect, RECT currentRect, RECT* newRect)
249  {
250  parentRect.left += m_Margin.left;
251  parentRect.right -= m_Margin.right;
252  parentRect.top += m_Margin.top;
253  parentRect.bottom -= m_Margin.bottom;
254 
255  if (parentRect.right < parentRect.left)
256  parentRect.right = parentRect.left;
257 
258  if (parentRect.bottom < parentRect.top)
259  parentRect.bottom = parentRect.top;
260 
261  SIZE szParent = {parentRect.right - parentRect.left, parentRect.bottom - parentRect.top};
262  SIZE szCurrent = {currentRect.right - currentRect.left, currentRect.bottom - currentRect.top};
263 
264  currentRect = parentRect;
265 
266  switch (m_HorizontalAlignment)
267  {
268  case UiAlign_LeftTop:
269  currentRect.right = currentRect.left + szCurrent.cx;
270  break;
271  case UiAlign_Middle:
272  currentRect.left = parentRect.left + (szParent.cx - szCurrent.cx) / 2;
273  currentRect.right = currentRect.left + szCurrent.cx;
274  break;
275  case UiAlign_RightBtm:
276  currentRect.left = currentRect.right - szCurrent.cx;
277  break;
278  default:
279  break;
280  }
281 
282  switch (m_VerticalAlignment)
283  {
284  case UiAlign_LeftTop:
285  currentRect.bottom = currentRect.top + szCurrent.cy;
286  break;
287  case UiAlign_Middle:
288  currentRect.top = parentRect.top + (szParent.cy - szCurrent.cy) / 2;
289  currentRect.bottom = currentRect.top + szCurrent.cy;
290  break;
291  case UiAlign_RightBtm:
292  currentRect.top = currentRect.bottom - szCurrent.cy;
293  break;
294  default:
295  break;
296  }
297 
298  *newRect = currentRect;
299  }
300 
301 
302 public:
304  {
305  // Override in subclass
306  size->cx = max(size->cx, 0);
307  size->cy = min(size->cy, 0);
308  };
309 
311  {
312  // Override in subclass
313  };
314 
316  {
317  // Override in subclass
318  return 0;
319  };
320 
321  virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
322  {
323  // Override in subclass
324  return NULL;
325  };
326 };
327 
329 {
330 protected:
332 
333 public:
334  virtual ~CUiPrimitive() {}
335 
336  virtual CUiBox * AsBox() { return NULL; }
337 };
338 
340  public CPointerArray < CUiPrimitive >
341 {
343  {
344  delete ptr;
345  return TRUE;
346  }
347 };
348 
350 {
351 protected:
353 
354 public:
356 };
357 
358 class CUiPanel :
359  public CUiPrimitive,
360  public CUiBox,
361  public CUiContainer
362 {
363 public:
366 
368  {
371  }
372 
373  virtual ~CUiPanel()
374  {
375  }
376 
377  virtual CUiBox * AsBox() { return this; }
378 
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  };
390 
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  };
402 
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  }
416 
417  virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
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  }
443 };
444 
445 template<class T = CWindow>
446 class CUiWindow :
447  public CUiPrimitive,
448  public CUiBox,
449  public T
450 {
451 public:
452  virtual CUiBox * AsBox() { return this; }
453 
454  HWND GetWindow() { return T::m_hWnd; }
455 
457  {
458  // TODO: Maybe use WM_GETMINMAXINFO?
460  };
461 
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  };
471 
473  {
474  return 1;
475  };
476 
477  virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
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  };
495 
496  virtual ~CUiWindow()
497  {
499  }
500 
502  {
505  szText.ReleaseBuffer();
506  }
507 };
508 
510  public CUiPrimitive,
511  public CUiBox,
512  public CWindowImpl<CUiSplitPanel>
513 {
514  static const INT THICKNESS = 4;
515 
516 protected:
517 
519 
522 
524 
526 
527 public:
533 
536 
538  {
541  m_Pos = 100;
542  m_MinFirst = 100;
543  m_MinSecond = 100;
546  }
547 
548  virtual ~CUiSplitPanel()
549  {
550  }
551 
552  virtual CUiBox * AsBox() { return this; }
553 
556 
558  {
559  if (m_Horizontal)
560  size->cx = max(size->cx, THICKNESS);
561  else
562  size->cy = max(size->cy, THICKNESS);
565  };
566 
568  {
569  RECT r;
570 
573 
574  ::GetWindowRect(m_hWnd, &r);
575 
576  rect->left = min(rect->left, r.left);
577  rect->top = min(rect->top, r.top);
578  rect->right = max(rect->right, r.right);
579  rect->bottom = max(rect->bottom, r.bottom);
580  };
581 
583  {
584  INT count = 1;
587  return count;
588  };
589 
590  virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
591  {
592  RECT rect = {0};
593 
594  SIZE content = {0};
596 
597  INT preferredWidth = m_Width.ComputeMeasure(parentRect.right - parentRect.left, content.cx);
598  INT preferredHeight = m_Width.ComputeMeasure(parentRect.bottom - parentRect.top, content.cy);
599 
600  rect.right = preferredWidth;
601  rect.bottom = preferredHeight;
602 
603  ComputeRect(parentRect, rect, &rect);
604 
605  SIZE growth = {0};
606  if (m_HasOldRect)
607  {
608  RECT oldRect = m_LastRect;
609 
610  growth.cx = (parentRect.right - parentRect.left) - (oldRect.right - oldRect.left);
611  growth.cy = (parentRect.bottom - parentRect.top) - (oldRect.bottom - oldRect.top);
612  }
613 
614  RECT splitter = rect;
615  RECT first = rect;
616  RECT second = rect;
617 
618  if (m_Horizontal)
619  {
620  rect.top += m_MinFirst;
621  rect.bottom -= THICKNESS + m_MinSecond;
622  if (m_DynamicFirst)
623  {
624  if (growth.cy > 0)
625  {
626  m_Pos += min(growth.cy, rect.bottom - (m_Pos + THICKNESS));
627  }
628  else if (growth.cy < 0)
629  {
630  m_Pos += max(growth.cy, rect.top - m_Pos);
631  }
632  }
633 
634  if (m_Pos > rect.bottom)
635  m_Pos = rect.bottom;
636 
637  if (m_Pos < rect.top)
638  m_Pos = rect.top;
639 
640  splitter.top = m_Pos;
641  splitter.bottom = m_Pos + THICKNESS;
642  first.bottom = splitter.top;
643  second.top = splitter.bottom;
644  }
645  else
646  {
647  rect.left += m_MinFirst;
648  rect.right -= THICKNESS + m_MinSecond;
649  if (m_DynamicFirst)
650  {
651  if (growth.cx > 0)
652  {
653  m_Pos += min(growth.cx, rect.right - (m_Pos + THICKNESS));
654  }
655  else if (growth.cx < 0)
656  {
657  m_Pos += max(growth.cy, rect.left - m_Pos);
658  }
659  }
660 
661  if (m_Pos > rect.right)
662  m_Pos = rect.right;
663 
664  if (m_Pos < rect.left)
665  m_Pos = rect.left;
666 
667  splitter.left = m_Pos;
668  splitter.right = m_Pos + THICKNESS;
669  first.right = splitter.left;
670  second.left = splitter.right;
671  }
672 
673  m_LastRect = parentRect;
674  m_HasOldRect = TRUE;
675 
676  hDwp = m_First.OnParentSize(first, hDwp);
677  hDwp = m_Second.OnParentSize(second, hDwp);
678 
679  if (hDwp)
680  {
681  return DeferWindowPos(hDwp, NULL,
682  splitter.left, splitter.top,
683  splitter.right - splitter.left,
684  splitter.bottom - splitter.top,
686  }
687  else
688  {
690  splitter.left, splitter.top,
691  splitter.right - splitter.left,
692  splitter.bottom - splitter.top,
694  return NULL;
695  }
696  };
697 
698 private:
700  {
701  theResult = 0;
702  switch (Msg)
703  {
704  case WM_SETCURSOR:
706  theResult = TRUE;
707  break;
708 
709  case WM_LBUTTONDOWN:
710  SetCapture();
711  break;
712 
713  case WM_LBUTTONUP:
714  case WM_RBUTTONDOWN:
715  if (GetCapture() == m_hWnd)
716  {
717  ReleaseCapture();
718  }
719  break;
720 
721  case WM_MOUSEMOVE:
722  if (GetCapture() == m_hWnd)
723  {
724  POINT Point;
727  if (m_Horizontal)
728  SetPos(Point.y);
729  else
730  SetPos(Point.x);
731  }
732  break;
733 
734  default:
735  return FALSE;
736  }
737 
738  return TRUE;
739  }
740 
741 public:
743  {
744  return m_Pos;
745  }
746 
747  VOID SetPos(INT NewPos)
748  {
749  RECT rcParent;
750 
751  rcParent = m_LastRect;
752 
753  if (m_Horizontal)
754  {
755  rcParent.bottom -= THICKNESS;
756 
757  m_Pos = NewPos;
758 
759  if (m_Pos < rcParent.top)
760  m_Pos = rcParent.top;
761 
762  if (m_Pos > rcParent.bottom)
763  m_Pos = rcParent.bottom;
764  }
765  else
766  {
767  rcParent.right -= THICKNESS;
768 
769  m_Pos = NewPos;
770 
771  if (m_Pos < rcParent.left)
772  m_Pos = rcParent.left;
773 
774  if (m_Pos > rcParent.right)
775  m_Pos = rcParent.right;
776  }
777 
779 
780  HDWP hdwp = NULL;
781  hdwp = BeginDeferWindowPos(count);
782  if (hdwp) hdwp = OnParentSize(m_LastRect, hdwp);
783  if (hdwp) EndDeferWindowPos(hdwp);
784  }
785 
786 public:
787  DECLARE_WND_CLASS_EX(_T("SplitterWindowClass"), CS_HREDRAW | CS_VREDRAW, COLOR_BTNFACE)
788 
789  /* Create splitter bar */
791  {
792  if (m_Horizontal)
794  else
796 
798  DWORD exStyle = WS_EX_TRANSPARENT;
799 
800  RECT size = {205, 180, 465, THICKNESS};
801  size.right += size.left;
802  size.bottom += size.top;
803 
804  return CWindowImpl::Create(hwndParent, size, NULL, style, exStyle);
805  }
806 };
BOOL m_HasOldRect
Definition: rosui.h:525
#define IDC_SIZEWE
Definition: winuser.h:689
CUiMeasure(MeasureType type, INT value)
Definition: rosui.h:180
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
virtual BOOL OnRemoveItem(CUiPrimitive *ptr)
Definition: rosui.h:342
void WINAPI DPA_DestroyCallback(HDPA hdpa, PFNDPAENUMCALLBACK enumProc, LPVOID lParam)
Definition: dpa.c:1003
#define max(a, b)
Definition: svc.c:63
INT IndexOf(T *ptr) const
Definition: rosui.h:84
HDWP WINAPI BeginDeferWindowPos(_In_ int)
#define TRUE
Definition: types.h:120
RECT m_LastRect
Definition: rosui.h:523
HDPA WINAPI DPA_Create(INT nGrow)
Definition: dpa.c:950
CUiMargin()
Definition: rosui.h:143
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:379
CUiCollection & Second()
Definition: rosui.h:555
#define WM_LBUTTONDOWN
Definition: winuser.h:1752
HCURSOR m_hCursor
Definition: rosui.h:518
virtual CUiBox * AsBox()
Definition: rosui.h:552
Definition: rosui.h:121
Definition: http.c:6587
virtual CUiBox * AsBox()
Definition: rosui.h:336
Definition: rosui.h:233
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
_In_ BOOLEAN Create
Definition: pstypes.h:511
static const INT THICKNESS
Definition: rosui.h:514
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:472
GLuint GLuint GLsizei count
Definition: gl.h:1545
const GLint * first
Definition: glext.h:5794
INT m_MinFirst
Definition: rosui.h:531
#define CALLBACK
Definition: compat.h:27
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:1876
INT Search(T *item, INT iStart, UINT uFlags)
Definition: rosui.h:115
#define WS_EX_TRANSPARENT
Definition: pedump.c:649
virtual ~CUiPrimitive()
Definition: rosui.h:334
INT GetCount() const
Definition: rosui.h:59
LONG top
Definition: windef.h:292
T * Get(INT i) const
Definition: rosui.h:64
GLdouble GLdouble t
Definition: gl.h:2047
BOOL Remove(T *ptr)
Definition: rosui.h:89
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define CS_HREDRAW
Definition: winuser.h:648
CUiMeasure m_Height
Definition: rosui.h:365
_In_ UINT iStart
Definition: wingdi.h:3598
CUiMeasure()
Definition: rosui.h:174
#define WS_CHILD
Definition: pedump.c:617
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
HICON HCURSOR
Definition: windef.h:284
UINT uFlags
Definition: api.c:60
CUiSplitPanel()
Definition: rosui.h:537
int32_t INT_PTR
Definition: typedefs.h:62
virtual BOOL OnRemoveItem(T *ptr)
Definition: rosui.h:43
CUiMeasure m_Width
Definition: rosui.h:534
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2635
LONG right
Definition: windef.h:293
virtual ~CUiPanel()
Definition: rosui.h:373
MeasureType
Definition: rosui.h:161
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL Sort()
Definition: rosui.h:110
int32_t INT
Definition: typedefs.h:56
virtual ~CUiSplitPanel()
Definition: rosui.h:548
#define T
Definition: mbstring.h:31
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
HDPA m_hDpa
Definition: rosui.h:16
#define IDC_SIZENS
Definition: winuser.h:690
INT GetPos()
Definition: rosui.h:742
UINT_PTR WPARAM
Definition: windef.h:207
virtual VOID ComputeContentBounds(RECT *rect)
Definition: rosui.h:310
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:417
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 Append(T *ptr)
Definition: rosui.h:79
static const WCHAR szText[]
Definition: dialog.c:139
CPointerArray()
Definition: rosui.h:19
INT ComputeMeasure(INT parent, INT content)
Definition: rosui.h:186
CUiAlignment
Definition: rosui.h:225
LONG_PTR LPARAM
Definition: windef.h:208
#define WM_SETCURSOR
Definition: winuser.h:1618
static CUiMeasure FitParent()
Definition: rosui.h:209
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
HWND WINAPI GetCapture(void)
Definition: message.c:2855
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:582
static PVOID ptr
Definition: dispmode.c:27
content
Definition: atl_ax.c:994
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
BOOL Clear()
Definition: rosui.h:104
LONG cx
Definition: windef.h:319
GLint GLint bottom
Definition: glext.h:7726
#define DPA_GetPtrCount(hdpa)
Definition: commctrl.h:4926
virtual CUiBox * AsBox()
Definition: rosui.h:377
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:315
CUiPanel()
Definition: rosui.h:367
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:321
INT Insert(INT at, T *ptr)
Definition: rosui.h:74
INT m_MinSecond
Definition: rosui.h:532
CUiRect(INT l, INT t, INT r, INT b)
Definition: rosui.h:130
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:557
#define b
Definition: ke_i.h:79
#define WM_RBUTTONDOWN
Definition: winuser.h:1755
r l[0]
Definition: byte_order.h:167
virtual VOID ComputeRect(RECT parentRect, RECT currentRect, RECT *newRect)
Definition: rosui.h:248
#define CS_VREDRAW
Definition: winuser.h:653
HWND GetWindow()
Definition: rosui.h:454
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define _T(x)
Definition: vfdio.h:22
INT m_Value
Definition: rosui.h:171
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizeiptr size
Definition: glext.h:5919
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
CUiPanel m_First
Definition: rosui.h:520
BOOL m_DynamicFirst
Definition: rosui.h:530
r parent
Definition: btrfs.c:2659
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:303
MeasureType m_Type
Definition: rosui.h:170
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define SWP_NOACTIVATE
Definition: winuser.h:1227
static CUiMeasure Percent(INT percent)
Definition: rosui.h:219
int WINAPI GetWindowTextLengthW(_In_ HWND)
BOOL WINAPI DPA_DeleteAllPtrs(HDPA hdpa)
Definition: dpa.c:730
CUiCollection & First()
Definition: rosui.h:554
unsigned int UINT
Definition: ndis.h:50
VOID GetWindowTextW(ATL::CStringW &szText)
Definition: rosui.h:501
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint left
Definition: glext.h:7726
INT WINAPI DPA_GetPtrIndex(HDPA hdpa, LPCVOID p)
Definition: dpa.c:561
CUiMargin(INT horz, INT vert)
Definition: rosui.h:152
BOOL m_Horizontal
Definition: rosui.h:529
GLdouble GLdouble right
Definition: glext.h:10859
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:590
CUiMeasure m_Height
Definition: rosui.h:535
CUiBox()
Definition: rosui.h:242
BOOL RemoveAt(INT i)
Definition: rosui.h:97
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:456
struct Point Point
~CPointerArray()
Definition: rosui.h:24
BOOL Set(INT i, T *ptr)
Definition: rosui.h:69
BOOL ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: rosui.h:699
INT WINAPI DPA_InsertPtr(HDPA hdpa, INT i, LPVOID p)
Definition: dpa.c:591
#define COLOR_BTNFACE
Definition: winuser.h:918
BOOL WINAPI DPA_Sort(HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
Definition: dpa.c:813
static INT CALLBACK s_OnCompareItems(PVOID p1, PVOID p2, LPARAM lParam)
Definition: rosui.h:36
VOID WINAPI DPA_EnumCallback(HDPA hdpa, PFNDPAENUMCALLBACK enumProc, LPVOID lParam)
Definition: dpa.c:969
CUiRect()
Definition: rosui.h:125
uint32_t DWORD_PTR
Definition: typedefs.h:63
GLsizei const GLfloat * value
Definition: glext.h:6069
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
#define LoadCursor
Definition: winuser.h:5678
static INT CALLBACK s_OnRemoveItem(PVOID ptr, PVOID context)
Definition: rosui.h:30
CUiPanel m_Second
Definition: rosui.h:521
HWND WINAPI GetParent(_In_ HWND)
INT m_Pos
Definition: rosui.h:528
HWND WINAPI SetCapture(_In_ HWND hWnd)
static ATOM item
Definition: dde.c:856
static CUiMeasure FitContent()
Definition: rosui.h:204
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1378
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define DPA_GetPtr
Definition: commctrl.h:5
virtual INT OnCompareItems(T *p1, T *p2)
Definition: rosui.h:48
virtual VOID ComputeContentBounds(RECT *rect)
Definition: rosui.h:567
virtual ~CUiWindow()
Definition: rosui.h:496
#define WM_LBUTTONUP
Definition: winuser.h:1753
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: gl.h:1546
struct @1565 Msg[]
#define min(a, b)
Definition: monoChain.cc:55
#define WM_MOUSEMOVE
Definition: winuser.h:1751
#define SWP_DEFERERASE
Definition: winuser.h:1237
CUiMeasure m_Width
Definition: rosui.h:364
virtual CUiBox * AsBox()
Definition: rosui.h:452
CUiCollection & Children()
Definition: rosui.h:355
#define DA_LAST
Definition: commctrl.h:4754
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2864
LPVOID WINAPI DPA_DeletePtr(HDPA hdpa, INT i)
Definition: dpa.c:677
CUiMargin(INT all)
Definition: rosui.h:147
CUiCollection m_Children
Definition: rosui.h:352
LONG bottom
Definition: windef.h:294
static CUiMeasure Fixed(INT pixels)
Definition: rosui.h:214
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)
virtual VOID ComputeContentBounds(RECT *rect)
Definition: rosui.h:462
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
LONG_PTR LRESULT
Definition: windef.h:209
CUiMargin m_Margin
Definition: rosui.h:236
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
CUiPrimitive * m_Parent
Definition: rosui.h:331
LONG cy
Definition: windef.h:320
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:403
LPARAM lParam
Definition: combotst.c:139
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:477
INT WINAPI DPA_Search(HDPA hdpa, LPVOID pFind, INT nStart, PFNDPACOMPARE pfnCompare, LPARAM lParam, UINT uOptions)
Definition: dpa.c:845
virtual VOID ComputeContentBounds(RECT *rect)
Definition: rosui.h:391
Definition: palette.c:467
Definition: dpa.c:48
BOOL WINAPI DPA_SetPtr(HDPA hdpa, INT i, LPVOID p)
Definition: dpa.c:626
VOID SetPos(INT NewPos)
Definition: rosui.h:747