patch_9_frame.h 787 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef PATCH_9_FRAME_H
  2. #define PATCH_9_FRAME_H
  3. #include "scene/gui/control.h"
  4. /**
  5. @author Juan Linietsky <reduzio@gmail.com>
  6. */
  7. class Patch9Frame : public Control {
  8. OBJ_TYPE(Patch9Frame,Control);
  9. bool draw_center;
  10. int margin[4];
  11. Color modulate;
  12. Ref<Texture> texture;
  13. protected:
  14. void _notification(int p_what);
  15. virtual Size2 get_minimum_size() const;
  16. static void _bind_methods();
  17. public:
  18. void set_texture(const Ref<Texture>& p_tex);
  19. Ref<Texture> get_texture() const;
  20. void set_modulate(const Color& p_tex);
  21. Color get_modulate() const;
  22. void set_patch_margin(Margin p_margin,int p_size);
  23. int get_patch_margin(Margin p_margin) const;
  24. void set_draw_center(bool p_enable);
  25. bool get_draw_center() const;
  26. Patch9Frame();
  27. ~Patch9Frame();
  28. };
  29. #endif // PATCH_9_FRAME_H