typedstream StreamTable HashTable Object [20c] typedstream [640c] typedstream HashTable Object FirstResponder HeaderClass %%%%i@@ firstnib checkSpelling: alignSelCenter: unscript: pasteFont: runPageLayout: superscript: copyRuler: copyFont: selectAll: pasteRuler: toggleRuler: showGuessPanel: alignSelLeft: paste: performClose: arrangeInFront: subscript: copy: alignSelRight: delete: orderFrontColorPanel: underline: performMiniaturize: xView viewnib xColorWell backColorWell widthScroller changeMade: [9242c] typedstream HashTable Object NXImage NXBitmapImageRep NXImageRep iissss@@ [1024c] DDDDDEEUDDDDDD UUUUUUUUU DDDTUU TTDDDO UUUUUUUUUUQ DDEUYY UUDDDO UUUUUUUUUUU UUUUeeeeeW UUVVfffff]W UUUef UUVfj f_UU_ fUUU_ eeUU_ UUVfjj ffUUUU QUUUeeffeeUUUQ_ UUUUUVUUUUUU QUUUUUUUUUUQP DDDUUYY UUDDDDO UUUUUUUUU DDDDTUU TTTDDDO QUUUUUUUUQ NibData @@@@s Storage {*@@} [39{*@@}] File's Owner CustomObject Application MainMenu MenuTemplate *@*@ccc xView Matrix Control Responder @:@iiii MenuCell ButtonCell ActionCell Helvetica Info Panel... Help... ff@@#::s submenuAction: Bitmap menuArrow Paste Select All Windows Drawing Window Colors... Control Panel MenuItem MyWindow WindowTemplate iiii***@s@ Window CustomView Panel ScrollView ClipView ciifffcfffs [2576c]{\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fswiss Helvetica;\f2\fmodern Courier;} \margl40 \margr40 {\colortbl\red0\green0\blue0;} \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800\f0\b\i0\ul0\fs36 "x" View \f1\b0\fs24 \ This is a quick demo to get you started with using the View class. While there are many fun things you can do with a view (rotate, scale, translate), I have not attempted to show them here. For a more complete example see VisibleView by Randy Nelson, or hack this program up to meet your educational needs.\ \f0\fs36 Use:\ \f1\fs24 \ You can start this program from either the shell, or Workspace Manager. However, because of the copious amount of printfs, I would \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0 reccomeend \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800 strongly that you run it from a Terminal window.\ \fc0 \ When started, you will see the drawing window. If you wish to manipulate the drawing, use the control panel, which you can access from the Windows menu. The use of the three controls should be obvious.\ \f0\fs36 Duties:\ \f1\fs24 \ A view can be thought of as a rectangular portion of your window that you may draw in. You do not actively draw into this view, but rather your view is told when it needs to draw. This takes place, by another object, or perhaps the window server, calling \f2 [yourView display]. \f1 This performs a number of duties, including saving graphic states, and telling subviews to draw themselves.\ \f0\fs36 Words of Advice:\ \f1\fs24 \ \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0 Always call display, never call drawSelf::\ There is more than one way to draw from within drawSelf::. This example uses a psw file, to simplify matters. You could instead use single operator C functions like PSsetlinewidth.\ You can use the arguments to drawSelf to optimize drawing. This is especially true if your View appears within a ScrollView, or will otherwise be clipped.\ \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800\fc0 To reduce the amount of PostScript sent to the server, you can define functions which are downloaded once. (perhaps in a more advanced example)\ The View is updated constantly thanks to \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0 [theColorPanel setContinuous:YES] \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800\fc0 \ NXCursor NXibeam Scroller _doScroller: @@@ffs ScrollingText Info Panel TextField TextFieldCell Title 'Part of the "Tour of Appkit" Collection' "x" View Times-Roman$ tKarl Kraft, 3949 Woodhill Ave, Las Vegas, NV 89121, Vocie (702) 458 4997 : FAX (702) 458 6704 : karl@bodi.portal.com Button This program is part of a combined effort to produce examples of how to program using the NeXT Appkit. If you would like more information about this effort, please contact me by one of the methods below. Field24 Field" Field1) Field3/ Box1B Controls NXColorWell Background X Color Slider SliderCell Pen Width ColorWelld` XRr\X Slider2kg {i*@@@} [18{i*@@@}] hide: terminate: copy: paste: selectAll: makeKeyAndOrderFront: widthScroller backColorWell xColorWell changeMade:k orderFrontColorPanel: delegate