LCOV - code coverage report
Current view: top level - src/gui/components - footswitch.h (source / functions) Coverage Total Hit
Test: merged.info Lines: 100.0 % 3 3
Test Date: 2026-06-03 09:13:19 Functions: - 0 0

            Line data    Source code
       1              : #pragma once
       2              : 
       3              : #include <imgui.h>
       4              : #include <functional>
       5              : 
       6              : namespace Amplitron {
       7              : 
       8          159 : struct FootswitchProps {
       9           53 :     bool enabled = false;
      10           53 :     const char* tooltip_prefix = "";
      11              : 
      12              :     // Callbacks
      13              :     std::function<void()> on_clicked;
      14              : };
      15              : 
      16              : class FootswitchComponent {
      17              : public:
      18              :     /**
      19              :      * @brief Render a reusable metallic footswitch toggle component.
      20              :      * @param imgui_id Unique ID for ImGui button tracking.
      21              :      * @param props    Footswitch state and callbacks.
      22              :      * @param zoom     DPI zoom scale.
      23              :      * @param center   Center coordinate of the footswitch.
      24              :      */
      25              :     static void render(const char* imgui_id, const FootswitchProps& props, float zoom, ImVec2 center);
      26              : };
      27              : 
      28              : } // namespace Amplitron
        

Generated by: LCOV version 2.0-1