18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C++ APPLICATION PROGRAMMING INTERFACE<br />

LIMITATIONS<br />

When using the C++ API, only command-line applications are cross-platform.<br />

On Solaris and Linux, controls in the form of Motif widgets have been provided<br />

and GUI applications can be built. The Motif applications will not run on Windows.<br />

However, GUI applications can be built on Windows with the COM API,<br />

including Visual C++, and several ActiveX controls provide GIS functionality to<br />

standalone GUI applications. For details, see the Visual C++ section of the help<br />

system.<br />

SOLARIS AND LINUX POST-CRASH CLEANUP<br />

If an application does not exit cleanly, it is possible that processes will remain. To<br />

tidy up these processes, use the mwcleanup utility. Typing “mwcleanup” at the<br />

command line will kill all running <strong>ArcGIS</strong> applications and clean up all X properties.<br />

CHOOSING BETWEEN MOTIF AND GTK<br />

If you would like to write a control application on Solaris or Linux, you have<br />

two widget sets to choose from: Motif and GTK. One major factor in whether<br />

you should use Motif or GTK will be your programming experience: if you are<br />

already familiar with one, that will make your ArcObjects experience easier. In<br />

addition, each has both benefits and disadvantages.<br />

Pros<br />

Motif<br />

multiplatform availability<br />

traditional UNIX look and feel<br />

well supported and documented<br />

preinstalled on Solaris<br />

long-established industry standard<br />

GTK<br />

multiplatform availability<br />

widely used for newer projects<br />

fairly easy to program<br />

standard part of most Linux distributions<br />

active development<br />

Cons<br />

Motif<br />

difficult to program<br />

little active development<br />

support for Linux is lacking<br />

dated design<br />

GTK<br />

noncentralized support<br />

documentation is lacking<br />

support for Solaris is quite new<br />

MOTIF PROGRAMMING<br />

Getting started with Motif programming<br />

Motif widget <strong>ArcGIS</strong> controls have been provided for C++ developers. To use<br />

them, you must understand some basics of Motif programming. This is not by any<br />

means a complete resource; the variety of Motif widgets and their resources,<br />

which you have available to you as a programmer, are not discussed here. However,<br />

this should give you a place to start figuring out the Motif-specific bits of<br />

the C++ API and samples.<br />

Seven steps of Motif programming<br />

When writing a Motif program, there are seven steps that need to be done.<br />

1. Initialize the Motif Toolkit.<br />

2. Create the widgets.<br />

234 • <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!