33 #include "servers/visual_server.h" 34 #include "scene/resources/texture.h" 41 RES_BASE_EXTENSION(
"sbx");
47 virtual float get_style_margin(Margin p_margin)
const=0;
48 static void _bind_methods();
51 virtual bool test_mask(
const Point2& p_point,
const Rect2& p_rect)
const;
53 void set_default_margin(Margin p_margin,
float p_value);
54 float get_default_margin(Margin p_margin)
const;
55 float get_margin(Margin p_margin)
const;
56 virtual Size2 get_center_size()
const;
58 virtual void draw(
RID p_canvas_item,
const Rect2& p_rect)
const=0;
60 Size2 get_minimum_size()
const;
69 virtual float get_style_margin(Margin p_margin)
const {
return 0; }
72 virtual void draw(
RID p_canvas_item,
const Rect2& p_rect)
const {}
82 float expand_margin[4];
90 virtual float get_style_margin(Margin p_margin)
const;
91 static void _bind_methods();
95 void set_expand_margin_size(Margin p_expand_margin,
float p_size);
96 float get_expand_margin_size(Margin p_expand_margin)
const;
98 void set_margin_size(Margin p_margin,
float p_size);
99 float get_margin_size(Margin p_margin)
const;
101 void set_texture(
RES p_texture);
102 RES get_texture()
const;
104 void set_draw_center(
bool p_draw);
105 bool get_draw_center()
const;
106 virtual Size2 get_center_size()
const;
109 virtual void draw(
RID p_canvas_item,
const Rect2& p_rect)
const;
131 virtual float get_style_margin(Margin p_margin)
const;
132 static void _bind_methods();
136 void set_bg_color(
const Color& p_color);
137 void set_light_color(
const Color& p_color);
138 void set_dark_color(
const Color& p_color);
140 Color get_bg_color()
const;
141 Color get_light_color()
const;
142 Color get_dark_color()
const;
144 void set_border_size(
int p_size);
145 int get_border_size()
const;
147 void set_border_blend(
bool p_blend);
148 bool get_border_blend()
const;
150 void set_draw_center(
bool p_draw);
151 bool get_draw_center()
const;
152 virtual Size2 get_center_size()
const;
154 virtual void draw(
RID p_canvas_item,
const Rect2& p_rect)
const;
165 virtual float get_style_margin(Margin p_margin)
const {
return 0; }
168 float expand_margin[4];
173 static void _bind_methods();
177 virtual void draw(
RID p_canvas_item,
const Rect2& p_rect)
const {}
178 virtual bool test_mask(
const Point2& p_point,
const Rect2& p_rect)
const;
180 void set_image(
const Image& p_image);
181 Image get_image()
const;
183 void set_expand(
bool p_expand);
184 bool get_expand()
const;
185 void set_expand_margin_size(Margin p_expand_margin,
float p_size);
186 float get_expand_margin_size(Margin p_expand_margin)
const;
Definition: math_2d.h:204
Definition: resource.h:89
Definition: style_box.h:116
Definition: style_box.h:66
Definition: style_box.h:162
Definition: style_box.h:77
Definition: style_box.h:38