E. GUI Implementation
“When you finally understandwhat you are doing,things will go right.”
—Bill Fairbank
This appendix presents implementation details of callbacks, Window, Widget, and Vector_ref. In Chapter 16, we couldn’t assume the knowledge of pointers and casts needed for a more complete explanation, so we banished that explanation to this appendix.
E.1 Callback implementation
We implemented callbacks like this:
void Simple_window::cb_next(Address, Address addr) // call Simple_window::next() for the window located at addr { reference_to<Simple_window>(addr).next(); ...
Get Programming: Principles and Practice Using C++, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.