18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BUILDING APPLICATIONS WITH C++ AND CONTROL WIDGETS<br />

Rather than walk through this scenario, you can<br />

get the completed application from the samples<br />

installation location. The sample is installed as<br />

part of the <strong>ArcGIS</strong> developer samples.<br />

The <strong>ArcGIS</strong> developer samples are not included<br />

in the typical installation of the <strong>ArcGIS</strong> <strong>Engine</strong><br />

<strong>Developer</strong> Kit. If you do not have them installed,<br />

rerun the developer kit Install wizard, click<br />

Custom or Modify, and click the samples feature<br />

under Software <strong>Developer</strong> Kit.<br />

Motif and GTK <strong>ArcGIS</strong> C++ control widgets are<br />

only available on Solaris and Linux. However, GUI<br />

applications can be built on Windows with the<br />

COM API, including Visual C++, and the ActiveX<br />

<strong>ArcGIS</strong> controls.<br />

The scenario has also been implemented with<br />

the GTK widget <strong>ArcGIS</strong> controls. That code can<br />

be found in the <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> Kit.<br />

This scenario is designed to introduce the <strong>ArcGIS</strong> <strong>Engine</strong> C++ API Control<br />

widgets. Its purpose is not to teach how to set up a C++ environment, how to<br />

compile using the make utility, or how to program with the Motif toolkit.<br />

Throughout this scenario it is assumed that the developer has a functional C++<br />

environment and knows how to compile a C++ and Motif program in that<br />

environment. What this scenario does provide are the steps to take and the code<br />

to write to create a standalone <strong>ArcGIS</strong> controls application for viewing map<br />

documents, complete with a popup menu and custom tool.<br />

You can find this sample in /developerkit/samples/<br />

<strong>Developer</strong>_<strong>Guide</strong>_Scenarios/Building_an_<strong>ArcGIS</strong>_Controls_Map_Viewer_<br />

ApplicationMotif_Cpp.zip.<br />

Although only C++ and Motif code samples are shown here, GIMP Toolkit<br />

(GTK) C++ code has also been written and can be found at /<br />

developerkit/samples/<strong>Developer</strong>_<strong>Guide</strong>_Scenarios/Building_an_<strong>ArcGIS</strong>_<br />

Controls_Map_Viewer_ApplicationGTK_Cpp.zip.<br />

PROJECT DESCRIPTION<br />

The ‘Building applications with C++ and control widgets’ scenario demonstrates<br />

the steps required to develop and deploy a GIS application using the standard<br />

<strong>ArcGIS</strong> controls within the <strong>ArcGIS</strong> <strong>Engine</strong> C++ API. This scenario uses the<br />

MapControl, PageLayoutControl, TOCControl, and ToolbarControl as Motif<br />

widgets in code written using a standard text editor and compiled using the make<br />

utility.<br />

This scenario demonstrates the steps required to create a GIS application for<br />

viewing preauthored ESRI map documents, or MXDs. The scenario covers the<br />

following techniques:<br />

• Programming with the <strong>ArcGIS</strong> <strong>Engine</strong> in a standard text editor<br />

• Programmatically placing the <strong>ArcGIS</strong> <strong>Engine</strong> controls in Motif widget forms<br />

• Loading preauthored map documents into the MapControl and<br />

PageLayoutControl<br />

• Setting ToolbarControl and TOCControl buddy controls<br />

• Adding control commands and tools to the ToolbarControl<br />

• Creating popup menus<br />

• Managing label editing in the TOCControl<br />

• Drawing shapes on the MapControl<br />

• Creating a custom tool to work with the MapControl, PageLayoutControl,<br />

and ToolbarControl<br />

• Customizing the ToolbarControl<br />

• Deploying the application on a Solaris or Linux platform<br />

CONCEPTS<br />

This scenario is implemented using a text editor, the make utility, and Motif<br />

widget <strong>ArcGIS</strong> controls.<br />

Chapter 6 • <strong>Developer</strong> scenarios • 357

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

Saved successfully!

Ooh no, something went wrong!