ReactOS  0.4.15-dev-1150-g593bcce
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, item, 0, s_OnCompareItems, (LPARAM)this, 0);
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 
497  {
498  TabOrderList.Add(T::m_hWnd);
499  return;
500  }
501 
502  virtual ~CUiWindow()
503  {
504  if (T::IsWindow())
505  {
507  }
508  }
509 
511  {
514  szText.ReleaseBuffer();
515  }
516 };
517 
519  public CUiPrimitive,
520  public CUiBox,
521  public CWindowImpl<CUiSplitPanel>
522 {
523  static const INT THICKNESS = 4;
524 
525 protected:
526 
528 
531 
533 
535 
536 public:
542 
545 
547  {
550  m_Pos = 100;
551  m_MinFirst = 100;
552  m_MinSecond = 100;
555  }
556 
557  virtual ~CUiSplitPanel()
558  {
559  }
560 
561  virtual CUiBox * AsBox() { return this; }
562 
565 
567  {
568  if (m_Horizontal)
569  size->cx = max(size->cx, THICKNESS);
570  else
571  size->cy = max(size->cy, THICKNESS);
574  };
575 
577  {
578  RECT r;
579 
582 
583  ::GetWindowRect(m_hWnd, &r);
584 
585  rect->left = min(rect->left, r.left);
586  rect->top = min(rect->top, r.top);
587  rect->right = max(rect->right, r.right);
588  rect->bottom = max(rect->bottom, r.bottom);
589  };
590 
592  {
593  INT count = 1;
596  return count;
597  };
598 
599  virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
600  {
601  RECT rect = {0};
602 
603  SIZE content = {0};
605 
606  INT preferredWidth = m_Width.ComputeMeasure(parentRect.right - parentRect.left, content.cx);
607  INT preferredHeight = m_Width.ComputeMeasure(parentRect.bottom - parentRect.top, content.cy);
608 
609  rect.right = preferredWidth;
610  rect.bottom = preferredHeight;
611 
612  ComputeRect(parentRect, rect, &rect);
613 
614  SIZE growth = {0};
615  if (m_HasOldRect)
616  {
617  RECT oldRect = m_LastRect;
618 
619  growth.cx = (parentRect.right - parentRect.left) - (oldRect.right - oldRect.left);
620  growth.cy = (parentRect.bottom - parentRect.top) - (oldRect.bottom - oldRect.top);
621  }
622 
623  RECT splitter = rect;
624  RECT first = rect;
625  RECT second = rect;
626 
627  if (m_Horizontal)
628  {
629  rect.top += m_MinFirst;
630  rect.bottom -= THICKNESS + m_MinSecond;
631  if (m_DynamicFirst)
632  {
633  if (growth.cy > 0)
634  {
635  m_Pos += min(growth.cy, rect.bottom - (m_Pos + THICKNESS));
636  }
637  else if (growth.cy < 0)
638  {
639  m_Pos += max(growth.cy, rect.top - m_Pos);
640  }
641  }
642 
643  if (m_Pos > rect.bottom)
644  m_Pos = rect.bottom;
645 
646  if (m_Pos < rect.top)
647  m_Pos = rect.top;
648 
649  splitter.top = m_Pos;
650  splitter.bottom = m_Pos + THICKNESS;
651  first.bottom = splitter.top;
652  second.top = splitter.bottom;
653  }
654  else
655  {
656  rect.left += m_MinFirst;
657  rect.right -= THICKNESS + m_MinSecond;
658  if (m_DynamicFirst)
659  {
660  if (growth.cx > 0)
661  {
662  m_Pos += min(growth.cx, rect.right - (m_Pos + THICKNESS));
663  }
664  else if (growth.cx < 0)
665  {
666  m_Pos += max(growth.cy, rect.left - m_Pos);
667  }
668  }
669 
670  if (m_Pos > rect.right)
671  m_Pos = rect.right;
672 
673  if (m_Pos < rect.left)
674  m_Pos = rect.left;
675 
676  splitter.left = m_Pos;
677  splitter.right = m_Pos + THICKNESS;
678  first.right = splitter.left;
679  second.left = splitter.right;
680  }
681 
682  m_LastRect = parentRect;
683  m_HasOldRect = TRUE;
684 
685  hDwp = m_First.OnParentSize(first, hDwp);
686  hDwp = m_Second.OnParentSize(second, hDwp);
687 
688  if (hDwp)
689  {
690  return DeferWindowPos(hDwp, NULL,
691  splitter.left, splitter.top,
692  splitter.right - splitter.left,
693  splitter.bottom - splitter.top,
695  }
696  else
697  {
699  splitter.left, splitter.top,
700  splitter.right - splitter.left,
701  splitter.bottom - splitter.top,
703  return NULL;
704  }
705  };
706 
707 private:
709  {
710  theResult = 0;
711  switch (Msg)
712  {
713  case WM_SETCURSOR:
715  theResult = TRUE;
716  break;
717 
718  case WM_LBUTTONDOWN:
719  SetCapture();
720  break;
721 
722  case WM_LBUTTONUP:
723  case WM_RBUTTONDOWN:
724  if (GetCapture() == m_hWnd)
725  {
726  ReleaseCapture();
727  }
728  break;
729 
730  case WM_MOUSEMOVE:
731  if (GetCapture() == m_hWnd)
732  {
733  POINT Point;
736  if (m_Horizontal)
737  SetPos(Point.y);
738  else
739  SetPos(Point.x);
740  }
741  break;
742 
743  default:
744  return FALSE;
745  }
746 
747  return TRUE;
748  }
749 
750 public:
752  {
753  return m_Pos;
754  }
755 
756  VOID SetPos(INT NewPos)
757  {
758  RECT rcParent;
759 
760  rcParent = m_LastRect;
761 
762  if (m_Horizontal)
763  {
764  rcParent.bottom -= THICKNESS;
765 
766  m_Pos = NewPos;
767 
768  if (m_Pos < rcParent.top)
769  m_Pos = rcParent.top;
770 
771  if (m_Pos > rcParent.bottom)
772  m_Pos = rcParent.bottom;
773  }
774  else
775  {
776  rcParent.right -= THICKNESS;
777 
778  m_Pos = NewPos;
779 
780  if (m_Pos < rcParent.left)
781  m_Pos = rcParent.left;
782 
783  if (m_Pos > rcParent.right)
784  m_Pos = rcParent.right;
785  }
786 
788 
789  HDWP hdwp = NULL;
790  hdwp = BeginDeferWindowPos(count);
791  if (hdwp) hdwp = OnParentSize(m_LastRect, hdwp);
792  if (hdwp) EndDeferWindowPos(hdwp);
793  }
794 
795 public:
796  DECLARE_WND_CLASS_EX(_T("SplitterWindowClass"), CS_HREDRAW | CS_VREDRAW, COLOR_BTNFACE)
797 
798  /* Create splitter bar */
800  {
801  if (m_Horizontal)
803  else
805 
807  DWORD exStyle = WS_EX_TRANSPARENT;
808 
809  RECT size = {205, 180, 465, THICKNESS};
810  size.right += size.left;
811  size.bottom += size.top;
812 
813  return CWindowImpl::Create(hwndParent, size, NULL, style, exStyle);
814  }
815 };
BOOL m_HasOldRect
Definition: rosui.h:534
#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)
RECT m_LastRect
Definition: rosui.h:532
HDPA WINAPI DPA_Create(INT nGrow)
Definition: dpa.c:950
CUiMargin()
Definition: rosui.h:143
BOOL Add(const T &t)
Definition: atlsimpcoll.h:58
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:379
CUiCollection & Second()
Definition: rosui.h:564
#define WM_LBUTTONDOWN
Definition: winuser.h:1758
HCURSOR m_hCursor
Definition: rosui.h:527
BOOL WINAPI IsWindow(_In_opt_ HWND)
virtual CUiBox * AsBox()
Definition: rosui.h:561
Definition: rosui.h:121
Definition: http.c:7094
#define TRUE
Definition: types.h:120
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:519
static const INT THICKNESS
Definition: rosui.h:523
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:540
#define CALLBACK
Definition: compat.h:35
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:1886
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: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
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:3619
CUiMeasure()
Definition: rosui.h:174
struct @1610 Msg[]
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:1232
HICON HCURSOR
Definition: windef.h:299
UINT uFlags
Definition: api.c:59
CUiSplitPanel()
Definition: rosui.h:546
int32_t INT_PTR
Definition: typedefs.h:64
virtual BOOL OnRemoveItem(T *ptr)
Definition: rosui.h:43
CUiMeasure m_Width
Definition: rosui.h:543
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2635
LONG right
Definition: windef.h:308
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:58
virtual ~CUiSplitPanel()
Definition: rosui.h:557
#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:751
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
#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:186
unsigned int BOOL
Definition: ntddk_ex.h:94
CUiAlignment
Definition: rosui.h:225
#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:2880
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:591
static PVOID ptr
Definition: dispmode.c:27
content
Definition: atl_ax.c:993
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
BOOL Clear()
Definition: rosui.h:104
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:4951
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:541
CUiRect(INT l, INT t, INT r, INT b)
Definition: rosui.h:130
virtual VOID ComputeMinimalSize(SIZE *size)
Definition: rosui.h:566
#define b
Definition: ke_i.h:79
#define WM_RBUTTONDOWN
Definition: winuser.h:1761
r l[0]
Definition: byte_order.h:167
virtual VOID ComputeRect(RECT parentRect, RECT currentRect, RECT *newRect)
Definition: rosui.h:248
virtual VOID AppendTabOrderWindow(int Direction, ATL::CSimpleArray< HWND > &TabOrderList)
Definition: rosui.h:496
#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
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:529
BOOL m_DynamicFirst
Definition: rosui.h:539
r parent
Definition: btrfs.c:2944
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
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION Direction
Definition: mmfuncs.h:772
int WINAPI GetWindowTextLengthW(_In_ HWND)
BOOL WINAPI DPA_DeleteAllPtrs(HDPA hdpa)
Definition: dpa.c:730
CUiCollection & First()
Definition: rosui.h:563
VOID GetWindowTextW(ATL::CStringW &szText)
Definition: rosui.h:510
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:538
GLdouble GLdouble right
Definition: glext.h:10859
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:599
CUiMeasure m_Height
Definition: rosui.h:544
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:708
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:65
GLsizei const GLfloat * value
Definition: glext.h:6069
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
#define LoadCursor
Definition: winuser.h:5787
static INT CALLBACK s_OnRemoveItem(PVOID ptr, PVOID context)
Definition: rosui.h:30
CUiPanel m_Second
Definition: rosui.h:530
HWND WINAPI GetParent(_In_ HWND)
INT m_Pos
Definition: rosui.h:537
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: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:576
virtual ~CUiWindow()
Definition: rosui.h:502
#define WM_LBUTTONUP
Definition: winuser.h:1759
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:1757
#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:4779
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:147
CUiCollection m_Children
Definition: rosui.h:352
LONG bottom
Definition: windef.h:309
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:335
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:756