1 / 47

Chap 9. User Interfaces

Object-Orientation by Khoshafian and Abnous. Chap 9. User Interfaces. 서울대학교 컴퓨터공학과 객체지향시스템 연구실 SNU OOPSLA LAB 김 형 주 교수. Contents. 1. Introduction 2. Common User-Interface Terms 3. Influence of Object Orientation on User Interfaces 4. Graphical User Interfaces

hollie
Download Presentation

Chap 9. User Interfaces

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Object-Orientation by Khoshafian and Abnous Chap 9. User Interfaces 서울대학교 컴퓨터공학과 객체지향시스템 연구실 SNU OOPSLA LAB 김 형 주 교수

  2. Contents 1. Introduction 2. Common User-Interface Terms 3. Influence of Object Orientation on User Interfaces 4. Graphical User Interfaces 5. Object-Oriented User Interfaces 6. Summary SNU-OOPSLA Lab

  3. 1. Introduction • Goal of modern user interface • Simplify and reduce commands • Intuitive Interfaces • PC: Windows, Windows 95 • Workstation: X-windows • Mouse, Windows, Menu bars, Pull-down menus, Dialog boxes • Ability to integrate different types of information • Text, Graphics, Spreadsheet data, Images and Voice • Microsoft OLE, CILabs OpenDoc, OMG CORBA • Dynamic linkage between various applications and various data types SNU-OOPSLA Lab

  4. 2. Common User-Interface Terms(1) • Pointing devices • light pen, joystick, touch-sensitive screen, mouse • selecting, moving, merging objects • Bit-mapped displays • made up of pixels (independently addressible) • advantange over character displays • graphic manipulation capabilities for vector and raster graphics • WYSIWYG: What You See Is What You Get! SNU-OOPSLA Lab

  5. 2. Common UI Terms(2) • Windows • independent screen region: tiled window or overlappd window • resizing, moving, iconifying • Menus • a list of commands available within an application • menu bars, pull-down menus • Dialog boxes • to collect information from the user • to present information to the user SNU-OOPSLA Lab

  6. 2. Common UI Terms(3) • Icon • symbolic representation of any system or object • double-clicking, dragging • Direct manipulation • simplify the interface greatly • ex) manipulate the files using the icons directly instead of memorizing the commands SNU-OOPSLA Lab

  7. 2. Common UI Terms(4) • Document-centric metaphor • not aware of programs or applications • users deal with documents, folders, drawers, clipboard, etc • Graphical user interfaces • system that allow creation and manipulation of user interface employing windows, menus, icons, dialog boxes, mouse, and keyboard event handling SNU-OOPSLA Lab

  8. 3. Influence of OO on UI(1) • Design (User Interface Management Systems) • present OO layer on top of an API • MacApp, MFC, Visual C++ • OO layer • provide a hierarchy of predefined classes • class • encapsulate the behavior of screen objects • class method • application developer can • specify which control options should be present,set, or reset • draw the screen objects • handle the events such as a mouse click • communicate with the GUI SNU-OOPSLA Lab

  9. 3. Influence of OO on UI(2) • Presentation • direct manipulation of the computer • intuitive interface: icons for objects • choose “open” menu item on a file icon: send “open” message to the file object • Integration from a set of applications • Microsoft OLE 2, CILab OpenDoc • object oriented technology for integration of the different data types into a compound document • oo concepts: complex objects, object identity, etc SNU-OOPSLA Lab

  10. 4. Graphical User Interface • Major GUIs • Microsoft Windows • Microsoft Windows 95 • Macintosh Toolbox • Other GUIs: X-windows, Smalltalk MVC, NeXT NeXTStep, ... • GUI provides an API • users can create screen objects • draw screen objects • monitor mouse activations SNU-OOPSLA Lab

  11. 4.1 Microsoft Windows (1) • Most popular GUI for IBM-compatible PCs • Announced in Nov. 1983, Released in Nov. 1985 • 4.1.1 Feature Overview • Common look and feel • All same basic look and feel • Device independence • Deal with the Windows API to manipulate the devices • Multitasking • Nonpreemptive SNU-OOPSLA Lab

  12. 4.1 Microsoft Windows (2) • Memory management • no limit such as 640k limit in DOS • Use the extended memory, share data segments , swap • Support for existing DOS applicatoins • Run most standard DOS appls under windows • Data sharing • Using the clipboard • 4.1.2 Support for object orientation • Class for screen objects • Window function for messages • Communicate with instances of a window class • Handle all messages SNU-OOPSLA Lab

  13. 4.1 Microsoft Windows (3) • 4.1.3 Creation and manipulation of a window • Structure of a window (figure 9.8) • Caption bar, System Menu, Menu bar, Minimize Box, Maximize box, Client Area, Scroll Bar • Creating windows • Set up a window class structure • The window function • The icon and the cursor • The background color of the client area • The window class menu • The redrawing function • Define the window class • Create instances • Manipulate windows SNU-OOPSLA Lab

  14. 4.1 Microsoft Windows (4) • 4.1.4 Pop-up windows and Child windows • Used to communicate information such as help, warning, and error messages • Child windows • Offsprings of other windows • A separate window class • Communicate with its parent window by transmitting messages • MS Window provides a collection of predefined child windows SNU-OOPSLA Lab

  15. 4.1 Microsoft Windows (5) • Windows predefined controls (for child windows) • Button classes • Push button, Radio button, Checkbox, 3state, Group box • Scroll bar class • Horizontal and vertical scroll bars • Edit class • Textual information to be entered • Static class • Display a box with associated text • Used most often to contain a group of other child windows • Listbox class • A list of strings to be displayed • Combo boxes • Combination of the edit class and list box class SNU-OOPSLA Lab

  16. Scroll bar Check box Static box Radio button Combo box SNU-OOPSLA Lab

  17. 4.1 Microsoft Windows (6) • 4.1.5 Resources • Icons and cursors • Can define it using the ICONEDIT utility • Menus • Dialog boxes • Provide another mechanism to obtain information from the end user SNU-OOPSLA Lab

  18. 4.1 Microsoft Windows (7) • Fonts • Bit maps • To represent icons, cursors, or draw pictures on the screen • Character strings • Resource file • User-defined resources • Keyboard accelerators • Resource scripts for window applications • Resource compiler SNU-OOPSLA Lab

  19. 4.1 Microsoft Windows (8) • 4.1.6 Graphics Device Interface(GDI) • Supports only two-dimensional graphics • Vector graphics : line, point, polygon, etc • Raster graphics : pixel manipulation • Raster graphics • bit map method: utilities such as BitBlt, PatBlt, StretchBlt • meta file method: • provide binary encoding of GDI functions • ex) draw vectors and fill a region with a bit map SNU-OOPSLA Lab

  20. 4.2 Windows 95 (1) • 32-bit protected operating system • Improved system set up and configuration • Improved file system, networking, and mobile computing • 4.2.1 Easy setup and configuration • Plug-and-play • Simplify h/w setup and configuration • Registry • Special file containing all information for configuration SNU-OOPSLA Lab

  21. 4.2 Windows 95 (2) • 4.2.2 Look and feel • Shell • Folder : container of document group or related objects • Shortcut : create a reference to an object • Task bar (Fig. 9.13) • Active windows and Start button • New control elements: slider control, tool bar control, status control, property sheet • Compound document : OLE (drag and drop) • Document-centric SNU-OOPSLA Lab

  22. 4.2 Windows 95 (3) • 4.2.3 New and improved OS features • Window 3.1 sits on top of MS-DOS • Window95 is an independent O/S: Preemptive • True 32-bit protected OS • Each application has its own protected memory • 32-bit address space (2GB) • New file system • Not on top of MS-DOS • Performance for network access and multitasking applications • Network • Can connect to multiple different network SNU-OOPSLA Lab

  23. 4.3 Macintosh Toolbox (1) • Apple’s Lisa • Steve Jobs, Smalltalk team (Alan Kay et al) • Macintosh GUI: the Toolbox • A collection of utilities to manipulate Macintosh’s resources SNU-OOPSLA Lab

  24. 4.3 Macintosh Toolbox (2) • 4.3.1 Functional overview of Toolbox • Fonts manager • manipulation of system and user defined fonts • Event manager • Monitoring of events • Desk manager • Access to desk utilities • Text edit Memory manager • Simple text editing capabilities • Memory manager • Routines to manipulate dynamic memory SNU-OOPSLA Lab

  25. 4.3 Macintosh Toolbox(3) • File manager • Routines to manipulate files and transfer data between files and applications • Sound driver • Access to sound and music capabilities • Toolbox utilities • Routines to manipulate icons, patterns, strings, fixed-point arithmetic, etc SNU-OOPSLA Lab

  26. 4.3 Macintosh Toolbox(4) • The Toolbox programming • Assembly language • Mac Programmer’s Workshop language: MPW language(Pascal, C, C++) • Most of its utilities reside in ROM • A very responsive user interface • Toolbox application code • detecting and handling events • MacApp (on top of Toolbox) • Make it simpler to develop Mac application SNU-OOPSLA Lab

  27. 4.3 Macintosh Toolbox:GUI Component • 4.3.2 Object-oriented features of Toolbox • Define a new type of window by defining a template • Messages between the Toolbox and the application • window definition function • 4.3.3 The Window Manager • Create windows with any shape and form • Protocol to draw a window on the screen • Create the window • Return a window ptr to resize,hide,deactivate,close • Manipulate the window • Close the window SNU-OOPSLA Lab

  28. 4.3 Macintosh Toolbox:GUI Component • 4.3.4 The Resource Manager • Icons, menus, windows, fonts, user-defined resource • Resource files • Window template, window definition function • 4.3.5 The Menu Manager • Routines to create and manipulate menus SNU-OOPSLA Lab

  29. 4.3 Macintosh Toolbox: GUI Component • 4.3.6 The Control Manager • Routines to define and manipulate control objects • Buttons • An action takes place when clicking it • Check boxes • Binary option • Radio buttons • Binary decision • Dials • Display a quantitative setting or value SNU-OOPSLA Lab

  30. 4.3 Macintosh Toolbox: GUI Component • 4.3.7 The Dialog Manager • Dialog boxes, Alert boxes • Resource Editor • 4.3.8 The Scrap Manager • Move data from one app to another • Clipboard SNU-OOPSLA Lab

  31. 4.3 Macintosh Toolbox: GUI Component • QuickDraw • Provides capabilities to draw and manipulate a large collection of graphic shapes • HyperCard (Bill Atkinson, 1987) • Hypermedia building tool • HyperTalk: English-like language • 5 system-defined objects • stacks, backgrounds, cards, buttons, and fields SNU-OOPSLA Lab

  32. 5. Object-Oriented User Interface • MacApp (Macintosh) • MFC and Visual C++ (Micro-Soft) • NeXT (Next computer) SNU-OOPSLA Lab

  33. 5.1 MacApp (1) • An object-oriented layer on top of the Macintosh Toolbox • A class library in Object Pascal and MPW Assembly Language • Classes • creating windows • handling file I/O • handling icons and cursors • control components: button, dials, and scroll bars • Compact, Easy and High-level coding SNU-OOPSLA Lab

  34. 5.1 MacApp (2) • 5.1.1 Predefined classes • Managing windows, menus, and mouse • Handling errors • Editing text within windows • Filing documents • Powerful debugging tools • Inspector window • Interactive debugger • Debug menu SNU-OOPSLA Lab

  35. TGridSelectCommand TPrintStyleChangeCommand TControlTracker TTECommand TCommand TEntry TAssociation TObject TList TSortedList TApplication TDocument TInspector TEvtHandler TScroller TInspectWindow TClassView TWindow TView TTextListView TObjListView TGridView TTextGridView TObjectView TPrinterHandler TStaticText TCluster TIcon TCtlMgr TPopup TPicture TEditText TNumberText TControl TScrollBar TButton TRadio TCheckBox TScrollBar TDialogView TDeskScrapView TTEView TDialogTEView MacApp class hierarchy

  36. 5.1 MacApp (3) • 5.1.2 User-interface class hierarchy • Tapplication • Opening and closing of an app • Tdocument • Management of app files • Tview • Every screen object • TWindow/TControl/TDialogView/TTEView/TScroller • Tcommand • Handle menu,mouse,keyboard commands • Tlist • Form a list of objects • 5.1.3 Extensibility • A brand-new class definition • A more specialized subclass definition SNU-OOPSLA Lab

  37. 5.2 MFC and Visual C++ (1) • Microsoft Foundation Class • MFC comes bundled with MS’s Visual C++ • MFC is object-oriented class hierarchy • Create and manage GUI objects • Easy development of OLE clients and server • General-purpose classes like string & file I/O • Available on top of MS Windows, Macintosh, and MIPS architecture SNU-OOPSLA Lab

  38. 5.2 MFC and Visual C++ (2) • 5.2.1 Visual C++ development environment • IDE (integrated development environment) tool • Editing, Debugging, Compiling. Linking • MFC AppWizard: application skeleton • Menu and dialog boxes • Support for OLE • Support for Multiple Document Exchange • Support for Context Sensitive Help • Support for toolbar and status • ODBC support SNU-OOPSLA Lab

  39. 5.2 MFC and Visual C++ (3) • MFC ClassWizard • Create new MFC classes • Add member variables to dialog classes and specify initialization and validation logic • Bind commands to message-handler functions • Class Browser • Display the relationship • Resource Editors • Resources: dialog, menus, bitmap • To create and maintain resources SNU-OOPSLA Lab

  40. 5.2.2 MFC and Visual C++ - MFC • Object oriented class hierarchy: Figure 9.29 • Provide a large set of classes for windows application development • Collection classes such as list , arrays ,maps • String Class • Time, time span, and date classes • File I/O classes • Object disk storage and retrieval class • OLE support classes • MDI support classes SNU-OOPSLA Lab

  41. 5.2.2 MFC and Visual C++ - MFC • Application framework • Figure 9.30 • Concept that combines capabilities of classes in this library and resource editors • To build Windows applications • Framework classes • Cobject • CCmdTarget • CWinApp, CDocTemplate, Cwind, Cdocument • CFrameWnd, CView, Cdialog • Applications classes • derivd from framework classes SNU-OOPSLA Lab

  42. 5.2.2 MFC and Visual C++ - MFC • 5.2.2.2 User interface class hierarchy • Extensive collection of classes for GUI application development • CMenu, CDC, CGdiObject, CCmdTarget, CWnd • Subclasses of CWnd: • CListBox, CComboBox, Cstatic • CButton, CPropertySheet, Cedit • CScrollBar, CControlBar SNU-OOPSLA Lab

  43. 5.2.2 MFC and Visual C++ - MFC • OLE class hierarchy • A collection of classes specifically designed for OLE application development • Linking and embedding items within compound documents • In-place activation of embedded items • Drag and drop between applications • COleDocument, COleObjectFactory, COleDocItem • COleClientItem, COleServerItem, COleDialog • COleInsretDialog, COleLinksDialog, COleUpdateDialog SNU-OOPSLA Lab

  44. 5.3 NeXT (1) • Three-dimensional user interface, 1988 • The most innovative computer at 1988 • Steve Jobs!, again • Originally for educational market • NeXT system software • Mach OS, Applications, NeXT user interface • Figure 9.32a, Figure 9.32b SNU-OOPSLA Lab

  45. 5.3 Next(2) • 5.3.2 NeXT user interface • Workspace Manager : manage file,directory • Interface Builder : create interface without coding • Application Kit : library of user-interface objects • NeXT Window Server : handle all screen activities • 5.3.3 Application Kit • Figure 9.33 • Provide an extensive library of predefined classes • Extend using the Objective C language SNU-OOPSLA Lab

  46. 5.3 NeXT (3) • 5.3.4 Designing user interface with Interface Builder • Figure 9.34 • Define screen layout • Define the user-defined classes : Classes Window • Make connections : outlet(interconnection) • Write the application code : Objective C language SNU-OOPSLA Lab

  47. Summary • User interface areas impacted by OO • Design and presentation of user interface • Integration of diverse types of objects • GUI (on top of OS kernel) • Microsoft Windows, Windows 95 • Apple Macintosh Toolbox • OO User Interfaces (on top of GUI) • Apple MacApp • Microsoft MFC • NeXT SNU-OOPSLA Lab

More Related