ScreenManager v1.1.0
A lightweight C++ library for managing application screens, navigation, transitions and display timing.
ScreenTransition.h
1#ifndef SCREEN_TRANSITION_H
2#define SCREEN_TRANSITION_H
3
4#include <stdint.h>
5
6using ScreenId = uint8_t;
7
12enum class TransitionIntentType : uint8_t {
13 None,
14 Auto,
15 Next,
16 Back,
17 Init,
18 Force
19};
20
39 // cppcheck-suppress noExplicitConstructor ; because I want to use `= {}`
40 constexpr TransitionIntent( TransitionIntentType intentType = TransitionIntentType::None, uint8_t ScreenId = 0)
41 : type(intentType),
42 requested(ScreenId)
43 {}
44
45 TransitionIntentType type;
46 ScreenId requested;
47};
48
49#endif
The type of transition and an optional requested ScreenId.
Definition: ScreenTransition.h:25
ScreenId requested
Explicit requested ScreenId.
Definition: ScreenTransition.h:46
constexpr TransitionIntent(TransitionIntentType intentType=TransitionIntentType::None, uint8_t ScreenId=0)
Must have a constructor to use defaults in C++11 because 'aggregate` _O_/.
Definition: ScreenTransition.h:40
TransitionIntentType type
The requested transition type.
Definition: ScreenTransition.h:45