class_styleboxflat.rst 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  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. Customizable :ref:`StyleBox<class_StyleBox>` with a given set of parameters (no texture required).
  10. Description
  11. -----------
  12. This :ref:`StyleBox<class_StyleBox>` can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
  13. - Color
  14. - Border width (individual width for each border)
  15. - Rounded corners (individual radius for each corner)
  16. - Shadow (with blur and offset)
  17. Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example:
  18. ::
  19. height = 30
  20. corner_radius_top_left = 50
  21. corner_radius_bottom_left = 100
  22. 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:
  23. ::
  24. corner_radius_top_left: 10
  25. corner_radius_bottom_left: 20
  26. Properties
  27. ----------
  28. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`anti_aliasing<class_StyleBoxFlat_property_anti_aliasing>` | ``true`` |
  30. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  31. | :ref:`int<class_int>` | :ref:`anti_aliasing_size<class_StyleBoxFlat_property_anti_aliasing_size>` | ``1`` |
  32. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  33. | :ref:`Color<class_Color>` | :ref:`bg_color<class_StyleBoxFlat_property_bg_color>` | ``Color( 0.6, 0.6, 0.6, 1 )`` |
  34. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`border_blend<class_StyleBoxFlat_property_border_blend>` | ``false`` |
  36. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  37. | :ref:`Color<class_Color>` | :ref:`border_color<class_StyleBoxFlat_property_border_color>` | ``Color( 0.8, 0.8, 0.8, 1 )`` |
  38. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  39. | :ref:`int<class_int>` | :ref:`border_width_bottom<class_StyleBoxFlat_property_border_width_bottom>` | ``0`` |
  40. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  41. | :ref:`int<class_int>` | :ref:`border_width_left<class_StyleBoxFlat_property_border_width_left>` | ``0`` |
  42. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  43. | :ref:`int<class_int>` | :ref:`border_width_right<class_StyleBoxFlat_property_border_width_right>` | ``0`` |
  44. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  45. | :ref:`int<class_int>` | :ref:`border_width_top<class_StyleBoxFlat_property_border_width_top>` | ``0`` |
  46. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  47. | :ref:`int<class_int>` | :ref:`corner_detail<class_StyleBoxFlat_property_corner_detail>` | ``8`` |
  48. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  49. | :ref:`int<class_int>` | :ref:`corner_radius_bottom_left<class_StyleBoxFlat_property_corner_radius_bottom_left>` | ``0`` |
  50. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  51. | :ref:`int<class_int>` | :ref:`corner_radius_bottom_right<class_StyleBoxFlat_property_corner_radius_bottom_right>` | ``0`` |
  52. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  53. | :ref:`int<class_int>` | :ref:`corner_radius_top_left<class_StyleBoxFlat_property_corner_radius_top_left>` | ``0`` |
  54. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  55. | :ref:`int<class_int>` | :ref:`corner_radius_top_right<class_StyleBoxFlat_property_corner_radius_top_right>` | ``0`` |
  56. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`draw_center<class_StyleBoxFlat_property_draw_center>` | ``true`` |
  58. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  59. | :ref:`float<class_float>` | :ref:`expand_margin_bottom<class_StyleBoxFlat_property_expand_margin_bottom>` | ``0.0`` |
  60. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  61. | :ref:`float<class_float>` | :ref:`expand_margin_left<class_StyleBoxFlat_property_expand_margin_left>` | ``0.0`` |
  62. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  63. | :ref:`float<class_float>` | :ref:`expand_margin_right<class_StyleBoxFlat_property_expand_margin_right>` | ``0.0`` |
  64. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  65. | :ref:`float<class_float>` | :ref:`expand_margin_top<class_StyleBoxFlat_property_expand_margin_top>` | ``0.0`` |
  66. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  67. | :ref:`Color<class_Color>` | :ref:`shadow_color<class_StyleBoxFlat_property_shadow_color>` | ``Color( 0, 0, 0, 0.6 )`` |
  68. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  69. | :ref:`Vector2<class_Vector2>` | :ref:`shadow_offset<class_StyleBoxFlat_property_shadow_offset>` | ``Vector2( 0, 0 )`` |
  70. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  71. | :ref:`int<class_int>` | :ref:`shadow_size<class_StyleBoxFlat_property_shadow_size>` | ``0`` |
  72. +-------------------------------+-------------------------------------------------------------------------------------------+-------------------------------+
  73. Methods
  74. -------
  75. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`int<class_int>` | :ref:`get_border_width<class_StyleBoxFlat_method_get_border_width>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const| |
  77. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`int<class_int>` | :ref:`get_border_width_min<class_StyleBoxFlat_method_get_border_width_min>` **(** **)** |const| |
  79. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`int<class_int>` | :ref:`get_corner_radius<class_StyleBoxFlat_method_get_corner_radius>` **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const| |
  81. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`float<class_float>` | :ref:`get_expand_margin<class_StyleBoxFlat_method_get_expand_margin>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const| |
  83. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`set_border_width<class_StyleBoxFlat_method_set_border_width>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`int<class_int>` width **)** |
  85. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | void | :ref:`set_border_width_all<class_StyleBoxFlat_method_set_border_width_all>` **(** :ref:`int<class_int>` width **)** |
  87. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | void | :ref:`set_corner_radius<class_StyleBoxFlat_method_set_corner_radius>` **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)** |
  89. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | void | :ref:`set_corner_radius_all<class_StyleBoxFlat_method_set_corner_radius_all>` **(** :ref:`int<class_int>` radius **)** |
  91. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | 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 **)** |
  93. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | void | :ref:`set_expand_margin<class_StyleBoxFlat_method_set_expand_margin>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)** |
  95. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`set_expand_margin_all<class_StyleBoxFlat_method_set_expand_margin_all>` **(** :ref:`float<class_float>` size **)** |
  97. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | 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 **)** |
  99. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. Property Descriptions
  101. ---------------------
  102. .. _class_StyleBoxFlat_property_anti_aliasing:
  103. - :ref:`bool<class_bool>` **anti_aliasing**
  104. +-----------+-------------------------+
  105. | *Default* | ``true`` |
  106. +-----------+-------------------------+
  107. | *Setter* | set_anti_aliased(value) |
  108. +-----------+-------------------------+
  109. | *Getter* | is_anti_aliased() |
  110. +-----------+-------------------------+
  111. 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.
  112. ----
  113. .. _class_StyleBoxFlat_property_anti_aliasing_size:
  114. - :ref:`int<class_int>` **anti_aliasing_size**
  115. +-----------+--------------------+
  116. | *Default* | ``1`` |
  117. +-----------+--------------------+
  118. | *Setter* | set_aa_size(value) |
  119. +-----------+--------------------+
  120. | *Getter* | get_aa_size() |
  121. +-----------+--------------------+
  122. This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect.
  123. ----
  124. .. _class_StyleBoxFlat_property_bg_color:
  125. - :ref:`Color<class_Color>` **bg_color**
  126. +-----------+-------------------------------+
  127. | *Default* | ``Color( 0.6, 0.6, 0.6, 1 )`` |
  128. +-----------+-------------------------------+
  129. | *Setter* | set_bg_color(value) |
  130. +-----------+-------------------------------+
  131. | *Getter* | get_bg_color() |
  132. +-----------+-------------------------------+
  133. The background color of the stylebox.
  134. ----
  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. ----
  146. .. _class_StyleBoxFlat_property_border_color:
  147. - :ref:`Color<class_Color>` **border_color**
  148. +-----------+-------------------------------+
  149. | *Default* | ``Color( 0.8, 0.8, 0.8, 1 )`` |
  150. +-----------+-------------------------------+
  151. | *Setter* | set_border_color(value) |
  152. +-----------+-------------------------------+
  153. | *Getter* | get_border_color() |
  154. +-----------+-------------------------------+
  155. Sets the color of the border.
  156. ----
  157. .. _class_StyleBoxFlat_property_border_width_bottom:
  158. - :ref:`int<class_int>` **border_width_bottom**
  159. +-----------+-------------------------+
  160. | *Default* | ``0`` |
  161. +-----------+-------------------------+
  162. | *Setter* | set_border_width(value) |
  163. +-----------+-------------------------+
  164. | *Getter* | get_border_width() |
  165. +-----------+-------------------------+
  166. Border width for the bottom border.
  167. ----
  168. .. _class_StyleBoxFlat_property_border_width_left:
  169. - :ref:`int<class_int>` **border_width_left**
  170. +-----------+-------------------------+
  171. | *Default* | ``0`` |
  172. +-----------+-------------------------+
  173. | *Setter* | set_border_width(value) |
  174. +-----------+-------------------------+
  175. | *Getter* | get_border_width() |
  176. +-----------+-------------------------+
  177. Border width for the left border.
  178. ----
  179. .. _class_StyleBoxFlat_property_border_width_right:
  180. - :ref:`int<class_int>` **border_width_right**
  181. +-----------+-------------------------+
  182. | *Default* | ``0`` |
  183. +-----------+-------------------------+
  184. | *Setter* | set_border_width(value) |
  185. +-----------+-------------------------+
  186. | *Getter* | get_border_width() |
  187. +-----------+-------------------------+
  188. Border width for the right border.
  189. ----
  190. .. _class_StyleBoxFlat_property_border_width_top:
  191. - :ref:`int<class_int>` **border_width_top**
  192. +-----------+-------------------------+
  193. | *Default* | ``0`` |
  194. +-----------+-------------------------+
  195. | *Setter* | set_border_width(value) |
  196. +-----------+-------------------------+
  197. | *Getter* | get_border_width() |
  198. +-----------+-------------------------+
  199. Border width for the top border.
  200. ----
  201. .. _class_StyleBoxFlat_property_corner_detail:
  202. - :ref:`int<class_int>` **corner_detail**
  203. +-----------+--------------------------+
  204. | *Default* | ``8`` |
  205. +-----------+--------------------------+
  206. | *Setter* | set_corner_detail(value) |
  207. +-----------+--------------------------+
  208. | *Getter* | get_corner_detail() |
  209. +-----------+--------------------------+
  210. 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.
  211. For corner radii smaller than 10, ``4`` or ``5`` should be enough. For corner radii smaller than 30, values between ``8`` and ``12`` should be enough.
  212. A corner detail of ``1`` will result in chamfered corners instead of rounded corners, which is useful for some artistic effects.
  213. ----
  214. .. _class_StyleBoxFlat_property_corner_radius_bottom_left:
  215. - :ref:`int<class_int>` **corner_radius_bottom_left**
  216. +-----------+--------------------------+
  217. | *Default* | ``0`` |
  218. +-----------+--------------------------+
  219. | *Setter* | set_corner_radius(value) |
  220. +-----------+--------------------------+
  221. | *Getter* | get_corner_radius() |
  222. +-----------+--------------------------+
  223. The bottom-left corner's radius. If ``0``, the corner is not rounded.
  224. ----
  225. .. _class_StyleBoxFlat_property_corner_radius_bottom_right:
  226. - :ref:`int<class_int>` **corner_radius_bottom_right**
  227. +-----------+--------------------------+
  228. | *Default* | ``0`` |
  229. +-----------+--------------------------+
  230. | *Setter* | set_corner_radius(value) |
  231. +-----------+--------------------------+
  232. | *Getter* | get_corner_radius() |
  233. +-----------+--------------------------+
  234. The bottom-right corner's radius. If ``0``, the corner is not rounded.
  235. ----
  236. .. _class_StyleBoxFlat_property_corner_radius_top_left:
  237. - :ref:`int<class_int>` **corner_radius_top_left**
  238. +-----------+--------------------------+
  239. | *Default* | ``0`` |
  240. +-----------+--------------------------+
  241. | *Setter* | set_corner_radius(value) |
  242. +-----------+--------------------------+
  243. | *Getter* | get_corner_radius() |
  244. +-----------+--------------------------+
  245. The top-left corner's radius. If ``0``, the corner is not rounded.
  246. ----
  247. .. _class_StyleBoxFlat_property_corner_radius_top_right:
  248. - :ref:`int<class_int>` **corner_radius_top_right**
  249. +-----------+--------------------------+
  250. | *Default* | ``0`` |
  251. +-----------+--------------------------+
  252. | *Setter* | set_corner_radius(value) |
  253. +-----------+--------------------------+
  254. | *Getter* | get_corner_radius() |
  255. +-----------+--------------------------+
  256. The top-right corner's radius. If ``0``, the corner is not rounded.
  257. ----
  258. .. _class_StyleBoxFlat_property_draw_center:
  259. - :ref:`bool<class_bool>` **draw_center**
  260. +-----------+--------------------------+
  261. | *Default* | ``true`` |
  262. +-----------+--------------------------+
  263. | *Setter* | set_draw_center(value) |
  264. +-----------+--------------------------+
  265. | *Getter* | is_draw_center_enabled() |
  266. +-----------+--------------------------+
  267. Toggles drawing of the inner part of the stylebox.
  268. ----
  269. .. _class_StyleBoxFlat_property_expand_margin_bottom:
  270. - :ref:`float<class_float>` **expand_margin_bottom**
  271. +-----------+--------------------------+
  272. | *Default* | ``0.0`` |
  273. +-----------+--------------------------+
  274. | *Setter* | set_expand_margin(value) |
  275. +-----------+--------------------------+
  276. | *Getter* | get_expand_margin() |
  277. +-----------+--------------------------+
  278. 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.
  279. ----
  280. .. _class_StyleBoxFlat_property_expand_margin_left:
  281. - :ref:`float<class_float>` **expand_margin_left**
  282. +-----------+--------------------------+
  283. | *Default* | ``0.0`` |
  284. +-----------+--------------------------+
  285. | *Setter* | set_expand_margin(value) |
  286. +-----------+--------------------------+
  287. | *Getter* | get_expand_margin() |
  288. +-----------+--------------------------+
  289. 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.
  290. ----
  291. .. _class_StyleBoxFlat_property_expand_margin_right:
  292. - :ref:`float<class_float>` **expand_margin_right**
  293. +-----------+--------------------------+
  294. | *Default* | ``0.0`` |
  295. +-----------+--------------------------+
  296. | *Setter* | set_expand_margin(value) |
  297. +-----------+--------------------------+
  298. | *Getter* | get_expand_margin() |
  299. +-----------+--------------------------+
  300. 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.
  301. ----
  302. .. _class_StyleBoxFlat_property_expand_margin_top:
  303. - :ref:`float<class_float>` **expand_margin_top**
  304. +-----------+--------------------------+
  305. | *Default* | ``0.0`` |
  306. +-----------+--------------------------+
  307. | *Setter* | set_expand_margin(value) |
  308. +-----------+--------------------------+
  309. | *Getter* | get_expand_margin() |
  310. +-----------+--------------------------+
  311. 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.
  312. ----
  313. .. _class_StyleBoxFlat_property_shadow_color:
  314. - :ref:`Color<class_Color>` **shadow_color**
  315. +-----------+---------------------------+
  316. | *Default* | ``Color( 0, 0, 0, 0.6 )`` |
  317. +-----------+---------------------------+
  318. | *Setter* | set_shadow_color(value) |
  319. +-----------+---------------------------+
  320. | *Getter* | get_shadow_color() |
  321. +-----------+---------------------------+
  322. The color of the shadow. This has no effect if :ref:`shadow_size<class_StyleBoxFlat_property_shadow_size>` is lower than 1.
  323. ----
  324. .. _class_StyleBoxFlat_property_shadow_offset:
  325. - :ref:`Vector2<class_Vector2>` **shadow_offset**
  326. +-----------+--------------------------+
  327. | *Default* | ``Vector2( 0, 0 )`` |
  328. +-----------+--------------------------+
  329. | *Setter* | set_shadow_offset(value) |
  330. +-----------+--------------------------+
  331. | *Getter* | get_shadow_offset() |
  332. +-----------+--------------------------+
  333. The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox.
  334. ----
  335. .. _class_StyleBoxFlat_property_shadow_size:
  336. - :ref:`int<class_int>` **shadow_size**
  337. +-----------+------------------------+
  338. | *Default* | ``0`` |
  339. +-----------+------------------------+
  340. | *Setter* | set_shadow_size(value) |
  341. +-----------+------------------------+
  342. | *Getter* | get_shadow_size() |
  343. +-----------+------------------------+
  344. The shadow size in pixels.
  345. Method Descriptions
  346. -------------------
  347. .. _class_StyleBoxFlat_method_get_border_width:
  348. - :ref:`int<class_int>` **get_border_width** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const|
  349. Returns the given ``margin``'s border width. See :ref:`Margin<enum_@GlobalScope_Margin>` for possible values.
  350. ----
  351. .. _class_StyleBoxFlat_method_get_border_width_min:
  352. - :ref:`int<class_int>` **get_border_width_min** **(** **)** |const|
  353. Returns the smallest border width out of all four borders.
  354. ----
  355. .. _class_StyleBoxFlat_method_get_corner_radius:
  356. - :ref:`int<class_int>` **get_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const|
  357. Returns the given ``corner``'s radius. See :ref:`Corner<enum_@GlobalScope_Corner>` for possible values.
  358. ----
  359. .. _class_StyleBoxFlat_method_get_expand_margin:
  360. - :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const|
  361. Returns the size of the given ``margin``'s expand margin. See :ref:`Margin<enum_@GlobalScope_Margin>` for possible values.
  362. ----
  363. .. _class_StyleBoxFlat_method_set_border_width:
  364. - void **set_border_width** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`int<class_int>` width **)**
  365. Sets the border width to ``width`` pixels for the given ``margin``. See :ref:`Margin<enum_@GlobalScope_Margin>` for possible values.
  366. ----
  367. .. _class_StyleBoxFlat_method_set_border_width_all:
  368. - void **set_border_width_all** **(** :ref:`int<class_int>` width **)**
  369. Sets the border width to ``width`` pixels for all margins.
  370. ----
  371. .. _class_StyleBoxFlat_method_set_corner_radius:
  372. - void **set_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)**
  373. Sets the corner radius to ``radius`` pixels for the given ``corner``. See :ref:`Corner<enum_@GlobalScope_Corner>` for possible values.
  374. ----
  375. .. _class_StyleBoxFlat_method_set_corner_radius_all:
  376. - void **set_corner_radius_all** **(** :ref:`int<class_int>` radius **)**
  377. Sets the corner radius to ``radius`` pixels for all corners.
  378. ----
  379. .. _class_StyleBoxFlat_method_set_corner_radius_individual:
  380. - 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 **)**
  381. Sets the corner radius for each corner to ``radius_top_left``, ``radius_top_right``, ``radius_bottom_right``, and ``radius_bottom_left`` pixels.
  382. ----
  383. .. _class_StyleBoxFlat_method_set_expand_margin:
  384. - void **set_expand_margin** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)**
  385. Sets the expand margin to ``size`` pixels for the given ``margin``. See :ref:`Margin<enum_@GlobalScope_Margin>` for possible values.
  386. ----
  387. .. _class_StyleBoxFlat_method_set_expand_margin_all:
  388. - void **set_expand_margin_all** **(** :ref:`float<class_float>` size **)**
  389. Sets the expand margin to ``size`` pixels for all margins.
  390. ----
  391. .. _class_StyleBoxFlat_method_set_expand_margin_individual:
  392. - 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 **)**
  393. Sets the expand margin for each margin to ``size_left``, ``size_top``, ``size_right``, and ``size_bottom`` pixels.
  394. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  395. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  396. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`