1 / 14

Event-Based Programming

Event-Based Programming. Chris North cs3724: HCI. Presentations. HW#1 due today brian hostetler daniel boisson Vote: UI Hall of Fame/Shame?. Quiz. 3 UI interaction styles? dm Menu command. Quiz. 4 principles of direct manipulation? visual Actions reversible Feedback

janae
Download Presentation

Event-Based Programming

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. Event-Based Programming Chris North cs3724: HCI

  2. Presentations • HW#1 due today • brian hostetler • daniel boisson • Vote: UI Hall of Fame/Shame?

  3. Quiz • 3 UI interaction styles? • dm • Menu • command

  4. Quiz • 4 principles of direct manipulation? • visual • Actions reversible • Feedback • Point select

  5. GUI Development: Goals • Learn basic GUI concepts • Events, graphics, components, … • Learn some specific technologies • VisualBasic, Java, ASP Goal: can pick-up new technologies quickly • .NET, C#, Xwin, Java 49

  6. Technologies • Microsoft: • Visual Basic (6) • C++, MFC (dead!) • C#, .Net • Borland Delphi • Unix: • Xlib • Motif, … • Tcl/tk • Cross Platform: • Visix Galaxy (dead) • Java, Swing • Mac ??? • Palm • Web • Dhtml, javascript • ASP, JSP, cgi, … • Cold fusion, …

  7. GUI Events System MS: Windows Unix: Xwindows Java: AWT/Swing event loop App Code: OK_button_callback() { do stuff; } Cancel_button_callback() { do different stuff; } Mouse click, Mouse move, Key press, … Application OK Cancel

  8. Typical GUI program App Code: Global storage for data state Startup stuff initialization create GUI Event callback proc Event callback proc Event callback proc Event callback proc … Example: Word Processor Datastruct current_text Startup() current_text = “” create window, text area, buttons Event text area keypress(char key) current_text.insert(key) Event bold button click() current_text.makebold() …

  9. Unpredictable Flow Non-GUI app: Code Code Code Code Code Code Code Code Code Code Code Code Code GUI app: Global storage for data state Startup stuff initialization create GUI Event callback proc Event callback proc Event callback proc Event callback proc Event callback proc Event callback proc Event callback proc Most time spent idle!

  10. Visual Basic • Form = window • RAD tools • Components: properties, methods, events • Modes: edit, run • Debug • Object Browser • msdn • CD • Web: http://www.msdn.microsoft.com/library/en-us/vbcon98/html/vbmscVisualBasicDocumentationMap.asp

  11. Components • Properties • Read/write (get/set) • E.g. color • Methods • Procedures or functions • E.g. move x,y,w,h • Events • Send message to component’s container • E.g. buttonClick

  12. Project 1: VB • See website • Due Thurs Feb 7 (2 weeks) • Virtual VCR programming tool • Idea: Cable PC, records onto huge disk drive • Visual Basic • 50% UI design, 50% program • Individual assignment

  13. Next • Homework #1 due now Presentations: • Next Tues: bruce billian, nick meyers • Next Thurs: taylor mitchell, chris henry

More Related