The CalcDocument class
The CalcDocument
class is the main class of the application. It catches mouse and keyboard events, handles scrolling and painting, and processes menu actions. However, the cell-level operations are handled by the Cell
class, which we will cover in Chapter 9, Formula Interpretation.
The user can mark one or several cells, in which case, the private field calcMode
is set to Mark
. The user can also edit the text in one cell, in which case the calcMode
field is set to Edit
. Similar to the word processor in the previous chapters, we refer to the current value of the calcMode
field in expressions such as in mark mode and in edit mode.
class CalcDocument : public StandardDocument { public: CalcDocument(WindowShow windowShow);
The ...
Get C++ Windows Programming 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.