OOP S Intuitive Interfa Ace. number of appli- cations today TUJE MARTIN that make use of . object-oriented programming. There are varying degrees to which the concepts are used, but in. all cases, object-oriented technigues al- E low the user to deal with a complex en- vironment in a straightforward manner: Some applications simply provide : users ' with an object-oriented interface, while others give users the ability to somi and create objects as well. ba This week, well look at three exam- ples of object-oriented programming: '" € Window-based user interfaces: These are the emerging standard for comput- .. ers, including workstations, Macintoshes and now PCs, with Presentation Manag- er (PM) and Microsoft Windows. ''' 4% > € Word processors: Powerful style sheets let the user create complex docu:''r ment formats with little effort. 4 4; ' Graphics programs: The creation of ,. complex drawings is easier with object": oriented technigues. The most; noticeable effect of object: /$ s si oriented programming can be seen in the windowing user interfaces that were ' first popularized on the Macintosh. '/' Ha These technigues are now becoming ' prt available on PCs with Microsoft Win: "%: dows and IBM's PM. The style of inter: ii face was first developed for Digitalk . Inc.s Smalltalk, the first pure object-ori:; ented language. The user benefits from the more intu- € itive interface provided by object-orient- ed technigues. The windowing interface is organized like objects in an office. The user can move the objects: open win- dows, close windows, pull down menus, ' select items. The effect is the same as opening desk drawers, selecting objects ' in the drawer, moving a coffee cup and. drinking the coffee. Various icons repre- senting objects are used to send mes- .' sages to the object. The user simply clicks on the icon to obtain the desired " result. For example, to seroll a enojni Ši | the user points the mouse to the scroll ' bar and clicks it. To close a window, the mouse is clicked in the "go away" box on-sCreen. Visual clues are used wherever possi- . ble to indicate the behaviors of an ob- ject or identify the object. There are icons for the controls on a window and icons used to identify the applications and documents in the system. For exam- ple, different icons are used for pictures : and text documents. Similar icons and. messages are used across multiple appli- cations. Open, close and save operations - always appear in the same place on the screen, whether the application isa |. word processor, draw program or pro- ' gram-development environment. The go- | | dows in all applications. ' ba -ed technigues enable users to explore:«;: li ] — technigues. '' " b. h ; | i | PSI i H sli bek | | ; i mo noj sb 7 TA oki] | Ig G4 '! ipredajii [A x. se 4 d. k.s ni i J Wi 4 8 i E h.: iN i.M | Mae sr ai f | | | i lj B. i bi: i PO avi Ani! Pay. ii: | ih i P V 4 di! XV | 4 l (ii 4 Ha | A | H ig, y ke, | i | —" ' liv | | | sal, Li aH. ne mi d : Y ai h vitae Ma EML piči neč Range di yi li h Applic | diš any more of - away-box icon k the same. fot all kj k ' ŠE Using ii, tetlaves V li Maepatt - Šek Nea teja KRE styles are organized in 4 hierarchy: The, ,.; phisticated dre using object-oriented || attributes of each style sheet are set at.;; technigues to make it rei to create 5 Ej) and experiment with a new envirorti: ki |,« the appropriate level in the hierarchy. pi (/ complex drawings. — UME ti ment. Many programs čan be learned 4. Lower-level štyles inherit attributes " ;, li As shown in the figure, a paint Or 4 (MJI4 with little or no training. Once users? 4 it '£rom higher levels, and only definitions/.. draw program provides the user with (4 Y (UJEge ki Kad ' User interfaces based on Object ore learn the functions of d word processof,'" that are new, or different, heed to be ';;;;. an empty window bordered by a num- or program editor, they then can trans: specified. "" ai Udu j? (dai tj ber of icons that represent; various fer that knowledge to other products "" '" Www For al the basic text style in a . drawing tools. These include line-width that conform to the same User-interface, .; - document, might define the margins, font. drawing tools; paint patterns; brush |tBiH bligjeaa dei Maga ji and paragraph style: A heading style;;| ; ih ; shapes; erasers; tools to draw boxes, cir-; Thus, object-oriented i terfaces help; di ' would be d subclass of the basic text. ';. 4 cles, polygons; and other special effects. | the user to grasp and work with the ''4%/. style. It would'retain the font and mar! ' The mouse and a pointer are then used | complex computer environment. Users ii | gins, but change the font size and add k to put the shapes or drawings on the; (4 lij gra - learning to operate a windowed inter-; si |, the bold attribute. A progrdmming book " ' screen. These programs all use the basic. | "ine | opora! roka Z A — iji — Mer MI RR Da zi na face do so in a fraction of the time it: S nlste have a different soje for code ex- '' object-oriented user interface and em- yploy icons to represent various options. . -W In contrast, conventional paint pro- / grams view the picture as a large bit Hi ME ' map. For example, when d box is drawn 4 |// ! with a convehntional paint program, the; 44 ,bits corresponding to the image are V turned on. When a circle is drawn inter-. Hi | secting the box, some more bits are j ii ' turned on. The program only has | V "knowledge" of the on and off bits. Af: 4 fer the initial drawing, the program has... Hel 'no control over the circle and sguare ' zal (and can only add or erase bits. There (ii are copy and duplicate functions, but EKO. V these work with areas of bits mia not. si V IE »with objects in, the dravi Bik One Shape at a Time en MENE '4 Inan object-oriented drawing pro- :' 'ii' ' ; gram, the shapes are remembered by | 4 ' the program as individual objects. They: /' How Word-Processlii Style Sheets Use Object-Oriented oe Styles Are Organized Ina Hierarcehy le Po. PM nie | Pammnee pra: : a zi oa | a] aa, Ne a k RA Darsa iznad RR SS ee a E ia s NE NI tm. moti M ba -y s ea : ia be čer mz ašaj z s NE - ge! . Č di a Š [ s zi 4 a se : Level |: | Basic Style V? Attributes ; — » Margins o PONI » Paragraph Style | »can be selected and modified once. .; '4iW ' drawn. They can be moved about the |, Hi ii screen, copied or deleted without, dis- h | h ii: Uf | turbing the objects they overlap."' ' i idi Objects cari be combined into more ' iti LI " S "complex objects, which cari then be ma- Hi II |, nipulated as single objects. Complex ob-' //[ | jects can be duplicated and moved, a : || lowing the user to work with the ča U Level Il: Level | Style Plus Additional Attributes s > « Headiij ———— — a ee EDI — | | pa TE ne NE —— aaa upre, " Level III: Level lI Style Plus Additional Attributes » Subheading — šim (ing at a higher level of detail. ' Ii: :;.. Each object can be edited. "Editing a ME « line means changing its end points. The bi: O: — same edit message can be sent to a rect- Mi :rangle, but with different results: The ;.' [if] z edit will change both the rectangles ; 4 m - Ši vi RA dla ME, te E Her Ha john hvakšn . height and width. Each object responds | |); Pb Sn ja | zRi S Hi tdi Minci,4,, to set attribute messages, but the | Ki: Kraji, | ži bami Nice (| (a attributes affect each object: differently. Using objectorientei teci, stles re organized ina hi ureo nino be vestni | vu erarchy. The atiributes of each style are al the Pile KRE < auate, but, for more complex drawings, dili h le ; the object-oriented approach is recom- s! mended. The use of object-oriented tech- kal di 4 ta - nigues simplifies the user interface and | pe | Mil KI helps the user to manage complexity. | | 4 Co teri mi KI Ju h Next week, in the fourth and final ar- would take them to lani a V oe antiij a rade in which aly the font 4 poo JE : ticle in this series, we will look at the ' al PC interface, because the windowing bi ' changed. All of tHese substyles inherit | growing use of object-oriented tech- . technigues help manage and control the: 4, attributes from the basic style, so the | . nigues to implement CASE tools and complexity of the environment. 4"; user has to specify only what, is differ- ' |. databases.a | io One of the more dramatic recent uses. ent for the štyles lower ini the hierarchy. | ————————— of object-oriented technigues is in the This use of object-oriented technigues % To learn more about the subject of definition of style sheets in some word- ,;. for style definitions results in d very "%:. these articles, please call The James processing programs. The style sheet, de- easy-to-use interface for developing co aii . Martin Report, an information service fines attributes, such aš page layout, plex documents. The levels of abstrac- | updated gudrterly, at (800) 242-1240. font type and text format, for some ič ' tion and inheritance make it easy to" "For information on seminars, please ' tion of the document. A čomplex dati work with and control contact (in the United States and Can documeni that Uy ment: might have styles for regula k, have a complex structure/ Again, objecti |', ada) Technology Transfer Institute, - ns bulleted text, headings and subhet dings.| . oriented technigues | pe ih (741 10th St, Santa Monica, Calif. Ni ji BE: The dli: sheets are specified by th 4, te p ment of complex . ideas. PA | |90402 (213 , 3994-8305. Im Europe, con- "li al There are n prerano tr for pro- (| tact Savant, 2 New St, Carnforth, "| Wi! ! s" Uslne a zori Pi A poreech, £ brie pictures on d computer, begin | Lancs., LA5 9BX United K: (ooo k V ae spro] Bl, seine | nin with, Apple Coraputef Inč's original |. (ose) 784 506... ee Um | PC ko! OPEE4E JM. ask k h 14! | ki Ne: | Mei bna V? i m VI ih. UE: či HUVEHA dRčva du t). KOME | ( | | | ii dbroMRi nm adi PINE