home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************\
-
- (c) 1995-1996, ProtoView Development Co., All rights reserved
- \***************************************************************************/
-
- //============================================================================
- //
- // Microsoft C++ Class Library for the IDO Custom Control
- //
- //============================================================================
-
- #ifndef __IDOMFC_H__
- #define __IDOMFC_H__
-
- //============================================================================
-
- #include <afxwin.h>
- #include "pvido.h"
-
- // InterAct Notification macros
- #define ON_IDON_SELCHANGE(id, memberFxn) ON_CONTROL(IDON_SELCHANGE, id, memberFxn)
-
- // InterAct Notification Message macros
- #define ON_IDOM_N_BEFOREDIAGRAMSAVED(method) ON_MESSAGE(IDOM_N_BEFOREDIAGRAMSAVED, method)
- #define ON_IDOM_N_DIAGRAMSAVED(method) ON_MESSAGE(IDOM_N_DIAGRAMSAVED, method)
- #define ON_IDOM_N_BEFOREDIAGRAMLOADED(method) ON_MESSAGE(IDOM_N_BEFOREDIAGRAMLOADED, method)
- #define ON_IDOM_N_DIAGRAMLOADED(method) ON_MESSAGE(IDOM_N_DIAGRAMLOADED, method)
- #define ON_IDOM_N_BEFOREDIAGRAMRESET(method) ON_MESSAGE(IDOM_N_BEFOREDIAGRAMRESET, method)
- #define ON_IDOM_N_DIAGRAMRESET(method) ON_MESSAGE(IDOM_N_DIAGRAMRESET, method)
-
- #define ON_IDOM_N_BEFOREPALETTESAVED(method) ON_MESSAGE(IDOM_N_BEFOREPALETTESAVED, method)
- #define ON_IDOM_N_PALETTESAVED(method) ON_MESSAGE(IDOM_N_PALETTESAVED, method)
- #define ON_IDOM_N_BEFOREPALETTELOADED(method) ON_MESSAGE(IDOM_N_BEFOREPALETTELOADED, method)
- #define ON_IDOM_N_PALETTELOADED(method) ON_MESSAGE(IDOM_N_PALETTELOADED, method)
- #define ON_IDOM_N_BEFOREPALETTERESET(method) ON_MESSAGE(IDOM_N_BEFOREPALETTERESET, method)
- #define ON_IDOM_N_PALETTERESET(method) ON_MESSAGE(IDOM_N_PALETTERESET, method)
-
- #define ON_IDOM_N_BEFOREDISPLAYOPTIONSMENU(method) ON_MESSAGE(IDOM_N_BEFOREDISPLAYOPTIONSMENU, method)
- #define ON_IDOM_N_BEFOREDISPLAYHELP(method) ON_MESSAGE(IDOM_N_BEFOREDISPLAYHELP, method)
- #define ON_IDOM_N_BEFOREDISPLAYMANAGERULES(method) ON_MESSAGE(IDOM_N_BEFOREDISPLAYMANAGERULES, method)
- #define ON_IDOM_N_BEFOREDISPLAYMANAGECLASSES(method) ON_MESSAGE(IDOM_N_BEFOREDISPLAYMANAGECLASSES, method)
- #define ON_IDOM_N_DISPLAYMANAGERULESBUTTON(method) ON_MESSAGE(IDOM_N_DISPLAYMANAGERULESBUTTON, method)
- #define ON_IDOM_N_BEFOREDISPLAYTOOLSPALETTE(method) ON_MESSAGE(IDOM_N_BEFOREDISPLAYTOOLSPALETTE, method)
- #define ON_IDOM_N_BEFOREHIDETOOLSPALETTE(method) ON_MESSAGE(IDOM_N_BEFOREHIDETOOLSPALETTE, method)
-
- #define ON_IDOM_N_ENTITYADDREQUEST(method) ON_MESSAGE(IDOM_N_ENTITYADDREQUEST, method)
- #define ON_IDOM_N_ENTITYADDED(method) ON_MESSAGE(IDOM_N_ENTITYADDED, method)
- #define ON_IDOM_N_ENTITYDELETEREQUEST(method) ON_MESSAGE(IDOM_N_ENTITYDELETEREQUEST, method)
- #define ON_IDOM_N_ENTITYDELETED(method) ON_MESSAGE(IDOM_N_ENTITYDELETED, method)
-
- #define ON_IDOM_N_RELATIONADDREQUEST(method) ON_MESSAGE(IDOM_N_RELATIONADDREQUEST, method)
- #define ON_IDOM_N_RELATIONADDED(method) ON_MESSAGE(IDOM_N_RELATIONADDED, method)
- #define ON_IDOM_N_RELATIONDELETEREQUEST(method) ON_MESSAGE(IDOM_N_RELATIONDELETEREQUEST, method)
- #define ON_IDOM_N_RELATIONDELETED(method) ON_MESSAGE(IDOM_N_RELATIONDELETED, method)
-
- #define ON_IDOM_N_CLICK_ENTITY(method) ON_MESSAGE(IDOM_N_CLICK_ENTITY, method)
- #define ON_IDOM_N_CLICK_RELATION(method) ON_MESSAGE(IDOM_N_CLICK_RELATION, method)
- #define ON_IDOM_N_CLICK_INTERACT(method) ON_MESSAGE(IDOM_N_CLICK_INTERACT, method)
-
- class CIDO;
- class CEntity;
- class CRelation;
- class CIDORule;
-
-
- //============================================================================
- // IDO Rule Class Definition
- class CIDORule : public CObject
- {
-
-
- //******* Constructors *******
- public:
-
- CIDORule ()
- {
- lstrcpy(m_rule.E1, "");
- lstrcpy(m_rule.R1, "");
- lstrcpy(m_rule.E2, "");
- m_rule.MaxCount = 0;
- }
- CIDORule (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 ~CIDORule()
- {
- ;
- }
-
-
- //******* 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 CEntity : public CObject
- {
- friend class CIDO;
- friend class CRelation;
-
-
- //******* Constructors *******
- public:
-
- CEntity ()
- {
- m_entity.id = 0L;
- lstrcpy(m_entity.name, "");
- m_entity.hIDO = 0;
- }
- CEntity (CWnd *pIDO, int UserID, LPCSTR lpszUserName)
- {
- m_entity.id = UserID;
- lstrcpy(m_entity.name, lpszUserName);
- m_entity.hIDO = pIDO->m_hWnd;
- }
- CEntity (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 *******
- public:
-
- virtual ~CEntity()
- {
- ;
- }
-
-
- //******* Public Data Members *******
- public :
-
- ENTITY m_entity;
-
-
- //******* Public Member Functions *******
- public :
-
- 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(CRelation * lpRel);
- CRelation * IterateRelationInNext();
-
- BOOL IterateRelationOutNext(LPRELATION lpRel);
- BOOL IterateRelationOutNext(CRelation * lpRel);
- CRelation * IterateRelationOutNext();
-
- BOOL IterateContainedEntityNext(LPENTITY lpEnt);
- BOOL IterateContainedEntityNext(CEntity * lpEnt);
- CEntity * IterateContainedEntityNext();
-
-
- //******* Public Member Functions *******
- public :
-
- 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(CEntity * lpCEntity)
- {
- if(!lpCEntity)
- return FALSE;
- return idoEntityAddEntityToContainer(&m_entity, &(lpCEntity->m_entity));
- }
- BOOL RemoveEntityFromContainer(CEntity * lpCEntity)
- {
- if(!lpCEntity)
- return FALSE;
- return idoEntityRemoveEntityFromContainer(&m_entity, &(lpCEntity->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 CRelation : public CObject
- {
- friend class CIDO;
- friend class CEntity;
-
-
- //******* Constructors *******
- public:
-
- CRelation ()
- {
- m_relation.id = 0L;
- lstrcpy(m_relation.name, "");
- m_relation.hIDO = 0;
- }
- CRelation (CWnd *pIDO, int UserID, LPCSTR lpszUserName)
- {
- m_relation.id = UserID;
- lstrcpy(m_relation.name, lpszUserName);
- m_relation.hIDO = pIDO->m_hWnd;
- }
- CRelation (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 *******
- public:
-
- virtual ~CRelation()
- {
- ;
- }
-
-
- //******* 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(CEntity * lpEnt);
- CEntity * SourceEntity();
-
- BOOL DestinationEntity(LPENTITY lpEnt);
- BOOL DestinationEntity(CEntity * lpEnt);
- CEntity * DestinationEntity();
-
-
- //******* Public inline Member Functions *******
- public :
-
- 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 CIDO : public CWnd
- {
- friend class CEntity;
- friend class CRelation;
-
-
- //******* Constructors *******
- public:
-
- CIDO ()
- {
- ;
- }
- CIDO (CWnd *pParent, int ControlID)
- {
- m_hWnd = ::GetDlgItem(pParent->m_hWnd, ControlID);
- }
-
- BOOL Create (DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID)
- {
- #ifdef WIN32
- return (CWnd::Create ("pvIDO32", NULL, dwStyle, rect, pParentWnd, nID));
- #else
- return (CWnd::Create ("pvIDO", NULL, dwStyle, rect, pParentWnd, nID));
- #endif
- }
-
-
- //******* Destructors *******
- public :
-
- virtual ~CIDO()
- {
- ;
- }
-
- //******* Protected Member Functions *******
- protected:
-
- virtual WNDPROC* GetSuperWndProcAddr (void)
- {
- static WNDPROC NEAR pfnSuper;
- return (&pfnSuper);
- }
-
-
- //******* Public Member Functions *******
- public:
-
- void SetModified(BOOL bVal)
- {
- idoSetModified(m_hWnd, bVal);
- }
- BOOL GetModified()
- {
- return idoGetModified(m_hWnd);
- }
-
- BOOL GetEditMode()
- {
- return idoGetEditMode(m_hWnd);
- }
- void SetEditMode(BOOL bVal)
- {
- idoSetEditMode(m_hWnd, bVal);
- }
-
- int GetGridHeight()
- {
- return idoGetGridHeight(m_hWnd);
- }
- void SetGridHeight(int cVal)
- {
- idoSetGridHeight(m_hWnd, cVal);
- }
-
- int GetGridWidth()
- {
- return idoGetGridWidth(m_hWnd);
- }
- void SetGridWidth(int cVal)
- {
- idoSetGridWidth(m_hWnd, cVal);
- }
-
- COLORREF GetGridLineColor()
- {
- return idoGetGridLineColor(m_hWnd);
- }
- void SetGridLineColor(COLORREF clrVal)
- {
- idoSetGridLineColor(m_hWnd, clrVal);
- }
-
- COLORREF GetBackColor()
- {
- return idoGetBackColor(m_hWnd);
- }
- void SetBackColor(COLORREF clrVal)
- {
- idoSetBackColor(m_hWnd, clrVal);
- }
-
- BOOL GetGridLines()
- {
- return idoGetGridLines(m_hWnd);
- }
- void SetGridLines(BOOL bVal)
- {
- idoSetGridLines(m_hWnd, bVal);
- }
-
- BOOL GetSnapToGrid()
- {
- return idoGetSnapToGrid(m_hWnd);
- }
- void SetSnapToGrid(BOOL bVal)
- {
- idoSetSnapToGrid(m_hWnd, bVal);
- }
-
- BOOL GetToolsPalette()
- {
- return idoGetToolsPalette(m_hWnd);
- }
- void SetToolsPalette(BOOL bVal)
- {
- idoSetToolsPalette(m_hWnd, bVal);
- }
-
- void SetToolsPaletteButtonText(LPCSTR lpText)
- {
- idoSetToolsPaletteButtonText(m_hWnd, lpText);
- }
- void SetToolsPaletteButtonText(CString& Text)
- {
- idoSetToolsPaletteButtonText(m_hWnd, Text.GetBuffer(0));
- }
-
- BOOL GetRulesEnforced()
- {
- return idoGetRulesEnforced(m_hWnd);
- }
- void SetRulesEnforced(BOOL bVal)
- {
- idoSetRulesEnforced(m_hWnd, bVal);
- }
-
- BOOL GetCurrentEntity(LPENTITY lpEnt)
- {
- return idoGetCurrentEntity(m_hWnd, lpEnt);
- }
- BOOL GetCurrentEntity(CEntity * lpEnt)
- {
- return idoGetCurrentEntity(m_hWnd, &(lpEnt->m_entity));
- }
- CEntity * GetCurrentEntity()
- {
- ENTITY entity;
- CEntity * lpEnt = NULL;
-
- if(idoGetCurrentEntity(m_hWnd, &entity))
- lpEnt = new CEntity(&entity);
-
- return lpEnt;
- }
-
- BOOL SetCurrentEntity(LPENTITY lpEnt)
- {
- return idoSetCurrentEntity(m_hWnd, lpEnt);
- }
- BOOL SetCurrentEntity(CEntity * lpEnt)
- {
- return idoSetCurrentEntity(m_hWnd, &(lpEnt->m_entity));
- }
-
- BOOL GetCurrentRelation(LPRELATION lpRel)
- {
- return idoGetCurrentRelation(m_hWnd, lpRel);
- }
- BOOL GetCurrentRelation(CRelation * lpRel)
- {
- return idoGetCurrentRelation(m_hWnd, &(lpRel->m_relation));
- }
- CRelation * GetCurrentRelation()
- {
- RELATION relation;
- CRelation * lpRel = NULL;
-
- if(idoGetCurrentRelation(m_hWnd, &relation))
- lpRel = new CRelation(&relation);
-
- return lpRel;
- }
-
- BOOL SetCurrentRelation(LPRELATION lpRel)
- {
- return idoSetCurrentRelation(m_hWnd, lpRel);
- }
- BOOL SetCurrentRelation(CRelation * lpRel)
- {
- return idoSetCurrentRelation(m_hWnd, &(lpRel->m_relation));
- }
-
- BOOL GetPopupMenu(long lVal)
- {
- return idoGetPopupMenu(m_hWnd, lVal);
- }
- void SetPopupMenu(long lVal, BOOL bVal)
- {
- idoSetPopupMenu(m_hWnd, lVal, bVal);
- }
-
- // conflicts with WINDOWSX.H
- // long GetWindowStyle()
- // {
- // return idoGetWindowStyle(m_hWnd);
- // }
- // void SetWindowStyle(long lVal)
- // {
- // idoSetWindowStyle(m_hWnd, lVal);
- // }
-
- BOOL GetBorder()
- {
- return idoGetBorder(m_hWnd);
- }
- void SetBorder(BOOL bVal)
- {
- idoSetBorder(m_hWnd, bVal);
- }
-
- BOOL GetPrinterLines()
- {
- return idoGetPrinterLines(m_hWnd);
- }
- void SetPrinterLines(BOOL bVal)
- {
- idoSetPrinterLines(m_hWnd, bVal);
- }
-
- BOOL GetPrinterLandscape()
- {
- return idoGetPrinterLandscape(m_hWnd);
- }
- void SetPrinterLandscape(BOOL bVal)
- {
- idoSetPrinterLandscape(m_hWnd, bVal);
- }
-
- long GetScrollBars()
- {
- return idoGetScrollBars(m_hWnd);
- }
- void SetScrollBars(long lVal)
- {
- idoSetScrollBars(m_hWnd, lVal);
- }
-
- BOOL GetRedraw()
- {
- return idoGetRedraw(m_hWnd);
- }
- void SetRedraw(BOOL bVal)
- {
- idoSetRedraw(m_hWnd, bVal);
- }
-
-
- LPCSTR GetInetPath()
- {
- return (LPCSTR)idoGetInetPath(m_hWnd);
- }
- void SetInetPath(LPCSTR lpPath)
- {
- idoSetInetPath(m_hWnd, (LPCSTR)lpPath);
- }
- void SetInetPath(CString& Path)
- {
- idoSetInetPath(m_hWnd, (LPCSTR)Path.GetBuffer(0));
- }
-
- short GetZoomValue()
- {
- return idoGetZoomValue(m_hWnd);
- }
- void SetZoomValue(short cVal)
- {
- idoSetZoomValue(m_hWnd, cVal);
- }
-
- //******* Public Member Functions *******
- public :
-
- void CancelAction()
- {
- idoCancelAction(m_hWnd);
- }
- void AllowAction()
- {
- idoAllowAction(m_hWnd);
- }
-
- BOOL DragAddEntity(LPCSTR lpszVal)
- {
- return idoDragAddEntity(m_hWnd, lpszVal);
- }
-
- BOOL AddEntityFromClass(long lID, LPSTR lpszName, LPSTR lpszClass, LPSTR lpszText, int cX, int cY, int cWidth, int cHeight)
- {
- return idoAddEntityFromClass(m_hWnd, lID, lpszName, lpszClass, lpszText, cX, cY, cWidth, cHeight);
- }
-
- BOOL DeleteEntity(LPENTITY lpEnt)
- {
- return idoDeleteEntity(m_hWnd, lpEnt);
- }
- BOOL DeleteEntity(CEntity * lpEnt)
- {
- return idoDeleteEntity(m_hWnd, &(lpEnt->m_entity));
- }
-
- BOOL DoesEntityExist(long lID, LPSTR lpszName)
- {
- return idoDoesEntityExist(m_hWnd, lID, lpszName);
- }
-
- long GetNumberOfSelectedEntities()
- {
- return idoGetNumberOfSelectedEntities(m_hWnd);
- }
- long GetNumberOfEntities()
- {
- return idoGetNumberOfEntities(m_hWnd);
- }
- long GetNumberOfRelations()
- {
- return idoGetNumberOfRelations(m_hWnd);
- }
-
- BOOL DragAddRelation(LPCSTR lpszVal)
- {
- return idoDragAddRelation(m_hWnd, lpszVal);
- }
-
- BOOL AddRelationFromClass(long lID, LPSTR lpszName, LPSTR lpszClass, LPSTR lpszText, long lsID, LPSTR lpszsName, long ldID, LPSTR lpszdName)
- {
- return idoAddRelationFromClass(m_hWnd, lID, lpszName, lpszClass, lpszText, lsID, lpszsName, ldID, lpszdName);
- }
-
- BOOL DeleteRelation(LPRELATION lpRel)
- {
- return idoDeleteRelation(m_hWnd, lpRel);
- }
- BOOL DeleteRelation(CRelation * lpRel)
- {
- return idoDeleteRelation(m_hWnd, &(lpRel->m_relation));
- }
-
- BOOL DoesRelationExist(long lID, LPSTR lpszName)
- {
- return idoDoesRelationExist(m_hWnd, lID, lpszName);
- }
-
- BOOL ReadDiagram(LPSTR lpszVal)
- {
- return idoReadDiagram(m_hWnd, lpszVal);
- }
- BOOL ReadDiagram(CString& szVal)
- {
- return idoReadDiagram(m_hWnd, (LPSTR)szVal.GetBuffer(0));
- }
-
- BOOL SaveDiagram(LPSTR lpszVal)
- {
- return idoSaveDiagram(m_hWnd, lpszVal);
- }
- BOOL SaveDiagram(CString& szVal)
- {
- return idoSaveDiagram(m_hWnd, (LPSTR)szVal.GetBuffer(0));
- }
-
- void ResetDiagram()
- {
- idoResetDiagram(m_hWnd);
- }
- void ResetPalette()
- {
- idoResetPalette(m_hWnd);
- }
-
- LPCSTR GetFileName()
- {
- return (LPCSTR)idoGetFileName(m_hWnd);
- }
- void SetFileName(LPCSTR lpFileName)
- {
- idoSetFileName(m_hWnd, (LPCSTR)lpFileName);
- }
- void SetFileName(CString& FileName)
- {
- idoSetFileName(m_hWnd, (LPCSTR)FileName.GetBuffer(0));
- }
-
- long GetVersion()
- {
- return idoGetVersion(m_hWnd);
- }
-
- BOOL ReadPalette(LPSTR lpszVal)
- {
- return idoReadPalette(m_hWnd, lpszVal);
- }
- BOOL ReadPalette(CString& szVal)
- {
- return idoReadPalette(m_hWnd, (LPSTR)szVal.GetBuffer(0));
- }
-
- BOOL SavePalette(LPSTR lpszVal)
- {
- return idoSavePalette(m_hWnd, lpszVal);
- }
- BOOL SavePalette(CString& szVal)
- {
- return idoSavePalette(m_hWnd, (LPSTR)szVal.GetBuffer(0));
- }
-
- void Zoom(int cVal, long lVal)
- {
- idoZoom(m_hWnd, cVal, lVal);
- }
-
- BOOL GetNotifyEntity(LPENTITY lpEnt)
- {
- return idoGetNotifyEntity(m_hWnd, lpEnt);
- }
- BOOL GetNotifyEntity(CEntity * lpEnt)
- {
- return idoGetNotifyEntity(m_hWnd, &(lpEnt->m_entity));
- }
- CEntity * GetNotifyEntity()
- {
- ENTITY entity;
- CEntity * lpEnt = NULL;
-
- if(idoGetNotifyEntity(m_hWnd, &entity))
- lpEnt = new CEntity(&entity);
-
- return lpEnt;
- }
-
- BOOL GetNotifyRelation(LPRELATION lpRel)
- {
- return idoGetNotifyRelation(m_hWnd, lpRel);
- }
- BOOL GetNotifyRelation(CRelation * lpRel)
- {
- return idoGetNotifyRelation(m_hWnd, &(lpRel->m_relation));
- }
- CRelation * GetNotifyRelation()
- {
- RELATION relation;
- CRelation * lpRel = NULL;
-
- if(idoGetNotifyRelation(m_hWnd, &relation))
- lpRel = new CRelation(&relation);
-
- return lpRel;
- }
-
- void Cut()
- {
- idoCut(m_hWnd);
- }
- void Copy()
- {
- idoCopy(m_hWnd);
- }
- void Paste()
- {
- idoPaste(m_hWnd);
- }
-
- void ManageClasses()
- {
- idoManageClasses(m_hWnd);
- }
- void ManageRules()
- {
- idoManageRules(m_hWnd);
- }
- void PrintDiagram()
- {
- idoPrintDiagram(m_hWnd);
- }
-
- void PropertyPage(int cVal)
- {
- idoPropertyPage(m_hWnd, cVal);
- }
-
- BOOL IterateSelectedEntityFirst()
- {
- return idoIterateSelectedEntityFirst(m_hWnd);
- }
- BOOL IterateSelectedEntityNext(LPENTITY lpEnt)
- {
- return idoIterateSelectedEntityNext(m_hWnd, lpEnt);
- }
- BOOL IterateSelectedEntityNext(CEntity * lpEnt)
- {
- return idoIterateSelectedEntityNext(m_hWnd, &(lpEnt->m_entity));
- }
- CEntity * IterateSelectedEntityNext()
- {
- ENTITY entity;
- CEntity * pEnt = NULL;
-
- if(idoIterateSelectedEntityNext(m_hWnd, &entity))
- pEnt = new CEntity(&entity);
-
- return pEnt;
- }
-
- BOOL IterateEntityFirst()
- {
- return idoIterateEntityFirst(m_hWnd);
- }
- BOOL IterateEntityNext(LPENTITY lpEnt)
- {
- return idoIterateEntityNext(m_hWnd, lpEnt);
- }
- BOOL IterateEntityNext(CEntity * lpEnt)
- {
- return idoIterateEntityNext(m_hWnd, &(lpEnt->m_entity));
- }
- CEntity * IterateEntityNext()
- {
- ENTITY entity;
- CEntity * pEnt = NULL;
-
- if(idoIterateEntityNext(m_hWnd, &entity))
- pEnt = new CEntity(&entity);
-
- return pEnt;
- }
-
- BOOL IterateRelationFirst()
- {
- return idoIterateRelationFirst(m_hWnd);
- }
- BOOL IterateRelationNext(LPRELATION lpRel)
- {
- return idoIterateRelationNext(m_hWnd, lpRel);
- }
- BOOL IterateRelationNext(CRelation * lpRel)
- {
- return idoIterateRelationNext(m_hWnd, &(lpRel->m_relation));
- }
- CRelation * IterateRelationNext()
- {
- RELATION relation;
- CRelation * lpRel = NULL;
-
- if(idoIterateRelationNext(m_hWnd, &relation))
- lpRel = new CRelation(&relation);
-
- return lpRel;
- }
-
- BOOL AddEntityClass(LPSTR lpszClass, LPSTR lpszBitmap, CEntity * lpCEnt)
- {
- if(lpCEnt)
- return idoAddEntityClass(m_hWnd, lpszClass, lpszBitmap, &(lpCEnt->m_entity));
- else
- return idoAddEntityClass(m_hWnd, lpszClass, lpszBitmap, NULL);
- }
- BOOL DeleteEntityClass(LPSTR lpszClass)
- {
- return idoDeleteEntityClass(m_hWnd, lpszClass);
- }
- BOOL RedefineFromEntityClass(LPSTR lpszClass)
- {
- return idoRedefineFromEntityClass(m_hWnd, lpszClass);
- }
- BOOL GetEntityClass(LPSTR lpszClassName, LPENTITY lpEnt)
- {
- return idoGetEntityClass(m_hWnd, lpszClassName, lpEnt);
- }
- BOOL GetEntityClass(LPSTR lpszClassName, CEntity * lpEnt)
- {
- return idoGetEntityClass(m_hWnd, lpszClassName, &(lpEnt->m_entity));
- }
- CEntity * GetEntityClass(LPSTR lpszClassName)
- {
- ENTITY entity;
- CEntity * lpEnt = NULL;
-
- if(idoGetEntityClass(m_hWnd, lpszClassName, &entity))
- lpEnt = new CEntity(&entity);
-
- return lpEnt;
- }
- BOOL DoesEntityClassExist(LPSTR lpszClassName)
- {
- return idoDoesEntityClassExist(m_hWnd, lpszClassName);
- }
- BOOL IterateEntityClassFirst()
- {
- return idoIterateEntityClassFirst(m_hWnd);
- }
- BOOL IterateEntityClassNext(LPSTR lpszVal)
- {
- return idoIterateEntityClassNext(m_hWnd, lpszVal);
- }
-
-
- BOOL AddRelationClass(LPSTR lpszClass, LPSTR lpszBitmap, CRelation * lpCRel)
- {
- if(lpCRel)
- return idoAddRelationClass(m_hWnd, lpszClass, lpszBitmap, &(lpCRel->m_relation));
- else
- return idoAddRelationClass(m_hWnd, lpszClass, lpszBitmap, NULL);
- }
- BOOL DeleteRelationClass(LPSTR lpszClass)
- {
- return idoDeleteRelationClass(m_hWnd, lpszClass);
- }
- BOOL RedefineFromRelationClass(LPSTR lpszClass)
- {
- return idoRedefineFromRelationClass(m_hWnd, lpszClass);
- }
- BOOL GetRelationClass(LPSTR lpszClassName, LPRELATION lpRel)
- {
- return idoGetRelationClass(m_hWnd, lpszClassName, lpRel);
- }
- BOOL GetRelationClass(LPSTR lpszClassName, CRelation * lpRel)
- {
- return idoGetRelationClass(m_hWnd, lpszClassName, &(lpRel->m_relation));
- }
- CRelation * GetRelationClass(LPSTR lpszClassName)
- {
- RELATION relation;
- CRelation * lpRel = NULL;
-
- if(idoGetRelationClass(m_hWnd, lpszClassName, &relation))
- lpRel = new CRelation(&relation);
-
- return lpRel;
- }
- BOOL DoesRelationClassExist(LPSTR lpszClassName)
- {
- return idoDoesRelationClassExist(m_hWnd, lpszClassName);
- }
- BOOL IterateRelationClassFirst()
- {
- return idoIterateRelationClassFirst(m_hWnd);
- }
- BOOL IterateRelationClassNext(LPSTR lpszVal)
- {
- return idoIterateRelationClassNext(m_hWnd, lpszVal);
- }
-
-
- BOOL AddRule(LPSTR lpszE1, LPSTR lpszR, LPSTR lpszE2)
- {
- return idoAddRule(m_hWnd, lpszE1, lpszR, lpszE2);
- }
- BOOL DeleteRule(CIDORule * lpRule)
- {
- return idoDeleteRule(m_hWnd, &(lpRule->m_rule));
- }
- BOOL DoesRuleExist(LPSTR lpszE1, LPSTR lpszR, LPSTR lpszE2)
- {
- return idoDoesRuleExist(m_hWnd, lpszE1, lpszR, lpszE2);
- }
- BOOL IterateRuleFirst()
- {
- return idoIterateRuleFirst(m_hWnd);
- }
- BOOL IterateRuleNext(CIDORule * lpRule)
- {
- return idoIterateRuleNext(m_hWnd, &(lpRule->m_rule));
- }
- CIDORule * IterateRuleNext()
- {
- IDO_RULE rule;
- CIDORule * lpRule = NULL;
-
- if(idoIterateRuleNext(m_hWnd, &rule))
- lpRule = new CIDORule(&rule);
-
- return lpRule;
- }
-
-
- BOOL GetEntity(long lID, LPSTR lpszName, LPENTITY lpEnt)
- {
- return idoGetEntity(m_hWnd, lID, lpszName, lpEnt);
- }
- BOOL GetEntity(long lID, LPSTR lpszName, CEntity * lpEnt)
- {
- return idoGetEntity(m_hWnd, lID, lpszName, &(lpEnt->m_entity));
- }
- CEntity * GetEntity(long lID, LPSTR lpszName)
- {
- ENTITY entity;
- CEntity * lpEnt = NULL;
-
- if(idoGetEntity(m_hWnd, lID, lpszName, &entity))
- lpEnt = new CEntity(&entity);
-
- return lpEnt;
- }
-
- BOOL GetRelation(long lID, LPSTR lpszName, LPRELATION lpRel)
- {
- return idoGetRelation(m_hWnd, lID, lpszName, lpRel);
- }
- BOOL GetRelation(long lID, LPSTR lpszName, CRelation * lpRel)
- {
- return idoGetRelation(m_hWnd, lID, lpszName, &(lpRel->m_relation));
- }
- CRelation * GetRelation(long lID, LPSTR lpszName)
- {
- RELATION relation;
- CRelation * lpRel = NULL;
-
- if(idoGetRelation(m_hWnd, lID, lpszName, &relation))
- lpRel = new CRelation(&relation);
-
- return lpRel;
- }
-
- };
-
-
- //============================================================================
- // CEntity Class Explicit inline functions.
-
- inline BOOL CEntity::IterateRelationInNext(LPRELATION lpRel)
- {
- return idoEntityIterateRelationInNext(&m_entity, lpRel);
- }
- inline BOOL CEntity::IterateRelationInNext(CRelation * lpRel)
- {
- return idoEntityIterateRelationInNext(&m_entity, &(lpRel->m_relation));
- }
- inline CRelation * CEntity::IterateRelationInNext()
- {
- RELATION relation;
- CRelation * lpRel = NULL;
-
- if(idoEntityIterateRelationInNext(&m_entity, &relation))
- lpRel = new CRelation(&relation);
-
- return lpRel;
- }
-
- inline BOOL CEntity::IterateRelationOutNext(LPRELATION lpRel)
- {
- return idoEntityIterateRelationOutNext(&m_entity, lpRel);
- }
- inline BOOL CEntity::IterateRelationOutNext(CRelation * lpRel)
- {
- return idoEntityIterateRelationOutNext(&m_entity, &(lpRel->m_relation));
- }
- inline CRelation * CEntity::IterateRelationOutNext()
- {
- RELATION relation;
- CRelation * lpRel = NULL;
-
- if(idoEntityIterateRelationOutNext(&m_entity, &relation))
- lpRel = new CRelation(&relation);
-
- return lpRel;
- }
-
- inline BOOL CEntity::IterateContainedEntityNext(LPENTITY lpEnt)
- {
- return idoEntityIterateContainedEntityNext(&m_entity, lpEnt);
- }
- inline BOOL CEntity::IterateContainedEntityNext(CEntity * lpEnt)
- {
- return idoEntityIterateContainedEntityNext(&m_entity, &(lpEnt->m_entity));
- }
- inline CEntity * CEntity::IterateContainedEntityNext()
- {
- ENTITY entity;
- CEntity * lpEnt = NULL;
-
- if(idoEntityIterateContainedEntityNext(&m_entity, &entity))
- lpEnt = new CEntity(&entity);
-
- return lpEnt;
- }
-
-
- //============================================================================
- // CRelation Class Explicit inline functions.
-
- inline BOOL CRelation::SourceEntity(LPENTITY lpEnt)
- {
- return idoRelationSourceEntity(&m_relation, lpEnt);
- }
- inline BOOL CRelation::SourceEntity(CEntity * lpEnt)
- {
- return idoRelationSourceEntity(&m_relation, &(lpEnt->m_entity));
- }
- inline CEntity * CRelation::SourceEntity()
- {
- ENTITY entity;
- CEntity *lpEntity = NULL;
-
- if(idoRelationSourceEntity(&m_relation, &entity))
- lpEntity = new CEntity(&entity);
-
- return lpEntity;
- }
-
- inline BOOL CRelation::DestinationEntity(LPENTITY lpEnt)
- {
- return idoRelationDestinationEntity(&m_relation, lpEnt);
- }
- inline BOOL CRelation::DestinationEntity(CEntity * lpEnt)
- {
- return idoRelationDestinationEntity(&m_relation, &(lpEnt->m_entity));
- }
- inline CEntity * CRelation::DestinationEntity()
- {
- ENTITY entity;
- CEntity *lpEntity = NULL;
-
- if(idoRelationDestinationEntity(&m_relation, &entity))
- lpEntity = new CEntity(&entity);
-
- return lpEntity;
- }
-
-
- #endif // ifndef __IDOMFC_H__
-
-