ReactOS  0.4.15-dev-3294-ge98684e
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  {
100  if (ptr != NULL)
101  {
102  OnRemoveItem(reinterpret_cast<T*>(ptr));
103  return TRUE;
104  }
105  return FALSE;
106  }
107 
109  {
111  return DPA_DeleteAllPtrs(m_hDpa);
112  }
113 
115  {
116  return DPA_Sort(m_hDpa, s_OnCompareItems, (LPARAM)this);
117  }
118 
120  {
121  return DPA_Search(m_hDpa, item, 0, s_OnCompareItems, (LPARAM)this, 0);
122  }
123 };
124 
125 class CUiRect
126  : public RECT
127 {
128 public:
130  {
131  left = right = top = bottom = 0;
132  }
133 
135  {
136  left = l;
137  right = r;
138  top = t;
139  bottom = b;
140  }
141 };
142 
144  : public CUiRect
145 {
146 public:
148  {
149  }
150 
152  : CUiRect(all, all, all, all)
153  {
154  }
155 
156  CUiMargin(INT horz, INT vert)
157  : CUiRect(horz, vert, horz, vert)
158  {
159  }
160 };
161 
163 {
164 public:
166  {
171  };
172 
173 private:
176 
177 public:
179  {
181  m_Value = 0;
182  }
183 
185  {
186  m_Type = type;
187  m_Value = value;
188  }
189 
191  {
192  switch (m_Type)
193  {
194  case Type_FitContent:
195  return content;
196  case Type_Fixed:
197  return m_Value;
198  case Type_Percent:
199  return max(content, parent * m_Value / 100);
200  case Type_FitParent:
201  return parent;
202  }
203 
204  return 0;
205  }
206 
207 public:
209  {
210  return CUiMeasure(Type_FitContent, 0);
211  }
212 
214  {
215  return CUiMeasure(Type_FitParent, 0);
216  }
217 
219  {
220  return CUiMeasure(Type_Fixed, pixels);
221  }
222 
223  static CUiMeasure Percent(INT percent)
224  {
225  return CUiMeasure(Type_Percent, percent);
226  }
227 };
228 
230 {
235 };
236 
237 class CUiBox
238 {
239 public:
241 
244 
245 protected:
247  {
250  }
251 
252  virtual VOID ComputeRect(RECT parentRect, RECT currentRect, RECT* newRect)
253  {
254  parentRect.left += m_Margin.left;
255  parentRect.right -= m_Margin.right;
256  parentRect.top += m_Margin.top;
257  parentRect.bottom -= m_Margin.bottom;
258 
259  if (parentRect.right < parentRect.left)
260  parentRect.right = parentRect.left;
261 
262  if (parentRect.bottom < parentRect.top)
263  parentRect.bottom = parentRect.top;
264 
265  SIZE szParent = {parentRect.right - parentRect.left, parentRect.bottom - parentRect.top};
266  SIZE szCurrent = {currentRect.right - currentRect.left, currentRect.bottom - currentRect.top};
267 
268  currentRect = parentRect;
269 
270  switch (m_HorizontalAlignment)
271  {
272  case UiAlign_LeftTop:
273  currentRect.right = currentRect.left + szCurrent.cx;
274  break;
275  case UiAlign_Middle:
276  currentRect.left = parentRect.left + (szParent.cx - szCurrent.cx) / 2;
277  currentRect.right = currentRect.left + szCurrent.cx;
278  break;
279  case UiAlign_RightBtm:
280  currentRect.left = currentRect.right - szCurrent.cx;
281  break;
282  default:
283  break;
284  }
285 
286  switch (m_VerticalAlignment)
287  {
288  case UiAlign_LeftTop:
289  currentRect.bottom = currentRect.top + szCurrent.cy;
290  break;
291  case UiAlign_Middle:
292  currentRect.top = parentRect.top + (szParent.cy - szCurrent.cy) / 2;
293  currentRect.bottom = currentRect.top + szCurrent.cy;
294  break;
295  case UiAlign_RightBtm:
296  currentRect.top = currentRect.bottom - szCurrent.cy;
297  break;
298  default:
299  break;
300  }
301 
302  *newRect = currentRect;
303  }
304 
305 
306 public:
308  {
309  // Override in subclass
310  size->cx = max(size->cx, 0);
311  size->cy = min(size->cy, 0);
312  };
313 
315  {
316  // Override in subclass
317  };
318 
320  {
321  // Override in subclass
322  return 0;
323  };
324 
325  virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
326  {
327  // Override in subclass
328  return NULL;
329  };
330 };
331 
333 {
334 protected:
336 
337 public:
338  virtual ~CUiPrimitive() {}
339 
340  virtual CUiBox * AsBox() { return NULL; }
341 };
342 
344  public CPointerArray < CUiPrimitive >
345 {
347  {
348  delete ptr;
349  return TRUE;
350  }
351 };
352 
354 {
355 protected:
357 
358 public:
360 };
361 
362 class CUiPanel :
363  public CUiPrimitive,
364  public CUiBox,
365  public CUiContainer
366 {
367 public:
370 
372  {
375  }
376 
377  virtual ~CUiPanel()
378  {
379  }
380 
381  virtual CUiBox * AsBox() { return this; }
382 
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  };
394 
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  };
406 
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  }
420 
421  virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
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  }
447 };
448 
449 template<class T = CWindow>
450 class CUiWindow :
451  public CUiPrimitive,
452  public CUiBox,
453  public T
454 {
455 public:
456  virtual CUiBox * AsBox() { return this; }
457 
458  HWND GetWindow() { return T::m_hWnd; }
459 
461  {
462  // TODO: Maybe use WM_GETMINMAXINFO?
464  };
465 
467  {
468  RECT r;
469  ::GetWindowRect(T::m_hWnd, &r);
470  rect->left = min(rect->left, r.left);
471  rect->top = min(rect->top, r.top);
472  rect->right = max(rect->right, r.right);
473  rect->bottom = max(rect->bottom, r.bottom);
474  };
475 
477  {
478  return 1;
479  };
480 
481  virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
482  {
483  RECT rect;
484 
485  ::GetWindowRect(T::m_hWnd, &rect);
486 
487  ComputeRect(parentRect, rect, &rect);
488 
489  if (hDwp)
490  {
491  return ::DeferWindowPos(hDwp, T::m_hWnd, NULL, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOACTIVATE | SWP_NOZORDER);
492  }
493  else
494  {
495  T::SetWindowPos(NULL, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOACTIVATE | SWP_NOZORDER | SWP_DEFERERASE);
496  return NULL;
497  }
498  };
499 
501  {
502  TabOrderList.Add(T::m_hWnd);
503  return;
504  }
505 
506  virtual ~CUiWindow()
507  {
508  if (T::IsWindow())
509  {
511  }
512  }
513 
515  {
518  szText.ReleaseBuffer();
519  }
520 };
521 
523  public CUiPrimitive,
524  public CUiBox,
525  public CWindowImpl<CUiSplitPanel>
526 {
527  static const INT THICKNESS = 4;
528 
529 protected:
530 
532 
535 
537 
539 
540 public:
546 
549 
551  {
554  m_Pos = 100;
555  m_MinFirst = 100;
556  m_MinSecond = 100;
559  }
560 
561  virtual ~CUiSplitPanel()
562  {
563  }
564 
565  virtual CUiBox * AsBox() { return this; }
566 
569 
571  {
572  if (m_Horizontal)
573  size->cx = max(size->cx, THICKNESS);
574  else
575  size->cy = max(size->cy, THICKNESS);
578  };
579 
581  {
582  RECT r;
583 
586 
587  ::GetWindowRect(m_hWnd, &r);
588 
589  rect->left = min(rect->left, r.left);
590  rect->top = min(rect->top, r.top);
591  rect->right = max(rect->right, r.right);
592  rect->bottom = max(rect->bottom, r.bottom);
593  };
594 
596  {
597  INT count = 1;
600  return count;
601  };
602 
603  virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
604  {
605  RECT rect = {0};
606 
607  SIZE content = {0};
609 
610  INT preferredWidth = m_Width.ComputeMeasure(parentRect.right - parentRect.left, content.cx);
611  INT preferredHeight = m_Width.ComputeMeasure(parentRect.bottom - parentRect.top, content.cy);
612 
613  rect.right = preferredWidth;
614  rect.bottom = preferredHeight;
615 
616  ComputeRect(parentRect, rect, &rect);
617 
618  SIZE growth = {0};
619  if (m_HasOldRect)
620  {
621  RECT oldRect = m_LastRect;
622 
623  growth.cx = (parentRect.right - parentRect.left) - (oldRect.right - oldRect.left);
624  growth.cy = (parentRect.bottom - parentRect.top) - (oldRect.bottom - oldRect.top);
625  }
626 
627  RECT splitter = rect;
628  RECT first = rect;
629  RECT second = rect;
630 
631  if (m_Horizontal)
632  {
633  rect.top += m_MinFirst;
634  rect.bottom -= THICKNESS + m_MinSecond;
635  if (m_DynamicFirst)
636  {
637  if (growth.cy > 0)
638  {
639  m_Pos += min(growth.cy, rect.bottom - (m_Pos + THICKNESS));
640  }
641  else if (growth.cy < 0)
642  {
643  m_Pos += max(growth.cy, rect.top - m_Pos);
644  }
645  }
646 
647  if (m_Pos > rect.bottom)
648  m_Pos = rect.bottom;
649 
650  if (m_Pos < rect.top)
651  m_Pos = rect.top;
652 
653  splitter.top = m_Pos;
654  splitter.bottom = m_Pos + THICKNESS;
655  first.bottom = splitter.top;
656  second.top = splitter.bottom;
657  }
658  else
659  {
660  rect.left += m_MinFirst;
661  rect.right -= THICKNESS + m_MinSecond;
662  if (m_DynamicFirst)
663  {
664  if (growth.cx > 0)
665  {
666  m_Pos += min(growth.cx, rect.right - (m_Pos + THICKNESS));
667  }
668  else if (growth.cx < 0)
669  {
670  m_Pos += max(growth.cy, rect.left - m_Pos);
671  }
672  }
673 
674  if (m_Pos > rect.right)
675  m_Pos = rect.right;
676 
677  if (m_Pos < rect.left)
678  m_Pos = rect.left;
679 
680  splitter.left = m_Pos;
681  splitter.right = m_Pos + THICKNESS;
682  first.right = splitter.left;
683  second.left = splitter.right;
684  }
685 
686  m_LastRect = parentRect;
687  m_HasOldRect = TRUE;
688 
689  hDwp = m_First.OnParentSize(first, hDwp);
690  hDwp = m_Second.OnParentSize(second, hDwp);
691 
692  if (hDwp)
693  {
694  return DeferWindowPos(hDwp, NULL,
695  splitter.left, splitter.top,
696  splitter.right - splitter.left,
697  splitter.bottom - splitter.top,
699  }
700  else
701  {
703  splitter.left, splitter.top,
704  splitter.right - splitter.left,
705  splitter.bottom - splitter.top,
707  return NULL;
708  }
709  };
710 
711 private:
713  {
714  theResult = 0;
715  switch (Msg)
716  {
717  case WM_SETCURSOR:
719  theResult = TRUE;
720  break;
721 
722  case WM_LBUTTONDOWN:
723  SetCapture();
724  break;
725 
726  case WM_LBUTTONUP:
727  case WM_RBUTTONDOWN:
728  if (GetCapture() == m_hWnd)
729  {
730  ReleaseCapture();
731  }
732  break;
733 
734  case WM_MOUSEMOVE:
735  if (GetCapture() == m_hWnd)
736  {
737  POINT Point;
740  if (m_Horizontal)
741  SetPos(Point.y);
742  else
743  SetPos(Point.x);
744  }
745  break;
746 
747  default:
748  return FALSE;
749  }
750 
751  return TRUE;
752  }
753 
754 public:
756  {
757  return m_Pos;
758  }
759 
760  VOID SetPos(INT NewPos)
761  {
762  RECT rcParent;
763 
764  rcParent = m_LastRect;
765 
766  if (m_Horizontal)
767  {
768  rcParent.bottom -= THICKNESS;
769 
770  m_Pos = NewPos;
771 
772  if (m_Pos < rcParent.top)
773  m_Pos = rcParent.top;
774 
775  if (m_Pos > rcParent.bottom)
776  m_Pos = rcParent.bottom;
777  }
778  else
779  {
780  rcParent.right -= THICKNESS;
781 
782  m_Pos = NewPos;
783 
784  if (m_Pos < rcParent.left)
785  m_Pos = rcParent.left;
786 
787  if (m_Pos > rcParent.right)
788  m_Pos = rcParent.right;
789  }
790 
792 
793  HDWP hdwp = NULL;
794  hdwp = BeginDeferWindowPos(count);
795  if (hdwp) hdwp = OnParentSize(m_LastRect, hdwp);
796  if (hdwp) EndDeferWindowPos(hdwp);
797  }
798 
799 public:
800  DECLARE_WND_CLASS_EX(_T("SplitterWindowClass"), CS_HREDRAW | CS_VREDRAW, COLOR_BTNFACE)
801 
802  /* Create splitter bar */
804  {
805  if (m_Horizontal)
807  else
809 
811  DWORD exStyle = WS_EX_TRANSPARENT;
812 
813  RECT size = {205, 180, 465, THICKNESS};
814  size.right += size.left;
815  size.bottom += size.top;
816 
817  return CWindowImpl::Create(hwndParent, size, NULL, style, exStyle);
818  }
819 };
BOOL m_HasOldRect
Definition: rosui.h:538
#define IDC_SIZEWE
Definition: winuser.h:689
CUiMeasure(MeasureType type, INT value)
Definition: rosui.h:184
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
virtual BOOL OnRemoveItem(CUiPrimitive *ptr)
Definition: rosui.h:346
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)
Definition: pdh_main.c:93
RECT m_LastRect
Definition: rosui.h:536
HDPA WINAPI DPA_Create(INT nGrow)
Definition: dpa.c:950
CUiMargin()
Definition: rosui.h:147
BOOL Add(const T &t)
Definition: atlsimpcoll.h:58
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:383
CUiCollection & Second()
Definition: rosui.h:568
#define WM_LBUTTONDOWN
Definition: winuser.h:1759
HCURSOR m_hCursor
Definition: rosui.h:531
BOOL WINAPI IsWindow(_In_opt_ HWND)
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION Direction
virtual CUiBox * AsBox()
Definition: rosui.h:565
Definition: rosui.h:125
Definition: http.c:7251
#define TRUE
Definition: types.h:120
virtual CUiBox * AsBox()
Definition: rosui.h:340
Definition: rosui.h:237
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
_In_ BOOLEAN Create
Definition: pstypes.h:527
static const INT THICKNESS
Definition: rosui.h:527
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:476
GLuint GLuint GLsizei count
Definition: gl.h:1545
const GLint * first
Definition: glext.h:5794
INT m_MinFirst
Definition: rosui.h:544
#define CALLBACK
Definition: compat.h:35
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:1935
INT Search(T *item, INT iStart, UINT uFlags)
Definition: rosui.h:119
#define WS_EX_TRANSPARENT
Definition: pedump.c:649
virtual ~CUiPrimitive()
Definition: rosui.h:338
INT GetCount() const
Definition: rosui.h:59
LONG top
Definition: windef.h:307
T * Get(INT i) const
Definition: rosui.h:64
GLdouble GLdouble t
Definition: gl.h:2047
BOOL Remove(T *ptr)
Definition: rosui.h:89
#define CS_HREDRAW
Definition: winuser.h:648
CUiMeasure m_Height
Definition: rosui.h:369
_In_ UINT iStart
Definition: wingdi.h:3620
CUiMeasure()
Definition: rosui.h:178
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
LONG left
Definition: windef.h:306
#define SWP_NOZORDER
Definition: winuser.h:1233
HICON HCURSOR
Definition: windef.h:299
UINT uFlags
Definition: api.c:59
CUiSplitPanel()
Definition: rosui.h:550
int32_t INT_PTR
Definition: typedefs.h:64
virtual BOOL OnRemoveItem(T *ptr)
Definition: rosui.h:43
CUiMeasure m_Width
Definition: rosui.h:547
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2635
LONG right
Definition: windef.h:308
virtual ~CUiPanel()
Definition: rosui.h:377
MeasureType
Definition: rosui.h:165
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL Sort()
Definition: rosui.h:114
int32_t INT
Definition: typedefs.h:58
virtual ~CUiSplitPanel()
Definition: rosui.h:561
#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:755
virtual VOID ComputeContentBounds(RECT *rect)
Definition: rosui.h:314
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:421
INT Append(T *ptr)
Definition: rosui.h:79
#define FALSE
Definition: types.h:117
static const WCHAR szText[]
Definition: dialog.c:139
CPointerArray()
Definition: rosui.h:19
INT ComputeMeasure(INT parent, INT content)
Definition: rosui.h:190
unsigned int BOOL
Definition: ntddk_ex.h:94
CUiAlignment
Definition: rosui.h:229
#define WM_SETCURSOR
Definition: winuser.h:1619
static CUiMeasure FitParent()
Definition: rosui.h:213
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
HWND WINAPI GetCapture(void)
Definition: message.c:2880
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:242
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:595
static PVOID ptr
Definition: dispmode.c:27
content
Definition: atl_ax.c:993
static HWND hwndParent
Definition: cryptui.c:300
BOOL Clear()
Definition: rosui.h:108
LONG cx
Definition: windef.h:334
LONG_PTR LPARAM
Definition: windef.h:208
GLint GLint bottom
Definition: glext.h:7726
#define DPA_GetPtrCount(hdpa)
Definition: commctrl.h:4955
virtual CUiBox * AsBox()
Definition: rosui.h:381
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:319
CUiPanel()
Definition: rosui.h:371
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:325
INT Insert(INT at, T *ptr)
Definition: rosui.h:74
INT m_MinSecond
Definition: rosui.h:545
CUiRect(INT l, INT t, INT r, INT b)
Definition: rosui.h:134
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:570
#define b
Definition: ke_i.h:79
#define WM_RBUTTONDOWN
Definition: winuser.h:1762
r l[0]
Definition: byte_order.h:167
virtual VOID ComputeRect(RECT parentRect, RECT currentRect, RECT *newRect)
Definition: rosui.h:252
virtual VOID AppendTabOrderWindow(int Direction, ATL::CSimpleArray< HWND > &TabOrderList)
Definition: rosui.h:500
#define CS_VREDRAW
Definition: winuser.h:653
HWND GetWindow()
Definition: rosui.h:458
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define _T(x)
Definition: vfdio.h:22
INT m_Value
Definition: rosui.h:175
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:533
BOOL m_DynamicFirst
Definition: rosui.h:543
r parent
Definition: btrfs.c:2944
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:307
MeasureType m_Type
Definition: rosui.h:174
#define SWP_NOACTIVATE
Definition: winuser.h:1228
static CUiMeasure Percent(INT percent)
Definition: rosui.h:223
int WINAPI GetWindowTextLengthW(_In_ HWND)
BOOL WINAPI DPA_DeleteAllPtrs(HDPA hdpa)
Definition: dpa.c:730
CUiCollection & First()
Definition: rosui.h:567
VOID GetWindowTextW(ATL::CStringW &szText)
Definition: rosui.h:514
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:156
BOOL m_Horizontal
Definition: rosui.h:542
GLdouble GLdouble right
Definition: glext.h:10859
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:603
CUiMeasure m_Height
Definition: rosui.h:548
CUiBox()
Definition: rosui.h:246
BOOL RemoveAt(INT i)
Definition: rosui.h:97
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:460
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:712
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
GLsizei const GLfloat * value
Definition: glext.h:6069
VOID WINAPI DPA_EnumCallback(HDPA hdpa, PFNDPAENUMCALLBACK enumProc, LPVOID lParam)
Definition: dpa.c:969
CUiRect()
Definition: rosui.h:129
uint32_t DWORD_PTR
Definition: typedefs.h:65
CUiAlignment m_VerticalAlignment
Definition: rosui.h:243
#define LoadCursor
Definition: winuser.h:5788
static INT CALLBACK s_OnRemoveItem(PVOID ptr, PVOID context)
Definition: rosui.h:30
CUiPanel m_Second
Definition: rosui.h:534
HWND WINAPI GetParent(_In_ HWND)
INT m_Pos
Definition: rosui.h:541
HWND WINAPI SetCapture(_In_ HWND hWnd)
static ATOM item
Definition: dde.c:856
static CUiMeasure FitContent()
Definition: rosui.h:208
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 WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1412
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:580
virtual ~CUiWindow()
Definition: rosui.h:506
#define WM_LBUTTONUP
Definition: winuser.h:1760
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: gl.h:1546
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
#define WM_MOUSEMOVE
Definition: winuser.h:1758
#define NULL
Definition: types.h:112
#define SWP_DEFERERASE
Definition: winuser.h:1238
CUiMeasure m_Width
Definition: rosui.h:368
virtual CUiBox * AsBox()
Definition: rosui.h:456
CUiCollection & Children()
Definition: rosui.h:359
#define DA_LAST
Definition: commctrl.h:4783
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2889
LPVOID WINAPI DPA_DeletePtr(HDPA hdpa, INT i)
Definition: dpa.c:677
CUiMargin(INT all)
Definition: rosui.h:151
CUiCollection m_Children
Definition: rosui.h:356
struct @1587 Msg[]
LONG bottom
Definition: windef.h:309
static CUiMeasure Fixed(INT pixels)
Definition: rosui.h:218
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:466
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
LONG_PTR LRESULT
Definition: windef.h:209
CUiMargin m_Margin
Definition: rosui.h:240
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
CUiPrimitive * m_Parent
Definition: rosui.h:335
LONG cy
Definition: windef.h:335
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:407
LPARAM lParam
Definition: combotst.c:139
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:481
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:395
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:760