V—A Free C++ GUI Framework for X
I love Linux as a development platform—it has all the Unix tools I've been using for years. Linux has been a superior development platform in every way except for development of graphical user interfaces (GUIs) with X. For some time, programmers using Microsoft Windows have had the option of using either Microsoft's MFC or Borland's OWL to develop C++ GUI applications. However, Linux has caught up in the graphics area as some very good freeware C++ GUI frameworks are now available for X and Linux. This article is about V, the GUI framework I've written.
I first developed V as a tutorial example for a C++ book I'm writing. My tutorial has turned into a very complete, easy-to-use C++ GUI framework suitable for developing almost any GUI application. It works with X and Linux, and uses the standard X Athena toolkit, so that everything remains free. V uses some customized versions of the free Athena 3D widget set, so V applications have a very handsome 3D look. V also works with Microsoft Windows, so applications you build on Linux with V are easily ported to MS-Windows, as well as other X platforms. V is distributed under the GNU Library General Public License, so you can freely use V to develop either other freeware or proprietary applications (as long as you make the source of V available to the end user).
Two other good frameworks are wxWindows and YACL. While these two programs have their strong points, I think V is much simpler to use and has applications that are more user friendly. For more details, a comparison of V and the other frameworks is posted on my web page (http://www.cs.unm.edu/~wampler/). All three programs provide much of the functionality of commercial frameworks such as MFC or OWL.
If you don't use a GUI library or framework, you are stuck using the native X toolkits to develop your GUI, either by using X directly (very hard) or using the Xt Athena or Motif widget sets (just a bit easier). While you can develop very nice interfaces using these toolkits directly, there is a steep learning curve. A good programmer needs at least a month of steady effort to be able to write programs using either Xt Athena or Motif, and the applications are limited to X platforms. One of the problems with the native X toolkits is that they are designed to be totally flexible, and to handle almost any interface design. This very generality makes them hard to learn and to use. For most applications, you simply don't need that much flexibility.
V, on the other hand, has been designed from the start with ease of programming in mind. I have received reports from new V users saying they were able to get their first V applications up and running in just four or five hours from downloading the V distribution to ending with a running application. Within a week, programmers are able to fully use almost every feature of V. Even the inexperienced programmers in my classes at the University of New Mexico have learned to program with V in a week.
The cost for this ease of programming is rather small. For one thing, you must use V's definition of the GUI elements. When you use V, you end up with interfaces that conform closely to standard Motif or Microsoft Windows applications. Also, you lose some of the low level access and flexibility you have when using the low-level toolkits. For the vast majority of applications, this loss is not significant. V does provides hooks for getting at some of the low-level details, but the only use I've heard made of them is to interface with OpenGL and Mesa.
Figure 1 shows the V Icon Editor included with the V distribution. The Icon Editor is representative of a typical V application. The main user interface element is the command window. The command window has a menu bar that is the standard drop-down menu found on most Motif and Windows applications. Below the menu bar are one or more tool bars that allow you to make the most commonly used commands readily available to the user. The current trend is to place buttons with small icons on the tool bar; with V you can use any standard control object on the tool bar. Under the tool bar is the drawing canvas where your application shows data, such as text information, graphical information, or, in this case, the icon to edit. The drawing canvas can have scroll bars, and the user interacts with the data displayed on the canvas using the mouse or keyboard. Below the drawing canvas is a status bar, used to show useful information, like the mouse position.
Dialogs are an important part of most GUI programs. Figure 2 shows the color selection modeless dialog used with the V Icon Editor. V supports both modal and modeless dialogs with a complete set of controls.
I hope you agree that the appearance of this V application is as good as any other X application you've seen on Linux. Icon Editor also compiles in Microsoft Windows without a single #ifdef and will look just like a standard Windows application.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- SuperTuxKart 0.9.2 Released
- Doing for User Space What We Did for Kernel Space
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide