class_styleboxflat.rst 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the StyleBoxFlat.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_StyleBoxFlat:
  6. StyleBoxFlat
  7. ============
  8. **Inherits:** :ref:`StyleBox<class_StyleBox>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Customizable Stylebox with a given set of parameters. (no texture required)
  13. Properties
  14. ----------
  15. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`anti_aliasing<class_StyleBoxFlat_property_anti_aliasing>` | true |
  17. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  18. | :ref:`int<class_int>` | :ref:`anti_aliasing_size<class_StyleBoxFlat_property_anti_aliasing_size>` | 1 |
  19. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  20. | :ref:`Color<class_Color>` | :ref:`bg_color<class_StyleBoxFlat_property_bg_color>` | Color( 0.6, 0.6, 0.6, 1 ) |
  21. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`border_blend<class_StyleBoxFlat_property_border_blend>` | false |
  23. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  24. | :ref:`Color<class_Color>` | :ref:`border_color<class_StyleBoxFlat_property_border_color>` | Color( 0.8, 0.8, 0.8, 1 ) |
  25. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  26. | :ref:`int<class_int>` | :ref:`border_width_bottom<class_StyleBoxFlat_property_border_width_bottom>` | 0 |
  27. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  28. | :ref:`int<class_int>` | :ref:`border_width_left<class_StyleBoxFlat_property_border_width_left>` | 0 |
  29. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  30. | :ref:`int<class_int>` | :ref:`border_width_right<class_StyleBoxFlat_property_border_width_right>` | 0 |
  31. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  32. | :ref:`int<class_int>` | :ref:`border_width_top<class_StyleBoxFlat_property_border_width_top>` | 0 |
  33. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  34. | :ref:`int<class_int>` | :ref:`corner_detail<class_StyleBoxFlat_property_corner_detail>` | 8 |
  35. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  36. | :ref:`int<class_int>` | :ref:`corner_radius_bottom_left<class_StyleBoxFlat_property_corner_radius_bottom_left>` | 0 |
  37. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  38. | :ref:`int<class_int>` | :ref:`corner_radius_bottom_right<class_StyleBoxFlat_property_corner_radius_bottom_right>` | 0 |
  39. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  40. | :ref:`int<class_int>` | :ref:`corner_radius_top_left<class_StyleBoxFlat_property_corner_radius_top_left>` | 0 |
  41. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  42. | :ref:`int<class_int>` | :ref:`corner_radius_top_right<class_StyleBoxFlat_property_corner_radius_top_right>` | 0 |
  43. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`draw_center<class_StyleBoxFlat_property_draw_center>` | true |
  45. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  46. | :ref:`float<class_float>` | :ref:`expand_margin_bottom<class_StyleBoxFlat_property_expand_margin_bottom>` | 0.0 |
  47. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  48. | :ref:`float<class_float>` | :ref:`expand_margin_left<class_StyleBoxFlat_property_expand_margin_left>` | 0.0 |
  49. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  50. | :ref:`float<class_float>` | :ref:`expand_margin_right<class_StyleBoxFlat_property_expand_margin_right>` | 0.0 |
  51. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  52. | :ref:`float<class_float>` | :ref:`expand_margin_top<class_StyleBoxFlat_property_expand_margin_top>` | 0.0 |
  53. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  54. | :ref:`Color<class_Color>` | :ref:`shadow_color<class_StyleBoxFlat_property_shadow_color>` | Color( 0, 0, 0, 0.6 ) |
  55. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  56. | :ref:`Vector2<class_Vector2>` | :ref:`shadow_offset<class_StyleBoxFlat_property_shadow_offset>` | Vector2( 0, 0 ) |
  57. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  58. | :ref:`int<class_int>` | :ref:`shadow_size<class_StyleBoxFlat_property_shadow_size>` | 0 |
  59. +-------------------------------+-------------------------------------------------------------------------------------------+---------------------------+
  60. Methods
  61. -------
  62. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`int<class_int>` | :ref:`get_border_width<class_StyleBoxFlat_method_get_border_width>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const |
  64. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`int<class_int>` | :ref:`get_border_width_min<class_StyleBoxFlat_method_get_border_width_min>` **(** **)** const |
  66. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`int<class_int>` | :ref:`get_corner_radius<class_StyleBoxFlat_method_get_corner_radius>` **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** const |
  68. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`float<class_float>` | :ref:`get_expand_margin<class_StyleBoxFlat_method_get_expand_margin>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const |
  70. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`set_border_width<class_StyleBoxFlat_method_set_border_width>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`int<class_int>` width **)** |
  72. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`set_border_width_all<class_StyleBoxFlat_method_set_border_width_all>` **(** :ref:`int<class_int>` width **)** |
  74. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | void | :ref:`set_corner_radius<class_StyleBoxFlat_method_set_corner_radius>` **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)** |
  76. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | void | :ref:`set_corner_radius_all<class_StyleBoxFlat_method_set_corner_radius_all>` **(** :ref:`int<class_int>` radius **)** |
  78. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | void | :ref:`set_corner_radius_individual<class_StyleBoxFlat_method_set_corner_radius_individual>` **(** :ref:`int<class_int>` radius_top_left, :ref:`int<class_int>` radius_top_right, :ref:`int<class_int>` radius_bottom_right, :ref:`int<class_int>` radius_bottom_left **)** |
  80. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`set_expand_margin<class_StyleBoxFlat_method_set_expand_margin>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)** |
  82. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`set_expand_margin_all<class_StyleBoxFlat_method_set_expand_margin_all>` **(** :ref:`float<class_float>` size **)** |
  84. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`set_expand_margin_individual<class_StyleBoxFlat_method_set_expand_margin_individual>` **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)** |
  86. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. Description
  88. -----------
  89. This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
  90. - Color
  91. - Border width (individual width for each border)
  92. - Rounded corners (individual radius for each corner)
  93. - Shadow
  94. Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example:
  95. ::
  96. height = 30
  97. corner_radius_top_left = 50
  98. corner_radius_bottom_left = 100
  99. The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will **never** be more than the height. Result:
  100. ::
  101. corner_radius_top_left: 10
  102. corner_radius_bottom_left: 20
  103. Property Descriptions
  104. ---------------------
  105. .. _class_StyleBoxFlat_property_anti_aliasing:
  106. - :ref:`bool<class_bool>` **anti_aliasing**
  107. +-----------+-------------------------+
  108. | *Default* | true |
  109. +-----------+-------------------------+
  110. | *Setter* | set_anti_aliased(value) |
  111. +-----------+-------------------------+
  112. | *Getter* | is_anti_aliased() |
  113. +-----------+-------------------------+
  114. Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners.
  115. .. _class_StyleBoxFlat_property_anti_aliasing_size:
  116. - :ref:`int<class_int>` **anti_aliasing_size**
  117. +-----------+--------------------+
  118. | *Default* | 1 |
  119. +-----------+--------------------+
  120. | *Setter* | set_aa_size(value) |
  121. +-----------+--------------------+
  122. | *Getter* | get_aa_size() |
  123. +-----------+--------------------+
  124. This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect.
  125. .. _class_StyleBoxFlat_property_bg_color:
  126. - :ref:`Color<class_Color>` **bg_color**
  127. +-----------+---------------------------+
  128. | *Default* | Color( 0.6, 0.6, 0.6, 1 ) |
  129. +-----------+---------------------------+
  130. | *Setter* | set_bg_color(value) |
  131. +-----------+---------------------------+
  132. | *Getter* | get_bg_color() |
  133. +-----------+---------------------------+
  134. The background color of the stylebox.
  135. .. _class_StyleBoxFlat_property_border_blend:
  136. - :ref:`bool<class_bool>` **border_blend**
  137. +-----------+-------------------------+
  138. | *Default* | false |
  139. +-----------+-------------------------+
  140. | *Setter* | set_border_blend(value) |
  141. +-----------+-------------------------+
  142. | *Getter* | get_border_blend() |
  143. +-----------+-------------------------+
  144. If ``true``, the border will fade into the background color.
  145. .. _class_StyleBoxFlat_property_border_color:
  146. - :ref:`Color<class_Color>` **border_color**
  147. +-----------+---------------------------+
  148. | *Default* | Color( 0.8, 0.8, 0.8, 1 ) |
  149. +-----------+---------------------------+
  150. | *Setter* | set_border_color(value) |
  151. +-----------+---------------------------+
  152. | *Getter* | get_border_color() |
  153. +-----------+---------------------------+
  154. Sets the color of the border.
  155. .. _class_StyleBoxFlat_property_border_width_bottom:
  156. - :ref:`int<class_int>` **border_width_bottom**
  157. +-----------+-------------------------+
  158. | *Default* | 0 |
  159. +-----------+-------------------------+
  160. | *Setter* | set_border_width(value) |
  161. +-----------+-------------------------+
  162. | *Getter* | get_border_width() |
  163. +-----------+-------------------------+
  164. Border width for the bottom border.
  165. .. _class_StyleBoxFlat_property_border_width_left:
  166. - :ref:`int<class_int>` **border_width_left**
  167. +-----------+-------------------------+
  168. | *Default* | 0 |
  169. +-----------+-------------------------+
  170. | *Setter* | set_border_width(value) |
  171. +-----------+-------------------------+
  172. | *Getter* | get_border_width() |
  173. +-----------+-------------------------+
  174. Border width for the left border.
  175. .. _class_StyleBoxFlat_property_border_width_right:
  176. - :ref:`int<class_int>` **border_width_right**
  177. +-----------+-------------------------+
  178. | *Default* | 0 |
  179. +-----------+-------------------------+
  180. | *Setter* | set_border_width(value) |
  181. +-----------+-------------------------+
  182. | *Getter* | get_border_width() |
  183. +-----------+-------------------------+
  184. Border width for the right border.
  185. .. _class_StyleBoxFlat_property_border_width_top:
  186. - :ref:`int<class_int>` **border_width_top**
  187. +-----------+-------------------------+
  188. | *Default* | 0 |
  189. +-----------+-------------------------+
  190. | *Setter* | set_border_width(value) |
  191. +-----------+-------------------------+
  192. | *Getter* | get_border_width() |
  193. +-----------+-------------------------+
  194. Border width for the top border.
  195. .. _class_StyleBoxFlat_property_corner_detail:
  196. - :ref:`int<class_int>` **corner_detail**
  197. +-----------+--------------------------+
  198. | *Default* | 8 |
  199. +-----------+--------------------------+
  200. | *Setter* | set_corner_detail(value) |
  201. +-----------+--------------------------+
  202. | *Getter* | get_corner_detail() |
  203. +-----------+--------------------------+
  204. This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius (:ref:`set_corner_radius_all<class_StyleBoxFlat_method_set_corner_radius_all>`) into account.
  205. For corner radii smaller than 10, 4-5 should be enough. For corner radii smaller than 30, 8-12 should be enough.
  206. .. _class_StyleBoxFlat_property_corner_radius_bottom_left:
  207. - :ref:`int<class_int>` **corner_radius_bottom_left**
  208. +-----------+--------------------------+
  209. | *Default* | 0 |
  210. +-----------+--------------------------+
  211. | *Setter* | set_corner_radius(value) |
  212. +-----------+--------------------------+
  213. | *Getter* | get_corner_radius() |
  214. +-----------+--------------------------+
  215. The bottom-left corner's radius. If ``0``, the corner is not rounded.
  216. .. _class_StyleBoxFlat_property_corner_radius_bottom_right:
  217. - :ref:`int<class_int>` **corner_radius_bottom_right**
  218. +-----------+--------------------------+
  219. | *Default* | 0 |
  220. +-----------+--------------------------+
  221. | *Setter* | set_corner_radius(value) |
  222. +-----------+--------------------------+
  223. | *Getter* | get_corner_radius() |
  224. +-----------+--------------------------+
  225. The bottom-right corner's radius. If ``0``, the corner is not rounded.
  226. .. _class_StyleBoxFlat_property_corner_radius_top_left:
  227. - :ref:`int<class_int>` **corner_radius_top_left**
  228. +-----------+--------------------------+
  229. | *Default* | 0 |
  230. +-----------+--------------------------+
  231. | *Setter* | set_corner_radius(value) |
  232. +-----------+--------------------------+
  233. | *Getter* | get_corner_radius() |
  234. +-----------+--------------------------+
  235. The top-left corner's radius. If ``0``, the corner is not rounded.
  236. .. _class_StyleBoxFlat_property_corner_radius_top_right:
  237. - :ref:`int<class_int>` **corner_radius_top_right**
  238. +-----------+--------------------------+
  239. | *Default* | 0 |
  240. +-----------+--------------------------+
  241. | *Setter* | set_corner_radius(value) |
  242. +-----------+--------------------------+
  243. | *Getter* | get_corner_radius() |
  244. +-----------+--------------------------+
  245. The top-right corner's radius. If ``0``, the corner is not rounded.
  246. .. _class_StyleBoxFlat_property_draw_center:
  247. - :ref:`bool<class_bool>` **draw_center**
  248. +-----------+--------------------------+
  249. | *Default* | true |
  250. +-----------+--------------------------+
  251. | *Setter* | set_draw_center(value) |
  252. +-----------+--------------------------+
  253. | *Getter* | is_draw_center_enabled() |
  254. +-----------+--------------------------+
  255. Toggles drawing of the inner part of the stylebox.
  256. .. _class_StyleBoxFlat_property_expand_margin_bottom:
  257. - :ref:`float<class_float>` **expand_margin_bottom**
  258. +-----------+--------------------------+
  259. | *Default* | 0.0 |
  260. +-----------+--------------------------+
  261. | *Setter* | set_expand_margin(value) |
  262. +-----------+--------------------------+
  263. | *Getter* | get_expand_margin() |
  264. +-----------+--------------------------+
  265. Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with :ref:`border_width_bottom<class_StyleBoxFlat_property_border_width_bottom>` to draw a border outside the control rect.
  266. .. _class_StyleBoxFlat_property_expand_margin_left:
  267. - :ref:`float<class_float>` **expand_margin_left**
  268. +-----------+--------------------------+
  269. | *Default* | 0.0 |
  270. +-----------+--------------------------+
  271. | *Setter* | set_expand_margin(value) |
  272. +-----------+--------------------------+
  273. | *Getter* | get_expand_margin() |
  274. +-----------+--------------------------+
  275. Expands the stylebox outside of the control rect on the left edge. Useful in combination with :ref:`border_width_left<class_StyleBoxFlat_property_border_width_left>` to draw a border outside the control rect.
  276. .. _class_StyleBoxFlat_property_expand_margin_right:
  277. - :ref:`float<class_float>` **expand_margin_right**
  278. +-----------+--------------------------+
  279. | *Default* | 0.0 |
  280. +-----------+--------------------------+
  281. | *Setter* | set_expand_margin(value) |
  282. +-----------+--------------------------+
  283. | *Getter* | get_expand_margin() |
  284. +-----------+--------------------------+
  285. Expands the stylebox outside of the control rect on the right edge. Useful in combination with :ref:`border_width_right<class_StyleBoxFlat_property_border_width_right>` to draw a border outside the control rect.
  286. .. _class_StyleBoxFlat_property_expand_margin_top:
  287. - :ref:`float<class_float>` **expand_margin_top**
  288. +-----------+--------------------------+
  289. | *Default* | 0.0 |
  290. +-----------+--------------------------+
  291. | *Setter* | set_expand_margin(value) |
  292. +-----------+--------------------------+
  293. | *Getter* | get_expand_margin() |
  294. +-----------+--------------------------+
  295. Expands the stylebox outside of the control rect on the top edge. Useful in combination with :ref:`border_width_top<class_StyleBoxFlat_property_border_width_top>` to draw a border outside the control rect.
  296. .. _class_StyleBoxFlat_property_shadow_color:
  297. - :ref:`Color<class_Color>` **shadow_color**
  298. +-----------+-------------------------+
  299. | *Default* | Color( 0, 0, 0, 0.6 ) |
  300. +-----------+-------------------------+
  301. | *Setter* | set_shadow_color(value) |
  302. +-----------+-------------------------+
  303. | *Getter* | get_shadow_color() |
  304. +-----------+-------------------------+
  305. The color of the shadow. This has no effect if :ref:`shadow_size<class_StyleBoxFlat_property_shadow_size>` is lower than 1.
  306. .. _class_StyleBoxFlat_property_shadow_offset:
  307. - :ref:`Vector2<class_Vector2>` **shadow_offset**
  308. +-----------+--------------------------+
  309. | *Default* | Vector2( 0, 0 ) |
  310. +-----------+--------------------------+
  311. | *Setter* | set_shadow_offset(value) |
  312. +-----------+--------------------------+
  313. | *Getter* | get_shadow_offset() |
  314. +-----------+--------------------------+
  315. The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox.
  316. .. _class_StyleBoxFlat_property_shadow_size:
  317. - :ref:`int<class_int>` **shadow_size**
  318. +-----------+------------------------+
  319. | *Default* | 0 |
  320. +-----------+------------------------+
  321. | *Setter* | set_shadow_size(value) |
  322. +-----------+------------------------+
  323. | *Getter* | get_shadow_size() |
  324. +-----------+------------------------+
  325. The shadow size in pixels.
  326. Method Descriptions
  327. -------------------
  328. .. _class_StyleBoxFlat_method_get_border_width:
  329. - :ref:`int<class_int>` **get_border_width** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const
  330. .. _class_StyleBoxFlat_method_get_border_width_min:
  331. - :ref:`int<class_int>` **get_border_width_min** **(** **)** const
  332. .. _class_StyleBoxFlat_method_get_corner_radius:
  333. - :ref:`int<class_int>` **get_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** const
  334. .. _class_StyleBoxFlat_method_get_expand_margin:
  335. - :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** const
  336. .. _class_StyleBoxFlat_method_set_border_width:
  337. - void **set_border_width** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`int<class_int>` width **)**
  338. .. _class_StyleBoxFlat_method_set_border_width_all:
  339. - void **set_border_width_all** **(** :ref:`int<class_int>` width **)**
  340. .. _class_StyleBoxFlat_method_set_corner_radius:
  341. - void **set_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)**
  342. .. _class_StyleBoxFlat_method_set_corner_radius_all:
  343. - void **set_corner_radius_all** **(** :ref:`int<class_int>` radius **)**
  344. .. _class_StyleBoxFlat_method_set_corner_radius_individual:
  345. - void **set_corner_radius_individual** **(** :ref:`int<class_int>` radius_top_left, :ref:`int<class_int>` radius_top_right, :ref:`int<class_int>` radius_bottom_right, :ref:`int<class_int>` radius_bottom_left **)**
  346. .. _class_StyleBoxFlat_method_set_expand_margin:
  347. - void **set_expand_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)**
  348. .. _class_StyleBoxFlat_method_set_expand_margin_all:
  349. - void **set_expand_margin_all** **(** :ref:`float<class_float>` size **)**
  350. .. _class_StyleBoxFlat_method_set_expand_margin_individual:
  351. - void **set_expand_margin_individual** **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)**