- Added bunch of screens, fonts and images - Added script to read out frame buffer (function currently disabled in Firmware)
107 lines
2.5 KiB
C
107 lines
2.5 KiB
C
/*
|
|
* File: Hierarchical_Menu.h
|
|
* Created: Created: Sunday September 2025 07:47:35
|
|
* Author: Chris
|
|
*/
|
|
#ifndef HIERARCHICAL_MENU_H
|
|
#define HIERARCHICAL_MENU_H
|
|
|
|
// ============================================================================================
|
|
// Includes
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#include "Display.h"
|
|
#include "Display_Objects.h"
|
|
#include "Display_Objects_Datatypes.h"
|
|
|
|
|
|
// ============================================================================================
|
|
// Defines
|
|
|
|
|
|
// ============================================================================================
|
|
// Forward declarations
|
|
typedef struct Menu_Item_s Menu_Item;
|
|
typedef struct Menu_List_s Menu_List;
|
|
typedef struct Hierarchical_Menu_s Hierarchical_Menu;
|
|
|
|
|
|
// ============================================================================================
|
|
// Datatypes
|
|
typedef enum {
|
|
NONE,
|
|
BOOL,
|
|
RGB,
|
|
VALUE,
|
|
LIST,
|
|
DEFAULT_NOTES,
|
|
REBOOT,
|
|
HUE,
|
|
MINMAX
|
|
} Variable_Type;
|
|
|
|
typedef struct {
|
|
const int32_t Min;
|
|
const int32_t Max;
|
|
const int32_t Value_Display_Ratio;
|
|
const char* Format;
|
|
const bool Use_Acceleration;
|
|
const bool Cycle_Selector;
|
|
} Menu_Configuration_Select_Value;
|
|
|
|
typedef struct {
|
|
const char* Item_Names;
|
|
const uint32_t Name_Length;
|
|
const uint32_t Item_Count;
|
|
|
|
const bool Use_Acceleration;
|
|
const bool Cycle_Selector;
|
|
} Menu_Configuration_Select_List;
|
|
|
|
typedef struct {
|
|
const int32_t Min;
|
|
const int32_t Max;
|
|
const int32_t Value_Display_Ratio;
|
|
const char* Format_Min;
|
|
const char* Format_Max;
|
|
const bool Use_Acceleration;
|
|
const bool Cycle_Selector;
|
|
} Menu_Configuration_Select_MinMax;
|
|
|
|
|
|
|
|
typedef struct Menu_Item_s {
|
|
const char* Text;
|
|
const Menu_List* List;
|
|
const bool Is_Back;
|
|
const Menu_List* Containing_List;
|
|
|
|
const Variable_Type Type;
|
|
const char* Variable_Title;
|
|
const void* Variable;
|
|
const void* Configuration;
|
|
} Menu_Item;
|
|
|
|
typedef struct Menu_List_s {
|
|
const char* Title;
|
|
const Menu_Item* Items;
|
|
const uint32_t Item_Count;
|
|
const Menu_Item* Parent;
|
|
const Hierarchical_Menu* Root;
|
|
} Menu_List;
|
|
|
|
typedef struct Hierarchical_Menu_s {
|
|
const Menu_List* List;
|
|
const void (*Parent_Function)(Screen_Transition_Direction, Screen_Transition_Direction, Easing, uint32_t, int32_t);
|
|
const int32_t Parent_Selected_Setting;
|
|
} Hierarchical_Menu;
|
|
|
|
|
|
// ============================================================================================
|
|
// Variables
|
|
|
|
|
|
|
|
#endif // HIERARCHICAL_MENU_H
|