home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************\
-
- (c) 1995-1996, ProtoView Development Co., All rights reserved
- \***************************************************************************/
-
- //============================================================================
- //
- // Borland C++ Class Library for the IDO Custom Control
- //
- //============================================================================
-
- #ifndef __IDOOWL_H__
- #define __IDOOWL_H__
-
- //============================================================================
-
- #if !defined(__OWL_CONTROL_H)
- #include <owl\control.h>
- #endif
- #if !defined(__CLASSLIB_ARRAYS_H)
- #include <classlib\arrays.h>
- #endif
-
- #include "pvido.h"
-
- #ifndef EXPORT
- #ifdef __DLL__
- #define EXPORT _export
- #else
- #define EXPORT huge
- #endif
- #endif
-
- class TIDO;
- class TEntity;
- class TRelation;
- class TIDORule;
-
- //============================================================================
- // IDO Rule Class Definition
- class TIDORule
- {
-
-
- //******* Constructors *******
- public:
-
- TIDORule ()
- {
- lstrcpy(m_rule.E1, "");
- lstrcpy(m_rule.R1, "");
- lstrcpy(m_rule.E2, "");
- m_rule.MaxCount = 0;
- }
- TIDORule (LPIDO_RULE lpRule)
- {
- lstrcpy(m_rule.E1, lpRule->E1);
- lstrcpy(m_rule.R1, lpRule->R1);
- lstrcpy(m_rule.E2, lpRule->E2);
- m_rule.MaxCount = lpRule->MaxCount;
- }
-
-
- //******* Destructors *******
- public:
-
- virtual ~TIDORule()
- {
- ;
- }
-
-
- //******* Public Data Members *******
- public :
-
- IDO_RULE m_rule;
-
-
- //******* Public Member Functions *******
- public :
-
- LPCSTR DestinationEntityClassName()
- {
- return (LPCSTR)idoRuleDestinationEntityClassName(&m_rule);
- }
-
- LPCSTR SourceEntityClassName()
- {
- return (LPCSTR)idoRuleSourceEntityClassName(&m_rule);
- }
-
- LPCSTR RelationClassName()
- {
- return (LPCSTR)idoRuleRelationClassName(&m_rule);
- }
-
- };
-
-
- //============================================================================
- // Entity Class Definition
- class TEntity
- {
- friend class TIDO;
- friend class TRelation;
-
-
- //******* Constructors *******
- public:
-
- TEntity ()
- {
- m_entity.id = 0L;
- lstrcpy(m_entity.name, "");
- m_entity.hIDO = 0;
- }
- TEntity (TWindow *pIDO, int UserID, LPCSTR lpszUserName)
- {
- m_entity.id = UserID;
- lstrcpy(m_entity.name, lpszUserName);
- m_entity.hIDO = pIDO->HWindow;
- }
- TEntity (LPENTITY lpEnt)
- {
- m_entity.id = lpEnt->id;
- lstrcpy(m_entity.name, lpEnt->name);
- lstrcpy(m_entity.classname, lpEnt->classname);
- m_entity.hIDO = lpEnt->hIDO;
- }
-
-
- //******* Destructors *******
- virtual ~TEntity()
- {
- ;
- }
-
-
- //******* Public Data Members *******
- public :
-
- ENTITY m_entity;
-
-
- //******* Public Member Functions *******
- void SetUserData(LPVOID lpData)
- {
- idoEntitySetUserData(&m_entity, lpData);
- }
- LPVOID GetUserData()
- {
- return idoEntityGetUserData(&m_entity);
- }
-
- void SetBackColor(COLORREF clrVal)
- {
- idoEntitySetBackColor(&m_entity, clrVal);
- }
- COLORREF GetBackColor()
- {
- return idoEntityGetBackColor(&m_entity);
- }
-
- void SetInetUrl(LPCSTR lpszText)
- {
- idoEntitySetInetUrl(&m_entity, lpszText);
- }
- LPCSTR GetInetUrl()
- {
- return idoEntityGetInetUrl(&m_entity);
- }
- void SetInetHost(INET_HOST Host)
- {
- idoEntitySetInetHost(&m_entity, Host);
- }
- INET_HOST GetInetHost()
- {
- return idoEntityGetInetHost(&m_entity);
- }
-
- void SetTextColor(COLORREF clrVal)
- {
- idoEntitySetTextColor(&m_entity, clrVal);
- }
- COLORREF GetTextColor()
- {
- return idoEntityGetTextColor(&m_entity);
- }
-
- void SetText(LPCSTR lpszText)
- {
- idoEntitySetText(&m_entity, lpszText);
- }
- LPCSTR GetText()
- {
- return idoEntityGetText(&m_entity);
- }
-
- int GetTop()
- {
- return idoEntityGetTop(&m_entity);
- }
- void SetTop(int cVal)
- {
- idoEntitySetTop(&m_entity, cVal);
- }
- int GetBottom()
- {
- return idoEntityGetBottom(&m_entity);
- }
- void SetBottom(int cVal)
- {
- idoEntitySetBottom(&m_entity, cVal);
- }
- int GetLeft()
- {
- return idoEntityGetLeft(&m_entity);
- }
- void SetLeft(int cVal)
- {
- idoEntitySetLeft(&m_entity, cVal);
- }
- int GetRight()
- {
- return idoEntityGetRight(&m_entity);
- }
- void SetRight(int cVal)
- {
- idoEntitySetRight(&m_entity, cVal);
- }
- int GetRect(LPRECT lpRect)
- {
- return idoEntityGetRect(&m_entity, lpRect);
- }
- void SetRect(LPRECT lpRect)
- {
- idoEntitySetRect(&m_entity, lpRect);
- }
-
- void SetCoordX(int cVal)
- {
- idoEntitySetCoordX(&m_entity, cVal);
- }
- int GetCoordX()
- {
- return idoEntityGetCoordX(&m_entity);
- }
- void SetCoordY(int cVal)
- {
- idoEntitySetCoordY(&m_entity, cVal);
- }
- int GetCoordY()
- {
- return idoEntityGetCoordY(&m_entity);
- }
-
- void SetShape(ENTITYSHAPE cVal)
- {
- idoEntitySetShape(&m_entity, cVal);
- }
- ENTITYSHAPE GetShape()
- {
- return idoEntityGetShape(&m_entity);
- }
-
- void SetFrame(THREE_D_STYLE cVal)
- {
- idoEntitySetFrame(&m_entity, cVal);
- }
- THREE_D_STYLE GetFrame()
- {
- return idoEntityGetFrame(&m_entity);
- }
-
- void SetSelect(BOOL bVal)
- {
- idoEntitySetSelect(&m_entity, bVal);
- }
- BOOL GetSelect()
- {
- return (BOOL)idoEntityGetSelect(&m_entity);
- }
-
- void SetBorder(BOOL bVal)
- {
- idoEntitySetBorder(&m_entity, bVal);
- }
- BOOL GetBorder()
- {
- return (BOOL)idoEntityGetBorder(&m_entity);
- }
-
- void SetContainer(long lVal)
- {
- idoEntitySetContainer(&m_entity, lVal);
- }
- long GetContainer()
- {
- return idoEntityGetContainer(&m_entity);
- }
-
- void SetGraphic(LPCSTR lpszVal)
- {
- idoEntitySetGraphic(&m_entity, lpszVal);
- }
- LPCSTR GetGraphic()
- {
- return idoEntityGetGraphic(&m_entity);
- }
-
- void SetTextOrientation(TEXTPOSSTYLE cVal)
- {
- idoEntitySetTextOrientation(&m_entity, cVal);
- }
- TEXTPOSSTYLE GetTextOrientation()
- {
- return idoEntityGetTextOrientation(&m_entity);
- }
-
- void SetFont(LPIDO_FONT lpFont)
- {
- idoEntitySetFont(&m_entity, lpFont);
- }
- LPIDO_FONT GetFont()
- {
- return idoEntityGetFont(&m_entity);
- }
-
- BOOL GetValidRelationDragSource()
- {
- return idoEntityGetValidRelationDragSource(&m_entity);
- }
- void SetValidRelationDragSource(BOOL bVal)
- {
- idoEntitySetValidRelationDragSource(&m_entity, bVal);
- }
-
- BOOL GetCanResize()
- {
- return idoEntityGetCanResize(&m_entity);
- }
- void SetCanResize(BOOL bVal)
- {
- idoEntitySetCanResize(&m_entity, bVal);
- }
-
- BOOL GetCanMove()
- {
- return idoEntityGetCanMove(&m_entity);
- }
- void SetCanMove(BOOL bVal)
- {
- idoEntitySetCanMove(&m_entity, bVal);
- }
-
- BOOL GetCanDelete()
- {
- return idoEntityGetCanDelete(&m_entity);
- }
- void SetCanDelete(BOOL bVal)
- {
- idoEntitySetCanDelete(&m_entity, bVal);
- }
-
- BOOL GetReadOnly()
- {
- return idoEntityGetReadOnly(&m_entity);
- }
- void SetReadOnly(BOOL bVal)
- {
- idoEntitySetReadOnly(&m_entity, bVal);
- }
-
- BOOL GetAutoResize()
- {
- return idoEntityGetAutoResize(&m_entity);
- }
- void SetAutoResize(BOOL bVal)
- {
- idoEntitySetAutoResize(&m_entity, bVal);
- }
-
- BOOL GetStretchBitmap()
- {
- return idoEntityGetStretchBitmap(&m_entity);
- }
- void SetStretchBitmap(BOOL bVal)
- {
- idoEntitySetStretchBitmap(&m_entity, bVal);
- }
-
- BOOL GetTransparent()
- {
- return idoEntityGetTransparent(&m_entity);
- }
- void SetTransparent(BOOL bVal)
- {
- idoEntitySetTransparent(&m_entity, bVal);
- }
-
-
- //******* Explicit inline Public Member Functions *******
- public :
-
- BOOL IterateRelationInNext(LPRELATION lpRel);
- BOOL IterateRelationInNext(TRelation * lpRel);
- TRelation * IterateRelationInNext();
-
- BOOL IterateRelationOutNext(LPRELATION lpRel);
- BOOL IterateRelationOutNext(TRelation * lpRel);
- TRelation * IterateRelationOutNext();
-
- BOOL IterateContainedEntityNext(LPENTITY lpEnt);
- BOOL IterateContainedEntityNext(TEntity * lpEnt);
- TEntity * IterateContainedEntityNext();
-
-
- //******* Public Member Functions *******
- long GetUserID()
- {
- return m_entity.id;
- }
- LPCSTR GetUserName()
- {
- return (LPCSTR)m_entity.name;
- }
- LPCSTR GetClassName()
- {
- return (LPCSTR)m_entity.classname;
- }
-
- long GetRelationInCount()
- {
- return idoEntityGetRelationInCount(&m_entity);
- }
- BOOL IterateRelationInFirst()
- {
- return idoEntityIterateRelationInFirst(&m_entity);
- }
-
- long GetRelationOutCount()
- {
- return idoEntityGetRelationOutCount(&m_entity);
- }
- BOOL IterateRelationOutFirst()
- {
- return idoEntityIterateRelationOutFirst(&m_entity);
- }
-
- long GetContainedEntityCount()
- {
- return idoEntityGetContainedEntityCount(&m_entity);
- }
- BOOL IterateContainedEntityFirst()
- {
- return idoEntityIterateContainedEntityFirst(&m_entity);
- }
- BOOL AddEntityToContainer(TEntity * lpTEntity)
- {
- if(!lpTEntity)
- return FALSE;
- return idoEntityAddEntityToContainer(&m_entity, &(lpTEntity->m_entity));
- }
- BOOL RemoveEntityFromContainer(TEntity * lpTEntity)
- {
- if(!lpTEntity)
- return FALSE;
- return idoEntityRemoveEntityFromContainer(&m_entity, &(lpTEntity->m_entity));
- }
-
- BOOL Delete()
- {
- return (BOOL)idoEntityDelete(&m_entity);
- }
-
- BOOL Repaint()
- {
- return idoEntityRepaint(&m_entity);
- }
-
- BOOL BringIntoView()
- {
- return idoEntityBringIntoView(&m_entity);
- }
-
- void PropertyPage(int cVal)
- {
- idoEntityPropertyPage(&m_entity, cVal);
- }
-
- };
-
-
- //============================================================================
- // Relation Class Definition
- class TRelation
- {
- friend class TIDO;
- friend class TEntity;
-
-
- //******* Constructors *******
- public:
-
- TRelation ()
- {
- m_relation.id = 0L;
- lstrcpy(m_relation.name, "");
- m_relation.hIDO = 0;
- }
- TRelation (TWindow *pIDO, int UserID, LPCSTR lpszUserName)
- {
- m_relation.id = UserID;
- lstrcpy(m_relation.name, lpszUserName);
- m_relation.hIDO = pIDO->HWindow;
- }
- TRelation (LPRELATION lpRel)
- {
- m_relation.id = lpRel->id;
- lstrcpy(m_relation.name, lpRel->name);
- lstrcpy(m_relation.classname, lpRel->classname);
- m_relation.hIDO = lpRel->hIDO;
- }
-
-
- //******* Destructors *******
- virtual
- ~TRelation()
- {
- ;
- }
-
-
- //******* Public Data Members *******
- public :
-
- RELATION m_relation;
-
-
-
- //******* Public Member Functions *******
- public :
-
- void SetUserData(LPVOID lpData)
- {
- idoRelationSetUserData(&m_relation, lpData);
- }
- LPVOID GetUserData()
- {
- return idoRelationGetUserData(&m_relation);
- }
-
- void SetBackColor(COLORREF clrVal)
- {
- idoRelationSetBackColor(&m_relation, clrVal);
- }
- COLORREF GetBackColor()
- {
- return idoRelationGetBackColor(&m_relation);
- }
-
- void SetTextColor(COLORREF clrVal)
- {
- idoRelationSetTextColor(&m_relation, clrVal);
- }
- COLORREF GetTextColor()
- {
- return idoRelationGetTextColor(&m_relation);
- }
-
- void SetText(LPCSTR lpszText)
- {
- idoRelationSetText(&m_relation, lpszText);
- }
- LPCSTR GetText()
- {
- return idoRelationGetText(&m_relation);
- }
-
- void SetSourceArrow(ARROWSTYLE cVal)
- {
- idoRelationSetSourceArrow(&m_relation, cVal);
- }
- ARROWSTYLE GetSourceArrow()
- {
- return idoRelationGetSourceArrow(&m_relation);
- }
-
- void SetDestinationArrow(ARROWSTYLE cVal)
- {
- idoRelationSetDestinationArrow(&m_relation, cVal);
- }
- ARROWSTYLE GetDestinationArrow()
- {
- return idoRelationGetDestinationArrow(&m_relation);
- }
-
- void SetType(LINESTYLE cVal)
- {
- idoRelationSetType(&m_relation, cVal);
- }
- LINESTYLE GetType()
- {
- return idoRelationGetType(&m_relation);
- }
-
- void SetThickness(long lVal)
- {
- idoRelationSetThickness(&m_relation, lVal);
- }
- long GetThickness()
- {
- return idoRelationGetThickness(&m_relation);
- }
-
- void SetFont(LPIDO_FONT lpFont)
- {
- idoRelationSetFont(&m_relation, lpFont);
- }
- LPIDO_FONT GetFont()
- {
- return idoRelationGetFont(&m_relation);
- }
-
- BOOL GetReadOnly()
- {
- return idoRelationGetReadOnly(&m_relation);
- }
- void SetReadOnly(LPRELATION, BOOL bVal)
- {
- idoRelationSetReadOnly(&m_relation, bVal);
- }
-
- BOOL GetCanDelete()
- {
- return idoRelationGetCanDelete(&m_relation);
- }
- void SetCanDelete(BOOL bVal)
- {
- idoRelationSetCanDelete(&m_relation, bVal);
- }
-
- BOOL GetCanMoveEndPoints()
- {
- return idoRelationGetCanMoveEndPoints(&m_relation);
- }
- void SetCanMoveEndPoints(BOOL bVal)
- {
- idoRelationSetCanMoveEndPoints(&m_relation, bVal);
- }
-
- BOOL GetCanMoveMidPoints()
- {
- return idoRelationGetCanMoveMidPoints(&m_relation);
- }
- void SetCanMoveMidPoints(BOOL bVal)
- {
- idoRelationSetCanMoveMidPoints(&m_relation, bVal);
- }
-
-
-
- //******* Explicit inline Public Member Functions *******
- public :
-
- BOOL SourceEntity(LPENTITY lpEnt);
- BOOL SourceEntity(TEntity * lpEnt);
- TEntity * SourceEntity();
-
- BOOL DestinationEntity(LPENTITY lpEnt);
- BOOL DestinationEntity(TEntity * lpEnt);
- TEntity * DestinationEntity();
-
-
- //******* Public Member Functions *******
- long GetUserID()
- {
- return m_relation.id;
- }
- LPCSTR GetUserName()
- {
- return (LPCSTR)m_relation.name;
- }
- LPCSTR GetClassName()
- {
- return (LPCSTR)m_relation.classname;
- }
-
- BOOL Repaint()
- {
- return idoRelationRepaint(&m_relation);
- }
-
- BOOL BringIntoView()
- {
- return idoRelationBringIntoView(&m_relation);
- }
-
- BOOL Delete()
- {
- return idoRelationDelete(&m_relation);
- }
-
- void PropertyPage(int cVal)
- {
- idoRelationPropertyPage(&m_relation, cVal);
- }
-
- };
-
-
- //============================================================================
- // IDO Class Definition
- class TIDO : public TControl
- {
- friend class TEntity;
- friend class TRelation;
-
-
- //******* Constructors *******
- public:
-
-
- TIDO::TIDO (TWindow * AParent, int AnId, int X, int Y, int W, int H, TModule * AModule)
- : TControl(AParent, AnId, NULL, X, Y, W, H, AModule)
- {
- EnableTransfer ();
- }
-
- TIDO::TIDO (TWindow * AParent, int ResourceId, TModule * AModule)
- : TControl (AParent, ResourceId, AModule)
- {
- EnableTransfer ();
- }
-
- //******* Destructors *******
- virtual
- ~TIDO()
- {
- ;
- }
-
- //******* Protected Member Functions *******
- protected:
-
- char far *
- GetClassName()
- {
- // Returns the MS Window's registered Class Name
- static char IDOClassName[30];
-
- #ifdef WIN32
- lstrcpy(IDOClassName, "pvIDO32");
- #else
- lstrcpy(IDOClassName, "pvIDO");
- #endif
-
- return IDOClassName;
- }
-
- virtual void
- GetWindowClass (WNDCLASS _FAR & AWndClass)
- {
- TControl::GetWindowClass (AWndClass);
- // not neaded since class should have already been registered
- }
-
- virtual bool
- Register (void)
- {
- // not needed since class should have already been registered
- return TRUE;
- }
-
- void
- EvHScroll(UINT scrollCode, UINT thumbPos, HWND hWndCtl)
- {
- DefaultProcessing();
- }
-
- void
- EvVScroll(UINT scrollCode, UINT thumbPos, HWND hWndCtl)
- {
- DefaultProcessing();
- }
-
-
- //******* Public Member Functions *******
- public:
-
- void SetModified(BOOL bVal)
- {
- idoSetModified(HWindow, bVal);
- }
- BOOL GetModified()
- {
- return idoGetModified(HWindow);
- }
-
- BOOL GetEditMode()
- {
- return idoGetEditMode(HWindow);
- }
- void SetEditMode(BOOL bVal)
- {
- idoSetEditMode(HWindow, bVal);
- }
-
- int GetGridHeight()
- {
- return idoGetGridHeight(HWindow);
- }
- void SetGridHeight(int cVal)
- {
- idoSetGridHeight(HWindow, cVal);
- }
-
- int GetGridWidth()
- {
- return idoGetGridWidth(HWindow);
- }
- void SetGridWidth(int cVal)
- {
- idoSetGridWidth(HWindow, cVal);
- }
-
- COLORREF GetGridLineColor()
- {
- return idoGetGridLineColor(HWindow);
- }
- void SetGridLineColor(COLORREF clrVal)
- {
- idoSetGridLineColor(HWindow, clrVal);
- }
-
- COLORREF GetBackColor()
- {
- return idoGetBackColor(HWindow);
- }
- void SetBackColor(COLORREF clrVal)
- {
- idoSetBackColor(HWindow, clrVal);
- }
-
- BOOL GetGridLines()
- {
- return idoGetGridLines(HWindow);
- }
- void SetGridLines(BOOL bVal)
- {
- idoSetGridLines(HWindow, bVal);
- }
-
- BOOL GetSnapToGrid()
- {
- return idoGetSnapToGrid(HWindow);
- }
- void SetSnapToGrid(BOOL bVal)
- {
- idoSetSnapToGrid(HWindow, bVal);
- }
-
- BOOL GetToolsPalette()
- {
- return idoGetToolsPalette(HWindow);
- }
- void SetToolsPalette(BOOL bVal)
- {
- idoSetToolsPalette(HWindow, bVal);
- }
-
- void SetToolsPaletteButtonText(LPCSTR lpText)
- {
- idoSetToolsPaletteButtonText(HWindow, lpText);
- }
-
- BOOL GetRulesEnforced()
- {
- return idoGetRulesEnforced(HWindow);
- }
- void SetRulesEnforced(BOOL bVal)
- {
- idoSetRulesEnforced(HWindow, bVal);
- }
-
- BOOL GetCurrentEntity(LPENTITY lpEnt)
- {
- return idoGetCurrentEntity(HWindow, lpEnt);
- }
- BOOL GetCurrentEntity(TEntity * lpEnt)
- {
- return idoGetCurrentEntity(HWindow, &(lpEnt->m_entity));
- }
- TEntity * GetCurrentEntity()
- {
- ENTITY entity;
- TEntity * lpEnt = NULL;
-
- if(idoGetCurrentEntity(HWindow, &entity))
- lpEnt = new TEntity(&entity);
-
- return lpEnt;
- }
-
- BOOL SetCurrentEntity(LPENTITY lpEnt)
- {
- return idoSetCurrentEntity(HWindow, lpEnt);
- }
- BOOL SetCurrentEntity(TEntity * lpEnt)
- {
- return idoSetCurrentEntity(HWindow, &(lpEnt->m_entity));
- }
-
- BOOL GetCurrentRelation(LPRELATION lpRel)
- {
- return idoGetCurrentRelation(HWindow, lpRel);
- }
- BOOL GetCurrentRelation(TRelation * lpRel)
- {
- return idoGetCurrentRelation(HWindow, &(lpRel->m_relation));
- }
- TRelation * GetCurrentRelation()
- {
- RELATION relation;
- TRelation * lpRel = NULL;
-
- if(idoGetCurrentRelation(HWindow, &relation))
- lpRel = new TRelation(&relation);
-
- return lpRel;
- }
-
- BOOL SetCurrentRelation(LPRELATION lpRel)
- {
- return idoSetCurrentRelation(HWindow, lpRel);
- }
- BOOL SetCurrentRelation(TRelation * lpRel)
- {
- return idoSetCurrentRelation(HWindow, &(lpRel->m_relation));
- }
-
- BOOL GetPopupMenu(long lVal)
- {
- return idoGetPopupMenu(HWindow, lVal);
- }
- void SetPopupMenu(long lVal, BOOL bVal)
- {
- idoSetPopupMenu(HWindow, lVal, bVal);
- }
-
- // conflicts with WINDOWSX.H
- // long idoGetWindowStyle()
- // {
- // return idoGetWindowStyle(HWindow);
- // }
- // void idoSetWindowStyle(long lVal)
- // {
- // idoSetWindowStyle(HWindow, lVal);
- // }
-
- BOOL GetBorder()
- {
- return idoGetBorder(HWindow);
- }
- void SetBorder(BOOL bVal)
- {
- idoSetBorder(HWindow, bVal);
- }
-
- BOOL GetPrinterLines()
- {
- return idoGetPrinterLines(HWindow);
- }
- void SetPrinterLines(BOOL bVal)
- {
- idoSetPrinterLines(HWindow, bVal);
- }
-
- BOOL GetPrinterLandscape()
- {
- return idoGetPrinterLandscape(HWindow);
- }
- void SetPrinterLandscape(BOOL bVal)
- {
- idoSetPrinterLandscape(HWindow, bVal);
- }
-
- long GetScrollBars()
- {
- return idoGetScrollBars(HWindow);
- }
- void SetScrollBars(long lVal)
- {
- idoSetScrollBars(HWindow, lVal);
- }
-
- BOOL GetRedraw()
- {
- return idoGetRedraw(HWindow);
- }
- void SetRedraw(BOOL bVal)
- {
- idoSetRedraw(HWindow, bVal);
- }
-
-
- LPCSTR GetInetPath()
- {
- return (LPCSTR)idoGetInetPath(HWindow);
- }
- void SetInetPath(LPCSTR lpPath)
- {
- idoSetInetPath(HWindow, (LPCSTR)lpPath);
- }
-
-
- short GetZoomValue()
- {
- return idoGetZoomValue(HWindow);
- }
- void SetZoomValue(short cVal)
- {
- idoSetZoomValue(HWindow, cVal);
- }
-
-
- //******* Public Member Functions *******
- void CancelAction()
- {
- idoCancelAction(HWindow);
- }
- void AllowAction()
- {
- idoAllowAction(HWindow);
- }
-
- BOOL DragAddEntity(LPCSTR lpszVal)
- {
- return idoDragAddEntity(HWindow, lpszVal);
- }
-
- BOOL AddEntityFromClass(long lID, LPSTR lpszName, LPSTR lpszClass, LPSTR lpszText, int cX, int cY, int cWidth, int cHeight)
- {
- return idoAddEntityFromClass(HWindow, lID, lpszName, lpszClass, lpszText, cX, cY, cWidth, cHeight);
- }
-
- BOOL DeleteEntity(LPENTITY lpEnt)
- {
- return idoDeleteEntity(HWindow, lpEnt);
- }
- BOOL DeleteEntity(TEntity * lpEnt)
- {
- return idoDeleteEntity(HWindow, &(lpEnt->m_entity));
- }
-
- BOOL DoesEntityExist(long lID, LPSTR lpszName)
- {
- return idoDoesEntityExist(HWindow, lID, lpszName);
- }
-
- long GetNumberOfSelectedEntities()
- {
- return idoGetNumberOfSelectedEntities(HWindow);
- }
- long GetNumberOfEntities()
- {
- return idoGetNumberOfEntities(HWindow);
- }
- long GetNumberOfRelations()
- {
- return idoGetNumberOfRelations(HWindow);
- }
-
- BOOL DragAddRelation(LPCSTR lpszVal)
- {
- return idoDragAddRelation(HWindow, lpszVal);
- }
-
- BOOL AddRelationFromClass(long lID, LPSTR lpszName, LPSTR lpszClass, LPSTR lpszText, long lsID, LPSTR lpszsName, long ldID, LPSTR lpszdName)
- {
- return idoAddRelationFromClass(HWindow, lID, lpszName, lpszClass, lpszText, lsID, lpszsName, ldID, lpszdName);
- }
-
- BOOL DeleteRelation(LPRELATION lpRel)
- {
- return idoDeleteRelation(HWindow, lpRel);
- }
- BOOL DeleteRelation(TRelation * lpRel)
- {
- return idoDeleteRelation(HWindow, &(lpRel->m_relation));
- }
-
- BOOL DoesRelationExist(long lID, LPSTR lpszName)
- {
- return idoDoesRelationExist(HWindow, lID, lpszName);
- }
-
- BOOL ReadDiagram(LPSTR lpszVal)
- {
- return idoReadDiagram(HWindow, lpszVal);
- }
-
- BOOL SaveDiagram(LPSTR lpszVal)
- {
- return idoSaveDiagram(HWindow, lpszVal);
- }
-
- void ResetDiagram()
- {
- idoResetDiagram(HWindow);
- }
- void ResetPalette()
- {
- idoResetPalette(HWindow);
- }
-
- LPCSTR GetFileName()
- {
- return (LPCSTR)idoGetFileName(HWindow);
- }
- void SetFileName(LPCSTR lpFileName)
- {
- idoSetFileName(HWindow, (LPCSTR)lpFileName);
- }
-
- long GetVersion()
- {
- return idoGetVersion(HWindow);
- }
-
- BOOL ReadPalette(LPSTR lpszVal)
- {
- return idoReadPalette(HWindow, lpszVal);
- }
-
- BOOL SavePalette(LPSTR lpszVal)
- {
- return idoSavePalette(HWindow, lpszVal);
- }
-
- void Zoom(int cVal, long lVal)
- {
- idoZoom(HWindow, cVal, lVal);
- }
-
- BOOL GetNotifyEntity(LPENTITY lpEnt)
- {
- return idoGetNotifyEntity(HWindow, lpEnt);
- }
- BOOL GetNotifyEntity(TEntity * lpEnt)
- {
- return idoGetNotifyEntity(HWindow, &(lpEnt->m_entity));
- }
- TEntity * GetNotifyEntity()
- {
- ENTITY entity;
- TEntity * lpEnt = NULL;
-
- if(idoGetNotifyEntity(HWindow, &entity))
- lpEnt = new TEntity(&entity);
-
- return lpEnt;
- }
-
- BOOL GetNotifyRelation(LPRELATION lpRel)
- {
- return idoGetNotifyRelation(HWindow, lpRel);
- }
- BOOL GetNotifyRelation(TRelation * lpRel)
- {
- return idoGetNotifyRelation(HWindow, &(lpRel->m_relation));
- }
- TRelation * GetNotifyRelation()
- {
- RELATION relation;
- TRelation * lpRel = NULL;
-
- if(idoGetNotifyRelation(HWindow, &relation))
- lpRel = new TRelation(&relation);
-
- return lpRel;
- }
-
- void Cut()
- {
- idoCut(HWindow);
- }
- void Copy()
- {
- idoCopy(HWindow);
- }
- void Paste()
- {
- idoPaste(HWindow);
- }
-
- void ManageClasses()
- {
- idoManageClasses(HWindow);
- }
- void ManageRules()
- {
- idoManageRules(HWindow);
- }
- void PrintDiagram()
- {
- idoPrintDiagram(HWindow);
- }
-
- void PropertyPage(int cVal)
- {
- idoPropertyPage(HWindow, cVal);
- }
-
- BOOL IterateSelectedEntityFirst()
- {
- return idoIterateSelectedEntityFirst(HWindow);
- }
- BOOL IterateSelectedEntityNext(LPENTITY lpEnt)
- {
- return idoIterateSelectedEntityNext(HWindow, lpEnt);
- }
- BOOL IterateSelectedEntityNext(TEntity * lpEnt)
- {
- return idoIterateSelectedEntityNext(HWindow, &(lpEnt->m_entity));
- }
- TEntity * IterateSelectedEntityNext()
- {
- ENTITY entity;
- TEntity * pEnt = NULL;
-
- if(idoIterateSelectedEntityNext(HWindow, &entity))
- pEnt = new TEntity(&entity);
-
- return pEnt;
- }
-
- BOOL IterateEntityFirst()
- {
- return idoIterateEntityFirst(HWindow);
- }
- BOOL IterateEntityNext(LPENTITY lpEnt)
- {
- return idoIterateEntityNext(HWindow, lpEnt);
- }
- BOOL IterateEntityNext(TEntity * lpEnt)
- {
- return idoIterateEntityNext(HWindow, &(lpEnt->m_entity));
- }
- TEntity * IterateEntityNext()
- {
- ENTITY entity;
- TEntity * pEnt = NULL;
-
- if(idoIterateEntityNext(HWindow, &entity))
- pEnt = new TEntity(&entity);
-
- return pEnt;
- }
-
- BOOL IterateRelationFirst()
- {
- return idoIterateRelationFirst(HWindow);
- }
- BOOL IterateRelationNext(LPRELATION lpRel)
- {
- return idoIterateRelationNext(HWindow, lpRel);
- }
- BOOL IterateRelationNext(TRelation * lpRel)
- {
- return idoIterateRelationNext(HWindow, &(lpRel->m_relation));
- }
- TRelation * IterateRelationNext()
- {
- RELATION relation;
- TRelation * lpRel = NULL;
-
- if(idoIterateRelationNext(HWindow, &relation))
- lpRel = new TRelation(&relation);
-
- return lpRel;
- }
-
- BOOL AddEntityClass(LPSTR lpszClass, LPSTR lpszBitmap, TEntity * lpCEnt)
- {
- if(lpCEnt)
- return idoAddEntityClass(HWindow, lpszClass, lpszBitmap, &(lpCEnt->m_entity));
- else
- return idoAddEntityClass(HWindow, lpszClass, lpszBitmap, NULL);
- }
- BOOL DeleteEntityClass(LPSTR lpszClass)
- {
- return idoDeleteEntityClass(HWindow, lpszClass);
- }
- BOOL RedefineFromEntityClass(LPSTR lpszClass)
- {
- return idoRedefineFromEntityClass(HWindow, lpszClass);
- }
- BOOL GetEntityClass(LPSTR lpszClassName, LPENTITY lpEnt)
- {
- return idoGetEntityClass(HWindow, lpszClassName, lpEnt);
- }
- BOOL GetEntityClass(LPSTR lpszClassName, TEntity * lpEnt)
- {
- return idoGetEntityClass(HWindow, lpszClassName, &(lpEnt->m_entity));
- }
- TEntity * GetEntityClass(LPSTR lpszClassName)
- {
- ENTITY entity;
- TEntity * lpEnt = NULL;
-
- if(idoGetEntityClass(HWindow, lpszClassName, &entity))
- lpEnt = new TEntity(&entity);
-
- return lpEnt;
- }
- BOOL DoesEntityClassExist(LPSTR lpszClassName)
- {
- return idoDoesEntityClassExist(HWindow, lpszClassName);
- }
- BOOL IterateEntityClassFirst()
- {
- return idoIterateEntityClassFirst(HWindow);
- }
- BOOL IterateEntityClassNext(LPSTR lpszVal)
- {
- return idoIterateEntityClassNext(HWindow, lpszVal);
- }
-
-
- BOOL AddRelationClass(LPSTR lpszClass, LPSTR lpszBitmap, TRelation * lpCRel)
- {
- if(lpCRel)
- return idoAddRelationClass(HWindow, lpszClass, lpszBitmap, &(lpCRel->m_relation));
- else
- return idoAddRelationClass(HWindow, lpszClass, lpszBitmap, NULL);
- }
- BOOL DeleteRelationClass(LPSTR lpszClass)
- {
- return idoDeleteRelationClass(HWindow, lpszClass);
- }
- BOOL RedefineFromRelationClass(LPSTR lpszClass)
- {
- return idoRedefineFromRelationClass(HWindow, lpszClass);
- }
- BOOL GetRelationClass(LPSTR lpszClassName, LPRELATION lpRel)
- {
- return idoGetRelationClass(HWindow, lpszClassName, lpRel);
- }
- BOOL GetRelationClass(LPSTR lpszClassName, TRelation * lpRel)
- {
- return idoGetRelationClass(HWindow, lpszClassName, &(lpRel->m_relation));
- }
- TRelation * GetRelationClass(LPSTR lpszClassName)
- {
- RELATION relation;
- TRelation * lpRel = NULL;
-
- if(idoGetRelationClass(HWindow, lpszClassName, &relation))
- lpRel = new TRelation(&relation);
-
- return lpRel;
- }
- BOOL DoesRelationClassExist(LPSTR lpszClassName)
- {
- return idoDoesRelationClassExist(HWindow, lpszClassName);
- }
- BOOL IterateRelationClassFirst()
- {
- return idoIterateRelationClassFirst(HWindow);
- }
- BOOL IterateRelationClassNext(LPSTR lpszVal)
- {
- return idoIterateRelationClassNext(HWindow, lpszVal);
- }
-
-
- BOOL AddRule(LPSTR lpszE1, LPSTR lpszR, LPSTR lpszE2)
- {
- return idoAddRule(HWindow, lpszE1, lpszR, lpszE2);
- }
- BOOL DeleteRule(TIDORule * lpRule)
- {
- return idoDeleteRule(HWindow, &(lpRule->m_rule));
- }
- BOOL DoesRuleExist(LPSTR lpszE1, LPSTR lpszR, LPSTR lpszE2)
- {
- return idoDoesRuleExist(HWindow, lpszE1, lpszR, lpszE2);
- }
- BOOL IterateRuleFirst()
- {
- return idoIterateRuleFirst(HWindow);
- }
- BOOL IterateRuleNext(TIDORule * lpRule)
- {
- return idoIterateRuleNext(HWindow, &(lpRule->m_rule));
- }
- TIDORule * IterateRuleNext()
- {
- IDO_RULE rule;
- TIDORule * lpRule = NULL;
-
- if(idoIterateRuleNext(HWindow, &rule))
- lpRule = new TIDORule(&rule);
-
- return lpRule;
- }
-
-
- BOOL GetEntity(long lID, LPSTR lpszName, LPENTITY lpEnt)
- {
- return idoGetEntity(HWindow, lID, lpszName, lpEnt);
- }
- BOOL GetEntity(long lID, LPSTR lpszName, TEntity * lpEnt)
- {
- return idoGetEntity(HWindow, lID, lpszName, &(lpEnt->m_entity));
- }
- TEntity * GetEntity(long lID, LPSTR lpszName)
- {
- ENTITY entity;
- TEntity * lpEnt = NULL;
-
- if(idoGetEntity(HWindow, lID, lpszName, &entity))
- lpEnt = new TEntity(&entity);
-
- return lpEnt;
- }
-
- BOOL GetRelation(long lID, LPSTR lpszName, LPRELATION lpRel)
- {
- return idoGetRelation(HWindow, lID, lpszName, lpRel);
- }
- BOOL GetRelation(long lID, LPSTR lpszName, TRelation * lpRel)
- {
- return idoGetRelation(HWindow, lID, lpszName, &(lpRel->m_relation));
- }
- TRelation * GetRelation(long lID, LPSTR lpszName)
- {
- RELATION relation;
- TRelation * lpRel = NULL;
-
- if(idoGetRelation(HWindow, lID, lpszName, &relation))
- lpRel = new TRelation(&relation);
-
- return lpRel;
- }
-
- // DECLARE_RESPONSE_TABLE(TIDO);
-
- };
-
-
- //============================================================================
- // TEntity Class Explicit inline functions.
-
- inline BOOL TEntity::IterateRelationInNext(LPRELATION lpRel)
- {
- return idoEntityIterateRelationInNext(&m_entity, lpRel);
- }
- inline BOOL TEntity::IterateRelationInNext(TRelation * lpRel)
- {
- return idoEntityIterateRelationInNext(&m_entity, &(lpRel->m_relation));
- }
- inline TRelation * TEntity::IterateRelationInNext()
- {
- RELATION relation;
- TRelation * lpRel = NULL;
-
- if(idoEntityIterateRelationInNext(&m_entity, &relation))
- lpRel = new TRelation(&relation);
-
- return lpRel;
- }
-
- inline BOOL TEntity::IterateRelationOutNext(LPRELATION lpRel)
- {
- return idoEntityIterateRelationOutNext(&m_entity, lpRel);
- }
- inline BOOL TEntity::IterateRelationOutNext(TRelation * lpRel)
- {
- return idoEntityIterateRelationOutNext(&m_entity, &(lpRel->m_relation));
- }
- inline TRelation * TEntity::IterateRelationOutNext()
- {
- RELATION relation;
- TRelation * lpRel = NULL;
-
- if(idoEntityIterateRelationOutNext(&m_entity, &relation))
- lpRel = new TRelation(&relation);
-
- return lpRel;
- }
-
- inline BOOL TEntity::IterateContainedEntityNext(LPENTITY lpEnt)
- {
- return idoEntityIterateContainedEntityNext(&m_entity, lpEnt);
- }
- inline BOOL TEntity::IterateContainedEntityNext(TEntity * lpEnt)
- {
- return idoEntityIterateContainedEntityNext(&m_entity, &(lpEnt->m_entity));
- }
- inline TEntity * TEntity::IterateContainedEntityNext()
- {
- ENTITY entity;
- TEntity * lpEnt = NULL;
-
- if(idoEntityIterateContainedEntityNext(&m_entity, &entity))
- lpEnt = new TEntity(&entity);
-
- return lpEnt;
- }
-
-
- //============================================================================
- // TRelation Class Explicit inline functions.
-
- inline BOOL TRelation::SourceEntity(LPENTITY lpEnt)
- {
- return idoRelationSourceEntity(&m_relation, lpEnt);
- }
- inline BOOL TRelation::SourceEntity(TEntity * lpEnt)
- {
- return idoRelationSourceEntity(&m_relation, &(lpEnt->m_entity));
- }
- inline TEntity * TRelation::SourceEntity()
- {
- ENTITY entity;
- TEntity *lpEntity = NULL;
-
- if(idoRelationSourceEntity(&m_relation, &entity))
- lpEntity = new TEntity(&entity);
-
- return lpEntity;
- }
-
- inline BOOL TRelation::DestinationEntity(LPENTITY lpEnt)
- {
- return idoRelationDestinationEntity(&m_relation, lpEnt);
- }
- inline BOOL TRelation::DestinationEntity(TEntity * lpEnt)
- {
- return idoRelationDestinationEntity(&m_relation, &(lpEnt->m_entity));
- }
- inline TEntity * TRelation::DestinationEntity()
- {
- ENTITY entity;
- TEntity *lpEntity = NULL;
-
- if(idoRelationDestinationEntity(&m_relation, &entity))
- lpEntity = new TEntity(&entity);
-
- return lpEntity;
- }
-
- #endif // ifndef __IDOOWL_H__
-
-