Manager for user interface windows associated with databases and tables. More...
#include <mi32/dbedit.h>
Manager for user interface windows associated with databases and tables.
| enum DBEDIT::CREATEFLAGS |
| enum DBEDIT::LABELCOLOR |
| enum DBEDIT::VIEWFLAGS |
Flags for database table viewer.
| DBEDIT::DBEDIT | ( | ) |
Constructor.
Use Create() after construction to complete setup.
| DBEDIT::~DBEDIT | ( | ) |
Destructor.
| ERRVALUE DBEDIT::CallbackAdd | ( | void(*)(const DBEDIT_MSG *, void *) | func, | |
| void * | data, | |||
| DBEDIT_MSG::REASON | reason | |||
| ) |
Add a callback.
| void DBEDIT::CallbackRemove | ( | void(*)(const DBEDIT_MSG *, void *) | func, | |
| void * | data, | |||
| DBEDIT_MSG::REASON | reason | |||
| ) |
Remove a callback.
| void DBEDIT::CallCallbacks | ( | DBEDIT_MSG & | cbs | ) |
Call callbacks.
This should be private. Only used by friend classes.
| bool DBEDIT::CanMakeTableImplied | ( | ) | const |
Determine if allowed to make implied one-to-one table.
| int DBEDIT::Close | ( | ) |
Close everything, but don't destroy anything.
| int DBEDIT::Create | ( | MDLGPARENT | parent, | |
| const RVC::OBJITEM & | ParentObjItem, | |||
| ELEMTYPE | elemtype, | |||
| CREATEFLAGS | flags = CREATEFLAG_None, |
|||
| const RVC::CREDENTIALS * | Credentials = 0 | |||
| ) |
Setup database editor manager with associated database.
| elemtype | Element type of the database to open (ELEMTYPE_Record if pinode is of an OTYPE_DBASE) |
| void DBEDIT::DBCallbackResume | ( | bool | ReallyIgnore, | |
| bool | Totally = false | |||
| ) |
Resume database callback handling.
If any callbacks happened while suspended (and we're not still suspended) they will be processed.
| Totally | If true, throw out everything - Use with caution |
| void DBEDIT::DBCallbackSuspend | ( | bool | ReallyIgnore, | |
| bool | Totally = false | |||
| ) |
Suspend database callbacks.
Unless ReallyIgnore is set, callbacks which happen while suspended will be queued and processed when resumed. Suspend/Resumes are refcounted.
| Totally | If true, throw out everything - Use with caution |
| static RVC::UI::DLG_DB_BASE* DBEDIT::DlgConstructTabularView | ( | DBEDIT_TINSTANCE * | idata | ) | [static] |
| int DBEDIT::Flush | ( | ) |
Force all unwritten records to be written.
| int DBEDIT::FormClose | ( | const RVC::OBJITEM & | ObjItem | ) |
Close a form.
| int DBEDIT::FormDrop | ( | MDLGPARENT | dlgparent, | |
| const RVC::OBJITEM & | ObjItem | |||
| ) |
Delete a form.
| dlgparent | Parent for "Are you sure" dialog |
| int DBEDIT::FormNew | ( | MDLGPARENT | dlgparent, | |
| VIEWFLAGS | flags = VIEWFLAG_None, |
|||
| const RVC::CREDENTIALS * | Credentials = 0 | |||
| ) |
Create a new, blank form.
| dlgparent | Parent for dialogs |
| int DBEDIT::FormOpen | ( | const RVC::OBJITEM & | ObjItem, | |
| VIEWFLAGS | flags = VIEWFLAG_None, |
|||
| const RVC::CREDENTIALS * | Credentials = 0 | |||
| ) |
Open a form.
| ERRVALUE DBEDIT::GenViewCreate | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| INT32 | TableNum, | |||
| RVC::UI::FORM_DB_RECORD ** | ppFormRet = 0, |
|||
| DBEDIT::VIEWFLAGS | flags = VIEWFLAG_None | |||
| ) |
Create a generic single record view form for a given table.
| ParentPane | Parent form form | |
| TableNum | Table number to create view for | |
| ppFormRet | Pointer to form returned |
| INT32 DBEDIT::GetActiveElement | ( | ) | const [inline] |
Get the active element number.
| INT32 DBEDIT::GetBaseTableNum | ( | ) | const [inline] |
| CREATEFLAGS DBEDIT::GetCreateFlags | ( | ) | const [inline] |
| const RVC::CREDENTIALS* DBEDIT::GetCredentials | ( | ) | const [inline] |
| RVC::DBASE_ELEMENT* DBEDIT::GetDBase | ( | ) | const [inline] |
| RVC::DBASE::OBSERVER* DBEDIT::GetDBRelateHandle | ( | ) | const [inline] |
Used by database relationships dialog to make sure there's only one instance of itself.
| MISTRING DBEDIT::GetDisplayPath | ( | ) | const |
Get display path string for database.
String will be of the form [ObjectName] / [DatabaseName] or [ObjectName].
| MDLGPARENT DBEDIT::GetDlgParent | ( | ) | const [inline] |
Get parent for dialogs managed by DBEDIT instance.
| const LONGLIST& DBEDIT::GetElemList | ( | ) | const [inline] |
Get element list.
| ELEMTYPE DBEDIT::GetElemType | ( | ) | const [inline] |
Get element type for this database.
| void DBEDIT::GetLabelColor | ( | LABELCOLOR | colornum, | |
| COLOR & | color | |||
| ) |
Get the color to use for a label given a DBEDIT::LABELCOLOR.
| void DBEDIT::GetLabelColorFromFlags | ( | RVC::DBTABLE::FIELDINFO::FLAGS | fieldflags, | |
| COLOR & | color | |||
| ) |
Get the color to use for a label from the DBFIELDINFO.flags.
| int DBEDIT::GetNumOpen | ( | ) |
Get the number of tables open.
| const RVC::OBJITEM& DBEDIT::GetObjItem | ( | ) | const [inline] |
Get the OBJITEM of the actual database.
| MDLGPARENT DBEDIT::GetParent | ( | ) | const [inline] |
Get the widget used as a parent for any dialogs we create.
| const RVC::OBJITEM& DBEDIT::GetParentObjItem | ( | ) | const [inline] |
Get the OBJITEM passed to create.
This is usually the OBJITEM of the parent except for main level databases, in which case it's the database's OBJITEM
| bool DBEDIT::GetStyleObject | ( | RVC::STYLE & | StyleObj | ) |
Open the style object associated with a database.
This is for use by DBEDIT_TDATA only (?).
| DBEDIT_TDATA* DBEDIT::GetTableData | ( | int | table | ) | const [inline] |
Get the DBEDIT_TDATA for a given table.
| table | Get internal table data |
Returns the instance handle for a given table and open mode.
Will create one unless passed the flag DBVIEW_NoCreateIfNotExist.
| TableNum | Table number to look for | |
| flags | DBVIEW_TabularView or 0 |
| bool DBEDIT::HasCallbacks | ( | UINT32 | reason | ) | const [inline] |
| bool DBEDIT::IsCreated | ( | ) | const [inline] |
Determine if Create() has been done yet.
| bool DBEDIT::IsFormOpen | ( | const RVC::OBJITEM & | ObjItemForm | ) |
Determine if form is open.
| int DBEDIT::IsMainLevel | ( | ) | const [inline] |
Returns true if this database is not under a vector or anything.
| int DBEDIT::IsPinMapping | ( | ) | const [inline] |
Returns true if the database is being used for pin-mapping.
i.e., we've called SetRecord or SetElement with an ELEMTYPE of ELEMTYPE_Record.
| int DBEDIT::IsTableOpen | ( | int | TableNum | ) |
Returns 1 if the requested table is open in some way.
| TableNum | Table to check for |
| int DBEDIT::ModalSingleRecordView | ( | INT32 | TableNum, | |
| INT32 | RecordNum, | |||
| RVC::DBTABLE::RECORD * | InitVal, | |||
| MDLGPARENT | dlgparent, | |||
| UINT32 | flags = 0 | |||
| ) |
Open a table in single record view as a modal dialog.
| TableNum | Table number to open | |
| RecordNum | Record to edit (or RECORD_New) | |
| InitVal | Initial record values (can be null) | |
| dlgparent | Parent to use for dialog | |
| flags | Not used |
| int DBEDIT::MultiSelectAddElement | ( | INT32 | ElemNum | ) |
Add an element to the multi-Select list.
| ElemNum | Element number or ELEMENTNUM_None |
| ERRVALUE DBEDIT::MultiSelectEnd | ( | bool | UpdateDialogs = true |
) |
Finish a multiple element selection.
| int DBEDIT::MultiSelectRemoveElement | ( | INT32 | ElemNum | ) |
Remove an element from the multi-Select list.
| ElemNum | Element to remove from the selected element set |
| ERRVALUE DBEDIT::MultiSelectStart | ( | int | BaseTable = 0 |
) |
Start adding elements to the element list, clearing previous list.
SetElements() is the prefered method, but isn't well suited to CAD. Call MultiSelectStart, MultiSelectAddElement as many times as you need, then MultiSelectEnd.
| BaseTable | Only needed if for ELEMTYPE_Record |
| void DBEDIT::OnEvent | ( | const DBEDIT::EVENT & | event, | |
| bool | bDeferable = true | |||
| ) |
Open a tree view showing table relationships.
Currently only defined for X
| flags | Old MxdFLAG_Flags |
| int DBEDIT::RefreshActiveElementAttachments | ( | bool | UpdateDialogs = true |
) |
Notify the database editor that attachments to active element may have changed.
(Should be unnecessary now that we have database callbacks to deal with all this, but you can totally suspend the callbacks).
Set the "active" element.
| ElemNum | Element number or ELEMENTNUM_None | |
| BaseTable | Table to use if this is ELEMTYPE_RECORD |
| void DBEDIT::SetBaseTable | ( | int | table | ) |
Set the base table number for PinMapping.
| table | Table number to use |
| void DBEDIT::SetDBRelateHandle | ( | RVC::DBASE::OBSERVER * | handle | ) | [inline] |
Used by database relationships dialog to make sure there's only one instance of itself.
| ERRVALUE DBEDIT::SetElements | ( | INT32 | BaseTable, | |
| const UNSIGNEDSET & | ElemSet, | |||
| ELEMNUM | ActiveElemNum | |||
| ) |
Set the list of selected elements using a bit array.
| BaseTable | Base table number | |
| ElemSet | Selected elements | |
| ActiveElemNum | Active element number |
| void DBEDIT::SetParent | ( | MDLGPARENT | parent | ) | [inline] |
Set widget to use as parent for all dialogs.
| parent | Widget to use as a parent |
| int DBEDIT::SetStyleNumber | ( | int | StyleNum, | |
| int | RecNum | |||
| ) |
Set the style number to edit in the style editor dialog.
Also remembers internally which record this was for. Returns without doing anything if style editor isn't open.
| StyleNum | Style number to edit | |
| RecNum | Record number in Style Assignment Table |
| int DBEDIT::SetStyleObject | ( | const RVC::OBJITEM & | StyleObjItem, | |
| const RVC::OBJECTNAME & | StyleTableName, | |||
| const void * | dftstyle | |||
| ) |
Set the style object to use for style samples.
| StyleObjItem | Style object to use | |
| StyleTableName | Name of style table | |
| dftstyle | Default style appropriate to the database type |
| static void DBEDIT::SML_Install | ( | SML::CONTEXT * | context | ) | [static] |
Install SML interface.
| int DBEDIT::StyleDialogClose | ( | ) |
Close the style dialog.
Actually does nothing.
| int DBEDIT::StyleDialogOpen | ( | MDLGPARENT | parent | ) |
Open the style editor dialog.
| parent | Parent for the dialog |
| int DBEDIT::TableClose | ( | INT32 | TableNum | ) |
Close all instances of a given table.
| TableNum | Table number to close (all instances) |
| int DBEDIT::TableCreate | ( | MDLGPARENT | parent | ) |
This uses a wizard to walk the user through the first few steps of creating a table.
| parent | Parent for dialogs |
| int DBEDIT::TableCreate | ( | MDLGPARENT | parent, | |
| const RVC::DBTABLE::MAKEPARMS & | MakeParms, | |||
| const RVC::DESCRIPTOR * | Descriptor = 0 | |||
| ) |
Popup a table creation dialog.
This pops up the "New Table" dialog to let the user design a new table.
The MakeParms will be used for defaults.
| parent | Parent for dialogs | |
| MakeParms | Defaults for new table | |
| Descriptor | Initial descriptor (can be 0 if no default name) |
| static ERRVALUE DBEDIT::TableCreateDefinition | ( | MDLGPARENT | parent, | |
| RVC::OBJTYPE | DBaseObjType, | |||
| RVC::DBTABLE::MAKEPARMS & | MakeParms, | |||
| RVC::DESCRIPTOR & | Descriptor | |||
| ) | [static] |
Popup a table creation dialog.
This pops up the "New Table" dialog to let the user design a new table.
| MakeParms | Filled in MakeParms, RETURNED | |
| Descriptor | Filled in Descriptor, RETURNED |
| int DBEDIT::TableDestroy | ( | int | TableNum | ) |
Destroy table instance (just the dialog, not the underlying table).
| TableNum | Table number to destroy |
| int DBEDIT::TableDrop | ( | MDLGPARENT | parent, | |
| int | TableNum | |||
| ) |
Drop (delete) a table.
| parent | Parent for "Are you sure" dialog | |
| TableNum | Table number to drop |
| ERRVALUE DBEDIT::TableEditACL | ( | MDLGPARENT | parent, | |
| int | TableNum | |||
| ) |
popup a dialog to allow the user to edit the table's Access Control List
| parent | Parent for "Are you sure" dialog | |
| TableNum | Table number to drop |
| int DBEDIT::TableEditDefinition | ( | MDLGPARENT | parent, | |
| int | TableNum | |||
| ) |
popup a dialog to allow the user to edit the table's definition.
| parent | Parent for "Are you sure" dialog | |
| TableNum | Table number to drop |
Open a table window in DBVIEW_TabularView mode or (default) Single Record View.
| TableNum | Table number to open | |
| flags | flags |
| int DBEDIT::UpdateDialogs | ( | ) |
Force all open table windows to update.
| int DBEDIT::UpdateResume | ( | ) |
Similar to DBCallbackResume, but if resuming (it's refcounted so may these can be nested), this will check to see if we think we need to update everything and do so.
In a perfect world, this should never be the case. CallbackResume will handle it all for us.
| void DBEDIT::UpdateSuspend | ( | ) |
Just calls DBCallbackSuspend().
1.6.1