The GUI Burden ATS 315 Stephenson, 118-125. Booting Your PC Starts off with some text with lots of...
-
Upload
kathleen-nelson -
Category
Documents
-
view
213 -
download
0
Transcript of The GUI Burden ATS 315 Stephenson, 118-125. Booting Your PC Starts off with some text with lots of...
Booting Your PC
• Starts off with some text with lots of cryptic messages.
• Next, the ugly windows logo…
Why start off in a text mode?
• Thousands of possible monitors
• Thousands of possible video cards
• = Millions of possible combinations
• All they have in command is “VGA” mode.
Drivers
• Translate the computers instructions into instructions for the specific brands of peripherals on your computer.
• The computer itself cannot care about the brand of hardware attached—it just talks to the drivers and the drivers sort it out.
Where are the drivers?
• Buried.• In binary.• You can set some of
the features of these drivers in the Display dialog box…
Unix
• At log in, you are on a glass teletype (tty)– Why?
– Server knows NOTHING about your computer’s hardware
– …or its own hardware!
XWindows
• A set of programs that reproduces the graphical metaphors in Unix
• XWindows itself is extremely ugly…
Window Managers
• A set of programs and settings that gives XWindows a coherent, modern “look and feel”.
• In cygwin, we are running XWin, which makes the windows look just like WindowsXP windows. (startxwin.sh)
Developing Programs for a GUI
• A simple program: grep
– grep simply searches files for the requested string.
– grep fopen *.c
grep.c
• Is probably very simple and short:
• while(!feof(fin)) {– fscanf(fin, “%s”,&string2);– if (!strcmp(string1,string2)) printf (“%s”,string1);
• }
A grep XWindows Program
• Would have to prompt the user for the string to search for and the files to search in.
• Requires loading fonts, choosing colors for the fonts, etc. (i.e., the attributes of the text)
What text are you looking for?
In which file should I look?
A grep XWindows Program
• Would have to set up dialog boxes in which the user could enter text. What text are
you looking for?
In which file should I look?
A grep XWindows Program
• Would have to know how to work with the mouse, mousebuttons, etc. What text are
you looking for?
In which file should I look?
A grep XWindows Program
• Would need buttons for Search and probably for Cancel.
What text are you looking for?
In which file should I look?
Search Cancel
A grep XWindows Program
• All of this is BEFORE you write the part of the program that actually searches for the text!
What text are you looking for?
In which file should I look?
Search Cancel
A grep XWindows Program
• This program would be thousands of lines long!
• Hardly worth the work!
What text are you looking for?
In which file should I look?
Search Cancel