ClearWin+ is an easy to use GUI builder which is designed for Fortran programmers. By learning a few simple subroutine calls and format strings you can take any existing Win32 Fortran program and add a full GUI interface with windows, menus, popup dialog boxes, list boxes, edit boxes, bitmaps, toolbars, etc. etc. Callback mechanisms and similar functionality is handled for the programmer by ClearWin+.
ClearWin+ is very concise, 'Hello World' requires only four lines of Fortran code. Whilst ClearWin+ provides the majority of interaction with the Win32 API full direct access is also possible. Applications written using ClearWin+ can also contain graphics regions, enabling charts and graphs of all descriptions to be included within applications. OpenGL graphics can also be included and sample code is provided.
Here is an example of how easy it is to produce graphics with ClearWin+. The Fortran to the left produces the graph to the right.
PROGRAM main use clrwin integer iw,winio@ integer ctrl integer last_x, last_y, mid_y integer new_x, new_y integer :: parameter, width = 800, height = 350, gutter = 20 real x iw=winio@('%ca[sin(x)exp(-x/10)]&') ! set up the surface to draw onto. Remove [smooth4] to see what anti-aliasing has given you iw=winio@('%gr[smooth4]&', width, height) iw=winio@('%lw', ctrl) ! draw axes mid_y = height / 2 call draw_line_between@(gutter, gutter, gutter, width-gutter, 0 ) call draw_line_between@(gutter, mid_y, width-gutter, mid_y, 0 ) do i = 0,width-(2*gutter) ! make the width of the x-axis span 0..8pi. REAL(width-(2*gutter) is the width of that axis x = (i/REAL(width-(2*gutter)))*8*3.1415926 new_y = mid_y + sin(x)*exp(-x / 10)*(mid_y-gutter) if (i > 0) then call draw_line_between@(gutter+i-1, last_y, gutter+i, new_y, RGB@(255,0,0) ) end if last_y = new_y end do END PROGRAM main