From acac9c805681b4af02b4104cd91f3eb04bec1a44 Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Tue, 21 May 2024 13:16:07 +0300 Subject: [PATCH] add Fl_Input_Choice_value2 --- fltk | 2 +- include/cfl_misc.h | 2 ++ src/cfl_misc.cpp | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fltk b/fltk index 324fcfc..8807efe 160000 --- a/fltk +++ b/fltk @@ -1 +1 @@ -Subproject commit 324fcfcb6228aeb24af8c50d548438e5f1d174b7 +Subproject commit 8807efe939baf7fe7619e34a869ba30c05a946ae diff --git a/include/cfl_misc.h b/include/cfl_misc.h index 38392b7..09d9b29 100644 --- a/include/cfl_misc.h +++ b/include/cfl_misc.h @@ -219,6 +219,8 @@ void Fl_Input_Choice_clear(Fl_Input_Choice *self); const char *Fl_Input_Choice_value(const Fl_Input_Choice *self); +int Fl_Input_Choice_value2(Fl_Input_Choice *self); + void Fl_Input_Choice_set_value(Fl_Input_Choice *self, const char *val); void Fl_Input_Choice_set_value2(Fl_Input_Choice *self, int val); diff --git a/src/cfl_misc.cpp b/src/cfl_misc.cpp index ce1310b..3d730c5 100644 --- a/src/cfl_misc.cpp +++ b/src/cfl_misc.cpp @@ -466,6 +466,11 @@ const char *Fl_Input_Choice_value(const Fl_Input_Choice *self) { return ret; } +int Fl_Input_Choice_value2(Fl_Input_Choice *self) { + LOCK(auto ret = self->menu()->value()); + return ret; +} + void Fl_Input_Choice_set_value(Fl_Input_Choice *self, const char *val) { LOCK(self->value(val)); }