From: <moo...@us...> - 2003-12-08 08:11:24
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv19301 Modified Files: ProjectTree.h StdAfx.h Log Message: Moved the Pug XML defines to StdAfx.h. This way it is only defined once for all the classes that use the Pug XML library. Index: ProjectTree.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ProjectTree.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ProjectTree.h 28 Nov 2003 13:20:37 -0000 1.6 --- ProjectTree.h 8 Dec 2003 08:11:20 -0000 1.7 *************** *** 7,13 **** // ProjectTree.h : header file // - #define PUGAPI_VARIANT 0x58475550 //The Pug XML library variant we are using in this implementation. - #define PUGAPI_VERSION_MAJOR 1 //The Pug XML library major version we are using in this implementation. - #define PUGAPI_VERSION_MINOR 2 //The Pug XML library minor version we are using in this implementation. #include "stdlib.h" --- 7,10 ---- *************** *** 25,48 **** enum project_item_types { ! ITEM_WORKSPACE, ! ITEM_PROJECT, ! ITEM_FOLDER, ! ITEM_FILE }; enum file_path_type { ! PATH_FULL, ! PATH_PARTIAL }; enum project_image_types { ! IMG_WORKSPACE, ! IMG_OFOLDER, ! IMG_FILE, ! IMG_PROJECT, ! IMG_FOLDER, ! IMG_INVALID }; --- 22,45 ---- enum project_item_types { ! ITEM_WORKSPACE, ! ITEM_PROJECT, ! ITEM_FOLDER, ! ITEM_FILE }; enum file_path_type { ! PATH_FULL, ! PATH_PARTIAL }; enum project_image_types { ! IMG_WORKSPACE, ! IMG_OFOLDER, ! IMG_FILE, ! IMG_PROJECT, ! IMG_FOLDER, ! IMG_INVALID }; *************** *** 50,73 **** { public: ! ProjectItem() ! { ! } ! ProjectItem(LPCSTR itemname, LPCSTR filepath,LPCSTR parentpath,int itype,int iimage ) ! { ! if(itemname) ItemName = itemname; ! if(filepath) FilePath = filepath; ! if(parentpath) parent_path = parentpath; ! type = itype; ! item_image = iimage; ! changed=FALSE; ! } ! ! int type; ! BOOL changed; ! CString ItemName; ! CString FilePath; ! int item_image; ! CString parent_path; }; --- 47,70 ---- { public: ! ProjectItem() ! { ! } ! ProjectItem(LPCSTR itemname, LPCSTR filepath,LPCSTR parentpath,int itype,int iimage ) ! { ! if(itemname) ItemName = itemname; ! if(filepath) FilePath = filepath; ! if(parentpath) parent_path = parentpath; ! type = itype; ! item_image = iimage; ! changed=FALSE; ! } ! ! int type; ! BOOL changed; ! CString ItemName; ! CString FilePath; ! int item_image; ! CString parent_path; }; *************** *** 89,94 **** BOOL m_bIsLoaded; stack<HTREEITEM> iStack; ! HTREEITEM m_ActiveProject; ! // Operations public: --- 86,91 ---- BOOL m_bIsLoaded; stack<HTREEITEM> iStack; ! HTREEITEM m_ActiveProject; ! // Operations public: *************** *** 116,145 **** HTREEITEM GetProjectItemForString(LPCSTR itemText); BOOL LoadProjectFile(LPCSTR filPath,BOOL path=FALSE); ! void AddFileUnderProject(LPCSTR projectname, LPCSTR filepath); protected: ! //New Implementation added functions ! BOOL DoesItemContainType(HTREEITEM hItem, int type, LPCSTR name,BOOL fname=FALSE); ! BOOL DoesProjectContainFile(HTREEITEM pitem, LPCSTR filename); ! void UpdateWorkspaceEntry(); ! BOOL AddProjectItemFromXmlNode(xml_node * node,LPCSTR fname); ! BOOL AddProjectFromXmlNode(xml_node * node,LPCSTR fname); ! BOOL AddFolderFromXmlNode(xml_node * node); ! BOOL AddFileFromXmlNode(xml_node * node); ! void SetActiveProject(CString &pfname,BOOL first=FALSE); void ShowOpenDialogForFiles(); ! void AddNewFolder(); int GetNumberOfProjects(); ! int GetNumberOfItemsUnderProject(int pfol,HTREEITEM hItem); ! HTREEITEM GetProjectItemForItem(HTREEITEM hItem); ! void SetDirty(HTREEITEM hItem); ! //to save a project file ! void SaveItemAsElement(HTREEITEM hItem,xml_node * node); BOOL SaveWSProjectToFile(HTREEITEM proItem,BOOL checkchange=FALSE); ! //Delete resources... ! void DeleteTreeResourcesFromItem(HTREEITEM hItem); ! //dragdrop ops BOOL IsChildNodeOf(HTREEITEM hitemChild, HTREEITEM hitemSuspectedParent); --- 113,142 ---- HTREEITEM GetProjectItemForString(LPCSTR itemText); BOOL LoadProjectFile(LPCSTR filPath,BOOL path=FALSE); ! void AddFileUnderProject(LPCSTR projectname, LPCSTR filepath); protected: ! //New Implementation added functions ! BOOL DoesItemContainType(HTREEITEM hItem, int type, LPCSTR name,BOOL fname=FALSE); ! BOOL DoesProjectContainFile(HTREEITEM pitem, LPCSTR filename); ! void UpdateWorkspaceEntry(); ! BOOL AddProjectItemFromXmlNode(xml_node * node,LPCSTR fname); ! BOOL AddProjectFromXmlNode(xml_node * node,LPCSTR fname); ! BOOL AddFolderFromXmlNode(xml_node * node); ! BOOL AddFileFromXmlNode(xml_node * node); ! void SetActiveProject(CString &pfname,BOOL first=FALSE); void ShowOpenDialogForFiles(); ! void AddNewFolder(); int GetNumberOfProjects(); ! int GetNumberOfItemsUnderProject(int pfol,HTREEITEM hItem); ! HTREEITEM GetProjectItemForItem(HTREEITEM hItem); ! void SetDirty(HTREEITEM hItem); ! //to save a project file ! void SaveItemAsElement(HTREEITEM hItem,xml_node * node); BOOL SaveWSProjectToFile(HTREEITEM proItem,BOOL checkchange=FALSE); ! //Delete resources... ! void DeleteTreeResourcesFromItem(HTREEITEM hItem); ! //dragdrop ops BOOL IsChildNodeOf(HTREEITEM hitemChild, HTREEITEM hitemSuspectedParent); Index: StdAfx.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/StdAfx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StdAfx.h 8 May 2003 12:00:56 -0000 1.3 --- StdAfx.h 8 Dec 2003 08:11:20 -0000 1.4 *************** *** 13,29 **** #pragma warning( disable : 4100 ) ! #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #include <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #include <afxadv.h> ! #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT ! #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT #include "./includes/htmlhelp.h" //HTML help :) ! #include "./includes/bcgcb.h" // BCG Control Bar //{{AFX_INSERT_LOCATION}} --- 13,34 ---- #pragma warning( disable : 4100 ) ! #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #include <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #include <afxadv.h> ! #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT ! #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT #include "./includes/htmlhelp.h" //HTML help :) ! #include "./includes/bcgcb.h" // BCG Control Bar ! ! // The defines for the Pug XML Library ! #define PUGAPI_VARIANT 0x58475550 //The Pug XML library variant we are using in this implementation. ! #define PUGAPI_VERSION_MAJOR 1 //The Pug XML library major version we are using in this implementation. ! #define PUGAPI_VERSION_MINOR 2 //The Pug XML library minor version we are using in this implementation. //{{AFX_INSERT_LOCATION}} |