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++, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.