comparison libui/ui/frame.h @ 174:6992085d47fd

ui: major theme overhaul, closes #2509 @1h - The font does not contain a color anymore, - Add a new color argument to font_render, - Theme are stored `const` in UI elements to promise no modifications, - Also make all <ui>_draw function to take a const widget too.
author David Demelier <markand@malikania.fr>
date Thu, 22 Oct 2020 15:16:43 +0200
parents 1008a796a9e7
children
comparison
equal deleted inserted replaced
173:cd69c8791dac 174:6992085d47fd
38 38
39 /** 39 /**
40 * \brief GUI frame. 40 * \brief GUI frame.
41 */ 41 */
42 struct frame { 42 struct frame {
43 int x; /*!< (+) Position in x. */ 43 int x; /*!< (+) Position in x. */
44 int y; /*!< (+) Position in y. */ 44 int y; /*!< (+) Position in y. */
45 unsigned int w; /*!< (+) Width. */ 45 unsigned int w; /*!< (+) Width. */
46 unsigned int h; /*!< (+) Height. */ 46 unsigned int h; /*!< (+) Height. */
47 enum frame_style style; /*!< (+) Frame style. */ 47 enum frame_style style; /*!< (+) Frame style. */
48 struct theme *theme; /*!< (+&?) Theme to use. */ 48 const struct theme *theme; /*!< (+&?) Theme to use. */
49 }; 49 };
50 50
51 /** 51 /**
52 * Default drawing function. 52 * Default drawing function.
53 * 53 *
55 * \pre frame != NULL 55 * \pre frame != NULL
56 * \param t the theme 56 * \param t the theme
57 * \param frame the frame 57 * \param frame the frame
58 */ 58 */
59 void 59 void
60 frame_draw_default(struct theme *t, const struct frame *frame); 60 frame_draw_default(const struct theme *t, const struct frame *frame);
61 61
62 /** 62 /**
63 * Draw the frame. 63 * Draw the frame.
64 * 64 *
65 * \pre frame != NULL 65 * \pre frame != NULL