Book contents
- Frontmatter
- Contents
- Foreword
- Preface
- 1 Introduction to Modern Fortran
- 2 Array-Valued Functions
- 3 Mathematical Abstractions
- 4 Memory Management
- 5 An Interface Problem
- 6 Interfacing to C: SQLite As an Example
- 7 Graphics, GUIs, and the Internet
- 8 Unit Testing
- 9 Code Reviews
- 10 Robust Implementation of Several Simple Algorithms
- 11 Object-Oriented Programming
- 12 Parallel Programming
- A Tools for Development and Maintenance
- B Caveats
- C Trademarks
- Bibliography
- Index
7 - Graphics, GUIs, and the Internet
Published online by Cambridge University Press: 05 July 2012
- Frontmatter
- Contents
- Foreword
- Preface
- 1 Introduction to Modern Fortran
- 2 Array-Valued Functions
- 3 Mathematical Abstractions
- 4 Memory Management
- 5 An Interface Problem
- 6 Interfacing to C: SQLite As an Example
- 7 Graphics, GUIs, and the Internet
- 8 Unit Testing
- 9 Code Reviews
- 10 Robust Implementation of Several Simple Algorithms
- 11 Object-Oriented Programming
- 12 Parallel Programming
- A Tools for Development and Maintenance
- B Caveats
- C Trademarks
- Bibliography
- Index
Summary
Interaction with the user via graphical presentation or graphical interfaces is an extremely important aspect of computing. It is also an area that depends heavily on the available hardware and the operating system. While much effort has been put into the various operating environments to hide the hardware aspect, programming a graphical user-interface (GUI) on MS Windows is completely different from doing so on Linux or Mac OS X.
Hardly any programming language defines how you can display results graphically or how to build a graphical user-interface. The common approach is to use a library that hides – if possible or desirable – the specifics of the operating system, so that a portable program results. Some libraries, however, have been designed to take advantage of exactly one operating system, so that the program fits seamlessly in that environment, at the cost of not being portable anymore. At the same time, you should not underestimate the effort and skills required for designing and building a useful and usable GUI [3].
For a Fortran programmer, the situation is a bit complicated: most GUI libraries are written with C, C++, and similar languages in mind. Furthermore, a GUI for a long-running computation should have different properties than one for filling in a database form. This chapter examines a variety of solutions.
Plotting the Results
The first type of graphical interaction to examine is the presentation of the results of a computation. The responses from the user are simple: leaf through the collection of plots – in many cases sequentially – and maybe change a display parameter here and there.
- Type
- Chapter
- Information
- Modern Fortran in Practice , pp. 92 - 113Publisher: Cambridge University PressPrint publication year: 2012