Database Editor

:Associate with "DBEDIT" More...

Defines

#define MxdDatabaseEditorSetCloseCallback(h, f, d)   MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Close);
#define MxdDatabaseEditorSetDestroyCallback(h, f, d)   MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Destroy);
#define MxdDatabaseEditorSetModifyCallback(h, f, d)   MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Modify);
#define MxdDatabaseEditorSetOpenCallback(h, f, d)   MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Open);
#define MxdDatabaseEditorSetSelectionCallback(h, f, d)   MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Elements);

Functions

int MxdDatabaseEditorAddCallback (MXDHANDLE dhandle, void(*func)(MxdDatabaseEditorCallbackStruct *, void *), void *data, UINT32 reason)
int MxdDatabaseEditorCloseFormWindow (MXDHANDLE dhandle, INT32 inode)
int MxdDatabaseEditorCloseStyleDialog (MXDHANDLE dhandle)
int MxdDatabaseEditorCloseTableWindow (MXDHANDLE dhandle, INT32 table)
int MxdDatabaseEditorCreate (Widget pwidget, MXDHANDLE *dhandle, const UNICODE *fname, RVCINODENUM inode, ELEMTYPE elemtypes, UINT32 flags)
int MxdDatabaseEditorDestroy (MXDHANDLE dhandle)
int MxdDatabaseEditorDropForm (MXDHANDLE dhandle, Widget parent, INT32 inode, UINT32 flags)
int MxdDatabaseEditorDropTable (MXDHANDLE dhandle, Widget parent, int TableNum, UINT32 flags)
int MxdDatabaseEditorEditTableDefn (MXDHANDLE dhandle, Widget parent, int TableNum, UINT32 flags)
int MxdDatabaseEditorFlush (MXDHANDLE dhandle)
int MxdDatabaseEditorGenViewAddCallback (Widget mainform, void(*)(MxdDatabaseEditorCallbackStruct *, void *), void *data, UINT32 reason)
int MxdDatabaseEditorGenViewDestroy (Widget form)
int MxdDatabaseEditorGenViewGetData (Widget mainform, void *buf)
int MxdDatabaseEditorGenViewRemoveCallback (Widget mainform, void(*)(MxdDatabaseEditorCallbackStruct *, void *), void *data, UINT32 reason)
int MxdDatabaseEditorGenViewSaveRecord (Widget mainform, UINT32 flags)
int MxdDatabaseEditorGenViewSetData (Widget mainform, void *buf)
int MxdDatabaseEditorGenViewSetRecord (Widget mainform, INT32 record, UINT32 flags)
int MxdDatabaseEditorGetDBHandle (MXDHANDLE dhandle)
int MxdDatabaseEditorGetNumOpen (MXDHANDLE dhandle)
DEPRECATED MDLGPARENT MxdDatabaseEditorGetParent (MXDHANDLE dhandle)
DEPRECATED MXDHANDLE MxdDatabaseEditorGetTableInstanceHandle (MXDHANDLE dhandle, INT32 TableNum, UINT32 flags)
DEPRECATED int MxdDatabaseEditorModalSingleRecordView (MXDHANDLE dhandle, INT32 TableNum, INT32 Record, void *initvals, Widget parent, UINT32 flags)
int MxdDatabaseEditorMultiSelectEnd (MXDHANDLE dhandle, UINT32 flags)
int MxdDatabaseEditorMultiSelectStart (MXDHANDLE dhandle, UINT32 flags)
int MxdDatabaseEditorNewForm (MXDHANDLE dhandle, Widget parent, INT32 *inodep, UINT32 flags)
int MxdDatabaseEditorNewTable (MXDHANDLE dhandle, Widget parent, UINT32 flags)
int MxdDatabaseEditorOpenFormWindow (MXDHANDLE dhandle, INT32 inode, UINT32 flags)
int MxdDatabaseEditorOpenStyleDialog (MXDHANDLE dhandle, Widget parent, UINT32 flags)
int MxdDatabaseEditorOpenTableWindow (MXDHANDLE dhandle, INT32 table, UINT32 flags)
int MxdDatabaseEditorOpenTabularView (MXDHANDLE dhandle, INT32 table, UINT32 flags)
int MxdDatabaseEditorRefreshActiveElementAttachments (MXDHANDLE dhandle, UINT32 flags)
int MxdDatabaseEditorRefreshAttachments (MXDHANDLE dhandle, UINT32 flags)
int MxdDatabaseEditorRelate (MXDHANDLE dhandle, UINT32 flags)
void MxdDatabaseEditorRemoveCallback (MXDHANDLE dhandle, void(*func)(MxdDatabaseEditorCallbackStruct *, void *), void *data, UINT32 reason)
int MxdDatabaseEditorResumeUpdates (MXDHANDLE dhandle, UINT32 flags)
int MxdDatabaseEditorSetActiveElement (MXDHANDLE dhandle, INT32 table, INT32 element, ELEMTYPE elemtype, UINT32 flags)
int MxdDatabaseEditorSetElement (MXDHANDLE dhandle, INT32 element, ELEMTYPE elemtype)
int MxdDatabaseEditorSetElementsExt (MXDHANDLE dhandle, ELEMTYPE ElemType, INT32 table, UINT8 *bits, INT32 NumElements, INT32 ActiveElement, UINT32 flags)
void MxdDatabaseEditorSetParent (MXDHANDLE dhandle, Widget widget)
int MxdDatabaseEditorSetRecord (MXDHANDLE dhandle, int table, INT32 record)
int MxdDatabaseEditorSetStyleNumber (MXDHANDLE dhandle, int StyleNum, int RecNum, UINT32 flags)
int MxdDatabaseEditorSetStyleObject (MXDHANDLE dhandle, const UNICODE *fname, INT32 inode, int styletable, void *dftstyle)
int MxdDatabaseEditorSuspendUpdates (MXDHANDLE dhandle, UINT32 flags)
int MxdDatabaseEditorTableIsOpen (MXDHANDLE dhandle, int TableNum)
int MxdDatabaseEditorUnsetElement (MXDHANDLE dhandle, INT32 element, int otype)
int MxdDatabaseEditorUpdateDialogs (MXDHANDLE dhandle)

Detailed Description

:Associate with "DBEDIT"


Define Documentation

#define MxdDatabaseEditorSetCloseCallback h,
f,
 )     MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Close);
 

Definition at line 596 of file mxdbedit.h.

#define MxdDatabaseEditorSetDestroyCallback h,
f,
 )     MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Destroy);
 

Definition at line 598 of file mxdbedit.h.

#define MxdDatabaseEditorSetModifyCallback h,
f,
 )     MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Modify);
 

Definition at line 597 of file mxdbedit.h.

#define MxdDatabaseEditorSetOpenCallback h,
f,
 )     MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Open);
 

Definition at line 595 of file mxdbedit.h.

#define MxdDatabaseEditorSetSelectionCallback h,
f,
 )     MxdDatabaseEditorAddCallback(h,f,d,MxdDATABASE_Elements);
 

Definition at line 599 of file mxdbedit.h.


Function Documentation

int MxdDatabaseEditorAddCallback MXDHANDLE  dhandle,
void(*  func)(MxdDatabaseEditorCallbackStruct *, void *),
void *  data,
UINT32  reason
 

Add a callback.

Valid reasons:

  • MxdDATABASE_Open Same as MxdCR_Open
  • MxdDATABASE_Close Same as MxdCR_Close
  • MxdDATABASE_Destroy Same as MxdCR_Destroy
  • MxdDATABASE_Modify Same as MxdCR_Modify
  • MxdDATABASE_TableOpen A table window was opened
  • MxdDATABASE_TableClose A table window was closed
  • MxdDATABASE_SelectElements User clicked multiselect button
  • MxdDATABASE_UnselectElements User clicked unselect button
  • MxdDATABASE_ToggleElements User clicked toggle select button
  • MxdDATABASE_SelectOnly User clicked exclusive select button
  • MxdDATABASE_Elements The 4 element select reasons or'd together

int MxdDatabaseEditorCloseFormWindow MXDHANDLE  dhandle,
INT32  inode
 

Close a database Form window.

Parameters:
dhandle  Dialog handle
inode  Form inode (must be subobject of database)

int MxdDatabaseEditorCloseStyleDialog MXDHANDLE  dhandle  ) 
 

Close style dialog.

int MxdDatabaseEditorCloseTableWindow MXDHANDLE  dhandle,
INT32  table
 

Close a table window.

int MxdDatabaseEditorCreate Widget  pwidget,
MXDHANDLE dhandle,
const UNICODE fname,
RVCINODENUM  inode,
ELEMTYPE  elemtypes,
UINT32  flags
 

Create "database editor" dialog.

Note, this function no longer opens a dialog of its own. However, the dhandle returned must be passed to the other MxdDatabaseEditor functions.

Parameters:
pwidget  Parent widget
dhandle  Dialog handle returned
fname  Filename of database
inode  Inode of database or database's parent object
elemtypes  ELEMTYPE_Xxx of database.
flags  Flags

int MxdDatabaseEditorDestroy MXDHANDLE  dhandle  ) 
 

Destroy previously created "database editor" dialog.

int MxdDatabaseEditorDropForm MXDHANDLE  dhandle,
Widget  parent,
INT32  inode,
UINT32  flags
 

Drop a form.

Returns 0 or an error < 0, including EUserCancel if the user changes their mind. If you don't want to ask the user about dropping the table, just call MfDropTable directly. Don't even think about calling this for an internal table.

Parameters:
dhandle  Handle created by MxdDatabaseEditorCreate()
parent  Parent widget for "Are you sure" dialog
inode  Inode of form to delete
flags  Flags

int MxdDatabaseEditorDropTable MXDHANDLE  dhandle,
Widget  parent,
int  TableNum,
UINT32  flags
 

Drop a table.

Returns 0 or an error < 0, including EUserCancel if the user changes their mind. If you don't want to ask the user about dropping the table, just call MfDropTable directly. Don't even think about calling this for an internal table.

Parameters:
dhandle  Handle created by MxdDatabaseEditorCreate()
parent  Parent widget for "Are you sure" dialog
TableNum  Table number to drop
flags  Flags

int MxdDatabaseEditorEditTableDefn MXDHANDLE  dhandle,
Widget  parent,
int  TableNum,
UINT32  flags
 

Popup dialog to edit a table definition.

Parameters:
dhandle  XXX Should be a DBEDIT*

int MxdDatabaseEditorFlush MXDHANDLE  dhandle  ) 
 

Write any changes that havn't been written yet.

Parameters:
dhandle  Handle created by MxdDatabaseEditorCreate()

int MxdDatabaseEditorGenViewAddCallback Widget  mainform,
void(*  )(MxdDatabaseEditorCallbackStruct *, void *),
void *  data,
UINT32  reason
 

Add a callback to a GenView.

Parameters:
mainform  Form created from DBEDIT::GenViewCreate()

int MxdDatabaseEditorGenViewDestroy Widget  form  ) 
 

Destroy a generic view form for a table.

Normal people would just destroy the widget. It's destroy callback will take care of everything.

Parameters:
form  The form returned by MxdDAtabaseEditorGenViewCreate

int MxdDatabaseEditorGenViewGetData Widget  mainform,
void *  buf
 

Get the record data for a GenView.

Parameters:
mainform  Form created from DBEDIT::GenViewCreate()
buf  Buffer to copy data into

int MxdDatabaseEditorGenViewRemoveCallback Widget  mainform,
void(*  )(MxdDatabaseEditorCallbackStruct *, void *),
void *  data,
UINT32  reason
 

Remove a callback from a GenView.

Parameters:
mainform  Form created from DBEDIT::GenViewCreate()

int MxdDatabaseEditorGenViewSaveRecord Widget  mainform,
UINT32  flags
 

Save the contents of a GenView to a record.

It will write whatever record was read via MxdDatabaseEditorGenViewSetRecord().

Parameters:
mainform  Form created via DBEDIT::GenViewCreate()
flags  Pass MxdDATABASE_AutoSave to avoid "Do you want to save?" dialog

int MxdDatabaseEditorGenViewSetData Widget  mainform,
void *  buf
 

Set the record data for a GenView.

Parameters:
mainform  Form created from DBEDIT::GenViewCreate()

int MxdDatabaseEditorGenViewSetRecord Widget  mainform,
INT32  record,
UINT32  flags
 

Read a record and set the GenView's data.

Parameters:
mainform  Form created via DBEDIT::GenViewCreate()

int MxdDatabaseEditorGetDBHandle MXDHANDLE  dhandle  ) 
 

Return the database object handle.

int MxdDatabaseEditorGetNumOpen MXDHANDLE  dhandle  ) 
 

Returns the number of table windows currently open.

Returns:
Error code if < 0, Number of open table windows if >= 0.
Parameters:
dhandle  Handle created by MxdDatabaseEditorCreate()

DEPRECATED MDLGPARENT MxdDatabaseEditorGetParent MXDHANDLE  dhandle  ) 
 

Obsolete: Use DBEDIT::GetParent().

Deprecated:
Use DBEDIT::GetParent().

DEPRECATED MXDHANDLE MxdDatabaseEditorGetTableInstanceHandle MXDHANDLE  dhandle,
INT32  TableNum,
UINT32  flags
 

GENERATING_DOXYGEN_OUTPUT.

Deprecated:
Use DBEDIT::GetTableInstanceHandle().

DEPRECATED int MxdDatabaseEditorModalSingleRecordView MXDHANDLE  dhandle,
INT32  TableNum,
INT32  Record,
void *  initvals,
Widget  parent,
UINT32  flags
 

Obsolete: Use DBEDIT::ModalSingleRecordView().

Deprecated:
Use DBEDIT::ModalSingleRecordView().
Parameters:
initvals  Buffer to initialize as (only for Record < 0)

int MxdDatabaseEditorMultiSelectEnd MXDHANDLE  dhandle,
UINT32  flags
 

End selection of multiple elements.

Ends the selection of multiple elements and updates open tables. See MxdDatabaseEditorSetElement() for more information.

Flags: MxdDATABASE_DontUpdateDialogs Don't update table dialogs

Parameters:
dhandle  Dialog handle
flags  Flags

int MxdDatabaseEditorMultiSelectStart MXDHANDLE  dhandle,
UINT32  flags
 

Begin selection of multiple elements.

Starts the selection of multiple elements. This function clears the list of selected elements first if MxdDATABASE_Clear is passed, otherwise it just adds to the list. See MxdDatabaseEditorSetElement() for more information.

Flags: MxdDATABASE_Clear Clear the list first

Parameters:
dhandle  Dialog handle
flags  Flags

int MxdDatabaseEditorNewForm MXDHANDLE  dhandle,
Widget  parent,
INT32 inodep,
UINT32  flags
 

Check the source and see if the function actually exists, if so, it creates a new form.

Parameters:
dhandle  XXX Should be a DBEDIT*
parent  Parent widget
inodep  Form inode number RETURNED

int MxdDatabaseEditorNewTable MXDHANDLE  dhandle,
Widget  parent,
UINT32  flags
 

Popup dialog to create a new table.

Parameters:
dhandle  XXX Should be a DBEDIT*

int MxdDatabaseEditorOpenFormWindow MXDHANDLE  dhandle,
INT32  inode,
UINT32  flags
 

Open a database Form window.

Parameters:
dhandle  Dialog handle
inode  Form inode (must be subobject of database)
flags  Flags

int MxdDatabaseEditorOpenStyleDialog MXDHANDLE  dhandle,
Widget  parent,
UINT32  flags
 

Open style dialog.

int MxdDatabaseEditorOpenTableWindow MXDHANDLE  dhandle,
INT32  table,
UINT32  flags
 

Open a database table window.

Most flags are only used by tabular view mode. Valid flags are:

  • DBVIEW_TabularView Bring window up in Tabular view mode (default is single record view)
  • DBVIEW_ViewActive View Active element's records
  • DBVIEW_ViewSelected View records attached to all selected elements
  • DBVIEW_ViewAll View all records
  • DBVIEW_NoChangeViewMode Don't let user change active/selected/all mode
  • DBVIEW_NoSingleRecordView Don't let user change single record/tabular view mode
  • DBVIEW_NoRecordSelection
  • DBVIEW_NoAttachmentIndicator
  • DBVIEW_NoRowControls The two flags above OR'd together
  • DBVIEW_NoNewRecord
  • DBVIEW_NoDropTable
  • DBVIEW_NoEditDefn

int MxdDatabaseEditorOpenTabularView MXDHANDLE  dhandle,
INT32  table,
UINT32  flags
 

Open tabluar view in database editor.

int MxdDatabaseEditorRefreshActiveElementAttachments MXDHANDLE  dhandle,
UINT32  flags
 

Refresh the active element attachments.

int MxdDatabaseEditorRefreshAttachments MXDHANDLE  dhandle,
UINT32  flags
 

Make the database editor figure out what's attached again.

Mostly obsolete. Now everything is done by callbacks and it knows to update automatically. However, if you're doing a lot of changes, it's a good idea to call MxdDatabaseEditorSuspendUpdates() and MxdDatabaseEditorResumeUpdates().

Flags:

  • MxdDATABASE_DontUpdateDialogs
Parameters:
dhandle  Handle created by MxdDatabaseEditorCreate()

int MxdDatabaseEditorRelate MXDHANDLE  dhandle,
UINT32  flags
 

Open the database relationship (tree view) editor.

Parameters:
dhandle  XXX Should be a DBEDIT*
flags  MxdFLAGs

void MxdDatabaseEditorRemoveCallback MXDHANDLE  dhandle,
void(*  func)(MxdDatabaseEditorCallbackStruct *, void *),
void *  data,
UINT32  reason
 

Remove a callback.

int MxdDatabaseEditorResumeUpdates MXDHANDLE  dhandle,
UINT32  flags
 

Resume updating dialogs.

Parameters:
dhandle  Dialog handle
flags  Flags

int MxdDatabaseEditorSetActiveElement MXDHANDLE  dhandle,
INT32  table,
INT32  element,
ELEMTYPE  elemtype,
UINT32  flags
 

View records attached to a given element.

This function is used to change the "Active" element without changing the selected element list. Flags:

  • MxdDATABASE_DontUpdateDialogs Don't update table dialogs
Parameters:
dhandle  Handle created by MxdDatabaseEditorCreate()
element  Element number to view records for
elemtype  ELEMTYPE_Xxxx
flags  Flags

int MxdDatabaseEditorSetElement MXDHANDLE  dhandle,
INT32  element,
ELEMTYPE  elemtype
 

View records attached to a given element.

Returns:
Error code if < 0, 1 if dialog open, 0 if dialog not open.
This function causes the database editor to look up the records attached and related to the selected element and update the open database windows accordingly. To set multiple elements, (for a multi-select tool), call MxdDatabaseEditorMultiSelectStart(), then call MxdDatabaseEditorSetElement() once for each element, then call MxdDatabaseEditorMultiSelectEnd().
Parameters:
dhandle  Handle created by MxdDatabaseEditorCreate()
element  Element number to view records for
elemtype  ELEMTYPE_Xxxx

int MxdDatabaseEditorSetElementsExt MXDHANDLE  dhandle,
ELEMTYPE  ElemType,
INT32  table,
UINT8 bits,
INT32  NumElements,
INT32  ActiveElement,
UINT32  flags
 

Set multiple elements for the database editor.

Flags:

  • MxdDATABASE_DontUpdateDialogs Don't update table dialogs
Parameters:
dhandle  Handle created by MxdDatabaseEditorCreate()
ElemType  ELEMTYPE_Xxxx
bits  Bit array of selected elements
NumElements  Size of "Bits" array
ActiveElement  The "Active" element number
flags  Flags

void MxdDatabaseEditorSetParent MXDHANDLE  dhandle,
Widget  widget
 

Set parent for database editor.

int MxdDatabaseEditorSetRecord MXDHANDLE  dhandle,
int  table,
INT32  record
 

Set the current element for pin-mapping.

This function is the same as MxdDatabaseEditorSetElement, but is used for pin-mapping. Table is the main table that controls the display.

int MxdDatabaseEditorSetStyleNumber MXDHANDLE  dhandle,
int  StyleNum,
int  RecNum,
UINT32  flags
 

Set style handle for the database editor.

int MxdDatabaseEditorSetStyleObject MXDHANDLE  dhandle,
const UNICODE fname,
INT32  inode,
int  styletable,
void *  dftstyle
 

Set style object for the database editor.

Parameters:
dhandle  Dialog handle
fname  Style object filename
inode  Style object inode
styletable  Active Style Assignment Table
dftstyle  Default style (POINTSTYLE/LINESTYLE/POLYSTYLE)

int MxdDatabaseEditorSuspendUpdates MXDHANDLE  dhandle,
UINT32  flags
 

Stop updating dialogs.

This is useful if you're going to be modifing the database over and over.

Parameters:
dhandle  Dialog handle
flags  Flags

int MxdDatabaseEditorTableIsOpen MXDHANDLE  dhandle,
int  TableNum
 

Check to see if a table is open.

Returns a non-zero value if the table is open. Don't assume it returns 1 or 0. Some day, it may be changed to return a value telling what mode (Single Record or Tabular View)

int MxdDatabaseEditorUnsetElement MXDHANDLE  dhandle,
INT32  element,
int  otype
 

Inform the database editor that element is unselected.

This function has the opposite effect as MxdDatabaseEditorSetElement(). It removes the specified element from the list of selected elements. It's meant to be called in a multi-selection situation only.

Parameters:
otype  ELEMTYPE_Xxxx

int MxdDatabaseEditorUpdateDialogs MXDHANDLE  dhandle  ) 
 

Update the database editor dialogs.


Generated on Tue Dec 14 13:20:26 2004 for TNTsdk by  doxygen 1.3.8-20040913