Skip to content

Commit

Permalink
Doc: review params diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Feb 5, 2024
1 parent 42da21a commit 379fa61
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/hello_imgui/app_window_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ struct EdgeInsets
// @@md#AppWindowParams
//
// AppWindowParams is a struct that defines the application window display params.
//See https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.png
//See https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.jpg
// for details.
struct AppWindowParams
{
Expand Down
4 changes: 2 additions & 2 deletions src/hello_imgui/doc_params.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_RunnerParams_ contains all the settings and callbacks in order to run an application.
The diagram below summarize all the possible settings and callbacks (which are explained in detail later in this document).

[![diagram](https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.png)](https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.png)
[![diagram](https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.jpg)](https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.jpg)

# RunnerParams

Expand Down Expand Up @@ -510,7 +510,7 @@ See [app_window_params.h](https://github.com/pthom/hello_imgui/blob/master/src/h
```cpp
//
// AppWindowParams is a struct that defines the application window display params.
//See https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.png
//See https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.jpg
// for details.
struct AppWindowParams
{
Expand Down
2 changes: 1 addition & 1 deletion src/hello_imgui/doc_params.src.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_RunnerParams_ contains all the settings and callbacks in order to run an application.
The diagram below summarize all the possible settings and callbacks (which are explained in detail later in this document).

[![diagram](https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.png)](https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.png)
[![diagram](https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.jpg)](https://raw.githubusercontent.com/pthom/hello_imgui/master/src/hello_imgui/doc_src/hello_imgui_diagram.jpg)

# RunnerParams

Expand Down
Binary file added src/hello_imgui/doc_src/hello_imgui_diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 41 additions & 10 deletions src/hello_imgui/doc_src/hello_imgui_diagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ class _ <free functions> {
_ --> SimpleRunnerParams: uses
_ --> RunnerParams: or uses

enum BackendType <enum>{
+ FirstAvailable
+ Sdl
+ Glfw
+ Qt
}

class FpsIdling<struct> {
float fpsIdle = 9
Expand All @@ -35,14 +29,23 @@ class RunnerParams <struct> {
+ RunnerCallbacks callbacks
+ AppWindowParams appWindowParams
+ ImGuiWindowParams imGuiWindowParams
---
+ DockingParams dockingParams
+ vector<DockingParams> alternativeDockingLayouts
---
+ BackendPointers backendPointers
+ BackendType backendType = FirstAvailable
+ RendererBackendOptions rendererBackendOptions
+ PlatformBackendType platformBackendType
+ RendererBackendType rendererBackendType
---
+ FpsIdling fpsIdling

+ DpiAwareParams dpiAwareParams
---
+ iniFolderType
+ iniFilename = ""
+ bool iniFilename_useAppWindowTitle = true

---
---
+ bool appShallExit = false
}

Expand Down Expand Up @@ -98,6 +101,35 @@ class MobileCallbacks <struct>{
}
RunnerCallbacks *-- MobileCallbacks

enum PlatformBackendType {
FirstAvailable,
Glfw,
Sdl,
}

RunnerParams +-- PlatformBackendType

enum RendererBackendType {
FirstAvailable,
OpenGL3,
Metal,
Vulkan,
DirectX11,
DirectX12,
}

RunnerParams +-- RendererBackendType


class DpiAwareParams {
+ float dpiWindowSizeFactor = 0.0f;
+ float fontRenderingScale = 0.0f;
+ float DpiFontLoadingFactor()
}

RunnerParams +-- DpiAwareParams


enum FullScreenMode <enum>{
+ NoFullScreen
+ FullScreen
Expand Down Expand Up @@ -228,7 +260,6 @@ class DockingSplit <struct> {
}

RunnerParams *-- FpsIdling
RunnerParams *-- BackendType
RunnerParams *-- RunnerCallbacks
RunnerParams *-- AppWindowParams
RunnerParams *-- ImGuiWindowParams
Expand Down
7 changes: 4 additions & 3 deletions src/hello_imgui/runner_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ struct RunnerParams
// These pointers will be filled when the application starts
BackendPointers backendPointers;

// `rendererBackendOptions`: _see renderer_backend_options.h_
// Options for the renderer backend
RendererBackendOptions rendererBackendOptions;

// `backendType`: _enum BackendType, default=PlatformBackendType::FirstAvailable_
// Select the wanted platform backend type between `Sdl`, `Glfw`.
// if `FirstAvailable`, Glfw will be preferred over Sdl when both are available.
Expand All @@ -195,9 +199,6 @@ struct RunnerParams
// Only useful when multiple rendering backend are compiled and available.
RendererBackendType rendererBackendType = RendererBackendType::FirstAvailable;

// `rendererBackendOptions`: _see renderer_backend_options.h_
// Options for the renderer backend
RendererBackendOptions rendererBackendOptions;


// --------------- Settings -------------------
Expand Down

0 comments on commit 379fa61

Please sign in to comment.