ZenScript main repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DUIContext.java 1009B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package org.openzen.drawablegui;
  7. import org.openzen.drawablegui.live.LiveObject;
  8. import org.openzen.drawablegui.style.DStyleSheets;
  9. /**
  10. *
  11. * @author Hoofdgebruiker
  12. */
  13. public interface DUIContext {
  14. DStyleSheets getStylesheets();
  15. float getScale();
  16. void repaint(int x, int y, int width, int height);
  17. default void repaint(DIRectangle rectangle) {
  18. repaint(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
  19. }
  20. void setCursor(Cursor cursor);
  21. void focus(DComponent component);
  22. void scrollInView(int x, int y, int width, int height);
  23. DTimerHandle setTimer(int millis, Runnable target);
  24. DClipboard getClipboard();
  25. DFontMetrics getFontMetrics(DFont font);
  26. DUIWindow getWindow();
  27. enum Cursor {
  28. NORMAL,
  29. HAND,
  30. MOVE,
  31. TEXT,
  32. E_RESIZE,
  33. S_RESIZE,
  34. NE_RESIZE,
  35. NW_RESIZE,
  36. }
  37. }