| 2708 | // ------------------------------------------------------------------------------------ |
| 2709 | |
| 2710 | void box_win:: |
| 2711 | deleter_thread ( |
| 2712 | void* param |
| 2713 | ) |
| 2714 | { |
| 2715 | // The point of this extra event_handler stuff is to allow the user |
| 2716 | // to end the program from within the callback. So we want to destroy the |
| 2717 | // window *before* we call their callback. |
| 2718 | box_win& w = *static_cast<box_win*>(param); |
| 2719 | w.close_window(); |
| 2720 | any_function<void()> event_handler(w.event_handler); |
| 2721 | delete &w; |
| 2722 | if (event_handler.is_set()) |
| 2723 | event_handler(); |
| 2724 | } |
| 2725 | |
| 2726 | // ------------------------------------------------------------------------------------ |
| 2727 | |