From a8df9c519b3c7d64108e018510282be65624888b Mon Sep 17 00:00:00 2001 From: Leonard Ritter Date: Sat, 16 Aug 2014 11:38:18 +0200 Subject: [PATCH] added uiGetAbsoluteRect() --- oui.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/oui.h b/oui.h index 059b0a3..d69b31c 100644 --- a/oui.h +++ b/oui.h @@ -522,10 +522,16 @@ int uiGetChildCount(int item); int uiGetChildId(int item); // returns the items layout rectangle relative to the parent. If uiGetRect() -// is called before uiProcess(), the values of the returned rectangle are +// is called before uiLayout(), the values of the returned rectangle are // undefined. UIrect uiGetRect(int item); +// returns the items layout rectangle in absolute coordinates. If +// uiGetAbsoluteRect() is called before uiLayout(), the values of the returned +// rectangle are undefined. +// This function has complexity O(N) for N parents +UIrect uiGetAbsoluteRect(int item); + // returns 1 if an items absolute rectangle contains a given coordinate // otherwise 0 int uiContains(int item, int x, int y);