mxdbedit.h

Go to the documentation of this file.
00001 /**
00002  * \file mxdbedit.h <mi32/mxdbedit.h>
00003  * \brief Definitions for database editor dialogs
00004  *
00005  * Note, most of the functions in this function group are just wrappers
00006  * around methods of the class DBEDIT.  It is suggested you use the
00007  * class methods instead of the functions.
00008  *
00009  * \if NODOC
00010  * $Id: mxdbedit.h_v 1.15 2004/04/12 16:08:43 scowan Exp $
00011  *
00012  * $Log: mxdbedit.h_v $
00013  * Revision 1.15  2004/04/12 16:08:43  scowan
00014  * Added deprecated to certain defined to create warning about the functions being deprecated.
00015  *
00016  * Revision 1.14  2003/09/15 13:49:56  fileserver!dwilliss
00017  * Doxygen
00018  *
00019  * Revision 1.13  2001/12/31 17:49:13  mju
00020  * Remove comment about flags moved from mxdialog.h.
00021  *
00022  * Revision 1.12  2001/12/27 23:30:45  dwilliss
00023  * Mike undefined a bunch of our constants in WIN32_NATIVE.  Put em back!
00024  *
00025  * Revision 1.11  2001/07/25 17:46:30  mju
00026  * Make DBVIEW_... flags an enum.
00027  *
00028  * Revision 1.10  2001/07/25 17:27:12  dwilliss
00029  * *** empty log message ***
00030  *
00031  * Revision 1.9  2001/04/18 21:59:25  dwilliss
00032  * Changed return type of one function to MDLGPARENT so it would compile for
00033  * WIN32_NATIVE
00034  *
00035  * Revision 1.8  2000/08/08 19:47:58  scowan
00036  * Fixed elemtype stuff.
00037  *
00038  * Revision 1.7  2000/07/07 19:39:09  sparsons
00039  * Genitor documentation.
00040  *
00041  * Revision 1.6  2000/06/01 17:51:23  dwilliss
00042  * comments
00043  *
00044  * Revision 1.5  2000/04/12 22:35:58  dwilliss
00045  * Added autocomplete callback reason
00046  *
00047  * Revision 1.4  1999/10/20 20:35:17  dwilliss
00048  * Made another function take a const filename
00049  *
00050  * Revision 1.3  1999/10/20 19:47:08  mju
00051  * Make DatabaseEditorCreate take const filename.
00052  *
00053  * Revision 1.2  1999/05/26  21:58:31  dwilliss
00054  * Ifdef out a prototype that didn't work under WIN32_NATIVE
00055  *
00056  * Revision 1.1  1999/05/06 22:17:06  mju
00057  * Initial revision
00058  *
00059  * \endif
00060 **/
00061 
00062 #ifndef  INC_MI32_MXDBEDIT_H
00063 #define  INC_MI32_MXDBEDIT_H
00064 
00065 #ifndef  INC_MI32_MXDIALOG_H
00066    #include <mi32/mxdialog.h>
00067 #endif
00068 
00069 #ifndef  INC_MI32_ELEMTYPE_H
00070    #include <mi32/elemtype.h>
00071 #endif
00072 
00073 
00074 //! Flags for database table viewer.
00075 enum DBVIEWFLAGS {
00076    DBVIEWFLAG_None =                0,
00077    DBVIEW_ViewActive =              0x00000001, //!< Default to viewing active
00078    DBVIEW_ViewSelected =            0x00000002, //!< Default to viewing Selected
00079    DBVIEW_ViewAll =                 0x00000004, //!< Default to viewing all records
00080    DBVIEW_NoChangeViewMode =        0x00000008, //!< Don't let user change view mode (attached/selected/all)
00081    DBVIEW_NoSingleRecordView =      0x00000010, //!< Don't allow user to switch to single-record view
00082    DBVIEW_NoRecordSelection =       0x00000020, //!< Omit record selection buttons
00083    DBVIEW_NoAttachmentIndicator =   0x00000040, //!< Omit record attachment indicators
00084    DBVIEW_NoRowControls =           (DBVIEW_NoRecordSelection|DBVIEW_NoAttachmentIndicator),
00085    DBVIEW_NoNewRecord =             0x00000080, //!< Don't allow user to add new record
00086    DBVIEW_NoDropTable =             0x00000100, //!< Don't allow user to "drop" table
00087    DBVIEW_NoEditDefn =              0x00000200, //!< Don't allow user to edit table definition
00088    DBVIEW_TabularView =             0x00000400, //!< Use tabular view
00089    DBVIEW_NoElementSelection =      0x00000800, //!< Leave off element selection button row
00090    DBVIEW_NoCreateIfNotExist =      0x00001000  //!< For MxdDatabaseEditorGetTableInstanceHandle()
00091    };
00092 DEFINE_ENUM_OPERATORS(DBVIEWFLAGS);
00093 
00094 
00095 struct MxdDatabaseEditorCallbackStruct {
00096    UINT32 reason;
00097    MXDHANDLE dhandle;
00098    ELEMTYPE ElemType;
00099    INT32 table;                        //!<  will be inode for form open/close 
00100    int record;
00101    INT32 *list;                        //!<  List of records or elements (depending on reason) 
00102                                        /* DO NOT FREE */
00103    int num;                            //!<  Number of things in above list 
00104    unsigned AllFieldsFilledIn:1,
00105        SpareBits:31;
00106    };
00107 
00108 
00109 /* 
00110 ** Database editor Callback reasons 
00111 ** Note:  The ones defined in terms of MxdCR flags are for backward
00112 **   compatability.
00113 */
00114    //! NOTE: The ones that were defined in terms of MxdCR flags won't work
00115    //! in WIN32_NATIVE because those aren't defined anymore.  So I just
00116    //! changed them to use the actual values that those constants represent
00117    //! They're the 4 with high values.
00118 #define MxdDATABASE_Open               0x20000000
00119 #define MxdDATABASE_Close              0x40000000
00120 #define MxdDATABASE_TableOpen          0x0001
00121 #define MxdDATABASE_TableClose         0x0002
00122 #define MxdDATABASE_FormOpen           0x0004
00123 #define MxdDATABASE_FormClose          0x0008
00124 #define MxdDATABASE_Destroy            0x80000000
00125 #define MxdDATABASE_Modify             0x04000000
00126 #define MxdDATABASE_SelectElements     0x0010
00127 #define MxdDATABASE_UnselectElements   0x0020
00128 #define MxdDATABASE_ToggleElements     0x0040
00129 #define MxdDATABASE_SelectOnly         0x0080
00130 #define MxdDATABASE_Elements           0x00F0      //!<  any of the 4 above 
00131 #define MxdDATABASE_FormObjectCreate   0x0100      //!<  A form object has been created under this database 
00132 #define MxdDATABASE_FormObjectDestroy  0x0200      //!<  A form object under this database has been destroyed 
00133 #define MxdDATABASE_AutoComplete       0x0400      
00134 
00135 /*----------------------------------------------------------------------------*/
00136 /*    Flags used by MxdDatabaseEditorXxxx functions                           */
00137 /*----------------------------------------------------------------------------*/
00138 
00139 #define MxdDATABASE_Clear                 0x00000001  //!<  flag for ...MultiSelectStart 
00140 #define MxdDATABASE_DontUpdateDialogs     0x00000002  //!<  flag for ...MultiSelectEnd 
00141 #define MxdDATABASE_AutoSave              0x00000004  //!<  MxdDatabaseEditorGenViewSaveRecord: Save without prompting 
00142 
00143 /* Special Element numbers to pass to MxdDatabaseSetElement...() */
00144 #define MxdDATABASE_DefaultElementList    ELEMENTNUM_DefaultList
00145 #define MxdDATABASE_NoElement             ELEMENTNUM_None
00146 
00147 
00148 #if defined(__cplusplus)
00149 extern "C" {
00150 #endif
00151 
00152 //!:Associate with "DBEDIT"
00153 //!\addtogroup DBEDIT Database Editor
00154 //!@{
00155 
00156 //! Add a callback.
00157 //!
00158 //! Valid reasons:      
00159 //!      \li \b MxdDATABASE_Open                Same as MxdCR_Open
00160 //!      \li \b MxdDATABASE_Close               Same as MxdCR_Close
00161 //!      \li \b MxdDATABASE_Destroy             Same as MxdCR_Destroy
00162 //!      \li \b MxdDATABASE_Modify           Same as MxdCR_Modify
00163 //!      \li \b MxdDATABASE_TableOpen        A table window was opened
00164 //!      \li \b MxdDATABASE_TableClose          A table window was closed
00165 //!      \li \b MxdDATABASE_SelectElements   User clicked multiselect button
00166 //!      \li \b MxdDATABASE_UnselectElements User clicked unselect button
00167 //!      \li \b MxdDATABASE_ToggleElements      User clicked toggle select button
00168 //!      \li \b MxdDATABASE_SelectOnly       User clicked exclusive select button
00169 //!      \li \b MxdDATABASE_Elements            The 4 element select reasons or'd together
00170 int MxdDatabaseEditorAddCallback (
00171    MXDHANDLE dhandle, 
00172    void (*func)(MxdDatabaseEditorCallbackStruct *,void*), 
00173    void *data, 
00174    UINT32 reason
00175    );
00176 
00177 //! Remove a callback.
00178 void MxdDatabaseEditorRemoveCallback (
00179    MXDHANDLE dhandle, 
00180    void (*func)(MxdDatabaseEditorCallbackStruct *, void*), 
00181    void *data, 
00182    UINT32 reason
00183    );
00184 
00185 //! Create "database editor" dialog.
00186 //!
00187 //! Note, this function no longer opens a dialog of its own.  However,
00188 //!   the dhandle returned must be passed to the other MxdDatabaseEditor functions.
00189 int MxdDatabaseEditorCreate (
00190    Widget pwidget,                     //!< Parent widget
00191    MXDHANDLE *dhandle,                 //!< Dialog handle returned
00192    const UNICODE *fname,               //!< Filename of database
00193    RVCINODENUM inode,                        //!< Inode of database or database's parent object
00194    ELEMTYPE elemtypes,                    //!< ELEMTYPE_Xxx of database. 
00195    UINT32 flags                        //!< Flags
00196    );
00197 
00198 //! Destroy previously created "database editor" dialog.
00199 int MxdDatabaseEditorDestroy (
00200    MXDHANDLE dhandle
00201    );
00202 
00203 //! Drop a table.
00204 //!
00205 //! Returns 0 or an error < 0, including EUserCancel if the user changes
00206 //!   their mind.  If you don't want to ask the user about dropping the table,
00207 //!   just call MfDropTable directly.  Don't even think about calling this for
00208 //!   an internal table.
00209 int MxdDatabaseEditorDropTable (
00210    MXDHANDLE dhandle,                  //!< Handle created by MxdDatabaseEditorCreate()
00211    Widget parent,                      //!< Parent widget for "Are you sure" dialog
00212    int TableNum,                       //!< Table number to drop
00213    UINT32 flags                        //!< Flags
00214    );
00215 
00216 //! Drop a form.
00217 //!
00218 //! Returns 0 or an error < 0, including EUserCancel if the user changes
00219 //!   their mind.  If you don't want to ask the user about dropping the table,
00220 //!   just call MfDropTable directly.  Don't even think about calling this for
00221 //!   an internal table.
00222 int MxdDatabaseEditorDropForm (
00223    MXDHANDLE dhandle,                  //!< Handle created by MxdDatabaseEditorCreate()
00224    Widget parent,                      //!< Parent widget for "Are you sure" dialog
00225    INT32 inode,                        //!< Inode of form to delete
00226    UINT32 flags                        //!< Flags
00227    );
00228 
00229  //! Popup dialog to edit a table definition. 
00230 int MxdDatabaseEditorEditTableDefn (
00231    MXDHANDLE dhandle,                  //!< XXX Should be a DBEDIT*
00232    Widget parent, 
00233    int TableNum, 
00234    UINT32 flags
00235    );
00236 
00237 //! Write any changes that havn't been written yet.
00238 int MxdDatabaseEditorFlush (
00239    MXDHANDLE dhandle                   //!< Handle created by MxdDatabaseEditorCreate()
00240    );
00241 
00242 #ifndef WIN32_NATIVE
00243 
00244 //! Create a generic view form for a table.
00245 int MxdDatabaseEditorGenViewCreate (
00246    MXDHANDLE dhandle,                  //!< Handle created by MxdDatabaseEditorCreate()
00247    INT32 TableNum,                     //!< Table number
00248    Widget parent,                      //!< Parent widget for the form that will be created
00249    Widget *pwidget,                    //!< Form RETURNED
00250    Arg *arg,                           
00251    int numargs,                        //!< Number of arguments
00252    UINT32 flags                        //!< Flags
00253    );
00254 
00255 #endif
00256 
00257 //! Destroy a generic view form for a table.
00258 //!
00259 //! Normal people would just destroy the widget.  It's destroy callback will
00260 //!   take care of everything.
00261 int MxdDatabaseEditorGenViewDestroy (
00262    Widget form                         //!< The form returned by MxdDAtabaseEditorGenViewCreate
00263    );
00264 
00265 //! Add a callback to a GenView.
00266 int MxdDatabaseEditorGenViewAddCallback (
00267    Widget mainform,                                      //!< Form created from DBEDIT::GenViewCreate()
00268    void (*)(MxdDatabaseEditorCallbackStruct *, void *),  
00269    void *data, 
00270    UINT32 reason
00271    );
00272 
00273 //! Remove a callback from a GenView.
00274 int MxdDatabaseEditorGenViewRemoveCallback (
00275    Widget mainform,                                      //!< Form created from DBEDIT::GenViewCreate()
00276    void (*)(MxdDatabaseEditorCallbackStruct *, void *), 
00277    void *data, 
00278    UINT32 reason
00279    );
00280 
00281 //! Get the record data for a GenView.
00282 int MxdDatabaseEditorGenViewGetData (
00283    Widget mainform,                    //!< Form created from DBEDIT::GenViewCreate()
00284    void *buf                           //!< Buffer to copy data into
00285    );
00286 
00287 //! Set the record data for a GenView.
00288 int MxdDatabaseEditorGenViewSetData (
00289    Widget mainform,                    //!< Form created from DBEDIT::GenViewCreate()
00290    void *buf
00291    );
00292 
00293 //! Read a record and set the GenView's data.
00294 int MxdDatabaseEditorGenViewSetRecord (
00295    Widget mainform,                    //!< Form created via DBEDIT::GenViewCreate()
00296    INT32 record, 
00297    UINT32 flags
00298    );
00299 
00300 //! Save the contents of a GenView to a record.
00301 //!
00302 //! It will write whatever record was read via MxdDatabaseEditorGenViewSetRecord().
00303 int MxdDatabaseEditorGenViewSaveRecord (
00304    Widget mainform,                    //!< Form created via DBEDIT::GenViewCreate()
00305    UINT32 flags                        //!< Pass MxdDATABASE_AutoSave to avoid "Do you want to save?" dialog
00306    );
00307 
00308 //! Return the database object handle.
00309 int MxdDatabaseEditorGetDBHandle (
00310    MXDHANDLE dhandle
00311    );
00312 
00313 //! Returns the number of table windows currently open.
00314 //!
00315 //! @return Error code if < 0, Number of open table windows if >= 0.
00316 int MxdDatabaseEditorGetNumOpen (
00317    MXDHANDLE dhandle                   //!< Handle created by MxdDatabaseEditorCreate()
00318    );
00319 
00320 //! Obsolete:  Use DBEDIT::GetParent().
00321 //! \deprecated  Use DBEDIT::GetParent().
00322 DEPRECATED MDLGPARENT MxdDatabaseEditorGetParent (
00323    MXDHANDLE dhandle
00324    );
00325 
00326 //! Obsolete: Use DBEDIT::GetTableInstanceHandle().
00327 //! \deprecated Use DBEDIT::GetTableInstanceHandle().
00328 DEPRECATED MXDHANDLE MxdDatabaseEditorGetTableInstanceHandle (
00329    MXDHANDLE dhandle, 
00330    INT32 TableNum, 
00331    UINT32 flags
00332    );
00333 
00334 #ifndef GENERATING_DOXYGEN_OUTPUT
00335 void *_MxdDatabaseEditorGetDBRelateHandle (
00336    MXDHANDLE dhandle
00337    );
00338 
00339 void _MxdDatabaseEditorSetDBRelateHandle (
00340    MXDHANDLE dhandle, 
00341    void *handle
00342    );
00343 #endif //!< GENERATING_DOXYGEN_OUTPUT
00344 
00345 //! Obsolete:  Use DBEDIT::ModalSingleRecordView(). 
00346 //! \deprecated  Use DBEDIT::ModalSingleRecordView(). 
00347 DEPRECATED int MxdDatabaseEditorModalSingleRecordView (
00348    MXDHANDLE dhandle, 
00349    INT32 TableNum, 
00350    INT32 Record, 
00351    void *initvals,                     //!< Buffer to initialize as (only for Record < 0)
00352    Widget parent, 
00353    UINT32 flags
00354    );
00355 
00356 //! Begin selection of multiple elements.
00357 //!
00358 //! Starts the selection of multiple elements.  This function clears the list of selected elements first
00359 //!   if MxdDATABASE_Clear is passed, otherwise it just adds to the list.
00360 //!   See MxdDatabaseEditorSetElement() for more information.
00361 //!   
00362 //!   Flags:   
00363 //!      \b MxdDATABASE_Clear       Clear the list first
00364 int MxdDatabaseEditorMultiSelectStart (
00365    MXDHANDLE dhandle,                  //!< Dialog handle
00366    UINT32 flags                        //!< Flags
00367    );
00368 
00369 //! End selection of multiple elements.
00370 //!
00371 //! Ends the selection of multiple elements and updates open tables.
00372 //! See MxdDatabaseEditorSetElement() for more information. 
00373 //!
00374 //!   Flags:
00375 //!      \b MxdDATABASE_DontUpdateDialogs    Don't update table dialogs
00376 int MxdDatabaseEditorMultiSelectEnd (
00377    MXDHANDLE dhandle,                  //!< Dialog handle
00378    UINT32 flags                        //!< Flags
00379    );
00380 
00381 //! Popup dialog to create a new table. 
00382 int MxdDatabaseEditorNewTable (
00383    MXDHANDLE dhandle,                  //!< XXX Should be a DBEDIT*
00384    Widget parent, 
00385    UINT32 flags
00386    );
00387 
00388 //! Check the source and see if the function actually exists, if so, it creates a new form.
00389 int MxdDatabaseEditorNewForm (
00390    MXDHANDLE dhandle,                  //!< XXX Should be a DBEDIT*
00391    Widget parent,                      //!< Parent widget
00392    INT32 *inodep,                      //!< Form inode number RETURNED
00393    UINT32 flags
00394    );
00395 
00396 //! Open a database table window.
00397 //!
00398 //! Most flags are only used by tabular view mode. 
00399 //! Valid flags are:
00400 //!      \li \b DBVIEW_TabularView           Bring window up in Tabular view mode (default is single record view)
00401 //!      \li \b DBVIEW_ViewActive            View Active element's records
00402 //!      \li \b DBVIEW_ViewSelected          View records attached to all selected elements
00403 //!      \li \b DBVIEW_ViewAll               View all records
00404 //!      \li \b DBVIEW_NoChangeViewMode      Don't let user change active/selected/all mode
00405 //!      \li \b DBVIEW_NoSingleRecordView    Don't let user change single record/tabular view mode
00406 //!      \li \b DBVIEW_NoRecordSelection  
00407 //!      \li \b DBVIEW_NoAttachmentIndicator
00408 //!      \li \b DBVIEW_NoRowControls         The two flags above OR'd together      
00409 //!      \li \b DBVIEW_NoNewRecord
00410 //!      \li \b DBVIEW_NoDropTable
00411 //!      \li \b DBVIEW_NoEditDefn 
00412 int MxdDatabaseEditorOpenTableWindow (
00413    MXDHANDLE dhandle, 
00414    INT32 table, 
00415    UINT32 flags
00416    );
00417 
00418 //! Open a database Form window.
00419 int MxdDatabaseEditorOpenFormWindow (
00420    MXDHANDLE dhandle,                  //!< Dialog handle
00421    INT32 inode,                        //!< Form inode (must be subobject of database)
00422    UINT32 flags                        //!< Flags
00423    );
00424 
00425 //! Open tabluar view in database editor.
00426 int MxdDatabaseEditorOpenTabularView (
00427    MXDHANDLE dhandle, 
00428    INT32 table, 
00429    UINT32 flags
00430    );
00431 
00432 //! Close a table window.
00433 int MxdDatabaseEditorCloseTableWindow (
00434    MXDHANDLE dhandle, 
00435    INT32 table
00436    );
00437 
00438 //! Close a database Form window.
00439 int MxdDatabaseEditorCloseFormWindow (
00440    MXDHANDLE dhandle,                  //!< Dialog handle
00441    INT32 inode                         //!< Form inode (must be subobject of database)
00442    );
00443 
00444 //! Stop updating dialogs.
00445 //!
00446 //! This is useful if you're going to be modifing the database over and over.
00447 int MxdDatabaseEditorSuspendUpdates (
00448    MXDHANDLE dhandle,                  //!< Dialog handle
00449    UINT32 flags                        //!< Flags
00450    );
00451 
00452 //!  Open the database relationship (tree view) editor.
00453 int MxdDatabaseEditorRelate (
00454    MXDHANDLE dhandle,                  //!< XXX Should be a DBEDIT*
00455    UINT32 flags                        //!< MxdFLAGs
00456    );
00457 
00458 //! Resume updating dialogs.
00459 int MxdDatabaseEditorResumeUpdates (
00460    MXDHANDLE dhandle,                  //!< Dialog handle
00461    UINT32 flags                        //!< Flags
00462    );
00463 
00464 //! Refresh the active element attachments. 
00465 int MxdDatabaseEditorRefreshActiveElementAttachments (
00466    MXDHANDLE dhandle, 
00467    UINT32 flags
00468    );
00469 
00470 //! Make the database editor figure out what's attached again.
00471 //!
00472 //! Mostly obsolete.  Now everything is done by callbacks and it knows to
00473 //!   update automatically.  However, if you're doing a lot of changes, it's a
00474 //!   good idea to call MxdDatabaseEditorSuspendUpdates() and MxdDatabaseEditorResumeUpdates().
00475 //!
00476 //! Flags:     
00477 //!   \li \b MxdDATABASE_DontUpdateDialogs
00478 int MxdDatabaseEditorRefreshAttachments (
00479    MXDHANDLE dhandle,                  //!< Handle created by MxdDatabaseEditorCreate()
00480    UINT32 flags
00481    );
00482 
00483 //! View records attached to a given element.
00484 //!
00485 //! This function is used to change the "Active" element without changing the selected element list.
00486 //! Flags:
00487 //!   \li \b MxdDATABASE_DontUpdateDialogs      Don't update table dialogs
00488 int MxdDatabaseEditorSetActiveElement (
00489    MXDHANDLE dhandle,                  //!< Handle created by MxdDatabaseEditorCreate()
00490    INT32 table,                        
00491    INT32 element,                      //!< Element number to view records for
00492    ELEMTYPE elemtype,                        //!< ELEMTYPE_Xxxx
00493    UINT32 flags                        //!< Flags
00494    );
00495 
00496 //! Update the database editor dialogs.
00497 int MxdDatabaseEditorUpdateDialogs (
00498    MXDHANDLE dhandle
00499    );
00500 
00501 //! Open style dialog.
00502 int MxdDatabaseEditorOpenStyleDialog (
00503    MXDHANDLE dhandle, 
00504    Widget parent, 
00505    UINT32 flags
00506    );
00507 
00508 //! Close style dialog.
00509 int MxdDatabaseEditorCloseStyleDialog (
00510    MXDHANDLE dhandle
00511    );
00512 
00513 //! Set parent for database editor.
00514 void MxdDatabaseEditorSetParent (
00515    MXDHANDLE dhandle, 
00516    Widget widget
00517    );
00518 
00519 //! Set style object for the database editor.
00520 int MxdDatabaseEditorSetStyleObject (
00521    MXDHANDLE dhandle,                  //!< Dialog handle
00522    const UNICODE *fname,               //!< Style object filename
00523    INT32 inode,                        //!< Style object inode
00524    int styletable,                     //!< Active Style Assignment Table
00525    void *dftstyle                      //!< Default style (POINTSTYLE/LINESTYLE/POLYSTYLE)
00526    );
00527 
00528 //! Set style handle for the database editor.
00529 int MxdDatabaseEditorSetStyleNumber (
00530    MXDHANDLE dhandle, 
00531    int StyleNum, 
00532    int RecNum, 
00533    UINT32 flags
00534    );
00535 
00536 //! View records attached to a given element.
00537 //!
00538 //! @return Error code if < 0, 1 if dialog open, 0 if dialog not open.
00539 //!
00540 //!   This function causes the database editor to look up the records attached and related to the 
00541 //! selected element and update the open database windows accordingly.  To set multiple elements, 
00542 //! (for a multi-select tool), call MxdDatabaseEditorMultiSelectStart(), then call 
00543 //! MxdDatabaseEditorSetElement() once for each element, then call MxdDatabaseEditorMultiSelectEnd().
00544 int MxdDatabaseEditorSetElement (
00545    MXDHANDLE dhandle,                  //!< Handle created by MxdDatabaseEditorCreate()
00546    INT32 element,                      //!< Element number to view records for
00547    ELEMTYPE elemtype                //!< ELEMTYPE_Xxxx
00548    );
00549 
00550 //! Set multiple elements for the database editor.
00551 //!
00552 //! Flags:     
00553 //!      \li \b MxdDATABASE_DontUpdateDialogs      Don't update table dialogs
00554 int MxdDatabaseEditorSetElementsExt (
00555    MXDHANDLE dhandle,                  //!< Handle created by MxdDatabaseEditorCreate()
00556    ELEMTYPE ElemType,                        //!< ELEMTYPE_Xxxx
00557    INT32 table,                        
00558    UINT8 *bits,                        //!< Bit array of selected elements
00559    INT32 NumElements,                  //!< Size of "Bits" array 
00560    INT32 ActiveElement,                //!< The "Active" element number
00561    UINT32 flags                        //!< Flags
00562    );
00563 
00564 //! Set the current element for pin-mapping.
00565 //!
00566 //! This function is the same as MxdDatabaseEditorSetElement, but is used for pin-mapping.
00567 //!   Table is the main table that controls the display.
00568 int MxdDatabaseEditorSetRecord (
00569    MXDHANDLE dhandle,                  
00570    int table, 
00571    INT32 record
00572    );
00573 
00574 //! Check to see if a table is open.
00575 //!
00576 //! Returns a non-zero value if the table is open.  Don't assume it
00577 //!   returns 1 or 0.  Some day, it may be changed to return a value
00578 //!   telling what mode (Single Record or Tabular View) 
00579 int MxdDatabaseEditorTableIsOpen (
00580    MXDHANDLE dhandle,                  
00581    int TableNum
00582    );
00583 
00584 //! Inform the database editor that element is unselected.
00585 //!
00586 //! This function has the opposite effect as MxdDatabaseEditorSetElement().  It removes the specified
00587 //!   element from the list of selected elements.  It's meant to be called in a multi-selection situation
00588 //!   only.
00589 int MxdDatabaseEditorUnsetElement (
00590    MXDHANDLE dhandle,                  
00591    INT32 element, 
00592    int otype                           //!< ELEMTYPE_Xxxx
00593    );
00594 
00595 #define  MxdDatabaseEditorSetOpenCallback(h,f,d) MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Open);
00596 #define  MxdDatabaseEditorSetCloseCallback(h,f,d) MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Close);
00597 #define  MxdDatabaseEditorSetModifyCallback(h,f,d) MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Modify);
00598 #define  MxdDatabaseEditorSetDestroyCallback(h,f,d) MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Destroy);
00599 #define  MxdDatabaseEditorSetSelectionCallback(h,f,d) MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Elements);
00600 
00601 //!@}
00602 
00603 #if defined(__cplusplus)
00604 }
00605 #endif
00606 
00607 #endif   //!< INC_MI32_MXDBEDIT_H

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