mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-09 12:37:41 +03:00
chore :refactored remaining views
This commit is contained in:
30
src/gui/widgets/settings_buttons.hpp
Normal file
30
src/gui/widgets/settings_buttons.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef CLRSYNC_GUI_WIDGETS_SETTINGS_BUTTONS_HPP
|
||||
#define CLRSYNC_GUI_WIDGETS_SETTINGS_BUTTONS_HPP
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace clrsync::gui::widgets
|
||||
{
|
||||
|
||||
struct settings_buttons_callbacks
|
||||
{
|
||||
std::function<void()> on_ok;
|
||||
std::function<void()> on_apply;
|
||||
std::function<void()> on_reset;
|
||||
std::function<void()> on_cancel;
|
||||
};
|
||||
|
||||
class settings_buttons
|
||||
{
|
||||
public:
|
||||
void render(const settings_buttons_callbacks& callbacks, bool apply_enabled);
|
||||
|
||||
void set_button_width(float width) { m_button_width = width; }
|
||||
|
||||
private:
|
||||
float m_button_width = 100.0f;
|
||||
};
|
||||
|
||||
} // namespace clrsync::gui::widgets
|
||||
|
||||
#endif // CLRSYNC_GUI_WIDGETS_SETTINGS_BUTTONS_HPP
|
||||
Reference in New Issue
Block a user