The V C++ GUI Framework User Guide:What is V?

From EDM2
Jump to: navigation, search

V is a C++ Graphical User Interface Framework designed to provide an easy to use and program system for building GUI applications. The framework is small, elegant, and provides the tools required for building all but the most specialized applications.

The V framework has also been designed to be portable. Currently, versions for the X Windowing System (using a customized 3D Athena widget set), Microsoft Windows 3.1, and Microsoft WIN32 (Windows 95 and NT) are available. A version for OS/2 is also available. A gtk version for X is also under development. The V system is freely available for use by anyone under the terms of the GNU Library General Public License.

Why did I write V, and why did I put it under the GNU license? I have been programming for over 20 years now, and building interactive applications for most of that time. During that time, I got tired of complicated, difficult to learn and use libraries for building interfaces, and wanted something easier.

I've also been successful in the software business, having founded two different software companies, Aspen Software and Reference Software International. I was the principle designer and author of the widely known and used grammar checker, Grammatik (1). Basically, I see V as something of a public service; a way to give something back to the software industry that has been good to me. The concept of a portable GUI library is not original, but I think some of the design goals of V are significantly different than other similar libraries I've seen.

  • The main design goal is for V is ease of programming. I don't think that building the GUI part of an application should be the hardest part of the job as it is with most native GUI toolkits. V is small, easy to learn, easy to use, and provides the essentials of a good graphical user interface.
  • I have some evidence that I have succeeded in this goal. V has been used for several semesters for large team projects in the software engineering class I taught at the University of New Mexico. While I get many questions from my students related to the projects they are doing, I got virtually no questions about using V itself. The small number of questions about V has been both startling and rewarding, and is good evidence that this design goal has been met. V has also been used successfully for a Junior level programming class. Previously, the high overhead of learning to write applications for X has prevented the students from writing small programs with interesting user interfaces. The simplicity of V has allowed them to do this for the first time.
  • V is designed to be portable. Over the years, I've programmed on a wide variety of interactive platforms. The main GUI platforms widely used today include the X Window System, Microsoft Windows (3.1, 95, and NT), OS/2, and the Macintosh. V has been designed to work on all those platforms, and present a look and feel that is consistent with native applications.
  • V is not too big. It has less than 15 C++ classes that you will have to interact with. This is unlike many other frameworks that provide dozens and dozens of classes that you must learn and understand. The V framework only supports GUIs. It does not have templates, containers, and bunches of other C++ classes. If you need a good list class, use your favourite one from another class library. Use V for your interface.
  • V has very good associated documentation. It is likely that part of the reason that V is easy to use is that it is accompanied by a better than average programming manual. I've tried to not only give a useful explanation of each V class and function, but to accompany each description with a short example that shows how to use the V feature in a useful way. There are also several examples provided with the V distribution to help you get started with a basic V application.
  • V is an alternative for building compiled GUI applications. While interpretive solutions such as Tk/Tcl for building GUI applications are becoming popular, they don't allow fully compiled code on multiple platforms. As machines get faster and faster, I don't think the advantage of an edit/interpret cycle versus an edit/compile/run cycle is significant.
  • The V library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.

V is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU Library General Public License for more details. (Note: that is a direct link to the GNU web page. If you are viewing this manual off-line, don't click there now.)

  • The source code for V is of commercial quality, and I hope some of the easiest to read and understand code you will ever encounter (if you decide to look at the V source code).

There is, of course, a price to pay for the ease of programming with V. The main constraint is that you are somewhat restricted to following V's (and thus my own) view of the world. The V model does not exactly conform to the native models of X, Windows, and the Mac, but it is a very good compromise. For the most part applications developed with V will in fact conform to the host look and feel, but may be lacking some of the bells and whistles of the most sophisticated commercial applications available for a given platform. For the vast majority of applications, this will not matter. You will end up with applications that look pretty good, and are likely to have a much cleaner and better interface than they would have otherwise.

If you are a C programmer, then the fact V is a C++ library might be a problem. While it is a fully object-oriented C++ framework, it can be used with C code if you know a bit about C++. Also, V does not allow you to do everything you could if you programmed in the native windowing library. You won't have every single conceivable control, and some controls are slightly restricted in how you can use them.

And finally, why the name V? First of all, it is a simple name. It follows the tradition of C and X. It makes naming the classes easier. And, my son's name is Van, which starts with a V. So V it is.


1 Grammatik is a trademark of Novell, Inc.