UI.pkg 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. $#include "UI.h"
  2. class UI : public Object
  3. {
  4. public:
  5. // Methods:
  6. void SetCursor(Cursor* cursor);
  7. void SetFocusElement(UIElement* element);
  8. bool SetModalElement(UIElement* modalElement, bool enable);
  9. void Clear();
  10. void Update(float timeStep);
  11. void RenderUpdate();
  12. void Render();
  13. void DebugDraw(UIElement* element);
  14. bool SaveLayout(Serializer& dest, UIElement* element);
  15. void SetClipBoardText(const String& text);
  16. void SetNonFocusedMouseWheel(bool nonFocusedMouseWheel);
  17. UIElement* GetRoot() const;
  18. UIElement* GetRootModalElement() const;
  19. Cursor* GetCursor() const;
  20. UIElement* GetElementAt(const IntVector2& position, bool enabledOnly = true);
  21. UIElement* GetElementAt(const IntVector2& position);
  22. UIElement* GetElementAt(int x, int y, bool enabledOnly = true);
  23. UIElement* GetElementAt(int x, int y);
  24. UIElement* GetFocusElement() const;
  25. UIElement* GetFrontElement() const;
  26. IntVector2 GetCursorPosition() const;
  27. const String& GetClipBoardText() const;
  28. bool IsNonFocusedMouseWheel() const;
  29. bool HasModalElement() const;
  30. // Properties:
  31. tolua_readonly tolua_property__get_set UIElement* root;
  32. tolua_readonly tolua_property__get_set UIElement* rootModalElement;
  33. tolua_readonly tolua_property__get_set Cursor* cursor;
  34. tolua_readonly tolua_property__get_set UIElement* focusElement;
  35. tolua_readonly tolua_property__get_set UIElement* frontElement;
  36. tolua_property__get_set const String& clipBoardText;
  37. tolua_readonly tolua_property__is_set bool nonFocusedMouseWheel;
  38. tolua_readonly tolua_property__has_set bool modalElement;
  39. };