mxdialog.h

Go to the documentation of this file.
00001 /**
00002  * \file mxdialog.h <mi32/mxdialog.h>
00003  * \brief Definitions for Mxd-style dialogs
00004  *
00005  *    If moving prototypes out of this header, DO NOT have this header
00006  *    include the new header.
00007  *
00008  * \if NODOC
00009  * $Id: mxdialog.h_v 1.28 2004/06/30 17:10:03 dwilliss Exp $
00010  *
00011  * $Log: mxdialog.h_v $
00012  * Revision 1.28  2004/06/30 17:10:03  dwilliss
00013  * const
00014  *
00015  * Revision 1.27  2004/06/30 16:35:56  dwilliss
00016  * Changed MxdViewRastHistCreate to take an RVC::OBJITEM instead of deprecated
00017  * fnameinodeuc
00018  * Changed MxdViewRastHistSetRegion to take REGION2D instead of deprecated
00019  * dregion
00020  *
00021  * Revision 1.26  2004/06/29 21:42:34  mju
00022  * Use trans2d_mapgen for rastcorr highlight.
00023  *
00024  * Revision 1.25  2004/06/29 21:19:05  mju
00025  * Use coordrefsys in viewprofileupdate.
00026  *
00027  * Revision 1.24  2004/03/08 20:01:20  vdronov
00028  * added PROFILEFLAG
00029  *
00030  * Revision 1.23  2004/02/20 20:33:03  scowan
00031  * Changed some view profile parms.
00032  *
00033  * Revision 1.22  2003/09/15 13:49:56  fileserver!dwilliss
00034  * Doxygen
00035  *
00036  * Revision 1.21  2003/03/27 18:35:04  mju
00037  * Remove obsolete prototype.
00038  *
00039  * Revision 1.20  2002/03/28 21:29:53  scowan
00040  * More cosnt.
00041  *
00042  * Revision 1.19  2001/12/31 17:49:04  mju
00043  * Remove MxDATABASE flags.
00044  *
00045  * Revision 1.18  2001/12/28 21:34:51  mju
00046  * Add MxEditColorMap using color array.
00047  * Use C++ linkage.
00048  *
00049  * Revision 1.17  2001/12/21 18:57:31  mju
00050  * Don't define anything if WIN32_NATIVE.
00051  *
00052  * Revision 1.16  2001/12/21 17:15:01  mju
00053  * Use const for filename in ...Create().
00054  *
00055  * Revision 1.15  2001/12/21 16:42:27  dwilliss
00056  * Fixed typo.  It compiles now
00057  *
00058  * Revision 1.14  2001/12/21 14:16:32  mju
00059  * Include xdefns so has MxRELPOSN defns.
00060  *
00061  * Revision 1.13  2001/12/21 00:42:47  scowan
00062  * Changed parameter to enum.
00063  *
00064  * Revision 1.12  2001/12/20 22:32:22  scowan
00065  * Changed to use relposn enum.
00066  *
00067  * Revision 1.11  2001/02/15 20:29:21  scowan
00068  * Nothing.
00069  *
00070  * Revision 1.10  2000/07/19 21:20:04  mju
00071  * Add MxdEditTextFileObj... prototypes.
00072  *
00073  * Revision 1.9  2000/07/07 21:38:10  sparsons
00074  * Genitor revision.
00075  *
00076  * Revision 1.8  2000/07/07 21:36:42  sparsons
00077  * Genitor documentation.
00078  *
00079  * Revision 1.7  1999/11/18 15:29:36  mju
00080  * MxdEditMetadataCreate now takes const title.
00081  *
00082  * Revision 1.6  1999/10/20  22:08:23  scowan
00083  * More const.
00084  *
00085  * Revision 1.5  1999/10/20 17:15:54  mju
00086  * Use const in ViewRastCorrCreate.
00087  *
00088  * Revision 1.4  1999/10/20  17:05:35  mju
00089  * Use const file in EditMetaDataCreate
00090  *
00091  * Revision 1.3  1999/05/26  20:16:48  mju
00092  * Include Intrinsic.h after all if not WIN32-native.
00093  *
00094  * Revision 1.2  1999/05/26  14:04:58  mju
00095  * Don't include "intrinsic" for X.
00096  *
00097  * Revision 1.1  1999/05/06  22:14:23  mju
00098  * Initial revision
00099  * \endif
00100 **/
00101 
00102 #if !defined(INC_MI32_MXDIALOG_H) && !defined(WIN32_NATIVE)
00103 #define  INC_MI32_MXDIALOG_H
00104 
00105 #ifndef  INC_MI32_STDDEFNS_H
00106    #include <mi32/stddefns.h>
00107 #endif
00108 
00109 #if !defined(WIN32_NATIVE) && !defined(INC_MI32_XDEFNS_H)
00110    #include <mi32/xdefns.h>
00111 #endif
00112 
00113 #if !defined(WIN32_NATIVE) && !defined(_XtIntrinsic_h)
00114    #include <X11/Intrinsic.h>
00115 #endif
00116 
00117 #ifndef  INC_MI32_POINT_H
00118    #include <mi32/point.h>
00119 #endif
00120 
00121 //! Forward declarations
00122 
00123 struct COLMAPINFO;
00124 class REGION2D;
00125 class TRANS2D_MAPGEN;
00126 namespace RVC {
00127    class OBJITEM;
00128    }
00129 
00130 /*----------------------------------------------------------------------------*/
00131 /*    Definitions for "modeless dialog" functions                             */
00132 /*----------------------------------------------------------------------------*/
00133 
00134 struct MxdAnyCallbackStruct {
00135    UINT32 reason;                   //!<  Callback reason 
00136    MXDHANDLE dhandle;               //!<  Dialog handle 
00137    };
00138 
00139 typedef void (*MxdCallbackFunc)(MxdAnyCallbackStruct*,void*);
00140 
00141          /* Generic flags */
00142 #define  MxdFLAG_SetLastPosition    0x80000000  //!<  Open dialog where it was last used (via MxSetWindowPosition())
00143 #define  MxdFLAG_OpenOnCreate       0x40000000  //!<  Open dialog when created 
00144 #define  MxdFLAG_DestroyOnClose     0x20000000  //!<  Destroy dialog when closed 
00145 #define  MxdFLAG_Modal              0x10000000  //!<  Dialog is modal 
00146 #define  MxdFLAG_ReturnWhenClose    0x08000000  //!<  Don't return from Mxd...Open() until dialog closed 
00147 #define  MxdFLAG_NoClose            0x04000000  //!<  Don't allow dialog to be closed by user or Mxd...Close() 
00148 #define  MxdFLAG_HaveApply          0x02000000  //!<  Include "Apply" button if appropriate 
00149 
00150          /* Dialog-specific flags */
00151 
00152          /* Flags for MxdInspRast */
00153 #define  MxdINSPRAST_NoSelect       0x00000001  //!<  Don't allow user to select raster 
00154 #define  MxdINSPRAST_AllowEdit      0x00000002  //!<  Allow user to edit cell values 
00155          /* Flags for MxdInspRastSetView */
00156 #define  MxdINSPRAST_SetCenter      1
00157 
00158          /* Flags for MxdTipOfDayCreate() */
00159 #define  MxdTIPOFDAY_NoAutoOpen     0x00000001  //!<  Auto open on startup disabled 
00160 
00161          /* Flags for MxdViewRastCorrSetHighlightPosn */
00162 #define  MxdVIEWRASTCORR_PosnTransInput   0x00000001  //!<  Use input side of specified TRANSPARM 
00163 
00164          /* Callback reasons common to many dialogs */
00165 #define  MxdCR_Destroy           0x80000000     //!<  Dialog is being destroyed 
00166 #define  MxdCR_Close             0x40000000     //!<  Dialog has been closed 
00167 #define  MxdCR_Open              0x20000000     //!<  Dialog has been opened 
00168 #define  MxdCR_Resize            0x10000000     //!<  Dialog has been resized 
00169 #define  MxdCR_Apply             0x08000000     //!<  User has pressed the "Apply" button 
00170 #define  MxdCR_Modify            0x04000000     //!<  User has modified something in the dialog 
00171 #define  MxdCR_ChangeBegin       0x02000000     //!<  User is about to change something 
00172 #define  MxdCR_ChangeEnd         0x01000000     //!<  User has finished changing something 
00173 #define  MxdCR_ChangeContinue    0x00800000     //!<  User is continuing to change something 
00174 #define  MxdCR_SelectedObject    0x00400000     //!<  User selected or opened different object 
00175 #define  MxdCR_SavedObject       0x00200000     //!<  User saved the object 
00176 
00177          /* Callback "reason" definitions for MxdInspRast */
00178 #define  MxdCR_InspRastViewChanged     0x00000001
00179 
00180 
00181 /*----------------------------------------------------------------------------*/
00182 /*    Definitions for MxdEditColorMap                                         */
00183 /*----------------------------------------------------------------------------*/
00184 
00185 #define  MxdEDITCOLORMAP_LoadFromObject      0x00000001  //!<  Load color map from file/object provided 
00186 #define  MxdEDITCOLORMAP_InitGrayscale       0x00000002  //!<  Initialize color map to linear grayscale 
00187 #define  MxdEDITCOLORMAP_RetNewObject        0x00000004  //!<  Return new filename/inode if user does save-as 
00188 #define  MxdEDITCOLORMAP_AllowTransparent    0x00000008  //!<  Allow colors to be set to "transparent" 
00189 #define  MxdEDITCOLORMAP_AllowTransparency   0x00000010  //!<  Allow transparency factor to be set 
00190 
00191 struct MxdEditColorMapCallbackStruct {
00192    UINT32 reason;                   //!<  Callback reason 
00193    MXDHANDLE dhandle;               //!<  Dialog handle 
00194    UNICODE *filename;               //!<  File name for save 
00195    INT32 inode;                        //!<  Object inode for save 
00196    };
00197 
00198 
00199 /*----------------------------------------------------------------------------*/
00200 /*    Definitions for MxdSmartLine                                            */
00201 /*----------------------------------------------------------------------------*/
00202 
00203 #define MxdSmartLine_StartLine      0x00000001  //!<  when start tracing new line 
00204 #define MxdSmartLine_StopLine       0x00000002  //!<  when new line is complete 
00205 #define MxdSmartLine_SaveLine       0x00000004  //!<  when new line is complete same as StopLine 
00206 #define MxdSmartLine_AbortLine      0x00000008  //!<  if line started, but then error occured 
00207 #define MxdSmartLine_NewPoint       0x00000010  //!<  when new point added to line 
00208 #define MxdSmartLine_TraceBegin     0x00000020  //!<  when start tracing procedure 
00209 #define MxdSmartLine_TraceEnd       0x00000040  //!<  when stop tracing procedure 
00210 #define MxdSmartLine_StopReason     0x00000080  //!<  when stop tracing procedure 
00211 
00212 struct MxdSmartLineCallbackStruct {
00213    UINT32 reason;
00214    MXDHANDLE dhandle;
00215    INT32 ElemNum;
00216    LPOINT3D *Line;
00217    INT32 NumPoints;
00218    int ElemType;
00219    };
00220 
00221 //!:Associate with "Mxd-style dialog functions"
00222 //!\addtogroup Mxd Mxd-style dialog functions
00223 //!@{
00224 
00225 //! Add callback to list.
00226 int MxdAutoColorMapAddCallback (
00227    MXDHANDLE dhandle, 
00228    MxdCallbackFunc, 
00229    void *data, 
00230    UINT32 reason
00231    );
00232 
00233 //! Create the dialog.
00234 int MxdAutoColorMapCreate (
00235    Widget pwidget,                     //!< Parent widget
00236    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00237    char *dialoghandle,                 //!< Dialog title
00238    int relposn,                        //!< Relative position for dialog to appear
00239    UNICODE *classfilename,             //!< Input File Name
00240    INT32 classrastinode,               //!< Input class raster inode
00241    COLOR *colmap,
00242    int NumColors,
00243    int dialogflags                     //!< MxdFLAG_... flags
00244    );
00245 
00246 //! Open the dialog.
00247 int MxdAutoColorMapOpen (
00248    MXDHANDLE dhandle                   //!< Dialog handle
00249    );
00250 
00251 //! Close the dialog.
00252 int MxdAutoColorMapClose (
00253    MXDHANDLE dhandle                   //!< Dialog handle
00254    );
00255 
00256 //! Destroy the dialog.
00257 int MxdAutoColorMapDestroy (
00258    MXDHANDLE dhandle                   //!< Dialog handle
00259    );
00260 
00261 //! Return whether not dialog is open.
00262 int MxdAutoColorMapIsOpen (
00263    MXDHANDLE dhandle                   //!< Dialog handle
00264    );
00265 
00266 //! Remove callback from list.
00267 int MxdAutoColorMapRemoveCallback (
00268    MXDHANDLE dhandle, 
00269    MxdCallbackFunc, 
00270    void *data, 
00271    UINT32 reason
00272    );
00273 
00274 //! Add callback for "color map editor" dialog.
00275 //!
00276 //! Flags:
00277 //!      \li \b MxdFLAG_Modal                   Make dialog modal
00278 //!      \li \b MxdEDITCOLORMAP_LoadFromObject  Load color map from filename/inode provided if possible
00279 //!      \li \b MxdEDITCOLORMAP_InitGrayscale      Initialize color map to linear grayscale
00280 //!      \li \b MxdEDITCOLORMAP_RetNewObject    Return new filename/inode if user does save-as (modal only)
00281 int MxdEditColorMapAddCallback (
00282    MXDHANDLE dhandle, 
00283    MxdCallbackFunc, 
00284    void *cbs, 
00285    UINT32 reasonmask
00286    );
00287 
00288 //! Close the dialog.
00289 int MxdEditColorMapClose (
00290    MXDHANDLE dhandle
00291    );
00292 
00293 //! Create "color map editor" dialog.
00294 //!
00295 //! Flags:     
00296 //!      \li \b MxdFLAG_Modal                   Make dialog modal
00297 //!      \li \b MxdEDITCOLORMAP_LoadFromObject  Load color map from filename/inode provided if possible
00298 //!      \li \b MxdEDITCOLORMAP_InitGrayscale      Initialize color map to linear grayscale
00299 //!      \li \b MxdEDITCOLORMAP_RetNewObject    Return new filename/inode if user does save-as (modal only)
00300 int MxdEditColorMapCreate (
00301    Widget pwidget,                     //!< Parent widget for dialog
00302    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00303    char *dialogname,                   //!< Dialog name for title ("color_palette_editor" if NULL)
00304    int relposn,                        //!< Position relative to parent's shell (0=none, -1=use previous)
00305    COLMAPINFO *colmapinfo,             //!< Color map information structure (can be NULL if modal)
00306    UNICODE *cmapfilename,              //!< RVC filename for loading/saving color map (NULL if don't need)
00307    INT32 parentinode,                  //!< Parent inode for saving colormap 
00308    INT32 *cmapinode,                   //!< Color map object inode passed/returned 
00309    UINT32 dialogflags                  //!< MxdFLAG_OpenOnCreate, MxdFLAG_DestroyOnClose
00310    );
00311 
00312 //! Create "color map editor" dialog.
00313 //!
00314 //! Flags:     
00315 //!      \li \b MxdFLAG_Modal                   Make dialog modal
00316 //!      \li \b MxdEDITCOLORMAP_LoadFromObject  Load color map from filename/inode provided if possible
00317 //!      \li \b MxdEDITCOLORMAP_InitGrayscale      Initialize color map to linear grayscale
00318 //!      \li \b MxdEDITCOLORMAP_RetNewObject    Return new filename/inode if user does save-as (modal only)
00319 int MxdEditColorMapCreate (
00320    Widget pwidget,                     //!< Parent widget for dialog
00321    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00322    char *dialogname,                   //!< Dialog name for title ("color_palette_editor" if NULL)
00323    int relposn,                        //!< Position relative to parent's shell (0=none, -1=use previous)
00324    COLOR *colmap,                      //!< Pointer to color palette, data at pointer will be modified by dialog
00325    int NumColors,                      //!< Number of colors in palette
00326    UNICODE *cmapfilename,              //!< RVC filename for loading/saving color map (NULL if don't need)
00327    INT32 parentinode,                  //!< Parent inode for saving colormap 
00328    INT32 *cmapinode,                   //!< Color map object inode passed/returned 
00329    UINT32 dialogflags                  //!< MxdFLAG_OpenOnCreate, MxdFLAG_DestroyOnClose
00330    );
00331 
00332 //! Destroy the dialog. 
00333 int MxdEditColorMapDestroy (
00334    MXDHANDLE dhandle
00335    );
00336 
00337 //! Return whether not dialog is open.
00338 int MxdEditColorMapIsOpen (
00339    MXDHANDLE dhandle
00340    );
00341 
00342 //! Open the dialog.
00343 int MxdEditColorMapOpen (
00344    MXDHANDLE dhandle
00345    );
00346 
00347 //! Remove callback from list.
00348 int MxdEditColorMapRemoveCallback (
00349    MXDHANDLE dhandle, 
00350    MxdCallbackFunc, 
00351    void *cbs, 
00352    UINT32 reasonmask
00353    );
00354 
00355 //! Update dialog for external changes to color palette.
00356 int MxdEditColorMapUpdate (
00357    MXDHANDLE dhandle,                  //!< Dialog handle from MxdEditColorMapCreate()
00358    int notify                          //!< Set if want callback list called with MxdCR_Modify
00359    );
00360 
00361 //! Add callback to list.
00362 int MxdEditMetaDataAddCallback (
00363    MXDHANDLE dhandle, 
00364    void(*)(MxdAnyCallbackStruct*,void*), 
00365    void *cbs, 
00366    UINT32 reasonmask
00367    );
00368 
00369 //! Close the dialog.
00370 int MxdEditMetaDataClose (
00371    MXDHANDLE dhandle
00372    );
00373 
00374 //! Create the dialog.
00375 int MxdEditMetaDataCreate (
00376    Widget pwidget,                     //!< Parent widget
00377    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00378    const char *dialogname,             //!< Dialog name override
00379    MxRELPOSN relposn,                        //!< Relative position for dialog to appear
00380    const UNICODE *filename,            
00381    INT32 inode,                        //!< Inode of object metadata is for
00382    UINT32 dialogflags                  //!< MxdFLAG_... flags
00383    );
00384 
00385 //! Destroy the dialog.
00386 int MxdEditMetaDataDestroy (
00387    MXDHANDLE dhandle
00388    );
00389 
00390 //! Return whether not dialog is open.
00391 int MxdEditMetaDataIsOpen (
00392    MXDHANDLE dhandle
00393    );
00394 
00395 //! Open the dialog.
00396 int MxdEditMetaDataOpen (
00397    MXDHANDLE dhandle
00398    );
00399 
00400 //! Remove callback from list.
00401 int MxdEditMetaDataRemoveCallback (
00402    MXDHANDLE dhandle, 
00403    void(*)(MxdAnyCallbackStruct*,void*), 
00404    void *cbs, 
00405    UINT32 reasonmask
00406    );
00407 
00408 //! Add callback for "text file editor" dialog.
00409 int MxdEditTextFileAddCallback (
00410    MXDHANDLE dhandle, 
00411    MxdCallbackFunc, 
00412    void *cbs, 
00413    UINT32 reasonmask
00414    );
00415 
00416 //! Close previously opened "text file editor" dialog.
00417 int MxdEditTextFileClose (
00418    MXDHANDLE dhandle
00419    );
00420 
00421 //! Create "text file editor" dialog.
00422 //!
00423 //! Flags:
00424 //!      \li \b MxdFLAG_Modal    Make dialog modal
00425 int MxdEditTextFileCreate (
00426    Widget pwidget,                     //!< Parent widget for dialog
00427    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00428    char *dialogname,                   //!< Dialog name ("mxAdjustShading" if NULL)
00429    int relposn,                        //!< Position relative to parent's shell (0=none, -1=use previous)
00430    UNICODE *filename,                  //!< Name of text file to be edited (NULL if no default)
00431    char *dftextn,                      //!< Default file extension (NULL for .txt)
00432    char *encoding,                     //!< Initial text encoding (NULL if don't need)
00433    UINT32 dialogflags                  //!< MxdFLAG_OpenOnCreate, MxdFLAG_DestroyOnClose
00434    );
00435 
00436 //! Get text widget so XeText functions can be called.
00437 int MxdEditTextFileGetTextWidget (
00438    MXDHANDLE dhandle,                  //!< Dialog handle from Create function
00439    Widget *ReturnWidget                //!< Widget returned
00440    );
00441 
00442 //! Destroy previously created "text file editor" dialog.
00443 int MxdEditTextFileDestroy (
00444    MXDHANDLE dhandle
00445    );
00446 
00447 //! Return true if "text file editor" dialog is open, false if not.
00448 int MxdEditTextFileIsOpen (
00449    MXDHANDLE dhandle
00450    );
00451 
00452 //! Open previously created "text file editor" dialog.
00453 int MxdEditTextFileOpen (
00454    MXDHANDLE dhandle
00455    );
00456 
00457 //! Remove callback for "text file editor" dialog.
00458 int MxdEditTextFileRemoveCallback (
00459    MXDHANDLE dhandle, 
00460    MxdCallbackFunc, 
00461    void *cbs, 
00462    UINT32 reasonmask
00463    );
00464 
00465 //! Add callback for "text file/object editor" dialog.
00466 ERRVALUE MxdEditTextFileObjAddCallback (
00467    MXDHANDLE dhandle, 
00468    MxdCallbackFunc, 
00469    void *cbs, 
00470    UINT32 reasonmask
00471    );
00472 
00473 //! Close previously opened "text file/object editor" dialog.
00474 ERRVALUE MxdEditTextFileObjClose (
00475    MXDHANDLE dhandle
00476    );
00477 
00478 //! Create "text file/object editor" dialog.
00479 //!
00480 //! Flags:
00481 //!      \li \b MxdFLAG_Modal    Make dialog modal
00482 ERRVALUE MxdEditTextFileObjCreate (
00483    Widget pwidget,                     //!< Parent widget for dialog
00484    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00485    char *dialogname,                   //!< Dialog name ("mxAdjustShading" if NULL)
00486    int relposn,                  //!< Position relative to parent's shell (0=none, -1=use previous)
00487    UNICODE *filename,                  //!< Name of text file to be edited (NULL if no default)
00488    char *dftextn,                      //!< Default file extension (NULL for .txt)
00489    char *encoding,                     //!< Initial text encoding (NULL if don't need)
00490    UINT32 dialogflags                  //!< MxdFLAG_OpenOnCreate, MxdFLAG_DestroyOnClose
00491    );
00492 
00493 //! Get text widget so XeText functions can be called.
00494 ERRVALUE MxdEditTextFileObjGetTextWidget (
00495    MXDHANDLE dhandle,                  //!< Dialog handle from Create function
00496    Widget *ReturnWidget                //!< Widget returned
00497    );
00498 
00499 //! Destroy previously created "text file/object editor" dialog.
00500 ERRVALUE MxdEditTextFileObjDestroy (
00501    MXDHANDLE dhandle
00502    );
00503 
00504 //! Return true if "text file/object editor" dialog is open, false if not.
00505 ERRVALUE MxdEditTextFileObjIsOpen (
00506    MXDHANDLE dhandle
00507    );
00508 
00509 //! Open previously created "text file/object editor" dialog.
00510 ERRVALUE MxdEditTextFileObjOpen (
00511    MXDHANDLE dhandle
00512    );
00513 
00514 //! Remove callback for "text file/object editor" dialog.
00515 ERRVALUE MxdEditTextFileObjRemoveCallback (
00516    MXDHANDLE dhandle, 
00517    MxdCallbackFunc, 
00518    void *cbs, 
00519    UINT32 reasonmask
00520    );
00521 
00522 //! Add callback for "raster inspection" dialog.
00523 //!
00524 //! Reasons:   
00525 //!      \li \b MxdCR_Open                Dialog was opened 
00526 //!      \li \b MxdCR_Close                  Dialog was closed
00527 //!      \li \b MxdCR_Destroy             Dialog was destroyed
00528 //!      \li \b MxdCR_Modify              User modified raster cell value (if editing allowed)
00529 //!      \li \b MxdCR_SelectedObject         User selected different raster object (if allowed)
00530 //!      \li \b MxdCR_InspRastViewChanged User scrolled the view
00531 int MxdInspRastAddCallback (
00532    MXDHANDLE handle,                   //!< Dialog handle
00533    MxdCallbackFunc,                    //!< Callback function
00534    void *cbdata,                       //!< Data to pass into callback
00535    UINT32 reason                       //!< Message reasons requested
00536    );
00537 
00538 //! Close previously opened "raster inspection" dialog.
00539 int MxdInspRastClose (
00540    MXDHANDLE dhandle
00541    );
00542 
00543 //! Create "raster inspection" dialog.
00544 //!
00545 //! Flags:     
00546 //!   \li \b MxdFLAG_OpenOnCreate      Open dialog when created
00547 //!      \li \b MxdFLAG_DestroyOnClose Destroy dialog when closed
00548 //!      \li \b MxdINSPRAST_NoSelect      Don't allow user to select a different raster
00549 //!      \li \b MxdINSPRAST_AllowEdit  Allow user to edit raster data
00550 int MxdInspRastCreate (
00551    Widget pwidget,                     //!< Parent widget for dialog
00552    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00553    char *dialogname,                   //!< Dialog name ("mxInspRast" if NULL)
00554    int relposn,                        //!< Position relative to parent's shell (0=none, -1=use previous)
00555    const UNICODE *dftfilename,         //!< Default RVC filename
00556    INT32 dftinode,                     //!< Default raster object inode
00557    int dialogflags                     //!< MxdFLAG_OpenOnCreate, MxdFLAG_DestroyOnClose
00558    );
00559 
00560 //! Destroy previously created "raster inspection" dialog. 
00561 int MxdInspRastDestroy (
00562    MXDHANDLE dhandle
00563    );
00564 
00565 //! Return filename/inode of raster currently being viewed.
00566 int MxdInspRastGetRast (
00567    MXDHANDLE dhandle,                  //!< Dialog handle
00568    UNICODE *filename,                  //!< String to store filename in
00569    INT32 *inode                        //!< Raster inode returned
00570    );
00571 
00572 //! Return portion of raster currently being viewed.
00573 int MxdInspRastGetView (
00574    MXDHANDLE dhandle,                  //!< Dialog handle
00575    INT32 *initlin,                     //!< Initial line being viewed [returned]
00576    INT32 *initcol,                     //!< Initial column being viewed [returned]
00577    INT32 *viewlins,                    //!< Number of lines being viewed [returned]
00578    INT32 *viewcols,                    //!< Number of columns being viewed [returned]
00579    INT32 *editlin,                     //!< Line being edited [returned]
00580    INT32 *editcol                      //!< Column being edited [returned]
00581    );
00582 
00583 //! Return true if "contrast enhancement" dialog is open, false if not.
00584 int MxdInspRastIsOpen (
00585    MXDHANDLE dhandle
00586    );
00587 
00588 //! Open previously created "contrast enhancement" dialog.
00589 int MxdInspRastOpen (
00590    MXDHANDLE dhandle
00591    );
00592 
00593 //! Remove callback for "raster inspection" dialog.
00594 int MxdInspRastRemoveCallback (
00595    MXDHANDLE dhandle, 
00596    MxdCallbackFunc, 
00597    void *cbs, 
00598    UINT32 reasonmask
00599    );
00600 
00601 //! Set portion of raster to be viewed.
00602 //!
00603 //! Flag:
00604 //!   \li \b MxdINSPRAST_SetCenter
00605 int MxdInspRastSetView (
00606    MXDHANDLE dhandle,                  //!< Dialog handle
00607    INT32 initlin,                      //!< Initial line to be viewed
00608    INT32 initcol,                      //!< Initial column to be viewed
00609    int flags                           //!< Flags
00610    );
00611 
00612 //! Activate dialog tool.
00613 int MxdSmartLineActivate (
00614    MXDHANDLE handle
00615    );
00616 
00617 //! Add callback to the dialog.
00618 int MxdSmartLineAddCallback (
00619    MXDHANDLE handle,                                     //!< Dialog handle
00620    void (*func)(MxdSmartLineCallbackStruct *cb, void*),  //! Callback function
00621    void *udata,                                          //!< User data to pass into callback
00622    UINT32 reason                                         //!< Reason for callback
00623    );
00624 
00625 //! Close the dialog.
00626 int MxdSmartLineClose (
00627    MXDHANDLE dhandle
00628    );
00629 
00630 //! Create Smart Line Following Dialog.
00631 int MxdSmartLineCreate (
00632    Widget pwidget,                     //!< Parent widget
00633    MXDHANDLE *handle,                  //!< Handle returned
00634    char *dialogname,                   //!< Dialog name override 
00635    int relposn,                        //!< Position relative to parent's shell (0=none, -1=use previous)
00636    void *vview,                        //!< View to operate on
00637    void *vlp,                          //!< Layer to operate on
00638    UINT32 dialogflags                  //!< Dialog flags
00639    );
00640 
00641 //! Destroy the dialog.
00642 int MxdSmartLineDestroy (
00643    MXDHANDLE dhandle
00644    );
00645 
00646 //! Return whether not dialog is open.
00647 int MxdSmartLineIsOpen (
00648    MXDHANDLE dhandle
00649    );
00650 
00651 //! Start a new view.
00652 int MxdSmartLineNewView (
00653    MXDHANDLE dhandle
00654    );
00655 
00656 //! Open the dialog.
00657 int MxdSmartLineOpen (
00658    MXDHANDLE dhandle
00659    );
00660 
00661 //! Remove callback from the dialog. 
00662 void MxdSmartLineRemoveCallback (
00663    MXDHANDLE dhandle, 
00664    void (*func)(MxdSmartLineCallbackStruct *cb, void*), 
00665    void *data, 
00666    UINT32 reason
00667    );
00668 
00669 //! Resume dialog tool.
00670 int MxdSmartLineResume (
00671    MXDHANDLE handle
00672    );
00673 
00674 //! Suspend dialog tool.
00675 int MxdSmartLineSuspend (
00676    MXDHANDLE handle
00677    );
00678 
00679 //! Add callback for "tip of day" dialog. 
00680 int MxdTipOfDayAddCallback (
00681    MXDHANDLE dhandle, 
00682    MxdCallbackFunc, 
00683    void *data, 
00684    UINT32 reason
00685    );
00686 
00687 //! Close previously opened "tip of day" dialog.
00688 int MxdTipOfDayClose (
00689    MXDHANDLE dhandle
00690    );
00691 
00692 //! Create "tip of day" dialog.
00693 //!
00694 //! Flags:     
00695 //!      \li \b MxdTIPOFDAY_NoAutoOpen Do not perform automatic opening
00696 //!
00697 //!   The TipOfDay messages are stored in tnthelp.txt in the format:
00698 //!      [tip."AppName".[0..n]] where "AppName" is from GetAppName() and [0..n] is the sequence
00699 //!      of Tip of the day messages.  Eg:  [tip.tntedit.0], [tip.tntedit.1], ...
00700 //! \todo This says the TipOfDay messages are in tnthelp.txt.  Need to update.
00701 int MxdTipOfDayCreate (
00702    Widget pwidget,                     //!< Parent widget for dialog
00703    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00704    char *dialogname,                   //!< Dialog name ("mxInspRast" if NULL)
00705    int relposn,                        //!< Position relative to parent's shell (0=none, -1=use previous)
00706    UINT32 dialogflags                  //!< MxdFLAG_OpenOnCreate, MxdFLAG_DestroyOnClose
00707    );
00708 
00709 //! Destroy previously created "tip of day" dialog.
00710 int MxdTipOfDayDestroy (
00711    MXDHANDLE dhandle
00712    );
00713 
00714 //! Return true if "tip of day" dialog is open, false if not.
00715 int MxdTipOfDayIsOpen (
00716    MXDHANDLE dhandle
00717    );
00718 
00719 //! Open previously created "tip of day" dialog.
00720 int MxdTipOfDayOpen (
00721    MXDHANDLE dhandle
00722    );
00723 
00724 //! Remove callback for "tip of day" dialog.
00725 int MxdTipOfDayRemoveCallback (
00726    MXDHANDLE dhandle, 
00727    MxdCallbackFunc, 
00728    void *data, 
00729    UINT32 reason
00730    );
00731 
00732 //! Close the dialog.
00733 int MxdViewProfileClose (
00734    MXDHANDLE dhandle
00735    );
00736 
00737 //! Create the dialog.
00738 int MxdViewProfileCreate (
00739    Widget parent,                      //!< Parent widget
00740    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00741    char *dialogname,                   //!< Dialog name override
00742    MxRELPOSN relposn,                  //!< Relative position for dialog to appear
00743    const UNICODE *objfilename,         //!< Object filename (if any)
00744    INT32 objinode,                     //!< Object inode
00745    int dialogflags                     //!< MxdFLAG_... flags
00746    );
00747 
00748 //! Destroy the dialog. 
00749 int MxdViewProfileDestroy (
00750    MXDHANDLE dhandle
00751    );
00752 
00753 //! Return whether not dialog is open.
00754 int MxdViewProfileIsOpen (
00755    MXDHANDLE dhandle
00756    );
00757 
00758 //! Open the dialog.
00759 int MxdViewProfileOpen (
00760    MXDHANDLE dhandle
00761    );
00762 
00763 //! Return filename/inode for object associated with profile.
00764 int MxdViewProfileQueryObject (
00765    MXDHANDLE dhandle, 
00766    RVC::OBJITEMLIST& ObjItemList
00767    );
00768 
00769 //! Redraw contents.
00770 int MxdViewProfileRedraw (
00771    MXDHANDLE dhandle
00772    );
00773 
00774 //! Set function to call when object being viewed changes.
00775 int MxdViewProfileSetChangeObjectCallback (
00776    MXDHANDLE dhandle,  
00777    void(*)(MXDHANDLE,void*,const RVC::OBJITEM&), 
00778    void *chgobjdata
00779    );
00780 
00781 //! Set function to call when dialog closed.
00782 int MxdViewProfileSetCloseCallback (
00783    MXDHANDLE dhandle, 
00784    void(*)(MXDHANDLE,void*), 
00785    void *closedata
00786    );
00787 
00788 //! Set function to call when dialog destroyed.
00789 int MxdViewProfileSetDestroyCallback (
00790    MXDHANDLE dhandle, 
00791    void(*)(MXDHANDLE,void*), 
00792    void *destroydata
00793    );
00794 
00795 enum PROFILEFLAGS {
00796     PROFILEFLAG_None       =    0x00,
00797     PROFILEFLAG_InMapCoord    =    0x01,
00798     PROFILEFLAG_SeparatePoints =    0x02
00799     };
00800 
00801 DEFINE_ENUM_OPERATORS(PROFILEFLAGS);
00802 
00803 //! Notify dialog that area selected for profile has changed. 
00804 int MxdViewProfileUpdate ( 
00805    MXDHANDLE dhandle, 
00806    DPOINT2D *mappoint, 
00807    INT32 numpoints, 
00808    const SPATREF::COORDREFSYS& CoordRefSys,
00809    PROFILEFLAGS flags
00810    );
00811 
00812 //! Add callback to list.
00813 int MxdViewRastCorrAddCallback (
00814    MXDHANDLE dhandle, 
00815    MxdCallbackFunc, 
00816    void *cbs, 
00817    UINT32 reasonmask
00818    );
00819 
00820 //! Close the dialog.
00821 int MxdViewRastCorrClose (
00822    MXDHANDLE dhandle
00823    );
00824 
00825 //! Create the dialog.
00826 int MxdViewRastCorrCreate (
00827    Widget pwidget,                     //!< Parent widget
00828    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00829    const char *dialogname,             //!< Dialog name override
00830    int relposn,                        //!< Relative position for dialog to appear
00831    const UNICODE *xrastfilename,       //!< Optional X raster filename
00832    INT32 xrastinode,                   //!< Optional inode for X raster
00833    const UNICODE *yrastfilename,       //!< Optional Y raster filename
00834    INT32 yrastinode,                   //!< Optional inode for Y raster
00835    UINT32 dialogflags                  //!< MxdFLAG_... flags
00836    );
00837 
00838 //! Destroy the dialog.
00839 int MxdViewRastCorrDestroy (
00840    MXDHANDLE dhandle
00841    );
00842 
00843 //! Return whether not dialog is open.
00844 int MxdViewRastCorrIsOpen (
00845    MXDHANDLE dhandle
00846    );
00847 
00848 //! Open the dialog.
00849 int MxdViewRastCorrOpen (
00850    MXDHANDLE dhandle
00851    );
00852 
00853 //! Remove callback from list.
00854 int MxdViewRastCorrRemoveCallback (
00855    MXDHANDLE dhandle, 
00856    MxdCallbackFunc, 
00857    void *cbs, 
00858    UINT32 reasonmask
00859    );
00860 
00861 //! Set coordinates for "dancing pixels" highlight position.
00862 int MxdViewRastCorrSetHighlightPosn (
00863    MXDHANDLE dhandle, 
00864    const TRANS2D_MAPGEN& Trans,
00865    DPOINT2D *point, 
00866    UINT32 flags
00867    );
00868 
00869 //! Add callback for raster histogram view dialog.
00870 int MxdViewRastHistAddCallback (
00871    MXDHANDLE dhandle, 
00872    void(*)(MxdAnyCallbackStruct*,void*), 
00873    void *cbdata, 
00874    UINT32 reasonmask
00875    );
00876 
00877 //! Close previously opened "raster histogram view" dialog.
00878 int MxdViewRastHistClose (
00879    MXDHANDLE dhandle
00880    );
00881 
00882 //! Create "raster histogram view".
00883 int MxdViewRastHistCreate (
00884    Widget pwidget,                     //!< Parent widget for dialog
00885    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00886    const char *dialogname, 
00887    int relposn,                        //!< Position relative to parent's shell (0=none, -1=use previous)
00888    const RVC::OBJITEM* objitem,        //!< if NULL, will prompt user to select a raster
00889    UINT32 dialogflags
00890    );
00891 
00892 //! Destroy previously created "raster histogram view" dialog.
00893 int MxdViewRastHistDestroy (
00894    MXDHANDLE dhandle
00895    );
00896 
00897 //! Open previously created "raster histogram view" dialog. 
00898 int MxdViewRastHistOpen (
00899    MXDHANDLE dhandle
00900    );
00901 
00902 //! Remove callback for raster histogram view dialog.
00903 int MxdViewRastHistRemoveCallback (
00904    MXDHANDLE dhandle, 
00905    void(*)(MxdAnyCallbackStruct*,void*), 
00906    void *cbdata, 
00907    UINT32 reasonmask
00908    );
00909 
00910 //! Set region for partial-raster histogram view.
00911 //! NOTE: If region.GetCoordRefSys().IsLocal() is true, the region is expected
00912 //!   to be in raster coordinages.  If not, the region is expected to be in
00913 //!   the the CRS returned by GetCoordRefSys()
00914 int MxdViewRastHistSetRegion (
00915    MXDHANDLE dhandle,                  //!< Dialog handle
00916    const REGION2D& region              //!< Region defining area to view (map coordinates)
00917    );
00918 
00919 //! Assign or change variable in rose diagram display.
00920 int MxdViewRoseAddVariable (
00921    MXDHANDLE dhandle,                  //!< Dialog handle
00922    int Num,                            //!< Variable number, started from 0
00923    const UNICODE *name,                      //!< Variable name to be displayed (lenght <= 25 char)
00924    double *Value,                      //!< Address of variable to be assigned 
00925    double Min,                         //!< Minimum value of this variable
00926    double Max,                         //!< Maximum value of this variable
00927    double SelPos                       //!< Reserved for future use, any value
00928    );
00929 
00930 //! Add variable using direction.
00931 int MxdViewRoseAddVariableAngle (
00932    MXDHANDLE dhandle,  
00933    double Angle, 
00934    UNICODE *name,  
00935    double *Value,  
00936    double Min, 
00937    double Max, 
00938    double SelPos
00939    );
00940 
00941 //! Close previously opened "rose diagram" dialog. 
00942 int MxdViewRoseClose (
00943    MXDHANDLE dhandle
00944    );
00945 
00946 //! Create rose diagram dialog.
00947 int MxdViewRoseCreate (
00948    Widget pwidget,                     //!< Parent widget 
00949    MXDHANDLE *dhandle,                 //!< Dialog handle returned 
00950    char *dialogname,                   //!< Dialog name override 
00951    int relposn,                        //!< Position relative to parent's shell (0=none, -1=use previous)
00952    int NumVars,                        //!< Number of variables/dimensions 
00953    int dialogflags                     //!< MxdFLAG_... flags 
00954    );
00955 
00956 //! Destroy previously created "rose diagram" dialog.
00957 int MxdViewRoseDestroy (
00958    MXDHANDLE dhandle
00959    );
00960 
00961 //! Return true if "rose diagram" dialog is open, false if not.
00962 int MxdViewRoseIsOpen (
00963    MXDHANDLE dhandle
00964    );
00965 
00966 //! Open previously created "rose diagram" dialog.
00967 int MxdViewRoseOpen (
00968    MXDHANDLE dhandle
00969    );
00970 
00971 //! Function for future use/ Get scale bar position for specified variable.
00972 int MxdViewRoseScaleBar (
00973    MXDHANDLE dhandle,                  //!< Dialog handle
00974    int Num,                            //!< Variable number to get scalebar position
00975    double *Var                         //!< Scalebar position returned
00976    );
00977 
00978 //! Set selection callback function.
00979 int MxdViewRoseSetSelectCallback (
00980    MXDHANDLE dhandle, 
00981    void(*)(int,  void*), 
00982    void *data
00983    );
00984 
00985 //! Update rose diagram display / redraw diagram.
00986 int MxdViewRoseUpdate (
00987    MXDHANDLE dhandle
00988    );
00989 
00990 //! Set function to call when dialog closed.
00991 int MxdViewRoseSetCloseCallback (
00992    MXDHANDLE dhandle, 
00993    void(*)(void*,void*), 
00994    void *closedata
00995    );
00996 
00997 //! Set function to call when dialog destroyed.
00998 int MxdViewRoseSetDestroyCallback (
00999    MXDHANDLE dhandle, 
01000    void(*)(void*,void*), 
01001    void *destroydata
01002    );
01003 
01004 //! Assign a callback.
01005 int MxdViewXYPlotAddCallback (
01006    MXDHANDLE dhandle, 
01007    MxdCallbackFunc, 
01008    void *cbdata, 
01009    UINT32 reasonmask
01010    );
01011 
01012 //! Assign XY data for dialog and provide name of axises.
01013 //!
01014 //! Note 1: If programmer pass NULL for X or Y axis, the default
01015 //!      names will be displayed in dialog: "X" and "Y".
01016 //!
01017 //!   Note 2: Dialog creates own copy of "Points" and you can do
01018 //!      what you want with it, it doesn't affect assigned data.
01019 int MxdViewXYPlotAssignData (
01020    MXDHANDLE dhandle,                  //!< Dialog handle
01021    INT32 Num,                          //!< Number of points
01022    DPOINT2D *Points,                   //!< Array of points
01023    char *Xname,                        //!< Name of horizontal axis, can be NULL 
01024    char *Yname                         //!< Name of vertical axis, can be NULL
01025    );
01026 
01027 //! Close previously opened dialog.
01028 int MxdViewXYPlotClose (
01029    MXDHANDLE dhandle
01030    );
01031 
01032 //! Create XY-plot dialog.
01033 int MxdViewXYPlotCreate (
01034    Widget parent,                      //!< Parent widget
01035    MXDHANDLE *dhandle,                 //!< Dialog handle returned
01036    char *name,                         //!< Dialog name override
01037    int relposn,                        //!< Position relative to parent's shell (0=none, -1=use previous)
01038    int dialogflags                     //!< MxdFLAG_OpenOnCreate, MxdFLAG_DestroyOnClose
01039    );
01040 
01041 //! Destroy previously created dialog.
01042 int MxdViewXYPlotDestroy (
01043    MXDHANDLE dhandle
01044    );
01045 
01046 //! Get Motif FormDialog for X-Y plot.
01047 Widget MxdViewXYPlotGetFormDialog (
01048    MXDHANDLE dhandle
01049    );
01050 
01051 //! Return true if dialog is open.
01052 int MxdViewXYPlotIsOpen (
01053    MXDHANDLE dhandle
01054    );
01055 
01056 //! Open previously created dialog.
01057 int MxdViewXYPlotOpen (
01058    MXDHANDLE dhandle
01059    );
01060 
01061 //! Redraw dialog contents.
01062 int MxdViewXYPlotUpdate (
01063    MXDHANDLE dhandle
01064    );
01065 
01066 //!@}
01067 
01068 #endif   //!<  INC_MI32_MXDIALOG_H 

Generated on Tue Dec 14 13:18:30 2004 for TNTsdk by  doxygen 1.3.8-20040913