SlideServe
Menu
Préférences
© SlideServe · v2026

Graphical User Interfaces

dyer avatar
18 diapositives · 202 Views · Oct 29, 2019

Explore the differences between graphical user interfaces (GUI) and console interfaces. Learn about the advantages and disadvantages of each method, as well as common tasks in GUI programming.

Graphical User Interfaces - slide 1
01 / 18Graphical User Interfaces
1 / 17

Télécharger la présentation

Graphical User Interfaces
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Graphical User Interfaces A Quick Outlook

  2. Interface • Many methods to create and “interface” with the user • 2 most common interface methods: • Console • GUI

  3. Interface Alternatives: Console • Command line Interface • Easier to use for certain operations/scenarios • You enter input using either given as parameters during the startup or by some menus/options inside the application

  4. Interface Alternatives : Console #runapp.exe param1 param2 >Hello User #Hello Console >Give me input: #`input` >Give more #`more input` >More #`even more input` >I SAID MORE INPUT #`Most input you can provide` >Press “return” to start computing your input >Wait for my answer “User” #waiting … #waiting … >Your answer is : 3 >Bye “user”

  5. GUI

  6. GUI Textbox 1 Textbox 2 Textbox 3 Submit Button

  7. GUI • Easier to use • Supply input with keyboard and deliver with mouse • Less text to explain what to do on screen

  8. Common GUI Tasks • Titles / Text • Names • Prompts • User instructions • Fields / Dialog boxes • Input • Output • Buttons • Let the user initiate actions • Let the user select among a set of alternatives • e.g. yes/no, blue/green/red, etc.

  9. Common GUI tasks (cont.) • Display results • Shapes • Text and numbers • Make a window • Style and color • More advanced • Tracking the mouse • Dragging and dropping • Free-hand drawing

  10. GUI • From a programming point of view GUI is based on two techniques • Object-oriented programming • For organizing program parts with common interfaces and common actions • Events • For connecting an event (like a mouse click) with a program action

  11. Object Oriented Programming and GUI • Every button, text, label etc. is a class instance • Actions are member functions • Can create own class derivations and reuse them :

  12. Events and GUI • As mentioned earlier GUI programming is event based • Clicking a button, entering text, keyboard press, mouse movement … • Bind events to member functions => interactive GUI

  13. GUI Enter text to textbox

  14. GUI Press the send button and fire the “click” event

  15. GUI The data in the textbox is read. Then added to the textbox above. Finally the event finishes by clearing the input box

  16. What? How? • We saw buttons, input boxes and an outbox in a window • How do we create a window? • How do we create buttons? • How do we create input and output textboxes? • Click on a button and something happens • How do we program that action? • How do we connect our code to the button? • You type something into a input box • How do we get that value into our code? • How do we clear the input of the box ? • We saw output in the output box • How do we get the values there? Willsee in thelabsthisweek!

  17. Console  GUI Mapping • For each console query create new label/textbox pairs • Don’t try to take all inputs from a single textbox • After all user “queries” are filled in create a single button to submit the data

  18. References • Based on Slides : Graphical User Interfaces by BjarneStroustrupwww.stroustrup.com/Programming