Buffer features
BufferFeatures.h
// Copyright 2011 ESRI
// 
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
// 
// You may freely redistribute and use this sample code, with or
// without modification, provided you include the original copyright
// notice and use restrictions.
// 
// See the use restrictions.
// 

 

#ifndef __BUFFER_FEATURES_MOTIF_EXAMPLE__
#define __BUFFER_FEATURES_MOTIF_EXAMPLE__

/* C/C++ Headers */

#include <iostream>
#include <stdlib.h>
#include <stdio.h>

/* Motif Headers */

#define String         esriXString
#define Time           esriXTime
#define Cursor         esriXCursor
#define Object         esriXObject
#define ObjectClass    esriXObjectClass
#include <Xm/Xm.h>
#include <Xm/MainW.h>
#include <Xm/Form.h>
#include <Xm/Protocols.h>
#include <Xm/PushB.h>
#include <Xm/FileSB.h>
#include <Xm/Text.h>
#include <Xm/TextF.h>
#include <Xm/Scale.h>
#include <Xm/MessageB.h>
#include <Xm/ToggleB.h>
#undef String
#undef Time
#undef Cursor
#undef Object
#undef ObjectClass

/* ArcObjects Headers */

// Engine
#include <ArcSDK.h>
// Controls
#include <Ao/AoMotifControls.h>
#include <Ao/AoCommandBase.h>

/* Other Headers */

#include "PathUtilities.h"
#include "MotifUtilities.h"
#include "ArcEngineUtilities.h"

/* Struct definitions */

typedef struct _CloseFormClientDataStruct {
    IMapControl3 *pMapControl;
    IToolbarControl *pToolbarControl;
    ITOCControl *pTOCControl;
} CloseFormClientDataStruct;

/* Function prototypes */

extern "C" void XtResizeWidget(Widget, _XtDimension, _XtDimension, _XtDimension);
void processFileSelect(Widget w, XtPointer client_data, XtPointer call_data);
void processClickBuffer(Widget w, XtPointer client_data, XtPointer call_data);
void processClickAdd(Widget w, XtPointer client_data, XtPointer call_data);
void processToggle(Widget w, XtPointer client_data, XtPointer call_data);
void processScaleChange(Widget w, XtPointer client_data, XtPointer call_data);
void processClickCloseForm(Widget w, XtPointer client_data, XtPointer call_data);
void ShowMessage (char *dialogtitle, char *text, bool asError);
void CreateBufferedGeometryOfSelectedFeatures(IMapControl3 *pMapControl, double scaleValue);
void DrawPolygonToActiveView(IMapControl3 *pMapControl, IPolygon *pPoly);
HRESULT ConvertPixToRealWorld(double inPixelUnits, double *retVal);
HRESULT CreateShapefile(double rwUnits, BSTR bstrOutPath, BSTR bstrOutName, ISpatialReference *ipSpatialReference, IPolygon *ipPolygon);

#endif /*__BUFFER_FEATURES_MOTIF_EXAMPLE__ */