GLG Programming Reference Manual GLG Toolkit Version 4.1

GLG Programming Reference Manual GLG Toolkit Version 4.1

GLG Programming Reference Manual GLG Toolkit Version 4.1 Generic Logic, Inc. Generic Logic, Inc. 6 University Drive 206-125 Amherst, MA 01002 USA Telephone: (413) 253-7491 FAX: (413) 241-6107 email: [email protected] web: www.genlogic.com Introduction Copyrights and Trademarks Copyright © 1994-2021 by Generic Logic, Inc. All Rights Reserved. This manual is subject to copyright protection. GLG Toolkit, GLG Widgets, and GLG Graphics Builder are trademarks of Generic Logic, Inc. All other trademarks are acknowledged as the property of their respective owners. May 3, 2021 Software Release Version 4.1 3 Preface GLG Programming Reference Manual This book provides information about programming with GLG and using different GLG Run-Time environments, including C/C++, Java, C#/.NET, JavaScript and ActiveX Control. The first section of this manual describes the C API, while the rest of the book describes the C++, Java, C#/.NET, JavaScript and ActiveX Control versions. Although various programming environments such as C, C++, Java, C#/.NET, JavaScript and ActiveX, use different syntax to invoke the GLG API, the semantics of the API methods is the same in either environment. The C programming section provides the most detailed description of each method in terms of its effect on the underlying GLG objects. It also provides more examples and may be used as a reference for C, C++, Java, C#/.NET and JavaScript programmers. The book contains the following chapters: Table of Contents Integrating GLG Drawings into a Program A general overview of the process of programming with the GLG Toolkit. Using the C/C++ version of the Toolkit Displaying a GLG Drawing How to load and display a GLG drawing in an application program in different programming environments. Compiling and Linking GLG Programs The details of compiling and linking an application program with the GLG libraries. The GLG Generic API Describes functions of the GLG Generic API for loading a displaying a GLG drawing is a cross-platform way. Animating a GLG Drawing with Data Using the Standard API Describes functions of the GLG Standard API used to animate a drawing with real-time data. Handling User Input and Other Events A description of the ways in which a GLG drawing can be used to get input from an application program user. GLG Intermediate and Extended API How to query the content of a drawing and modify the drawing from an application program. Real-Time Chart Functions A description of functions used with the GLG Real Time Chart object. GIS Object Functions A description functions used to handle user interaction with the GLG GIS Object. GLG Installable Interface Handlers A description of installable interface handles that may be used to handle complex editor-like user interaction. 4 GLG Programming Reference Manual GLG C++ Bindings A description of GLG C++ Bindings and the GLG MFC class. Using the ActiveX Control A description of the GLG ActiveX Control methods. Using the Java and C# Versions of the Toolkit A description of the Java and C#/.NET versions of the GLG Class Library. Using the JavaScript Version of the Toolkit A description of the JavaScript version of the GLG Library used to display GLG drawings on a web page inside a browser. GLG Programming Tools and Utilities Descriptions of the utility tools that come with the GLG Toolkit. C/C++ Graph Layout Component The graph layout component for the GLG C/C++ library. Appendices Appendix A: Global Configuration Resources A list of global configuration resources. Appendix B: Message Object Resources A table of the GLG event types and their message object resources. Appendix C: GLG Object Attribute Table A list of the default attribute names for all object types. Index This guide assumes that you are conversant with the basic concepts of computer graphics programming. For a comprehensive discussion of three dimensional computer graphics, we recommend Computer Graphics: Principles and Practice, Foley, Van Dam, Feiner, and Hughes. Second edition, 1990; Addison-Wesley, Reading MA. Please note that although the illustrations in this document represent the UNIX/Linux version of the GLG Graphics Builder, the information it contains is equally relevant to Microsoft Windows users. The two versions present the same functionality in equivalent user interfaces, with minimal, cosmetic differences caused by the different platforms. 5 Table GLG Programming Reference of Manual Contents Chapter 1 Integrating GLG Drawings into a Program............................. 23 Creating a Widget Drawing ............................................................................................................24 Displaying a Drawing .....................................................................................................................25 Animating a Drawing with Real-Time Data...................................................................................26 Handling User Input........................................................................................................................26 H and V Resources..........................................................................................................................27 Utilities............................................................................................................................................29 Chapter 2 Using the C/C++ version of the Toolkit................................... 31 2.1 Displaying a GLG Drawing ............................................................... 31 X Windows and GLG Wrapper Widget..........................................................................................32 Creating the Wrapper Widget ..................................................................................................32 Wrapper Widget Resources .....................................................................................................33 Obtaining a Viewport Handle ..................................................................................................37 Closing the Wrapper Widget ...................................................................................................38 GLG Custom Control for Windows................................................................................................38 Creating the GLG Custom Control ..........................................................................................39 Setting Initial Resources ..........................................................................................................39 Obtaining a Viewport Handle ..................................................................................................40 Closing the Custom Control ....................................................................................................41 Messages ..................................................................................................................................41 Loading and Displaying a GLG Drawing using Generic API ........................................................42 Coding Examples of Displaying and Animating a GLG Drawing .................................................43 Compiling and running Example Programs ............................................................................43 2.2 Compiling and Linking GLG Programs ........................................... 43 Building GLG Demos and Examples..............................................................................................43 Visual Studio Projects for Windows .......................................................................................43 Makefiles for Unix/Linux ........................................................................................................43 6 GLG Programming Reference Manual Using Constant Strings ............................................................................................................ 44 Linking with the GLG Libraries..................................................................................................... 44 X Windows on UNIX/Linux ................................................................................................... 44 Windows ................................................................................................................................. 46 Using OpenGL in Application Executables ............................................................................ 47 Qt and GTK Integration.................................................................................................................. 48 Error Processing and Debugging.................................................................................................... 49 Default Error Handler ............................................................................................................. 49 2.3 The GLG Generic API ........................................................................ 51 Function Summary ......................................................................................................................... 51 Generic Program Entry Point .................................................................................................. 52 GLG Generic API Function Descriptions ...................................................................................... 52 GlgAddCallback ...................................................................................................................... 53 GlgAddTimeOut ....................................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    498 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us