tailieunhanh - Lecture Programming principles and practice using C++: Chapter 16 - Bjarne Stroustrup

Lecture Programming principles and practice using C++ - Chapter 16 introduce graphical user interfaces. In this chapter, you learned to: Perspective (I/O alternatives, GUI, layers of software), GUI example, GUI code (callbacks). Inviting you refer. | Chapter 16 Graphical User Interfaces Bjarne Stroustrup Overview Perspective I/O alternatives GUI Layers of software GUI example GUI code callbacks Stroustrup/Programming I/O alternatives Use console input and output A strong contender for technical/professional work Command line interface Menu driven interface Graphic User Interface Use a GUI Library To match the “feel” of windows/Mac applications When you need drag and drop, WYSIWYG Event driven program design A web browser – this is a GUI library application HTML / a scripting language For remote access (and more) Stroustrup/Programming 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 . yes/no, blue/green/red, etc. Stroustrup/Programming Common GUI tasks (cont.) Display results Shapes Text and numbers Make a window “look right” Style and color Note: our . | Chapter 16 Graphical User Interfaces Bjarne Stroustrup Overview Perspective I/O alternatives GUI Layers of software GUI example GUI code callbacks Stroustrup/Programming I/O alternatives Use console input and output A strong contender for technical/professional work Command line interface Menu driven interface Graphic User Interface Use a GUI Library To match the “feel” of windows/Mac applications When you need drag and drop, WYSIWYG Event driven program design A web browser – this is a GUI library application HTML / a scripting language For remote access (and more) Stroustrup/Programming 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 . yes/no, blue/green/red, etc. Stroustrup/Programming Common GUI tasks (cont.) Display results Shapes Text and numbers Make a window “look right” Style and color Note: our windows look different (and appropriate) on different systems More advanced Tracking the mouse Dragging and dropping Free-hand drawing Stroustrup/Programming 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 Stroustrup/Programming Layers of software When we build software, we usually build upon existing code Our program Our GUI/Graphics interface library FLTK The operating system Graphics GUI facilities Device driver layer Example of a layer Provides services Uses services Stroustrup/Programming GUI example Window with two Buttons, two In_boxes, and an Out_box Stroustrup/Programming GUI example Enter a point in the In_boxes Stroustrup/Programming GUI example When you hit Next point that point becomes the current (x,y) and is displayed in the Out_box Stroustrup/Programming GUI

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.