@@ -189,7 +189,8 @@ namespace ktvr
189189 }
190190
191191 // Function handlers for plugin to use
192- void (*OnClick)(Button* this_button);
192+ std::function<void (Button*)> OnClick;
193+ // void (*OnClick)(Button* this_button);
193194 };
194195
195196 // NumberBox Class : (SpinBox, Same as XAMLs)
@@ -216,7 +217,8 @@ namespace ktvr
216217 }
217218
218219 // Function handlers for plugin to use
219- void (*OnValueChanged)(NumberBox* this_number_box, int const & new_value);
220+ std::function<void (NumberBox*, int const &)> OnValueChanged;
221+ // void (*OnValueChanged)(NumberBox* this_number_box, int const& new_value);
220222 };
221223
222224 // CheckBox Class : (Same as XAMLs)
@@ -243,8 +245,10 @@ namespace ktvr
243245 }
244246
245247 // Function handlers for plugin to use
246- void (*OnChecked)(CheckBox* this_check_box);
247- void (*OnUnchecked)(CheckBox* this_check_box);
248+ std::function<void (CheckBox*)> OnChecked;
249+ std::function<void (CheckBox*)> OnUnchecked;
250+ // void (*OnChecked)(CheckBox* this_check_box);
251+ // void (*OnUnchecked)(CheckBox* this_check_box);
248252 };
249253
250254 // ToggleSwitch Class : (A bit altered XAMLs)
@@ -271,8 +275,10 @@ namespace ktvr
271275 }
272276
273277 // Function handlers for plugin to use
274- void (*OnChecked)(ToggleSwitch* this_toggle_switch);
275- void (*OnUnchecked)(ToggleSwitch* this_toggle_switch);
278+ std::function<void (ToggleSwitch*)> OnChecked;
279+ std::function<void (ToggleSwitch*)> OnUnchecked;
280+ // void (*OnChecked)(ToggleSwitch* this_toggle_switch);
281+ // void (*OnUnchecked)(ToggleSwitch* this_toggle_switch);
276282 };
277283
278284 // TextBox Class : (Same as XAMLs, Text Input)
@@ -292,7 +298,8 @@ namespace ktvr
292298 }
293299
294300 // Function handlers for plugin to use
295- void (*OnEnterKeyDown)(TextBox* this_text_box);
301+ std::function<void (TextBox*)> OnEnterKeyDown;
302+ // void (*OnEnterKeyDown)(TextBox* this_text_box);
296303 };
297304
298305 // LayoutRoot appending enum:
0 commit comments