Programming for the Newton using Macintosh, 2nd ed.
Eat to please thyself, but dress to please others. --Benjamin FranklinYou can go a long way toward the final look of your views without writing any code. All you have to do is edit various template slots from within NTK. In these slots, you can specify what type of frame, fill, and shadow a view has. You can also set the type of font the view will use for displays, and you can set the size and location of the view.
NTK and the Newton view system also provide you with some powerful view justification tools. You can specify the placement of one view relative to another in myriad ways. While understanding the relationship between the view coordinates (found in the viewBounds
slot) and the justification (found in the viewJustify
slot) can take some getting used to, it is well worth the effort. After detailing the justification features of NTK and the view system, this chapter also describes why and how you would use justification in your application design.
Once you have set all the view features found in various common slots and set the size and justification, you will have created all the basic components of the view. Its skeleton will be in place and ready for your code sinew.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996