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-07 15:51:50 Functions: - 0 0

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

Generated by: LCOV version 2.0-1