20.7. Exercises
You can download the source code for the examples in the book and the solutions to the following exercises from http://www.wrox.com.
Implement a dialog initiated from a toolbar button to select the current element color.
Add a menu item to the Element context menu that will display information about the element at the cursor in a dialog—what it is and its basic defining data.
Display a special context menu when the cursor is over a TEXT object that provides a menu option to edit the text through a dialog.
Change the implementations of the element classes to make use of the combined translate and rotate operation.
Add a toolbar button to switch highlighting on and off. The same button should turn it on when it is off and vice versa, so you need to change the button label appropriately.
Add a Scale menu item to the element context menu that will allow a geometric element to be scaled by dragging the mouse cursor.
Implement a main menu item and a toolbar button for choosing a custom color.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access