Chapter 2. GTK for VB Developers

only for RuBoard - do not distribute or recompile

Chapter 2. GTK+ for VB Developers

graphics/chic01.gif

This chapter introduces the GTK+ widget set, primarily for the Linux platform. The widgets have also been ported to the Microsoft Windows environment. However, before you go switching all your Windows development efforts, you need to know that cross-compiling the same code on both Linux and Windows is far from a painless process. This book focuses on Linux and considers Windows an option. At the time of this writing, the Windows port of the GTK+ widget set is considered alpha release, but continued improvement is expected in the immediate future. Although I have created and used applications for both Windows and Linux from the same source code, I have to caution you to approach such a task very carefully for any mission critical application. Do your homework and be very thorough in your testing process. Also, you need to know that although you can use Visual C++ to compile GTK+ code, it requires a couple of hacks and is not a terribly elegant process ”not anywhere near as clean as compiling for Linux. Plus, you ll need the appropriate dll s and other files, which you then have to distribute to your end users. Caveat emptor: Let the buyer beware.

The GTK+ widget set is a GUI toolkit for building windowing applications. A widget is what the MS Windows world calls a control. On Linux, the primary windowing environment is called X-Windows or X for short. It is important to know that unlike in Microsoft Windows, the GUI environment is not integrated with the operating system. You can run an entire Linux machine from the command line. Most distributions of Linux ship with the XFree86 windowing system. XFree86 is another example of open source software power. It is a powerful windows environment that was built by hackers from around the globe. The GTK+ widget set operates under the windowing environment, providing a set of GUI controls that is easy to implement and use, such as command buttons and text boxes.

However, it is important to note that the GTK+ widget set has nothing inherently comparable to the VB data control(s). This book will show you how to combine MySQL (introduced in Chapter 1, MySQL for Access and SQL Server Developers and DBAs ) with the GTK+ widget set.

Why would VB developers be interested in GTK+? First, they are used to rapid development, and the conversion from controls-events to widgets-callbacks is a natural one. C++ developers will have it a little easier because the syntax and the object oriented (OO) paradigms of inheritance, polymorphism, and encapsulation are already second nature to them. Some will say OO is a way of programming and, therefore, any language can be OO, whereas others will say that OO is part of the language, as in C++. In this case, I think it works to borrow the OO concepts as I have here because it allows you to make the jump to MySQL/GTK+ more easily, especially if you already understand the OO concepts.

Second, most VB developers are used to working with some kind of database, which is why MySQL was introduced in the early part of this book.

only for RuBoard - do not distribute or recompile


MySQL Building User Interfaces
MySQL: Building User Interfaces (Landmark)
ISBN: 073571049X
EAN: 2147483647
Year: 2001
Pages: 119

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net