Skip to content
Snippets Groups Projects
Commit 2e634476 authored by Pascal Engeler's avatar Pascal Engeler
Browse files

more documentation

parent 0f6c2b59
No related branches found
No related tags found
No related merge requests found
......@@ -918,7 +918,8 @@ Reads all input from SDL, preprocesses it and stores it in the `Toolbox` event c
**Usage**
Todo
- Construct object
- At the beginning of each frame, call `update` to update the `Toolbox` event chain
**Constructors and Destructors**
......@@ -955,7 +956,22 @@ Represents a message to one of the components
**Usage**
Todo
- Construct object using a message, e.g. `WAVEMESSAGE::RESET_DAMPING` or `PATTERNMESSAGE::PATTERN_SSH` (see `*MESSAGE` types in [enums](#enums-enumshpp))
- Read messages using the pattern
```c++
Message m = getSomeMessage();
if(m.target == MESSAGETARGET::WAVE){
WAVEMESSAGE message = std::get<WAVEMESSAGE>(m.message);
switch(message){
case WAVEMESSAGE::RESET_WAVE:
//process RESET_WAVE here
case WAVEMESSAGE::RESET_DAMPING:
//process RESET_DAMPING here
default:
break;
}
}
```
**Constructors and Destructors**
......@@ -1084,6 +1100,7 @@ Todo
- `PeventFactory()`
- `PeventFactory(const int screen_w, const int screen_h, const int texture_w, const int texture_h, const int texoffset_left, const int texoffset_right, const int texoffset_bottom, const int texoffset_top)`
- This constructor should be changed to take a `Toolbox` instead.
**Public Function Members**
- `Pevent operator()(const SDL_Event&) const`
......@@ -1458,7 +1475,7 @@ Todo
**Public Data Members**
Todo
N/A
**Private Data Members**
Only relevant members are listed
......@@ -1483,7 +1500,7 @@ Only relevant members are listed
This class predates the Toolbox and is not yet well integrated into the flow. All member functions assume the object is fully initialized.
## Enums ([enums.hpp](include/enums.hpp))
**`MSTATE`** (Mouse State): `IMMEDIATE` (Zeichnen), `PLACE`, `DELETE`, `MOVE`, `DRAW` (Zeichnen), `Erase` (Radieren)
**`MSTATE`** (Mouse State): `IMMEDIATE` (Spielen), `PLACE`, `DELETE`, `MOVE`, `DRAW` (Zeichnen), `Erase` (Radieren)
**`SSTATE`** (Source State): `RUN`, `STOP`
......@@ -1491,17 +1508,17 @@ This class predates the Toolbox and is not yet well integrated into the flow. Al
**`MESSAGETARGET`** (Possible targets for messages): `BLOCKCHAIN`, `DRAWER`, `GUI`, `WAVE`, `PATTERN`
**`BLOCKCHAINMESSAGE`** (Possible messages to the `SlimBlockchainHandler`): `CLEAR`, `PATTERN_SINGLESLIT`, `PATTERN_DOUBLESLIT`, `PATTER_LATTICE`, `PATTERN_WAVEGUIDE`, `PATTERN_SSH`, `PATTERN_FRESNEL`
**`BLOCKCHAINMESSAGE`** (Possible messages to `SlimBlockchainHandler`): `CLEAR`, `PATTERN_SINGLESLIT`, `PATTERN_DOUBLESLIT`, `PATTER_LATTICE`, `PATTERN_WAVEGUIDE`, `PATTERN_SSH`, `PATTERN_FRESNEL`
**`PATTERNMESSAGE`**: `PATTERN_SINGLESLIT`, `PATTERN_DOUBLESLIT`, `PATTER_LATTICE`, `PATTERN_WAVEGUIDE`, `PATTERN_SSH`, `PATTERN_FRESNEL`
**`PATTERNMESSAGE`** (Possible messages to `PatternHandler`): `PATTERN_SINGLESLIT`, `PATTERN_DOUBLESLIT`, `PATTER_LATTICE`, `PATTERN_WAVEGUIDE`, `PATTERN_SSH`, `PATTERN_FRESNEL`
**`DRAWERMESSAGE`**: `CLEAR`
**`DRAWERMESSAGE`** (Possible messages to `DrawingHandler`): `CLEAR`
**`GUIMESSAGE`**: n/a
**`GUIMESSAGE`** (Possible messages to `GuiHandler`): n/a
**`WAVEMESSAGE`**: `RESET_WAVE`, `RESET_DAMPING`, `DIMENSION_2D`, `DIMENSION_3D`, `DEBUG_ON`, `DEBUG_OFF`
**`WAVEMESSAGE`** (Possible messages to `WaveHandler`): `RESET_WAVE`, `RESET_DAMPING`, `DIMENSION_2D`, `DIMENSION_3D`, `DEBUG_ON`, `DEBUG_OFF`
**`PEVENTTYPE`**: `DOWN`, `UP`, `MOVE`, `OTHER`
**`PEVENTTYPE`** (Possible `Pevent` types): `DOWN`, `UP`, `MOVE`, `OTHER`
## ImGui Customization
The ImGui library has been customized in the following way:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment