Andrea Blankenstijn
59d4612a61
layout: remove widget by raw ptr
2022-02-17 18:34:44 +01:00
Andrea Blankenstijn
d5b59a67ac
fix layout: set widget parent, tell parent to update geometry
2022-02-17 15:30:32 +01:00
Andrea Blankenstijn
231499f24c
layout: + remove_widget
2022-02-16 17:48:25 +01:00
hsv-2
3c5f5c8ea9
caption: fix text transparency
2022-02-08 19:20:47 +01:00
hsv-2
4414326b56
Color: alway compare all values
2022-02-08 19:16:26 +01:00
hsv-2
180e1f77fa
fix type in smoothstep
2022-02-08 19:15:44 +01:00
Andrea Blankenstijn
f537d94c9c
caption default alignment
2022-02-05 19:45:24 +01:00
Andrea Blankenstijn
01932cee20
theme optional in layout and don't do layout automatically on every widget addition
2022-02-05 19:29:38 +01:00
Andrea Blankenstijn
72dd10ef06
use shared_ptr for widgets
2022-02-04 18:26:19 +01:00
Andrea Blankenstijn
de607fdeb2
render scrollable area without texture
2022-02-02 19:49:51 +01:00
Andrea Blankenstijn
1294806696
changes… and forgotten file
2022-02-01 20:52:54 +01:00
Andrea Blankenstijn
6149c48664
default fonts in theme, custom with FontHandler.
...
fix input highlight.
render multiline text.
remove default theme singleton.
scrollable area texture alignment.
2022-02-01 19:14:51 +01:00
Andrea Blankenstijn
3f15d1d857
scrollable (texture) area works
2022-01-26 22:49:41 +01:00
Andrea Blankenstijn
af7b9803d2
more wip on api and also on a scrollable thing widget
2022-01-26 18:38:47 +01:00
Andrea Blankenstijn
860b656bf7
more wip on api rewrites
2022-01-25 17:30:30 +01:00
Andrea Blankenstijn
a36fe9cae5
big wip scrollbar, theme, api changes
2022-01-24 16:18:14 +01:00
Andrea Blankenstijn
bac66748ec
Merge branch 'wip'
2021-12-23 13:56:08 +01:00
Andrea Blankenstijn
a54dc9c2b2
some comment edits, readme draft
2021-08-27 16:08:14 +02:00
Andrea Blankenstijn
d8f56e0e5f
Delete OpaqueStruct and use directly fancy pointers now that I know
...
how to set the deleter correctly.
2021-08-26 18:59:52 +02:00
Andrea Blankenstijn
5f341149fa
clang-format header sorting conf fix. Some spacing and order of
...
include/declaration changes.
2021-08-24 00:12:57 +02:00
Andrea Blankenstijn
299b39ad28
little tweaks here and there.
2021-08-24 00:10:09 +02:00
Andrea Blankenstijn
dc243a9fdf
little fixes here and there.
2021-08-24 00:00:28 +02:00
Andrea Blankenstijn
f6ae2c51e8
Comment a bit the code.
2021-08-23 23:50:14 +02:00
Andrea Blankenstijn
5020eab828
remove some asserts and use exceptions for the remaining ones.
2021-08-23 18:41:11 +02:00
Andrea Blankenstijn
0c0b03aeac
fix sdl include path
2021-08-23 00:00:57 +02:00
Andrea Blankenstijn
a19d2ea6bd
- mark as const every single read only variable.
...
- mark as const every pointer that can be const.
- in implementation mark const args passed by value that are meant to be read-only.
- wrap in a lambda complex initializations of (const) values.
- argument passing:
- pass by value arguments of cheap-to-copy types or meant to be copied
anyway.
- pass by (const) reference args not meant to outlive called
function scope and not cheap-to-copy.
- pass (const) pointers to (const) args when null is a valid option
and pointed data aren't expected to outlive function scope.
- use string_view for non-owned strings (not meant to outlive function
scope).
- use span for collection types like vector and arrays.
- fancy pointers passing:
- pass by value if a reference will be held:
- pass by const reference if a reference _may_ be hell.
- when no references are meant to be held:
- dereference the pointer to pass the pointed data by reference
if null is not an option.
- pass the underlying raw pointer if null is an option.
… and random subtle changes and fixes here and there that I forgot to mention.
2021-08-22 00:57:55 +02:00
Andrea Blankenstijn
76d319fb69
trash commit, style, small api changes (ref vs ptr) and who knows
2021-08-19 15:00:44 +02:00
Andrea Blankenstijn
6a14cd635d
almost finished work on interface-impl separation
2021-08-18 18:27:48 +02:00
Andrea Blankenstijn
880748276a
input interface-impl separation
2021-08-17 18:00:27 +02:00
Andrea Blankenstijn
76a8bb6140
inheritance fixes
2021-08-17 17:59:34 +02:00
Andrea Blankenstijn
eb777db6dd
layout interface-api separation
2021-08-17 12:10:41 +02:00
Andrea Blankenstijn
620b66d622
add missing caption impl header
2021-08-17 12:09:03 +02:00
Andrea Blankenstijn
fbaabd5aa7
button interface-api separation
2021-08-17 12:08:38 +02:00
Andrea Blankenstijn
0eb300ceeb
caption interface-api separation
2021-08-17 11:39:07 +02:00
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