[Top] [Prev] [Next] [Index]
Page 21 out of 116 total pages
, Page 4 out of 12 pages in this chapter
Running ViewKit ObjectPak Applications
Once you have instantiated a VkApp object and set up your program's interface, call VkApp::run():
virtual void run()
The run() function enters a custom main loop that supports dispatching raw events in addition to the normal Xt event handling. See "ViewKit ObjectPak Event Handling" for more information on event handling.
Note: Do not call XtMainLoop(3) or XtAppMainLoop(3) in a ViewKit ObjectPak application.
Example 11. illustrates the typical use of the VkApp class in the main body of a ViewKit ObjectPak program.
Example 11. Using VkApp
Code
- #include <Vk/VkApp.h>
-
- // Application-specific setup
-
- void main ( int argc, char **argv )
- {
- VkApp *myApp = new VkApp("MyApp", &argc, argv);
-
- // Application-specific code
-
- myApp->run(); // Run the application
- }
[Top] [Prev] [Next] [Index]
Page 21 out of 116 total pages
, Page 4 out of 12 pages in this chapter
info@ics.com
Copyright © 1998, Integrated Computer Solutions, Inc. All rights
reserved.