Visual Component Framework
Encyclopedia
The Visual Component Framework (VCF) is an open source
project for development under Microsoft Windows
and Apple Macintosh that is distributed under the BSD license. It is an advanced C++
application framework that makes it easier to produce GUI-based C++ applications. The framework is based on a thoroughly modern C++ design and has built in support for Rapid application development
. The framework is designed to be portable over multiple platforms
and compiler
s.
The framework runs under Windows and Mac OS X
, but the OS X port is still ongoing as of this writing. Current efforts are also underway to port it to Linux
.
The project has made a large effort to support a variety of compilers and Integrated Development Environment
s (IDE), allowing the developer to work in whatever IDE/compiler they prefer. Compiler support on Windows covers Microsoft's Visual C++
versions 6, 7, 7.1, and 8, along with Borlands C++ Compiler, the Intel C++ Compiler, and GCC
. On Mac OS X GCC is supported using the Xcode
IDE. A CodeWarrior port was completed, but stopped due to CodeWarrior dropping support for their x86 version of the compiler, and later for their PowerPC version as well.
, such as Mac OS X
, BeOS
, or possibly even embedded operating systems like Windows CE
.
The next goal is to provide solid support for dynamic programming such as that found in languages like Borland
's Object Pascal
, Java
, or Objective-C
. This included RTTI or reflection
like classes that allow the developer to query all sorts of information about a given class instance at runtime.
Another goal was to design the UI
classes so that visual programming or rapid application development
was possible, similar to what is found in Delphi
. This includes support for property editors, component editors, persistence of the UI state to and from an external text file, and making use of the dynamic features to create class instances on the fly and get and set the instance's registered properties.
In addition to this, the last goal was to provide support for a large number of common programming tasks when developing an application, particularly for larger scale applications. This includes support for various kinds of IO (in memory, file/disk, and so forth), thread support and various synchronization primitives like mutexs, semaphores, and conditions, Unicode string support, locale and internationalization support including localizing string resources, comprehensive resource support, and basic XML parsing. Graphics features include anti-aliased graphics using the Anti-Grain Graphics Library, full affine transformation support, images with direct access to the image's pixel bits. Additional application support features also include undo/redo classes, advanced support for Model View Controller.
As a general rule, the framework makes as much use as possible of the Standard Template Library
, avoiding duplication of work on things like container classes, or string handling.
Where possible the framework builds on top of the native C++ RTTI support such as using dynamic cast
and typeid
, as opposed to simply re-implementing it.
Most OS objects, such as files, threads, graphics devices, and window controls (or widgets), and so on, are implemented using a thin layer that talks directly to the specific native object. UI controls are not emulated for the most part, instead the framework uses native widgets in most places. Direct access to the underlying OS "handle" is allowed in cases where platform specific functionality is needed, allowing the developer to easily call the platform's native APIs.
Open-source software
Open-source software is computer software that is available in source code form: the source code and certain other rights normally reserved for copyright holders are provided under a software license that permits users to study, change, improve and at times also to distribute the software.Open...
project for development under Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
and Apple Macintosh that is distributed under the BSD license. It is an advanced C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...
application framework that makes it easier to produce GUI-based C++ applications. The framework is based on a thoroughly modern C++ design and has built in support for Rapid application development
Rapid application development
Rapid application development is a software development methodology that uses minimal planning in favor of rapid prototyping. The "planning" of software developed using RAD is interleaved with writing the software itself...
. The framework is designed to be portable over multiple platforms
Platform (computing)
A computing platform includes some sort of hardware architecture and a software framework , where the combination allows software, particularly application software, to run...
and compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...
s.
The framework runs under Windows and Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
, but the OS X port is still ongoing as of this writing. Current efforts are also underway to port it to Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
.
The project has made a large effort to support a variety of compilers and Integrated Development Environment
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...
s (IDE), allowing the developer to work in whatever IDE/compiler they prefer. Compiler support on Windows covers Microsoft's Visual C++
Visual C++
Microsoft Visual C++ is a commercial , integrated development environment product from Microsoft for the C, C++, and C++/CLI programming languages...
versions 6, 7, 7.1, and 8, along with Borlands C++ Compiler, the Intel C++ Compiler, and GCC
GNU Compiler Collection
The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain...
. On Mac OS X GCC is supported using the Xcode
Xcode
Xcode is a suite of tools, developed by Apple, for developing software for Mac OS X and iOS. Xcode 4.2, the latest major version, is available on the Mac App Store for free for Mac OS X 10.7 , and on the Apple Developer Connection website for free to registered developers Xcode is a suite of tools,...
IDE. A CodeWarrior port was completed, but stopped due to CodeWarrior dropping support for their x86 version of the compiler, and later for their PowerPC version as well.
Design and Goals
The framework is designed with several goals in mind. One is the ability to be ported to other platforms beyond WindowsMicrosoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
, such as Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
, BeOS
BeOS
BeOS is an operating system for personal computers which began development by Be Inc. in 1991. It was first written to run on BeBox hardware. BeOS was optimized for digital media work and was written to take advantage of modern hardware facilities such as symmetric multiprocessing by utilizing...
, or possibly even embedded operating systems like Windows CE
Windows CE
Microsoft Windows CE is an operating system developed by Microsoft for embedded systems. Windows CE is a distinct operating system and kernel, rather than a trimmed-down version of desktop Windows...
.
The next goal is to provide solid support for dynamic programming such as that found in languages like Borland
Borland
Borland Software Corporation is a software company first headquartered in Scotts Valley, California, Cupertino, California and finally Austin, Texas. It is now a Micro Focus subsidiary. It was founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad and Philippe Kahn.-The 1980s:...
's Object Pascal
Object Pascal
Object Pascal refers to a branch of object-oriented derivatives of Pascal, mostly known as the primary programming language of Embarcadero Delphi.-Early history at Apple:...
, Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
, or Objective-C
Objective-C
Objective-C is a reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.Today, it is used primarily on Apple's Mac OS X and iOS: two environments derived from the OpenStep standard, though not compliant with it...
. This included RTTI or reflection
Reflection (computer science)
In computer science, reflection is the process by which a computer program can observe and modify its own structure and behavior at runtime....
like classes that allow the developer to query all sorts of information about a given class instance at runtime.
Another goal was to design the UI
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...
classes so that visual programming or rapid application development
Rapid application development
Rapid application development is a software development methodology that uses minimal planning in favor of rapid prototyping. The "planning" of software developed using RAD is interleaved with writing the software itself...
was possible, similar to what is found in Delphi
Borland Delphi
Embarcadero Delphi is an integrated development environment for console, desktop graphical, web, and mobile applications.Delphi's compilers use its own Object Pascal dialect of Pascal and generate native code for 32- and 64-bit Windows operating systems, as well as 32-bit Mac OS X and iOS...
. This includes support for property editors, component editors, persistence of the UI state to and from an external text file, and making use of the dynamic features to create class instances on the fly and get and set the instance's registered properties.
In addition to this, the last goal was to provide support for a large number of common programming tasks when developing an application, particularly for larger scale applications. This includes support for various kinds of IO (in memory, file/disk, and so forth), thread support and various synchronization primitives like mutexs, semaphores, and conditions, Unicode string support, locale and internationalization support including localizing string resources, comprehensive resource support, and basic XML parsing. Graphics features include anti-aliased graphics using the Anti-Grain Graphics Library, full affine transformation support, images with direct access to the image's pixel bits. Additional application support features also include undo/redo classes, advanced support for Model View Controller.
As a general rule, the framework makes as much use as possible of the Standard Template Library
Standard Template Library
The Standard Template Library is a C++ software library which later evolved into the C++ Standard Library. It provides four components called algorithms, containers, functors, and iterators. More specifically, the C++ Standard Library is based on the STL published by SGI. Both include some...
, avoiding duplication of work on things like container classes, or string handling.
Where possible the framework builds on top of the native C++ RTTI support such as using dynamic cast
Dynamic cast
In the C++ programming language, the dynamic_cast operator is a part of the run-time type information system that performs a typecast. Unlike an ordinary C-style typecast, a type safety check is performed at runtime, and if the types are not compatible, an exception will be thrown or a null...
and typeid
Typeid
In C++, the typeid keyword is used to determine the class of an object at run time. It returns a reference to std::type_info object, which exists until the end of the program...
, as opposed to simply re-implementing it.
Most OS objects, such as files, threads, graphics devices, and window controls (or widgets), and so on, are implemented using a thin layer that talks directly to the specific native object. UI controls are not emulated for the most part, instead the framework uses native widgets in most places. Direct access to the underlying OS "handle" is allowed in cases where platform specific functionality is needed, allowing the developer to easily call the platform's native APIs.
See also
- Software component
- Widget toolkitWidget toolkitIn computing, a widget toolkit, widget library, or GUI toolkit is a set of widgets for use in designing applications with graphical user interfaces...
- List of widget toolkits
- QtQt (toolkit)Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface , and also used for developing non-GUI programs such as command-line tools and consoles for servers...
- wxWidgetsWxWidgetswxWidgets is a widget toolkit for creating graphical user interfaces for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with minimal or no code changes...
- MotifMotif (widget toolkit)In computing, Motif refers to both a graphical user interface specification and the widget toolkit for building applications that follow that specification under the X Window System on Unix and other POSIX-compliant systems. It emerged in the 1980s as Unix workstations were on the rise, as a...
- GTK+GTK+GTK+ is a cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. It is one of the most popular toolkits for the X Window System, along with Qt.The name GTK+ originates from GTK;...
- GtkmmGtkmmgtkmm is the official C++ interface for the popular GUI library GTK+. gtkmm is free software distributed under the GNU Lesser General Public License ....
- FLTKFLTKFLTK is a cross-platform GUI library developed by Bill Spitzak and others. Made with 3D graphics programming in mind, it has an interface to OpenGL, but it is also suitable for general GUI programming....
- FOX toolkitFOX toolkitThe FOX toolkit is an open source, cross-platform widget toolkit, that is, a library of basic elements for building a graphical user interface...
- Ultimate++Ultimate++Ultimate++ is a C++ cross-platform development framework which aims to reduce the code complexity of typical desktop applications by extensively exploiting C++ features.-Features:* currently supports Microsoft Windows, Linux/X11 and BSD/X11....