Commit graph

110 commits

Author SHA1 Message Date
Andrea Blankenstijn bb934d4f86 separate widget interface-implementation 2021-08-17 00:27:51 +02:00
Andrea Blankenstijn 9e6e0a1d4c rewrite how events are held 2021-08-16 23:14:29 +02:00
Andrea Blankenstijn d9eccc940a rewrite how events are held 2021-08-16 23:13:59 +02:00
Andrea Blankenstijn 07f7061c20 public api before private members 2021-08-15 16:13:05 +02:00
Andrea Blankenstijn 2c344ecee5 well, finally I don't doxygen for the moment 2021-08-15 16:12:45 +02:00
Andrea Blankenstijn 2d21c6e320 aesthetic 2021-08-14 16:45:30 +02:00
Andrea Blankenstijn 7fcb8b84a9 explicit single arg ctor 2021-08-14 16:44:47 +02:00
Andrea Blankenstijn 8b69227fe2 fix success_or_throw 2021-08-14 16:43:25 +02:00
Andrea Blankenstijn 3458ca123b pass by value vs by ref thing 2021-08-14 16:37:42 +02:00
Andrea Blankenstijn 478ed90d1f use a lambda instead of a function for atexit 2021-08-14 12:19:16 +02:00
Andrea Blankenstijn 58300d08d5 owner semantic "maybe be shared owner" (const shared_ptr&) 2021-08-14 12:14:34 +02:00
Andrea Blankenstijn 6ba5d7fc1c enable widget debug outline when BWIDGETS_DEBUG is defined 2021-08-14 12:06:21 +02:00
Andrea Blankenstijn b11d574d9c constructor style refactor 2021-08-14 11:53:51 +02:00
Andrea Blankenstijn 280575a0e2 make aligned layout orientation a template parameter. 2021-08-14 11:48:24 +02:00
Andrea Blankenstijn 718af15b07 don't inherit directly from std::excption but from derived type and use their constructor. 2021-08-14 11:04:48 +02:00
Andrea Blankenstijn 50a324cc95 button border gradient lambda deduplication 2021-08-14 10:20:00 +02:00
Andrea Blankenstijn ab34a95027 fix error checking 2021-08-14 10:18:31 +02:00
Andrea Blankenstijn 3570cf301a format code 2021-08-14 09:25:28 +02:00
Andrea Blankenstijn 151c502472 explicitly initialize value to shut up linter 2021-08-14 09:25:18 +02:00
Andrea Blankenstijn 524f7511af exception: default 'what' to 'unknown' 2021-08-14 09:24:19 +02:00
Andrea Blankenstijn 7c5277dabd They say members defined in header are implicitly inline.
Also remove the static from static inline (is that C specific?)
2021-08-14 09:17:51 +02:00
Andrea Blankenstijn 5476836208 Put operator overloads for Size outside class 2021-08-13 22:04:10 +02:00
Andrea Blankenstijn f0e89f837b Simplify exceptions 2021-08-13 22:01:14 +02:00
Andrea Blankenstijn e52b55f460 delete default copy/move ctor/operator=, default default ctor and
destructor
2021-08-13 16:11:19 +02:00
Andrea Blankenstijn f78fa82ae8 better smart ptr owner semantic 2021-08-12 23:27:09 +02:00
Andrea Blankenstijn 494b638e2c use unique_ptr in layout 2021-08-12 23:17:00 +02:00
Andrea Blankenstijn d7abc49d07 remove useless calls to Color::operator() 2021-08-12 16:38:55 +02:00
Andrea Blankenstijn 86c28dd36b use std::chrono instead of SDL_GetTicks 2021-08-12 16:30:00 +02:00
Andrea Blankenstijn 5cb15abe11 code formatting. 2021-08-12 16:10:49 +02:00
Andrea Blankenstijn d1cd97809e littles things 2021-08-12 16:09:26 +02:00
Andrea Blankenstijn d3be108df6 don't pass by ref scalar types, copy them. 2021-08-12 16:08:08 +02:00
Andrea Blankenstijn 85837167fe fix: layout didn't call Widget constructor. 2021-08-12 16:06:33 +02:00
Andrea Blankenstijn 09dffb63dd undo test thing 2021-08-12 16:05:11 +02:00
Andrea Blankenstijn d78a6b0f0e initialize static members in source file. 2021-08-12 16:04:02 +02:00
Andrea Blankenstijn 43dd6ab820 use raw ptr instead of fancy one when no references are kept after function
exit.
2021-08-12 15:55:47 +02:00
Andrea Blankenstijn 0642d89803 Suppressed or defaulted constructors/assignment operators 2021-08-12 15:29:25 +02:00
Andrea Blankenstijn 31763a4563 fix missing cmath include. don't understand how it compiled until now. 2021-08-12 15:22:58 +02:00
Andrea Blankenstijn c7bea043c2 rethink C opaque struct encapsulation 2021-08-11 15:58:04 +02:00
Andrea Blankenstijn 79f83abe3b smart ptr and a bit of doc 2021-08-10 23:48:19 +02:00
Andrea Blankenstijn e71a16208b noexcept correctness intent 2021-08-08 16:04:33 +02:00
Andrea Blankenstijn 4f82826bbc constness 2021-08-08 14:30:56 +02:00
Andrea Blankenstijn cab6fa0cf4 wip general code improvement 2021-08-07 20:11:28 +02:00
Andrea Blankenstijn 2d4c6e3694 Extract linear and smoothstep functions. Minor tweaks. 2021-08-01 11:19:06 +02:00
Andrea Blankenstijn 13bdb970c0 config clang-tidy linter and fix code based on linting err/warn 2021-07-30 21:37:14 +02:00
Andrea Blankenstijn 3b6e900a22 format code with custom clang-format style 2021-07-29 16:06:03 +02:00
Andrea Blankenstijn a83c4521e5 fix missing includes (for clang, gcc was working fine) 2021-07-29 15:31:39 +02:00
Andrea Blankenstijn 657c7f852c fix struct/class forward decl incoherence, forgotten override spec and make it compile with clang 12 2021-07-28 15:15:32 +02:00
Andrea Blankenstijn 80576bdab8 fix memory leak in text rendering 2021-07-27 22:15:43 +02:00
Andrea Blankenstijn 0dfc8cdf02 fix aa 2021-07-27 21:52:38 +02:00
Andrea Blankenstijn 55fbd59c36 half workaround to fix corner glitch in draw_rect and minor changes 2021-07-26 23:48:04 +02:00