You can subscribe to this list here.
| 2005 |
Jan
(98) |
Feb
(101) |
Mar
(60) |
Apr
(38) |
May
(26) |
Jun
|
Jul
|
Aug
(159) |
Sep
(78) |
Oct
(31) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(6) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Emilien K. <cur...@us...> - 2005-03-08 18:46:39
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22285/include/wxDevCenter Modified Files: Tag: manager-virtualization FileSystem.h FileSystemStandard.h Manager.h Log Message: Passage du FileSystemManager à la nouvelle architecture des gestionnaires. Index: Manager.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Attic/Manager.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Manager.h 8 Mar 2005 17:26:27 -0000 1.1.2.1 --- Manager.h 8 Mar 2005 18:46:24 -0000 1.1.2.2 *************** *** 98,106 **** * @param nIndex Index de l'objet. * @return Référence de l'objet.*/ ! ItemType& Item(unsigned int n){return *at(n);} /** Accès constant à un objet. * @param nIndex Index de l'objet. * @return Référence de l'objet.*/ ! const ItemType& Item(unsigned int n)const{return *at(n) ;} /** Enregistrement d'un objet. * @param pObj Adresse de l'objet. --- 98,106 ---- * @param nIndex Index de l'objet. * @return Référence de l'objet.*/ ! ItemType& Item(unsigned int nIndex){return *at(nIndex);} /** Accès constant à un objet. * @param nIndex Index de l'objet. * @return Référence de l'objet.*/ ! const ItemType& Item(unsigned int nIndex)const{return *at(nIndex);} /** Enregistrement d'un objet. * @param pObj Adresse de l'objet. *************** *** 153,156 **** --- 153,158 ---- { public: + /** Constructeur.*/ + InitializableObjectManager():ObjectManager<ItemType>(){} /** @name Surcharge des fonctions de manipulations. * @{ */ *************** *** 260,268 **** * @param nIndex Index du patron. * @return Référence du patron.*/ ! Template& GetTemplate(unsigned int n){return InitializableObjectManager<Template>::Item(n);} /** Accès constant à un patron. * @param nIndex Index du patron. * @return Référence du patron.*/ ! const Template& GetTemplate(unsigned int n)const{return InitializableObjectManager<Template>::Item(n);} /** Enregistrement d'un patron. * @param pTemplate Adresse du patron. --- 262,270 ---- * @param nIndex Index du patron. * @return Référence du patron.*/ ! Template& GetTemplate(unsigned int nIndex){return InitializableObjectManager<Template>::Item(nIndex);} /** Accès constant à un patron. * @param nIndex Index du patron. * @return Référence du patron.*/ ! const Template& GetTemplate(unsigned int nIndex)const{return InitializableObjectManager<Template>::Item(nIndex);} /** Enregistrement d'un patron. * @param pTemplate Adresse du patron. Index: FileSystemStandard.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystemStandard.h,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** FileSystemStandard.h 7 Mar 2005 15:23:02 -0000 1.9 --- FileSystemStandard.h 8 Mar 2005 18:46:24 -0000 1.9.2.1 *************** *** 42,45 **** --- 42,48 ---- { public: + virtual wxString GetFileSystemName()const{return WXDC_SYSTEM_STDFS_NAME;} + virtual wxIconBundle GetIconBundle()const{return wxGetApp().LoadAppIconBundle("desktop");} + wxString GetProtocoleName()const{return "file";} bool CreateDirectory(FilePath strDir); Index: FileSystem.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystem.h,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** FileSystem.h 25 Feb 2005 20:45:55 -0000 1.3 --- FileSystem.h 8 Mar 2005 18:46:24 -0000 1.3.2.1 *************** *** 33,36 **** --- 33,37 ---- #define __WXDEVCENTER_FILESYSTEM + #include <wxDevCenter/Manager.h> #include <wxDevCenter/FileTools.h> *************** *** 121,127 **** * @see UnixStandardFileSystem */ ! class WXDC_DLL_BASE FileSystem : public wxObject { public: /** @name Enumération du contenu. * @{ */ --- 122,137 ---- * @see UnixStandardFileSystem */ ! class WXDC_DLL_BASE FileSystem : public wxObject, public InitializableInterface { public: + /** @name Propriétés générales. + * @{ */ + /** Retourne le nom du système de fichier. + * Le nom n'est qu'une donnée de présentation est en aucun cas une clef unique.*/ + virtual wxString GetFileSystemName()const{return wxT("");} + /** Retourne le bundle d'icones du système de fichier.*/ + virtual wxIconBundle GetIconBundle()const{return wxIconBundle();} + /** @} */ + /** @name Enumération du contenu. * @{ */ *************** *** 212,278 **** * Fait le lien entre les noms de fichiers, les systèmes de fichiers et les archives. */ ! class WXDC_DLL_BASE FileSystemManager : public wxObject { public: - /** Structure d'association des systèmes de fichiers avec d'autres infos.*/ - struct WXDC_DLL_BASE FileSystemManagerAssoc - { - /** Adresse de l'instance du système de fichier.*/ - FileSystem* pFileSystem; - /** Nom du système de fichier.*/ - wxString strName; - /** Bundle d'icone associé.*/ - wxIconBundle Icones; - }; - protected: - WX_DEFINE_USER_EXPORTED_ARRAY(FileSystemManagerAssoc*, FileSystemManagerAssocArray, class WXDC_DLL_BASE); - - /** Tableau des systèmes de fichiers enregistrés.*/ - FileSystemManagerAssocArray m_arFileSystems; - public: FileSystemManager(); virtual ~FileSystemManager(); - /** Enregistre un nouveau système de fichier. - * @param pFileSystem Système de fichier à enregistrer. - * @param strName Nom de présentation du système. - * @param Icones Bundle d'icone pour la représentation graphique. - */ - void RegisterFileSystem(FileSystem* pFileSystem, const wxString& strName, const wxIconBundle& Icones); - - /** Désinscrit le système de fichier. - * Le système de fichier est désinscrit mais pas détruit. - * @param pFileSystem Système de fichier à désinscrire. - */ - void RemoveFileSystem(FileSystem* pFileSystem); - - /** Supprime le système de fichier. - * Le système de fichier est désinscrit puis détruit. - * @param pFileSystem Système de fichier à supprimer. - */ - void DeleteFileSystem(FileSystem* pFileSystem); - - /** Retourne le nombre de systèmes de fichiers enregistrés. - * @return Nombre de systèmes enregistrés. - */ - unsigned int GetCount(); - - /** Cherche si un système de fichier est attaché. - * @param pFileSystem Système de fichier à supprimer. - * @return Index du système de fichier et -1 si non attaché.*/ - int Find(FileSystem* pFileSystem); - - /** Retourne une référence vers la description demandée. - * @param nIndex Indice du système de fichier. - * @return Référence de l'association du système de fichier. - */ - FileSystemManagerAssoc& GetFileSystem(int nIndex){return *m_arFileSystems[nIndex];} - - /** Retourne une référence vers la description demandée. - * @param pFileSystem Systeme de fichier demandé. - * @return Référence de l'association du système de fichier. - */ - FileSystemManagerAssoc& GetFileSystem(FileSystem* pFileSystem){return *m_arFileSystems[Find(pFileSystem)];} - /** Retourne le système de fichier correspondant à un chemin de fichier. * @param strPath Chemin du fichier. --- 222,231 ---- * Fait le lien entre les noms de fichiers, les systèmes de fichiers et les archives. */ ! class WXDC_DLL_BASE FileSystemManager : public InitializableObjectManager<FileSystem> { public: FileSystemManager(); virtual ~FileSystemManager(); /** Retourne le système de fichier correspondant à un chemin de fichier. * @param strPath Chemin du fichier. |
|
From: Emilien K. <cur...@us...> - 2005-03-08 18:46:38
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22285/src Modified Files: Tag: manager-virtualization Application.cpp FileSystem.cpp FileSystemCtrl.cpp Log Message: Passage du FileSystemManager à la nouvelle architecture des gestionnaires. Index: FileSystemCtrl.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystemCtrl.cpp,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** FileSystemCtrl.cpp 25 Feb 2005 20:58:04 -0000 1.6 --- FileSystemCtrl.cpp 8 Mar 2005 18:46:25 -0000 1.6.2.1 *************** *** 683,689 **** for(unsigned int n=0; n<pFSM->GetCount(); n++) { ! FileSystemManager::FileSystemManagerAssoc& FSMA = pFSM->GetFileSystem((int)n); ! wxBitmap bmp = FSMA.Icones.GetIcon(48); ! AttachFileSystem(FSMA.pFileSystem, FSMA.strName, bmp); } } --- 683,688 ---- for(unsigned int n=0; n<pFSM->GetCount(); n++) { ! wxBitmap bmp = pFSM->Item(n).GetIconBundle().GetIcon(48); ! AttachFileSystem(&(pFSM->Item(n)), pFSM->Item(n).GetFileSystemName(), bmp); } } Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -C2 -d -r1.15.2.1 -r1.15.2.2 *** Application.cpp 8 Mar 2005 17:26:28 -0000 1.15.2.1 --- Application.cpp 8 Mar 2005 18:46:24 -0000 1.15.2.2 *************** *** 74,79 **** // Initialise le gestionnaire de systèmes de fichiers m_pStandardFileSystem = new FileSystemStandard; ! wxIconBundle IB = LoadAppIconBundle("desktop"); ! m_FileSystemManager.RegisterFileSystem(m_pStandardFileSystem, WXDC_SYSTEM_STDFS_NAME, IB); // Crée la fenetre principale --- 74,78 ---- // Initialise le gestionnaire de systèmes de fichiers m_pStandardFileSystem = new FileSystemStandard; ! m_FileSystemManager.Register(m_pStandardFileSystem); // Crée la fenetre principale Index: FileSystem.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystem.cpp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** FileSystem.cpp 3 Dec 2004 16:47:45 -0000 1.1 --- FileSystem.cpp 8 Mar 2005 18:46:25 -0000 1.1.4.1 *************** *** 188,192 **** FileSystemManager::FileSystemManager(): ! wxObject() { } --- 188,192 ---- FileSystemManager::FileSystemManager(): ! InitializableObjectManager<FileSystem>() { } *************** *** 194,247 **** FileSystemManager::~FileSystemManager() { - while(m_arFileSystems.GetCount()>0) - { - delete m_arFileSystems[0]->pFileSystem; - delete m_arFileSystems[0]; - m_arFileSystems.RemoveAt(0); - } - } - - // Enregistre un nouveau système de fichier. - void FileSystemManager::RegisterFileSystem(FileSystem* pFileSystem, const wxString& strName, const wxIconBundle& Icones) - { - FileSystemManagerAssoc* pFSMA = new FileSystemManagerAssoc; - pFSMA->pFileSystem = pFileSystem; - pFSMA->strName = strName; - pFSMA->Icones = Icones; - m_arFileSystems.Add(pFSMA); - } - - // Désinscrit le système de fichier. - void FileSystemManager::RemoveFileSystem(FileSystem* pFileSystem) - { - int iIndex = Find(pFileSystem); - if(iIndex!=-1) - m_arFileSystems.RemoveAt(iIndex); - } - - // Supprime le système de fichier. - void FileSystemManager::DeleteFileSystem(FileSystem* pFileSystem) - { - int iIndex = Find(pFileSystem); - if(iIndex!=-1) - { - delete m_arFileSystems[iIndex]; - m_arFileSystems.RemoveAt(iIndex); - } - } - - // Retourne le nombre de systèmes de fichiers enregistrés. - unsigned int FileSystemManager::GetCount() - { - return m_arFileSystems.GetCount(); - } - - // Cherche si un système de fichier est attaché. - int FileSystemManager::Find(FileSystem* pFileSystem) - { - for(unsigned int n=0; n<m_arFileSystems.GetCount(); n++) - if(m_arFileSystems[n]->pFileSystem == pFileSystem) - return (int)n; - return -1; } --- 194,197 ---- *************** *** 250,256 **** { wxString strProtocol = strPath.GetFileProtocol(); ! for(unsigned int n=0; n<m_arFileSystems.GetCount(); n++) ! if(m_arFileSystems[n]->pFileSystem->GetProtocoleName()==strProtocol) ! return m_arFileSystems[n]->pFileSystem; return NULL; } --- 200,206 ---- { wxString strProtocol = strPath.GetFileProtocol(); ! for(unsigned int n=0; n<GetCount(); n++) ! if(Item(n).GetProtocoleName()==strProtocol) ! return &Item(n); return NULL; } |
|
From: Emilien K. <cur...@us...> - 2005-03-08 17:26:37
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32164/include/wxDevCenter Modified Files: Tag: manager-virtualization Application.h Project.h Added Files: Tag: manager-virtualization Manager.h Log Message: Adaptation du gestionnaire de projet à la nouvelle architecture des gestionnaires. Index: Project.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Project.h,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** Project.h 7 Mar 2005 15:23:02 -0000 1.4 --- Project.h 8 Mar 2005 17:26:27 -0000 1.4.2.1 *************** *** 30,33 **** --- 30,34 ---- #define __WXDEVCENTER_PROJECT + #include <wxDevCenter/Manager.h> #include <wxDevCenter/FileTools.h> #include <wxDevCenter/FileSystem.h> *************** *** 45,49 **** * @warning Les classes de projets doivent impérativement être RTTI-dynamiques et leurs constructeurs ne peuvent prendre aucun paramètre. */ ! class WXDC_DLL_BASE Project : public wxObject { DECLARE_DYNAMIC_CLASS(Project); --- 46,50 ---- * @warning Les classes de projets doivent impérativement être RTTI-dynamiques et leurs constructeurs ne peuvent prendre aucun paramètre. */ ! class WXDC_DLL_BASE Project : public ManagedObject { DECLARE_DYNAMIC_CLASS(Project); *************** *** 102,105 **** --- 103,107 ---- + /** Classe de patron de projet. * Utilisé pour enregistrer les différents types de projets. *************** *** 110,128 **** * - Les infos RTTI de la classe du projet. */ ! class WXDC_DLL_BASE ProjectTemplate : public wxObject { protected: - /** Nom du type de projet.*/ - wxString m_strName; - /** Description du type de projet.*/ - wxString m_strDescript; /** Chemin relatif de son icone.*/ wxString m_strIcon; - /** Extensions des fichiers du type de projet.*/ wxArrayString m_strExtArray; - - /** Informations RTTI.*/ - wxClassInfo *m_pProjectClassInfo; public: /** Constructeur par défaut. --- 112,122 ---- * - Les infos RTTI de la classe du projet. */ ! class WXDC_DLL_BASE ProjectTemplate : public ObjectTemplate<Project> { protected: /** Chemin relatif de son icone.*/ wxString m_strIcon; /** Extensions des fichiers du type de projet.*/ wxArrayString m_strExtArray; public: /** Constructeur par défaut. *************** *** 164,168 **** /** Crée un objet projet. * Ne fait que allouer la mémoire et appeler le constructeur par défaut.*/ ! Project* CreateProject(); }; --- 158,162 ---- /** Crée un objet projet. * Ne fait que allouer la mémoire et appeler le constructeur par défaut.*/ ! Project* CreateProject(){return CreateObject();} }; *************** *** 186,204 **** - - /** Définition du type tableau dynamique de patrons de projets. - */ - WX_DEFINE_USER_EXPORTED_ARRAY(ProjectTemplate*, ProjectTemplateArray, class WXDC_DLL_BASE); - - /** Gestionnaire de projets. * Enregistre les différents types de projets et gère le projet actuellement ouvert. */ ! class WXDC_DLL_BASE ProjectManager : protected ProjectTemplateArray { - protected: - /** Projet actuellement ouvert. NULL si aucun.*/ - Project* m_pCurrentProject; - public: /** Constructeur par défaut.*/ --- 180,188 ---- /** Gestionnaire de projets. * Enregistre les différents types de projets et gère le projet actuellement ouvert. */ ! class WXDC_DLL_BASE ProjectManager : public SingleObjectTemplateManager<Project, ProjectTemplate> { public: /** Constructeur par défaut.*/ *************** *** 216,224 **** * @{ */ /** Test si un projet est actuellement ouvert.*/ ! bool HasProject()const{return m_pCurrentProject!=NULL;} /** Retourne l'adresse du projet courant.*/ ! Project* GetProject(){return m_pCurrentProject;} /** Retourne l'adresse du projet courant.*/ ! const Project* GetProject()const{return m_pCurrentProject;} /** Ferme le projet en cours. * @param bForce Vrai si le projet doit être fermé impérativement. --- 200,208 ---- * @{ */ /** Test si un projet est actuellement ouvert.*/ ! bool HasProject()const{return HasObject();} /** Retourne l'adresse du projet courant.*/ ! Project& GetProject(){return GetCurrentObject();} /** Retourne l'adresse du projet courant.*/ ! const Project& GetProject()const{return GetCurrentObject();} /** Ferme le projet en cours. * @param bForce Vrai si le projet doit être fermé impérativement. *************** *** 243,255 **** /** @name Gestion des types de projets. * @{ */ - /** Nombre de type de projets.*/ - unsigned int GetProjectTemplateCount()const{return GetCount();} - /** Accès à un type de projet par son index.*/ - ProjectTemplate* GetProjectTemplate(int index){return Item(index);} - const ProjectTemplate* GetProjectTemplate(int index)const{return Item(index);} - /** Accès à l'index d'un type de projet.*/ - int GetProjectTemplateIndex(const ProjectTemplate* pTemplate); - /** Enregistre un type de projet.*/ - bool RegisterProjectType(ProjectTemplate* pTemplate); /** Retourne le wildcard de tous les types de projets. * @param bShowStarDotStar Si vrai, ajoute le wildcard "*.*". --- 227,230 ---- --- NEW FILE: Manager.h --- (This appears to be a binary file; contents omitted.) Index: Application.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Application.h,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** Application.h 7 Mar 2005 15:23:02 -0000 1.8 --- Application.h 8 Mar 2005 17:26:27 -0000 1.8.2.1 *************** *** 160,165 **** ProjectManager& GetProjectManager(){return m_ProjectManager;} /** Projet.*/ ! Project* GetProject(){return m_ProjectManager.GetProject();} ! const Project* GetProject()const{return m_ProjectManager.GetProject();} /** @}*/ --- 160,165 ---- ProjectManager& GetProjectManager(){return m_ProjectManager;} /** Projet.*/ ! Project& GetProject(){return m_ProjectManager.GetProject();} ! const Project& GetProject()const{return m_ProjectManager.GetProject();} /** @}*/ |
|
From: Emilien K. <cur...@us...> - 2005-03-08 17:26:37
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32164/src Modified Files: Tag: manager-virtualization Application.cpp Project.cpp Added Files: Tag: manager-virtualization Manager.cpp Log Message: Adaptation du gestionnaire de projet à la nouvelle architecture des gestionnaires. Index: Project.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Project.cpp,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Project.cpp 4 Mar 2005 16:09:46 -0000 1.3 --- Project.cpp 8 Mar 2005 17:26:28 -0000 1.3.2.1 *************** *** 36,40 **** */ Project::Project(): ! wxObject(), m_strName(""), m_strPath(""), --- 36,40 ---- */ Project::Project(): ! ManagedObject(), m_strName(""), m_strPath(""), *************** *** 86,94 **** */ ProjectTemplate::ProjectTemplate(wxClassInfo* pProjectClassInfo, wxString strName, wxString strDescript, wxString strIcon, wxString strExt): ! wxObject(), ! m_strName(strName), ! m_strDescript(strDescript), ! m_strIcon(strIcon), ! m_pProjectClassInfo(pProjectClassInfo) { if(!strExt.IsEmpty()) --- 86,91 ---- */ ProjectTemplate::ProjectTemplate(wxClassInfo* pProjectClassInfo, wxString strName, wxString strDescript, wxString strIcon, wxString strExt): ! ObjectTemplate<Project>(pProjectClassInfo, strName, strDescript), ! m_strIcon(strIcon) { if(!strExt.IsEmpty()) *************** *** 121,129 **** } ! // Crée un objet projet. ! Project* ProjectTemplate::CreateProject() ! { ! return (Project*)m_pProjectClassInfo->CreateObject(); ! } --- 118,126 ---- } ! //// Crée un objet projet. ! //Project* ProjectTemplate::CreateProject() ! //{ ! // return (Project*)m_pProjectClassInfo->CreateObject(); ! //} *************** *** 136,140 **** ProjectTemplate(pProjectClassInfo, strName, strDescript, strIcon, strExt) { ! wxGetApp().GetProjectManager().RegisterProjectType(this); } --- 133,137 ---- ProjectTemplate(pProjectClassInfo, strName, strDescript, strIcon, strExt) { ! wxGetApp().GetProjectManager().RegisterTemplate(this); } *************** *** 146,151 **** // Constructeur par défaut. ProjectManager::ProjectManager(): ! ProjectTemplateArray(), ! m_pCurrentProject(NULL) { } --- 143,147 ---- // Constructeur par défaut. ProjectManager::ProjectManager(): ! SingleObjectTemplateManager<Project, ProjectTemplate>() { } *************** *** 165,170 **** void ProjectManager::Finalize() { ! for(unsigned int n=0; n<GetProjectTemplateCount(); n++) ! GetProjectTemplate(n)->Finalize(); } --- 161,166 ---- void ProjectManager::Finalize() { ! for(unsigned int n=0; n<GetTemplateCount(); n++) ! GetTemplate(n).Finalize(); } *************** *** 176,187 **** { // Préfermeture. ! if(!m_pCurrentProject->CanCloseProject() && !bForce) return false; // Fermeture. ! if(!m_pCurrentProject->OnCloseProject() && !bForce) return false; // Destruction. ! delete m_pCurrentProject; ! m_pCurrentProject = NULL; } return true; --- 172,182 ---- { // Préfermeture. ! if(!GetProject().CanCloseProject() && !bForce) return false; // Fermeture. ! if(!GetProject().OnCloseProject() && !bForce) return false; // Destruction. ! DestroyCurrentObject(); } return true; *************** *** 201,207 **** return false; ! m_pCurrentProject = GetProjectTemplate(iTemplateIndex)->CreateProject(); ! if(m_pCurrentProject) { // Appelle de le chargement du projet. --- 196,202 ---- return false; ! CreateObject(iTemplateIndex); ! if(HasObject()) { // Appelle de le chargement du projet. *************** *** 209,213 **** if(pAr!=NULL) { ! if(m_pCurrentProject->OnOpenProject(*pAr)) { delete pAr; --- 204,208 ---- if(pAr!=NULL) { ! if(GetProject().OnOpenProject(*pAr)) { delete pAr; *************** *** 215,219 **** } } ! delete m_pCurrentProject; } return false; --- 210,214 ---- } } ! DestroyCurrentObject(); } return false; *************** *** 226,234 **** { // Appelle de le chargement du projet. ! FilePath path = m_pCurrentProject->GetPath(); Archive* pAr = wxGetApp().CreateDocumentArchive(path, Archive::write); if(pAr!=NULL) { ! if(m_pCurrentProject->OnSaveProject(*pAr)) { delete pAr; --- 221,229 ---- { // Appelle de le chargement du projet. ! FilePath path = GetProject().GetPath(); Archive* pAr = wxGetApp().CreateDocumentArchive(path, Archive::write); if(pAr!=NULL) { ! if(GetProject().OnSaveProject(*pAr)) { delete pAr; *************** *** 253,262 **** return false; ! m_pCurrentProject = GetProjectTemplate(iTemplateIndex)->CreateProject(); // Appelle de l'initialisation du projet. ! if(!m_pCurrentProject->OnCreateProject()) { ! delete m_pCurrentProject; return false; } --- 248,257 ---- return false; ! CreateObject(iTemplateIndex); // Appelle de l'initialisation du projet. ! if(!GetProject().OnCreateProject()) { ! DestroyCurrentObject(); return false; } *************** *** 265,291 **** } - // Accès à l'index d'un type de projet. - int ProjectManager::GetProjectTemplateIndex(const ProjectTemplate* pTemplate) - { - for(unsigned int n=0; n<GetCount(); n++) - if(Item(n)==pTemplate) - return n; - return -1; - } - - // Enregistre un type de projet. - bool ProjectManager::RegisterProjectType(ProjectTemplate* pTemplate) - { - if(GetProjectTemplateIndex(pTemplate)==-1) - { - if(pTemplate->Initialize()) - { - Add(pTemplate); - return true; - } - } - return false; - } - // Retourne le wildcard de tous les types de projets. wxString ProjectManager::GetAllWildcard(bool bShowStarDotStar, bool bShowAllRegisteredExt)const --- 260,263 ---- *************** *** 298,306 **** { strWild = wxString(WXDC_FILE_WILDCARD_ALLREGISTERED) + wxT("|"); ! for(m=0; m<GetCount(); m++) { ! for(n=0; n<GetProjectTemplate(m)->GetExtensionCount(); n++) { ! strWild << wxT("*.") << GetProjectTemplate(m)->GetExtension(n) << wxT(";"); } } --- 270,278 ---- { strWild = wxString(WXDC_FILE_WILDCARD_ALLREGISTERED) + wxT("|"); ! for(m=0; m<GetTemplateCount(); m++) { ! for(n=0; n<GetTemplate(m).GetExtensionCount(); n++) { ! strWild << wxT("*.") << GetTemplate(m).GetExtension(n) << wxT(";"); } } *************** *** 309,314 **** } ! for(n=0; n<GetCount(); n++) ! strWild << GetProjectTemplate(n)->GetDocWildcard(false); if(bShowStarDotStar) --- 281,286 ---- } ! for(n=0; n<GetTemplateCount(); n++) ! strWild << GetTemplate(n).GetDocWildcard(false); if(bShowStarDotStar) *************** *** 321,326 **** { wxArrayString ar; ! for(unsigned int n=0; n<GetProjectTemplateCount(); n++) ! ar.Add(GetProjectTemplate(n)->GetName() + wxT(" - ") + GetProjectTemplate(n)->GetDescript()); return wxGetSingleChoiceIndex(WXDC_PROJECT_QUERY_TYPE, WXDC_NAME, ar); } --- 293,298 ---- { wxArrayString ar; ! for(unsigned int n=0; n<GetTemplateCount(); n++) ! ar.Add(GetTemplate(n).GetName() + wxT(" - ") + GetTemplate(n).GetDescript()); return wxGetSingleChoiceIndex(WXDC_PROJECT_QUERY_TYPE, WXDC_NAME, ar); } *************** *** 330,336 **** { wxString strExt = strFile.GetFileExt(); ! for(unsigned int n=0; n<GetProjectTemplateCount(); n++) ! for(unsigned int m=0; m<GetProjectTemplate(n)->GetExtensionCount(); m++) ! if(strExt==GetProjectTemplate(n)->GetExtension(m)) return (int)n; return -1; --- 302,308 ---- { wxString strExt = strFile.GetFileExt(); ! for(unsigned int n=0; n<GetTemplateCount(); n++) ! for(unsigned int m=0; m<GetTemplate(n).GetExtensionCount(); m++) ! if(strExt==GetTemplate(n).GetExtension(m)) return (int)n; return -1; --- NEW FILE: Manager.cpp --- (This appears to be a binary file; contents omitted.) Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -d -r1.15 -r1.15.2.1 *** Application.cpp 7 Mar 2005 15:23:03 -0000 1.15 --- Application.cpp 8 Mar 2005 17:26:28 -0000 1.15.2.1 *************** *** 141,145 **** if(iProjectType==wxNOT_FOUND // Pas de sélection de type || iProjectType==0 // "Tous les types enregistrés" ! || iProjectType==(int)m_ProjectManager.GetProjectTemplateCount()) // "*.*" iProjectType = -1; --- 141,145 ---- if(iProjectType==wxNOT_FOUND // Pas de sélection de type || iProjectType==0 // "Tous les types enregistrés" ! || iProjectType==(int)m_ProjectManager.GetTemplateCount()) // "*.*" iProjectType = -1; |
|
From: Emilien K. <cur...@us...> - 2005-03-07 15:24:36
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28800/src Modified Files: SimpleTextDocView.cpp Log Message: Correction de la doc doxygen. Index: SimpleTextDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/SimpleTextDocView.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SimpleTextDocView.cpp 4 Mar 2005 16:35:16 -0000 1.8 --- SimpleTextDocView.cpp 7 Mar 2005 15:23:54 -0000 1.9 *************** *** 97,101 **** /** Traduction d'une couleur depuis sa forme de sauvegarde de config. ! * @param Chaine de configuration. * @return Couleur. */ --- 97,101 ---- /** Traduction d'une couleur depuis sa forme de sauvegarde de config. ! * @param str Chaine de configuration. * @return Couleur. */ |
|
From: Emilien K. <cur...@us...> - 2005-03-07 15:24:13
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28800/include/wxDevCenter/StdPlugin Modified Files: BitmapCtrl.h BitmapDocView.h Controls.h SimpleTextDocView.h language.h Log Message: Correction de la doc doxygen. Index: Controls.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/Controls.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Controls.h 23 Feb 2005 09:16:46 -0000 1.7 --- Controls.h 7 Mar 2005 15:23:53 -0000 1.8 *************** *** 23,27 **** class wxSliderSpinCtrl : public wxControl { ! DECLARE_EVENT_TABLE() public: wxSliderSpinCtrl(wxWindow* parent, wxWindowID id, int value , int minValue, int maxValue, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER); --- 23,27 ---- class wxSliderSpinCtrl : public wxControl { ! DECLARE_EVENT_TABLE(); public: wxSliderSpinCtrl(wxWindow* parent, wxWindowID id, int value , int minValue, int maxValue, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER); *************** *** 60,64 **** class wxColourCtrl : public wxControl { ! DECLARE_EVENT_TABLE() public: wxColourCtrl(wxWindow* parent, wxWindowID id, unsigned char red, unsigned char green, unsigned char blue, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCOL_PICK_ON_DBLCLIC); --- 60,64 ---- class wxColourCtrl : public wxControl { ! DECLARE_EVENT_TABLE(); public: wxColourCtrl(wxWindow* parent, wxWindowID id, unsigned char red, unsigned char green, unsigned char blue, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCOL_PICK_ON_DBLCLIC); Index: BitmapCtrl.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/BitmapCtrl.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** BitmapCtrl.h 4 Mar 2005 16:35:16 -0000 1.9 --- BitmapCtrl.h 7 Mar 2005 15:23:50 -0000 1.10 *************** *** 88,92 **** /** Attache un image au controle. ! * @param img Nouvelle image fixée au controle.*/ void SetBitmap(const wxBitmap& Bmp); --- 88,92 ---- /** Attache un image au controle. ! * @param Bmp Nouvelle image fixée au controle.*/ void SetBitmap(const wxBitmap& Bmp); Index: BitmapDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/BitmapDocView.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** BitmapDocView.h 4 Mar 2005 16:35:16 -0000 1.15 --- BitmapDocView.h 7 Mar 2005 15:23:53 -0000 1.16 *************** *** 42,46 **** class BitmapDocument : public wxDevCenter::Document { ! DECLARE_DYNAMIC_CLASS(BitmapDocument) protected: /** Buffer de l'image.*/ --- 42,46 ---- class BitmapDocument : public wxDevCenter::Document { ! DECLARE_DYNAMIC_CLASS(BitmapDocument); protected: /** Buffer de l'image.*/ *************** *** 67,71 **** * @param ptFrom Point de départ du trait. * @param ptTo Point d'arrivée du trait. ! * @pen Crayon de dessin du trait. */ void DrawLine(wxPoint ptFrom, wxPoint ptTo, const wxPen &pen); --- 67,71 ---- * @param ptFrom Point de départ du trait. * @param ptTo Point d'arrivée du trait. ! * @param pen Crayon de dessin du trait. */ void DrawLine(wxPoint ptFrom, wxPoint ptTo, const wxPen &pen); *************** *** 74,85 **** * @param ptFrom Point de départ du rectangle. * @param ptTo Point d'arrivée du rectangle. ! * @pen Crayon du contour du rectangle. ! * @brush Pinceau de remplissage du rectangle. */ void DrawRect(wxPoint ptFrom, wxPoint ptTo, const wxPen &pen, const wxBrush &brush); /** Dessine un rectangle. * @param r Rectangle à dessiner. ! * @pen Crayon du contour du rectangle. ! * @brush Pinceau de remplissage du rectangle. */ void DrawRect(wxRect r, const wxPen &pen, const wxBrush &brush); --- 74,85 ---- * @param ptFrom Point de départ du rectangle. * @param ptTo Point d'arrivée du rectangle. ! * @param pen Crayon du contour du rectangle. ! * @param brush Pinceau de remplissage du rectangle. */ void DrawRect(wxPoint ptFrom, wxPoint ptTo, const wxPen &pen, const wxBrush &brush); /** Dessine un rectangle. * @param r Rectangle à dessiner. ! * @param pen Crayon du contour du rectangle. ! * @param brush Pinceau de remplissage du rectangle. */ void DrawRect(wxRect r, const wxPen &pen, const wxBrush &brush); *************** *** 88,93 **** * @param ptFrom Point de départ du rectangle. * @param ptTo Point d'arrivée du rectangle. ! * @pen Crayon du contour du rectangle. ! * @brush Pinceau de remplissage du rectangle. */ void DrawRoundedRect(wxPoint ptFrom, wxPoint ptTo, const wxPen &pen, const wxBrush &brush); --- 88,93 ---- * @param ptFrom Point de départ du rectangle. * @param ptTo Point d'arrivée du rectangle. ! * @param pen Crayon du contour du rectangle. ! * @param brush Pinceau de remplissage du rectangle. */ void DrawRoundedRect(wxPoint ptFrom, wxPoint ptTo, const wxPen &pen, const wxBrush &brush); *************** *** 96,101 **** * @param ptFrom Point de départ de l'ellipse. * @param ptTo Point d'arrivée de l'ellipse. ! * @pen Crayon du contour de l'ellipse. ! * @brush Pinceau de remplissage de l'ellipse. */ void DrawEllipse(wxPoint ptFrom, wxPoint ptTo, const wxPen &pen, const wxBrush &brush); --- 96,101 ---- * @param ptFrom Point de départ de l'ellipse. * @param ptTo Point d'arrivée de l'ellipse. ! * @param pen Crayon du contour de l'ellipse. ! * @param brush Pinceau de remplissage de l'ellipse. */ void DrawEllipse(wxPoint ptFrom, wxPoint ptTo, const wxPen &pen, const wxBrush &brush); *************** *** 103,107 **** /** Applique/colle un bitmap par dessus l'image d'origine. * @param bmp Bitmap à appliquer. ! * @param pot Position où appliquer le bitmap.*/ void DrawBitmap(const wxBitmap& bmp, wxPoint pos); --- 103,107 ---- /** Applique/colle un bitmap par dessus l'image d'origine. * @param bmp Bitmap à appliquer. ! * @param pos Position où appliquer le bitmap.*/ void DrawBitmap(const wxBitmap& bmp, wxPoint pos); *************** *** 133,138 **** class BitmapView : public wxDevCenter::View { ! DECLARE_DYNAMIC_CLASS(BitmapView) ! DECLARE_EVENT_TABLE() protected: virtual bool OnCreate(); --- 133,138 ---- class BitmapView : public wxDevCenter::View { ! DECLARE_DYNAMIC_CLASS(BitmapView); ! DECLARE_EVENT_TABLE(); protected: virtual bool OnCreate(); Index: SimpleTextDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/SimpleTextDocView.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SimpleTextDocView.h 4 Mar 2005 16:35:16 -0000 1.8 --- SimpleTextDocView.h 7 Mar 2005 15:23:53 -0000 1.9 *************** *** 170,174 **** { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(SimpleTextDocument) protected: /** Buffer du texte. */ --- 170,174 ---- { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(SimpleTextDocument); protected: /** Buffer du texte. */ *************** *** 212,218 **** { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(SimpleTextView) /** Déclaration de la table d'interception des évènements.*/ ! DECLARE_EVENT_TABLE() protected: --- 212,218 ---- { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(SimpleTextView); /** Déclaration de la table d'interception des évènements.*/ ! DECLARE_EVENT_TABLE(); protected: *************** *** 307,317 **** /** Interception de l'évènement menu : Affichage/Options.*/ void OnShowOptions(wxCommandEvent& event); ! /** Interception des évènements menu : Langage/... .*/ void OnLangage(wxCommandEvent& event); ! /** Prépare les menus Langage/... .*/ void OnUpdateLangageUI(wxUpdateUIEvent& event); /** Intercepte l'évènement clic sur une marge.*/ void OnMarginClick(wxStyledTextEvent& event); ! /** Intercepte les évènements menus Rechercher/... .*/ void OnFindMenu(wxCommandEvent &event); /** Intercepte les évènements liés à la boite de dialogue rechercher/remplacer.*/ --- 307,317 ---- /** Interception de l'évènement menu : Affichage/Options.*/ void OnShowOptions(wxCommandEvent& event); ! /** Interception des évènements menu : Langage/* .*/ void OnLangage(wxCommandEvent& event); ! /** Prépare les menus Langage/* .*/ void OnUpdateLangageUI(wxUpdateUIEvent& event); /** Intercepte l'évènement clic sur une marge.*/ void OnMarginClick(wxStyledTextEvent& event); ! /** Intercepte les évènements menus Rechercher/* .*/ void OnFindMenu(wxCommandEvent &event); /** Intercepte les évènements liés à la boite de dialogue rechercher/remplacer.*/ Index: language.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/language.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** language.h 25 Feb 2005 15:43:28 -0000 1.13 --- language.h 7 Mar 2005 15:23:53 -0000 1.14 *************** *** 1,4 **** /** ! * @file language.h * @author Cursor * --- 1,4 ---- /** ! * @file StdPlugin/language.h * @author Cursor * |
|
From: Emilien K. <cur...@us...> - 2005-03-07 15:23:19
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28522/src Modified Files: Application.cpp Config.cpp DocManager.cpp FileSystemStandard.cpp Plugin.cpp Log Message: Correction de la doc doxygen. Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Application.cpp 3 Mar 2005 16:20:28 -0000 1.14 --- Application.cpp 7 Mar 2005 15:23:03 -0000 1.15 *************** *** 40,50 **** // Déclaration de la classe application ! IMPLEMENT_APP(wxDevCenter::Application) using namespace wxDevCenter; - // Fonction de lancement de l'appliation. - // Cette fonction permet d'initialiser les données de l'appli. bool Application::OnInit(void) { --- 40,48 ---- // Déclaration de la classe application ! IMPLEMENT_APP(wxDevCenter::Application); using namespace wxDevCenter; bool Application::OnInit(void) { Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Config.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Config.cpp 25 Feb 2005 17:16:56 -0000 1.8 --- Config.cpp 7 Mar 2005 15:23:03 -0000 1.9 *************** *** 1,4 **** /** ! * @file Config.cpp * @author Cursor * --- 1,4 ---- /** ! * @file src/Config.cpp * @author Cursor * Index: DocManager.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/DocManager.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DocManager.cpp 22 Feb 2005 16:44:14 -0000 1.6 --- DocManager.cpp 7 Mar 2005 15:23:03 -0000 1.7 *************** *** 48,57 **** // Constructeur-initialisation ! DocTemplate::DocTemplate(wxString strName, wxClassInfo *pDocClassInfo, wxString strExt, wxString strDescripton): wxObject(), m_nID(GetNewIdent()), m_strDocName(strName), m_pDocClassInfo(pDocClassInfo), ! m_strDescription(strDescripton) { m_ViewInfoArray.Alloc(2); --- 48,57 ---- // Constructeur-initialisation ! DocTemplate::DocTemplate(wxString strName, wxClassInfo *pDocClassInfo, wxString strExt, wxString strDescription): wxObject(), m_nID(GetNewIdent()), m_strDocName(strName), m_pDocClassInfo(pDocClassInfo), ! m_strDescription(strDescription) { m_ViewInfoArray.Alloc(2); Index: FileSystemStandard.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystemStandard.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** FileSystemStandard.cpp 25 Feb 2005 20:45:55 -0000 1.12 --- FileSystemStandard.cpp 7 Mar 2005 15:23:04 -0000 1.13 *************** *** 1,4 **** /** ! * @file FileSystemStandard.cpp * @author Cursor * --- 1,4 ---- /** ! * @file src/FileSystemStandard.cpp * @author Cursor * Index: Plugin.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Plugin.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Plugin.cpp 3 Dec 2004 16:47:46 -0000 1.1 --- Plugin.cpp 7 Mar 2005 15:23:04 -0000 1.2 *************** *** 1,4 **** /** ! * @file Plugin.h * @author Cursor * --- 1,4 ---- /** ! * @file Plugin.cpp * @author Cursor * |
|
From: Emilien K. <cur...@us...> - 2005-03-07 15:23:16
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28522/include/wxDevCenter Modified Files: AboutBox.h Application.h Config.h DocManager.h DocView.h FileSystemCtrl.h FileSystemStandard.h FileTools.h Frame.h MDIFrame.h MainFrame.h Plugin.h Project.h StatusBar.h Log Message: Correction de la doc doxygen. Index: Project.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Project.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Project.h 4 Mar 2005 16:09:46 -0000 1.3 --- Project.h 7 Mar 2005 15:23:02 -0000 1.4 *************** *** 43,51 **** /** Classe de base des projets. * A dériver pour implémenter de nouveaux types de projets. ! * \warning Les classes de projets doivent impérativement être RTTI-dynamiques et leurs constructeurs ne peuvent prendre aucun paramètre. */ class WXDC_DLL_BASE Project : public wxObject { ! DECLARE_DYNAMIC_CLASS(Project) // Données membres : protected: --- 43,51 ---- /** Classe de base des projets. * A dériver pour implémenter de nouveaux types de projets. ! * @warning Les classes de projets doivent impérativement être RTTI-dynamiques et leurs constructeurs ne peuvent prendre aucun paramètre. */ class WXDC_DLL_BASE Project : public wxObject { ! DECLARE_DYNAMIC_CLASS(Project); // Données membres : protected: Index: Config.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Config.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Config.h 23 Feb 2005 14:43:41 -0000 1.6 --- Config.h 7 Mar 2005 15:23:02 -0000 1.7 *************** *** 1,4 **** /** ! * @file Config.h * @author Cursor * --- 1,4 ---- /** ! * @file wxDevCenter/Config.h * @author Cursor * Index: MainFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MainFrame.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MainFrame.h 22 Feb 2005 16:24:04 -0000 1.3 --- MainFrame.h 7 Mar 2005 15:23:02 -0000 1.4 *************** *** 50,54 **** friend class Application; /** Déclare la table d'interception des évènements de fenêtres.*/ ! DECLARE_EVENT_TABLE() protected: --- 50,54 ---- friend class Application; /** Déclare la table d'interception des évènements de fenêtres.*/ ! DECLARE_EVENT_TABLE(); protected: Index: StatusBar.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/StatusBar.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StatusBar.h 15 Jan 2005 15:33:23 -0000 1.3 --- StatusBar.h 7 Mar 2005 15:23:02 -0000 1.4 *************** *** 36,40 **** class StatusBar : public wxStatusBar { ! DECLARE_EVENT_TABLE() public: StatusBar(wxWindow* parent); --- 36,40 ---- class StatusBar : public wxStatusBar { ! DECLARE_EVENT_TABLE(); public: StatusBar(wxWindow* parent); *************** *** 71,75 **** BEGIN_DECLARE_EVENT_TYPES() DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDC_EVT_STATUS_PANEL, 12010) ! END_DECLARE_EVENT_TYPES() typedef void (wxEvtHandler::*StatusEventFunction)(StatusEvent&); --- 71,75 ---- BEGIN_DECLARE_EVENT_TYPES() DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDC_EVT_STATUS_PANEL, 12010) ! END_DECLARE_EVENT_TYPES(); typedef void (wxEvtHandler::*StatusEventFunction)(StatusEvent&); Index: Application.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Application.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Application.h 4 Mar 2005 16:09:46 -0000 1.7 --- Application.h 7 Mar 2005 15:23:02 -0000 1.8 *************** *** 203,207 **** bool SaveDocument(Document* pDoc, bool bForceChooseName=false); /** Crée une archive (pointeur vers Archive) pour la sérialisation des documents. ! * @retourne l'adresse de l'archive et NULL si erreur. */ Archive* CreateDocumentArchive(FilePath &strDocPath, unsigned int nMode); --- 203,207 ---- bool SaveDocument(Document* pDoc, bool bForceChooseName=false); /** Crée une archive (pointeur vers Archive) pour la sérialisation des documents. ! * @return Retourne l'adresse de l'archive et NULL si erreur. */ Archive* CreateDocumentArchive(FilePath &strDocPath, unsigned int nMode); Index: Frame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Frame.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Frame.h 15 Jan 2005 15:33:23 -0000 1.3 --- Frame.h 7 Mar 2005 15:23:02 -0000 1.4 *************** *** 45,54 **** ! class WXDC_DLL_BASE ViewEvent : public wxEvent { private: ViewEvent& operator=(const ViewEvent& event); View *m_pOldView, *m_pNewView; public: --- 45,60 ---- ! /** Evènement prévenant d'un chan,gement de vue active.*/ class WXDC_DLL_BASE ViewEvent : public wxEvent { private: + /** Opérateur de copie. + * @param event 2vènement à copier. + * @return Référence de l'évènement courant. + */ ViewEvent& operator=(const ViewEvent& event); + /** Ancienne vue active.*/ View *m_pOldView, + /** Nouvelle vue active.*/ *m_pNewView; public: *************** *** 56,63 **** --- 62,72 ---- wxEvent* Clone(void) const; + /** @name Accesseurs. + * @{ */ View* GetOldView(){return m_pOldView;} View* GetNewView(){return m_pNewView;} void SetOldView(View *pOldView=NULL){m_pOldView=pOldView;} void SetNewView(View *pNewView=NULL){m_pNewView=pNewView;} + /** @} */ }; Index: Plugin.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Plugin.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Plugin.h 3 Dec 2004 16:47:44 -0000 1.1 --- Plugin.h 7 Mar 2005 15:23:02 -0000 1.2 *************** *** 103,112 **** /** Retourne un plugin. * @param nIndex Indice du plugin. ! * @param Référence vers un plugin. */ Plugin& GetPlugin(unsigned int nIndex){return *Item(nIndex);} /** Retourne un plugin. * @param nIndex Indice du plugin. ! * @param Référence vers un plugin. */ Plugin& operator[](unsigned int nIndex){return *Item(nIndex);} --- 103,112 ---- /** Retourne un plugin. * @param nIndex Indice du plugin. ! * @return Référence vers un plugin. */ Plugin& GetPlugin(unsigned int nIndex){return *Item(nIndex);} /** Retourne un plugin. * @param nIndex Indice du plugin. ! * @return Référence vers un plugin. */ Plugin& operator[](unsigned int nIndex){return *Item(nIndex);} Index: MDIFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MDIFrame.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MDIFrame.h 12 Jan 2005 13:50:54 -0000 1.2 --- MDIFrame.h 7 Mar 2005 15:23:02 -0000 1.3 *************** *** 39,43 **** { friend class DocManager; ! DECLARE_EVENT_TABLE() protected: // Fonctions d'évenements --- 39,43 ---- { friend class DocManager; ! DECLARE_EVENT_TABLE(); protected: // Fonctions d'évenements Index: DocManager.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocManager.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DocManager.h 28 Feb 2005 15:26:23 -0000 1.8 --- DocManager.h 7 Mar 2005 15:23:02 -0000 1.9 *************** *** 141,145 **** * @param strDescription Description détaillée du document (éventuellement vide). */ ! DocTemplate(wxString strName, wxClassInfo *pDocClassInfo, wxString strExt, wxString strDescripton=""); ~DocTemplate(); --- 141,145 ---- * @param strDescription Description détaillée du document (éventuellement vide). */ ! DocTemplate(wxString strName, wxClassInfo *pDocClassInfo, wxString strExt, wxString strDescription=""); ~DocTemplate(); Index: FileSystemCtrl.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystemCtrl.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FileSystemCtrl.h 25 Feb 2005 20:58:02 -0000 1.6 --- FileSystemCtrl.h 7 Mar 2005 15:23:02 -0000 1.7 *************** *** 83,87 **** class WXDC_DLL_BASE FileSystemTreeCtrl : public wxTreeCtrl { ! DECLARE_EVENT_TABLE() protected: /** Système de fichier attaché au controle.*/ --- 83,87 ---- class WXDC_DLL_BASE FileSystemTreeCtrl : public wxTreeCtrl { ! DECLARE_EVENT_TABLE(); protected: /** Système de fichier attaché au controle.*/ *************** *** 176,180 **** class WXDC_DLL_BASE FileSystemListCtrl : public wxListCtrl { ! DECLARE_EVENT_TABLE() protected: /** Système de fichier attaché au controle.*/ --- 176,180 ---- class WXDC_DLL_BASE FileSystemListCtrl : public wxListCtrl { ! DECLARE_EVENT_TABLE(); protected: /** Système de fichier attaché au controle.*/ *************** *** 384,387 **** --- 384,389 ---- /** Ajoute un système de fichiers à la liste des systèmes de fichiers attachés. * @param pFileSystem Nouveau système de fichiers. + * @param strTitle Nom du système de fichier. + * @param bmp Image représentant le système de fichier. */ void AttachFileSystem(FileSystem *pFileSystem, wxString strTitle, wxBitmap& bmp); Index: DocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocView.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DocView.h 15 Jan 2005 15:33:23 -0000 1.6 --- DocView.h 7 Mar 2005 15:23:02 -0000 1.7 *************** *** 93,99 **** /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(View) /** Déclaration de la table des évènements.*/ ! DECLARE_EVENT_TABLE() protected: /** Cadre parent. Fenêtre cadre qui contient (parent) la vue.*/ --- 93,99 ---- /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(View); /** Déclaration de la table des évènements.*/ ! DECLARE_EVENT_TABLE(); protected: /** Cadre parent. Fenêtre cadre qui contient (parent) la vue.*/ *************** *** 186,190 **** friend class Application; /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(wxDevCenter::Document) protected: /** Pointeur vers le gestionnaire de document.*/ --- 186,190 ---- friend class Application; /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(wxDevCenter::Document); protected: /** Pointeur vers le gestionnaire de document.*/ *************** *** 308,312 **** { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(wxDevCenter::ActionDocument) protected: /** Définit le type tableau dynamique d'actions ActionArray.*/ --- 308,312 ---- { /** Déclaration de classe dynamique. Déclare la classe comme pouvant être crée dynamiquement depuis ses infos RTTI de caractère.*/ ! DECLARE_DYNAMIC_CLASS(wxDevCenter::ActionDocument); protected: /** Définit le type tableau dynamique d'actions ActionArray.*/ *************** *** 522,526 **** DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDC_EVT_MINIVIEW_DRAG, 12022) DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDC_EVT_MINIVIEW_CONTEXTMENU, 12023) ! END_DECLARE_EVENT_TYPES() typedef void (wxEvtHandler::*MiniViewEventFunction)(MiniViewEvent&); --- 522,526 ---- DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDC_EVT_MINIVIEW_DRAG, 12022) DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDC_EVT_MINIVIEW_CONTEXTMENU, 12023) ! END_DECLARE_EVENT_TYPES(); typedef void (wxEvtHandler::*MiniViewEventFunction)(MiniViewEvent&); Index: FileTools.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileTools.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FileTools.h 25 Feb 2005 20:42:24 -0000 1.4 --- FileTools.h 7 Mar 2005 15:23:02 -0000 1.5 *************** *** 61,65 **** /** Retourne le protocole du fichier (sans le ":").*/ wxString GetFileProtocol()const; ! /** Retourne le chemin et le nom du fichier sans le protocole (dir\titre.ext).*/ wxString GetFilePath()const; /** Retourne le carctère de séparation des dossiers.*/ --- 61,65 ---- /** Retourne le protocole du fichier (sans le ":").*/ wxString GetFileProtocol()const; ! /** Retourne le chemin et le nom du fichier sans le protocole (dir/titre.ext).*/ wxString GetFilePath()const; /** Retourne le carctère de séparation des dossiers.*/ *************** *** 83,87 **** /** Retourne le nombre de niveau d'arborescence. * @param pFilenameArray Tableau des niveaux d'arborescence (de la racine à la feuille). Non rempli si NULL. ! * @retun Nombre de niveaux d'arborescences. */ unsigned int GetDirLevel(wxArrayString* pFilenameArray = NULL)const; --- 83,87 ---- /** Retourne le nombre de niveau d'arborescence. * @param pFilenameArray Tableau des niveaux d'arborescence (de la racine à la feuille). Non rempli si NULL. ! * @return Nombre de niveaux d'arborescences. */ unsigned int GetDirLevel(wxArrayString* pFilenameArray = NULL)const; Index: AboutBox.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/AboutBox.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AboutBox.h 3 Dec 2004 17:27:28 -0000 1.2 --- AboutBox.h 7 Mar 2005 15:23:02 -0000 1.3 *************** *** 34,38 **** class AboutBox : public wxDialog { ! DECLARE_EVENT_TABLE() protected: wxNotebook *m_pNotebook; --- 34,38 ---- class AboutBox : public wxDialog { ! DECLARE_EVENT_TABLE(); protected: wxNotebook *m_pNotebook; *************** *** 51,55 **** class AboutBoxAboutPage : public wxWindow { ! DECLARE_EVENT_TABLE() protected: void OnPaint(wxPaintEvent& event); --- 51,55 ---- class AboutBoxAboutPage : public wxWindow { ! DECLARE_EVENT_TABLE(); protected: void OnPaint(wxPaintEvent& event); Index: FileSystemStandard.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystemStandard.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FileSystemStandard.h 25 Feb 2005 20:45:55 -0000 1.8 --- FileSystemStandard.h 7 Mar 2005 15:23:02 -0000 1.9 *************** *** 1,4 **** /** ! * @file FileSystemStandard.h * @author Cursor * --- 1,4 ---- /** ! * @file wxDevCenter/FileSystemStandard.h * @author Cursor * |
|
From: Emilien K. <cur...@us...> - 2005-03-07 15:23:13
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28522/include/wxDevCenter/msw Modified Files: FileSystemStandard.h Log Message: Correction de la doc doxygen. Index: FileSystemStandard.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/msw/FileSystemStandard.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileSystemStandard.h 26 Jan 2005 16:11:45 -0000 1.1 --- FileSystemStandard.h 7 Mar 2005 15:23:03 -0000 1.2 *************** *** 71,76 **** /** Convertit un chemin logique en chemin physique. * Par exemple : ! * - file://C:\machin\truc.ext => C:\machin\truc.ext ! * - file:bureau\machin\truc.ext => C:\documents and settings\moi\bureau\machin\truc.ext * @param strPath Chemin virtuel à convertir. * @return Chemin physique. --- 71,76 ---- /** Convertit un chemin logique en chemin physique. * Par exemple : ! * - file://C:\\machin\\truc.ext => C:\\machin\\truc.ext ! * - file:bureau\\machin\\truc.ext => C:\\documents and settings\\moi\\bureau\\machin\\truc.ext * @param strPath Chemin virtuel à convertir. * @return Chemin physique. |
|
From: Emilien K. <cur...@us...> - 2005-03-04 16:35:26
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31702/src Modified Files: BitmapCtrl.cpp BitmapDocView.cpp SimpleTextDocView.cpp StdPlugin.cpp Removed Files: OrganigramPanel.cpp Log Message: Utilisation de namespaces et suppression des reliquats du doc/vue d'organigrammes. Index: SimpleTextDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/SimpleTextDocView.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SimpleTextDocView.cpp 16 Feb 2005 17:45:56 -0000 1.7 --- SimpleTextDocView.cpp 4 Mar 2005 16:35:16 -0000 1.8 *************** *** 37,40 **** --- 37,42 ---- using namespace wxDevCenter; + using namespace StdPlugin::Text; + *************** *** 43,52 **** - ////////////////////////////////////////////////////////////////////// // LanguageProperty ////////////////////////////////////////////////////////////////////// ! LanguageProperty g_LangagePropertyArray[WXDC_NB_LEX]; LanguageProperty::LanguageProperty() --- 45,53 ---- ////////////////////////////////////////////////////////////////////// // LanguageProperty ////////////////////////////////////////////////////////////////////// ! LanguageProperty StdPlugin::Text::g_LangagePropertyArray[WXDC_NB_LEX]; LanguageProperty::LanguageProperty() *************** *** 151,155 **** /** Fonction de lecture des préférences.*/ ! void LoadPreferences() { int iLang, NumStyle, NumKeyword; --- 152,156 ---- /** Fonction de lecture des préférences.*/ ! void StdPlugin::Text::LoadPreferences() { int iLang, NumStyle, NumKeyword; *************** *** 202,206 **** /** Fonction de sauvegarde des préférences.*/ ! void SavePreferences() { int iLang, NumStyle, NumKeyword; --- 203,207 ---- /** Fonction de sauvegarde des préférences.*/ ! void StdPlugin::Text::SavePreferences() { int iLang, NumStyle, NumKeyword; *************** *** 256,260 **** ! void QueryPreferences() { SimpleTextPrefDialog Dialog; --- 257,261 ---- ! void StdPlugin::Text::QueryPreferences() { SimpleTextPrefDialog Dialog; *************** *** 270,274 **** } ! void RefreshPreferences() { unsigned int n, nb=wxGetApp().GetDocManager().GetViewCount(); --- 271,275 ---- } ! void StdPlugin::Text::RefreshPreferences() { unsigned int n, nb=wxGetApp().GetDocManager().GetViewCount(); Index: BitmapCtrl.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/BitmapCtrl.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** BitmapCtrl.cpp 25 Feb 2005 10:43:41 -0000 1.13 --- BitmapCtrl.cpp 4 Mar 2005 16:35:16 -0000 1.14 *************** *** 30,33 **** --- 30,37 ---- #include <wx/dcbuffer.h> + using namespace wxDevCenter; + using namespace StdPlugin::Bitmap; + + #define BMP_ANCHOR_INFLATE_WIDTH 3 Index: BitmapDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/BitmapDocView.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** BitmapDocView.cpp 25 Feb 2005 15:43:28 -0000 1.19 --- BitmapDocView.cpp 4 Mar 2005 16:35:16 -0000 1.20 *************** *** 16,20 **** --- 16,22 ---- #include <wx/clipbrd.h> + using namespace wxDevCenter; + using namespace StdPlugin::Bitmap; ////////////////////////////////////////////////////////////////////// Index: StdPlugin.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/StdPlugin.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StdPlugin.cpp 19 Dec 2004 17:01:29 -0000 1.3 --- StdPlugin.cpp 4 Mar 2005 16:35:17 -0000 1.4 *************** *** 24,34 **** #include <wxDevCenter/StdPlugin.h> /** Définition du plugin.*/ ! StdPlugin STD_DLL_PLUGIN g_Plugin; - #include <wxDevCenter/StdPlugin/BitmapDocView.h> /** Définition du type de document 'Image Bitmap'.*/ wxDevCenter::DocType BitmapType(WXDC_DOCTYPE_IMAGE_NAME, CLASSINFO(BitmapDocument), WXDC_DOCTYPE_IMAGE_DESCRIPT, wxT("bmp;gif;png;tiff;jpg;jpeg"), --- 24,37 ---- #include <wxDevCenter/StdPlugin.h> + #include <wxDevCenter/StdPlugin/BitmapDocView.h> + #include <wxDevCenter/StdPlugin/SimpleTextDocView.h> + using namespace StdPlugin::Bitmap; + using namespace StdPlugin::Text; /** Définition du plugin.*/ ! StdPlugin::StdPlugin STD_DLL_PLUGIN g_Plugin; /** Définition du type de document 'Image Bitmap'.*/ wxDevCenter::DocType BitmapType(WXDC_DOCTYPE_IMAGE_NAME, CLASSINFO(BitmapDocument), WXDC_DOCTYPE_IMAGE_DESCRIPT, wxT("bmp;gif;png;tiff;jpg;jpeg"), *************** *** 36,40 **** - #include <wxDevCenter/StdPlugin/SimpleTextDocView.h> /** Définition du type de document 'Texte simple'.*/ wxDevCenter::DocType TxtType(WXDC_DOCTYPE_TEXT_NAME, CLASSINFO(SimpleTextDocument), WXDC_DOCTYPE_TEXT_DESCRIPT, wxT("txt;log"), --- 39,42 ---- *************** *** 55,74 **** #include <wx/statbmp.h> ! StdPlugin::StdPlugin(): wxDevCenter::Plugin(STD_PLUGIN_NAME, STD_PLUGIN_DESCRIPT) { } ! wxPanel* StdPlugin::CreateAboutPanel(wxWindow* pParent, wxWindowID id) { return new StdPluginAbout(pParent, id); } ! void StdPlugin::InitPlugin() { LoadPreferences(); } ! void StdPlugin::FinalPlugin() { SavePreferences(); --- 57,76 ---- #include <wx/statbmp.h> ! StdPlugin::StdPlugin::StdPlugin(): wxDevCenter::Plugin(STD_PLUGIN_NAME, STD_PLUGIN_DESCRIPT) { } ! wxPanel* StdPlugin::StdPlugin::CreateAboutPanel(wxWindow* pParent, wxWindowID id) { return new StdPluginAbout(pParent, id); } ! void StdPlugin::StdPlugin::InitPlugin() { LoadPreferences(); } ! void StdPlugin::StdPlugin::FinalPlugin() { SavePreferences(); *************** *** 77,81 **** ! StdPluginAbout::StdPluginAbout(wxWindow* parent, wxWindowID id): wxPanel(parent, id) { --- 79,83 ---- ! StdPlugin::StdPluginAbout::StdPluginAbout(wxWindow* parent, wxWindowID id): wxPanel(parent, id) { --- OrganigramPanel.cpp DELETED --- |
|
From: Emilien K. <cur...@us...> - 2005-03-04 16:35:25
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31702/include/wxDevCenter/StdPlugin Modified Files: BitmapCtrl.h BitmapDocView.h SimpleTextDocView.h Removed Files: OrganigramPanel.h Log Message: Utilisation de namespaces et suppression des reliquats du doc/vue d'organigrammes. Index: BitmapCtrl.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/BitmapCtrl.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BitmapCtrl.h 25 Feb 2005 10:43:41 -0000 1.8 --- BitmapCtrl.h 4 Mar 2005 16:35:16 -0000 1.9 *************** *** 34,37 **** --- 34,44 ---- #include <wxDevCenter/StdPlugin/extmouse.h> + + namespace StdPlugin + { + namespace Bitmap + { + + /** Style à appliquer aux BitmapCtrl pour afficher les ancres de dimensionnement.*/ #define BMP_SHOW_ANCHOR 0x100 *************** *** 184,187 **** }; ! #endif --- 191,194 ---- }; ! }} #endif Index: BitmapDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/BitmapDocView.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** BitmapDocView.h 25 Feb 2005 15:43:21 -0000 1.14 --- BitmapDocView.h 4 Mar 2005 16:35:16 -0000 1.15 *************** *** 28,31 **** --- 28,37 ---- class wxDevCenter::Archive; + + namespace StdPlugin + { + namespace Bitmap + { + class BitmapDocument; class BitmapView; *************** *** 375,381 **** }; ! #endif - - - --- 381,384 ---- }; ! }} #endif Index: SimpleTextDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/SimpleTextDocView.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SimpleTextDocView.h 16 Feb 2005 17:45:54 -0000 1.7 --- SimpleTextDocView.h 4 Mar 2005 16:35:16 -0000 1.8 *************** *** 42,45 **** --- 42,51 ---- + namespace StdPlugin + { + namespace Text + { + + class SimpleTextDocument; class SimpleTextView; *************** *** 352,355 **** ! #endif --- 358,361 ---- ! }} #endif --- OrganigramPanel.h DELETED --- |
|
From: Emilien K. <cur...@us...> - 2005-03-04 16:35:25
|
Update of /cvsroot/wxdevcenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31702 Modified Files: CHANGELOG Log Message: Utilisation de namespaces et suppression des reliquats du doc/vue d'organigrammes. Index: CHANGELOG =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/CHANGELOG,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CHANGELOG 1 Mar 2005 14:36:29 -0000 1.1 --- CHANGELOG 4 Mar 2005 16:35:15 -0000 1.2 *************** *** 4,6 **** CVS : ----- ! --- 4,7 ---- CVS : ----- ! - Use of namespaces. ! |
|
From: Emilien K. <cur...@us...> - 2005-03-04 16:35:24
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31702/include/wxDevCenter Modified Files: StdPlugin.h Log Message: Utilisation de namespaces et suppression des reliquats du doc/vue d'organigrammes. Index: StdPlugin.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StdPlugin.h 19 Dec 2004 17:01:21 -0000 1.3 --- StdPlugin.h 4 Mar 2005 16:35:16 -0000 1.4 *************** *** 31,34 **** --- 31,37 ---- + namespace StdPlugin + { + /** Plugin personnalisé. * On dérive wxDevCenter::Plugin juste pour implémenter une boite de dialogue "A propos de" personnalisée. *************** *** 53,54 **** --- 56,59 ---- }; + + } |
|
From: Emilien K. <cur...@us...> - 2005-03-04 16:12:37
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23965 Modified Files: wx.bkl wxDevCenter.bkl Log Message: autoconf/gnu Index: wx.bkl =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/wx.bkl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wx.bkl 28 Feb 2005 20:17:24 -0000 1.3 --- wx.bkl 4 Mar 2005 16:12:27 -0000 1.4 *************** *** 20,27 **** <!-- for extended wxlibs use. --> <!-- --> - <!-- --> - <!-- --> - <!-- --> - <!-- --> <!-- 4) the WXLIBS and SYSLIBS tags --> <!-- --> --- 20,23 ---- *************** *** 46,50 **** <exe id="myprog" template="wxbase"> ! <if cond="FORMAT!='autoconf'"> <include>$(WXWIN)\include</include> <include>$(WXWIN)$(WXLIBINCLUDE)</include> --- 42,46 ---- <exe id="myprog" template="wxbase"> ! <if cond="FORMAT!='autoconf' and FORMAT!='gnu'"> <include>$(WXWIN)\include</include> <include>$(WXWIN)$(WXLIBINCLUDE)</include> *************** *** 443,448 **** <sys-lib>wxbase25$(WXLIBPOSTFIX)</sys-lib> ! <if cond="WXLIB_FL==1"><sys-lib>wxmsw25$(WXLIBPOSTFIX)_fl</sys-lib></if> ! <if cond="WXLIB_STC==1"><sys-lib>wxmsw25$(WXLIBPOSTFIX)_stc</sys-lib></if> </if> --- 439,444 ---- <sys-lib>wxbase25$(WXLIBPOSTFIX)</sys-lib> ! <if cond="WXLIB_FL=='1'"><sys-lib>wxmsw25$(WXLIBPOSTFIX)_fl</sys-lib></if> ! <if cond="WXLIB_STC=='1'"><sys-lib>wxmsw25$(WXLIBPOSTFIX)_stc</sys-lib></if> </if> *************** *** 472,478 **** <!-- utilities to include the libs and defines for us. --> <if cond="TARGETING_WIN32=='0'"> ! <if cond="WXLIB_FL==1"><set var="USE_WXLIB_FL">,fl</set></if> ! <if cond="WXLIB_STC==1"><set var="USE_WXLIB_STC">,stc</set></if> ! <ldflags>`wx-config --libs std$(USE_WXLIB_FL)$(USE_WXLIB_STC)`</ldflags> </if> --- 468,473 ---- <!-- utilities to include the libs and defines for us. --> <if cond="TARGETING_WIN32=='0'"> ! <set var="USE_WXLIB_FL"><if cond="WXLIB_FL=='1'">,fl</if></set> ! <set var="USE_WXLIB_STC"><if cond="WXLIB_STC=='1'">,stc</if></set> <ldflags>`wx-config --libs std$(USE_WXLIB_FL)$(USE_WXLIB_STC)`</ldflags> </if> Index: wxDevCenter.bkl =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/wxDevCenter.bkl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxDevCenter.bkl 28 Feb 2005 20:17:24 -0000 1.7 --- wxDevCenter.bkl 4 Mar 2005 16:12:27 -0000 1.8 *************** *** 31,35 **** <lib id="specific" template="wxbase"> ! <if cond="FORMAT!='autoconf'"> <include>$(WXWIN)\include</include> <include>$(WXWIN)$(WXLIBINCLUDE)</include> --- 31,35 ---- <lib id="specific" template="wxbase"> ! <if cond="FORMAT!='autoconf' and FORMAT!='gnu'"> <include>$(WXWIN)\include</include> <include>$(WXWIN)$(WXLIBINCLUDE)</include> *************** *** 54,58 **** <exe id="wxDevCenter" template="wxbase"> ! <if cond="FORMAT!='autoconf'"> <include>$(WXWIN)\include</include> <include>$(WXWIN)$(WXLIBINCLUDE)</include> --- 54,58 ---- <exe id="wxDevCenter" template="wxbase"> ! <if cond="FORMAT!='autoconf' and FORMAT!='gnu'"> <include>$(WXWIN)\include</include> <include>$(WXWIN)$(WXLIBINCLUDE)</include> |
|
From: Emilien K. <cur...@us...> - 2005-03-04 16:09:59
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22287/src Modified Files: Project.cpp Log Message: Add ProjectType - the autoregitered ProjectTemplate base class. Index: Project.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Project.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Project.cpp 3 Mar 2005 16:20:28 -0000 1.2 --- Project.cpp 4 Mar 2005 16:09:46 -0000 1.3 *************** *** 128,131 **** --- 128,142 ---- + /** + * Implémentation de la classe wxDevCenter::ProjectType + */ + + // Constructeur par défaut. + ProjectType::ProjectType(wxClassInfo* pProjectClassInfo, wxString strName, wxString strDescript, wxString strIcon, wxString strExt): + ProjectTemplate(pProjectClassInfo, strName, strDescript, strIcon, strExt) + { + wxGetApp().GetProjectManager().RegisterProjectType(this); + } + /** *************** *** 154,157 **** --- 165,170 ---- void ProjectManager::Finalize() { + for(unsigned int n=0; n<GetProjectTemplateCount(); n++) + GetProjectTemplate(n)->Finalize(); } *************** *** 266,274 **** if(GetProjectTemplateIndex(pTemplate)==-1) { ! Add(pTemplate); ! return true; } ! else ! return false; } --- 279,289 ---- if(GetProjectTemplateIndex(pTemplate)==-1) { ! if(pTemplate->Initialize()) ! { ! Add(pTemplate); ! return true; ! } } ! return false; } |
|
From: Emilien K. <cur...@us...> - 2005-03-04 16:09:59
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22287/include/wxDevCenter Modified Files: Application.h Project.h Log Message: Add ProjectType - the autoregitered ProjectTemplate base class. Index: Project.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Project.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Project.h 3 Mar 2005 16:20:27 -0000 1.2 --- Project.h 4 Mar 2005 16:09:46 -0000 1.3 *************** *** 136,139 **** --- 136,146 ---- ProjectTemplate(wxClassInfo* pProjectClassInfo=NULL, wxString strName=wxT(""), wxString strDescript=wxT(""), wxString strIcon=wxT(""), wxString strExt=wxT("")); + /** Initialisation du patron de projet. + * Si celui-ci échoue lors de l'initialisation, il ne sera pas utilisé. + * @return Faux si initialisation échouée.*/ + virtual bool Initialize(){return true;} + /** Finalisation du type de projet.*/ + virtual void Finalize(){} + /** Accesseur de nom.*/ wxString GetName()const{return m_strName;} *************** *** 160,163 **** --- 167,190 ---- }; + /** Définission des types de projets, basés sur des patrons de projets. + * Un type de projet est un patron de projet qui s'auto-enregistre dans le ProjectManager au démarrage. + */ + class WXDC_DLL_BASE ProjectType : public ProjectTemplate + { + public: + /** Constructeur par défaut. + * Identique à ProjectTemplate::ProjectTemplate. + * @param pProjectClassInfo Adresse des informations RTTI de la classe de projet. + * @param strName Nom du type de projet. + * @param strDescript Description du type de projet. + * @param strIcon Icone du type de projet. + * @param strExt Extensions associées au fichier de projet séparés par des point-virgules(';'). + */ + ProjectType(wxClassInfo* pProjectClassInfo=NULL, wxString strName=wxT(""), wxString strDescript=wxT(""), wxString strIcon=wxT(""), wxString strExt=wxT("")); + + }; + + + /** Définition du type tableau dynamique de patrons de projets. */ Index: Application.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Application.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Application.h 3 Mar 2005 16:20:27 -0000 1.6 --- Application.h 4 Mar 2005 16:09:46 -0000 1.7 *************** *** 157,160 **** --- 157,162 ---- * @return Vrai si un projet est actif.*/ bool IsProjectActive(void); + /** Gestionnaire de types de projets.*/ + ProjectManager& GetProjectManager(){return m_ProjectManager;} /** Projet.*/ Project* GetProject(){return m_ProjectManager.GetProject();} |
|
From: Emilien K. <cur...@us...> - 2005-03-04 16:09:59
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22287 Modified Files: CHANGELOG Log Message: Add ProjectType - the autoregitered ProjectTemplate base class. Index: CHANGELOG =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/CHANGELOG,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CHANGELOG 3 Mar 2005 16:20:27 -0000 1.2 --- CHANGELOG 4 Mar 2005 16:09:45 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- CVS : ----- + - Add ProjectType, an auto-regitered ProjectTemplate (like DocType). - Add Project basic mecanisms (Project/ProjectTemplates/ProjectManager). - Make wxDevCenter::FilePath extractors constants. |
|
From: Emilien K. <cur...@us...> - 2005-03-03 16:20:52
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28018 Modified Files: CHANGELOG Log Message: Ajout des mécanismes primaires de gestion des projets. Index: CHANGELOG =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/CHANGELOG,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CHANGELOG 1 Mar 2005 14:40:08 -0000 1.1 --- CHANGELOG 3 Mar 2005 16:20:27 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- CVS : ----- + - Add Project basic mecanisms (Project/ProjectTemplates/ProjectManager). - Make wxDevCenter::FilePath extractors constants. - Move document iconlist management from DocManager to FileSystem. \ No newline at end of file |
|
From: Emilien K. <cur...@us...> - 2005-03-03 16:20:39
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28018/src Modified Files: Application.cpp Project.cpp Log Message: Ajout des mécanismes primaires de gestion des projets. Index: Project.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Project.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Project.cpp 3 Dec 2004 16:47:46 -0000 1.1 --- Project.cpp 3 Mar 2005 16:20:28 -0000 1.2 *************** *** 3,7 **** * @author Cursor * ! * @brief Implémentation de la classe de gestion du projet. */ // --- 3,7 ---- * @author Cursor * ! * @brief Implémentation des classes de gestion des projets. */ // *************** *** 26,35 **** #include <wxDevCenter/Project.h> using namespace wxDevCenter; ! ////////////////////////////////////////////////////////////////////// ! // Construction/Destruction Project::Project(): ! m_bIsActive(false), m_strName(""), m_strPath(""), --- 26,40 ---- #include <wxDevCenter/Project.h> + #include <wx/tokenzr.h> + using namespace wxDevCenter; ! IMPLEMENT_DYNAMIC_CLASS(wxDevCenter::Project, wxObject); ! ! /** ! * Implémentation de la classe wxDevCenter::Project ! */ Project::Project(): ! wxObject(), m_strName(""), m_strPath(""), *************** *** 45,73 **** ! ////////////////////////////////////////////////////////////////////// ! // Création/Ouverture/Fermeture ! bool Project::OpenFromFile(wxString WXUNUSED(strFile)) { ! m_bIsActive = true; ! return true; } ! bool Project::Create(wxString WXUNUSED(strFile), wxString WXUNUSED(strName)) { ! m_bIsActive = true; ! return true; } ! void Project::Close() { ! m_strName = ""; ! m_strPath = ""; ! m_strDescription = ""; ! m_bIsActive = false; } --- 50,322 ---- ! // Méthode de création d'un nouveau projet. ! bool Project::OnCreateProject() { ! return true; } ! // Méthode d'ouverture de projet. ! bool Project::OnOpenProject(Archive& WXUNUSED(ar)) { ! return true; } ! // Méthode de sauvegarde de projet. ! bool Project::OnSaveProject(Archive& WXUNUSED(ar)) { ! return true; ! } ! ! // Méthode testant la possibilité de fermer un projet. ! bool Project::CanCloseProject() ! { ! /** @todo Fermer les documents attachés.*/ ! return true; ! } ! ! // Méthode de fermeture de projet. ! bool Project::OnCloseProject() ! { ! return true; ! } ! ! ! /** ! * Implémentation de la classe wxDevCenter::ProjectTemplate ! */ ! ProjectTemplate::ProjectTemplate(wxClassInfo* pProjectClassInfo, wxString strName, wxString strDescript, wxString strIcon, wxString strExt): ! wxObject(), ! m_strName(strName), ! m_strDescript(strDescript), ! m_strIcon(strIcon), ! m_pProjectClassInfo(pProjectClassInfo) ! { ! if(!strExt.IsEmpty()) ! AddFileProjectExtension(strExt); ! } ! ! ! // Ajoute des extensions de fichiers de projets. ! void ProjectTemplate::AddFileProjectExtension(wxString strExt) ! { ! wxStringTokenizer ST(strExt, wxT(";")); ! while(ST.HasMoreTokens()) ! m_strExtArray.Add(ST.GetNextToken()); ! } ! ! // Retourne le wildcard associé au fichier du projet. ! wxString ProjectTemplate::GetDocWildcard(bool bShowStarDotStar)const ! { ! wxString strWildcard, str; ! unsigned int n; ! str.Empty(); ! for(n=0; n<m_strExtArray.GetCount(); n++) ! str += "*." + m_strExtArray[n] + ";"; ! str.RemoveLast(); ! strWildcard = m_strName + " (" + str + ")|" + str; ! if(bShowStarDotStar) ! strWildcard += "|" + wxString(WXDC_FILE_WILDCARD_ALLFILE) + "|*.*"; ! strWildcard += "|"; ! return strWildcard; } + // Crée un objet projet. + Project* ProjectTemplate::CreateProject() + { + return (Project*)m_pProjectClassInfo->CreateObject(); + } + /** + * Implémentation de la classe wxDevCenter::ProjectManager + */ + // Constructeur par défaut. + ProjectManager::ProjectManager(): + ProjectTemplateArray(), + m_pCurrentProject(NULL) + { + } + // Destructeur. + ProjectManager::~ProjectManager() + { + CloseProject(true); + } + + // Initialisation du gestionnaire. + void ProjectManager::Initialize() + { + } + + // Finalisation du gestionnaire. + void ProjectManager::Finalize() + { + } + + + // Ferme le projet en cours. + bool ProjectManager::CloseProject(bool bForce) + { + if(HasProject()) + { + // Préfermeture. + if(!m_pCurrentProject->CanCloseProject() && !bForce) + return false; + // Fermeture. + if(!m_pCurrentProject->OnCloseProject() && !bForce) + return false; + // Destruction. + delete m_pCurrentProject; + m_pCurrentProject = NULL; + } + return true; + } + + // Ouvre un projet depuis un fichier spécifié. + bool ProjectManager::OpenProject(FilePath strFile, int iTemplateIndex) + { + // Fermeture de l'ancien projet. + if(!CloseProject()) + return false; + + // Validation du type de projet. + if(iTemplateIndex==-1) + iTemplateIndex = ChooseProjectTemplateFromExtension(strFile); + if(iTemplateIndex==-1) + return false; + + m_pCurrentProject = GetProjectTemplate(iTemplateIndex)->CreateProject(); + + if(m_pCurrentProject) + { + // Appelle de le chargement du projet. + Archive* pAr = wxGetApp().CreateDocumentArchive(strFile, Archive::read); + if(pAr!=NULL) + { + if(m_pCurrentProject->OnOpenProject(*pAr)) + { + delete pAr; + return true; + } + } + delete m_pCurrentProject; + } + return false; + } + + // Sauvegarde les données du projet. + bool ProjectManager::SaveProject() + { + if(HasProject()) + { + // Appelle de le chargement du projet. + FilePath path = m_pCurrentProject->GetPath(); + Archive* pAr = wxGetApp().CreateDocumentArchive(path, Archive::write); + if(pAr!=NULL) + { + if(m_pCurrentProject->OnSaveProject(*pAr)) + { + delete pAr; + return true; + } + } + } + return false; + } + + // Crée un nouveau projet. + bool ProjectManager::CreateProject(int iTemplateIndex) + { + // Fermeture de l'ancien projet. + if(!CloseProject()) + return false; + + // Test du type de projet + if(iTemplateIndex==-1) + iTemplateIndex = ChooseProjectTemplate(); + if(iTemplateIndex==-1) + return false; + + m_pCurrentProject = GetProjectTemplate(iTemplateIndex)->CreateProject(); + + // Appelle de l'initialisation du projet. + if(!m_pCurrentProject->OnCreateProject()) + { + delete m_pCurrentProject; + return false; + } + + return true; + } + + // Accès à l'index d'un type de projet. + int ProjectManager::GetProjectTemplateIndex(const ProjectTemplate* pTemplate) + { + for(unsigned int n=0; n<GetCount(); n++) + if(Item(n)==pTemplate) + return n; + return -1; + } + + // Enregistre un type de projet. + bool ProjectManager::RegisterProjectType(ProjectTemplate* pTemplate) + { + if(GetProjectTemplateIndex(pTemplate)==-1) + { + Add(pTemplate); + return true; + } + else + return false; + } + + // Retourne le wildcard de tous les types de projets. + wxString ProjectManager::GetAllWildcard(bool bShowStarDotStar, bool bShowAllRegisteredExt)const + { + unsigned int m, n; + wxString strWild; + strWild.Empty(); + + if(bShowAllRegisteredExt) + { + strWild = wxString(WXDC_FILE_WILDCARD_ALLREGISTERED) + wxT("|"); + for(m=0; m<GetCount(); m++) + { + for(n=0; n<GetProjectTemplate(m)->GetExtensionCount(); n++) + { + strWild << wxT("*.") << GetProjectTemplate(m)->GetExtension(n) << wxT(";"); + } + } + strWild.RemoveLast(); + strWild << wxT("|"); + } + + for(n=0; n<GetCount(); n++) + strWild << GetProjectTemplate(n)->GetDocWildcard(false); + + if(bShowStarDotStar) + strWild << wxString(WXDC_FILE_WILDCARD_ALLFILE) << wxT("|*.*|"); + return strWild; + } + + // Fait choisir un patron de projet à l'utilisateur. + int ProjectManager::ChooseProjectTemplate()const + { + wxArrayString ar; + for(unsigned int n=0; n<GetProjectTemplateCount(); n++) + ar.Add(GetProjectTemplate(n)->GetName() + wxT(" - ") + GetProjectTemplate(n)->GetDescript()); + return wxGetSingleChoiceIndex(WXDC_PROJECT_QUERY_TYPE, WXDC_NAME, ar); + } + + // Choisit un type de projet en fonction de l'extensions d'un fichier. + int ProjectManager::ChooseProjectTemplateFromExtension(const FilePath& strFile)const + { + wxString strExt = strFile.GetFileExt(); + for(unsigned int n=0; n<GetProjectTemplateCount(); n++) + for(unsigned int m=0; m<GetProjectTemplate(n)->GetExtensionCount(); m++) + if(strExt==GetProjectTemplate(n)->GetExtension(m)) + return (int)n; + return -1; + } Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Application.cpp 28 Feb 2005 15:26:23 -0000 1.13 --- Application.cpp 3 Mar 2005 16:20:28 -0000 1.14 *************** *** 61,67 **** m_ConfigManager.CreateUserProfile(); ! // Initialise le DocManager m_DocManager.InitDocManager(); // Charge les plugins. LoadPlugins(); --- 61,70 ---- m_ConfigManager.CreateUserProfile(); ! // Initialise le DocManager m_DocManager.InitDocManager(); + // Initialise le ProjectManager + m_ProjectManager.Initialize(); + // Charge les plugins. LoadPlugins(); *************** *** 93,96 **** --- 96,101 ---- int Application::OnExit(void) { + // Finalisation du gestionnaire de projets. + m_ProjectManager.Finalize(); // Enregistrement de la config m_ConfigManager.Finalize(); *************** *** 103,116 **** Application::Application(void): wxApp(), - m_pProject(NULL), m_pStandardFileSystem(NULL), m_IconBundleCache(40) { - m_pProject = new Project; } Application::~Application(void) { - delete m_pProject; } --- 108,118 ---- *************** *** 123,127 **** void Application::CreateProject() { ! CloseProject(); } --- 125,129 ---- void Application::CreateProject() { ! m_ProjectManager.CreateProject(); } *************** *** 130,150 **** void Application::LoadProject() { ! CloseProject(); ! wxFileDialog FileDialog(NULL, WXDC_PROJECT_QUERY_OPEN, "", "", WXDC_PROJECT_WILDCARD, wxOPEN); ! if(FileDialog.ShowModal()==wxID_OK) ! { ! m_pProject->OpenFromFile(FileDialog.GetPath()); ! } } // Ferme le projet en cours void Application::CloseProject() { ! if(m_pProject->IsActive()) ! { ! m_pProject->Close(); ! } } --- 132,166 ---- void Application::LoadProject() { ! if(!m_ProjectManager.CloseProject()) ! return; ! FileSystemDialog FD(NULL, -1, WXDC_PROJECT_QUERY_OPEN, WXDC_SYSTEM_DEFAULT_PATH); ! FD.AttachFileSystems(&m_FileSystemManager); ! FD.SetWildcard(m_ProjectManager.GetAllWildcard()); ! if(FD.ShowModal()==wxID_OK) ! { ! int iProjectType = FD.GetFilterIndex(); ! if(iProjectType==wxNOT_FOUND // Pas de sélection de type ! || iProjectType==0 // "Tous les types enregistrés" ! || iProjectType==(int)m_ProjectManager.GetProjectTemplateCount()) // "*.*" ! iProjectType = -1; ! ! wxArrayString files; ! FD.GetSelectedFileList(files); ! if(files.GetCount()>0) ! m_ProjectManager.OpenProject(files[0], iProjectType); ! } } + // Sauvegarde le projet. + void Application::SaveProject() + { + m_ProjectManager.SaveProject(); + } // Ferme le projet en cours void Application::CloseProject() { ! m_ProjectManager.CloseProject(); } *************** *** 152,156 **** bool Application::IsProjectActive(void) { ! return (m_pProject!=NULL)?m_pProject->IsActive():false; } --- 168,172 ---- bool Application::IsProjectActive(void) { ! return m_ProjectManager.HasProject(); } |
|
From: Emilien K. <cur...@us...> - 2005-03-03 16:20:39
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28018/include/wxDevCenter Modified Files: Application.h Project.h language.h Log Message: Ajout des mécanismes primaires de gestion des projets. Index: Project.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Project.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Project.h 3 Dec 2004 16:47:44 -0000 1.1 --- Project.h 3 Mar 2005 16:20:27 -0000 1.2 *************** *** 3,9 **** * @author Cursor * ! * @brief Déclaration de la classe de gestion du projet. * ! * Déclaration de la classe "projet" (wxDevCenter::Project) */ // --- 3,11 ---- * @author Cursor * ! * @brief Déclaration des classes de gestion des projets. * ! * Déclaration de la classe "projet" (wxDevCenter::Project). ! * Déclaration de la classe de patron de projet (wxDevCenter::ProjectTemplate). ! * Déclaration de la classe du gestionnaire de projet (wxDevCenter::ProjectManager). */ // *************** *** 28,60 **** #define __WXDEVCENTER_PROJECT namespace wxDevCenter { - class Project : public wxObject - { - friend class Application; - protected: - Project(); // Seule la classe application peut créer un objet projet - virtual ~Project(void); // Données membres : protected: - bool m_bIsActive; // Projet actif wxString m_strName; // Nom du projet ! wxString m_strPath; // Chemin - localisation du projet wxString m_strDescription; // Description du projet ! // Fonctions d'acces publique au projet : public: ! wxString GetName(){return m_strName;}; ! wxString GetPath(){return m_strPath;}; ! wxString GetDescription(){return m_strDescription;}; - bool OpenFromFile(wxString strFile); - bool Create(wxString strFile, wxString strName); - void Close(); - bool IsActive()const{return m_bIsActive;} }; --- 30,241 ---- #define __WXDEVCENTER_PROJECT + #include <wxDevCenter/FileTools.h> + #include <wxDevCenter/FileSystem.h> + + #include <wx/dynarray.h> + namespace wxDevCenter { + class ProjectTemplate; + /** Classe de base des projets. + * A dériver pour implémenter de nouveaux types de projets. + * \warning Les classes de projets doivent impérativement être RTTI-dynamiques et leurs constructeurs ne peuvent prendre aucun paramètre. + */ + class WXDC_DLL_BASE Project : public wxObject + { + DECLARE_DYNAMIC_CLASS(Project) // Données membres : protected: wxString m_strName; // Nom du projet ! FilePath m_strPath; // Chemin - localisation du projet wxString m_strDescription; // Description du projet + /** Adresse du patron de projet.*/ + ProjectTemplate* m_pTemplate; + public: + Project(); + virtual ~Project(void); ! /** @name Accesseurs publiques. ! * @{ */ ! /** Nom du Projet.*/ ! wxString GetName()const{return m_strName;}; ! /** Chemin du fichier du projet.*/ ! FilePath GetPath()const{return m_strPath;}; ! /** Description du projet.*/ ! wxString GetDescription()const{return m_strDescription;}; ! /** @} */ ! ! /** Accesseur sur le patron de projet.*/ ! ProjectTemplate* GetProjectTemplate(){return m_pTemplate;} ! ! /** @name Fonction virtuelles de contrôle du projet. ! * @{ */ ! /** Méthode de création d'un nouveau projet. ! * Appelé lorsqu'un nouveau projet est créé. ! * @return Faux si erreur d'initialisation.*/ ! virtual bool OnCreateProject(); ! /** Méthode d'ouverture de projet. ! * Appelé lorqu'un projet est ouvert. ! * @param ar Archive de lecture des données du projet. ! * @return Faux si erreur de chargement.*/ ! virtual bool OnOpenProject(Archive& ar); ! /** Méthode de sauvegarde de projet. ! * Appelé lorsqu'un projet doit sauvegarder ses données. ! * @param ar Archive de sauvegarde des données du projet. ! * @return Faux si erreur de sauvegarde.*/ ! virtual bool OnSaveProject(Archive& ar); ! /** Méthode testant la possibilité de fermer un projet. ! * Appelé lors de la demande de fermeture du projet. ! * La fonction de base ferme les documents associés. ! * @return Faux pour annuler la fermeture du projet.*/ ! virtual bool CanCloseProject(); ! /** Méthode de fermeture de projet. ! * Appelé juste avant la fermeture de projet mais après la fermeture des documents attachés. ! * @return Faux si problème de fermeture.*/ ! virtual bool OnCloseProject(); ! /** @} */ ! }; ! ! ! /** Classe de patron de projet. ! * Utilisé pour enregistrer les différents types de projets. ! * Utilise les données suivantes : ! * - Un nom de type de projet. ! * - Une description du type de projet. ! * - Une icone. ! * - Les infos RTTI de la classe du projet. ! */ ! class WXDC_DLL_BASE ProjectTemplate : public wxObject ! { ! protected: ! /** Nom du type de projet.*/ ! wxString m_strName; ! /** Description du type de projet.*/ ! wxString m_strDescript; ! /** Chemin relatif de son icone.*/ ! wxString m_strIcon; ! ! /** Extensions des fichiers du type de projet.*/ ! wxArrayString m_strExtArray; ! ! /** Informations RTTI.*/ ! wxClassInfo *m_pProjectClassInfo; public: ! /** Constructeur par défaut. ! * Assigne directement les données. ! * @param pProjectClassInfo Adresse des informations RTTI de la classe de projet. ! * @param strName Nom du type de projet. ! * @param strDescript Description du type de projet. ! * @param strIcon Icone du type de projet. ! * @param strExt Extensions associées au fichier de projet séparés par des point-virgules(';'). ! */ ! ProjectTemplate(wxClassInfo* pProjectClassInfo=NULL, wxString strName=wxT(""), wxString strDescript=wxT(""), wxString strIcon=wxT(""), wxString strExt=wxT("")); ! ! /** Accesseur de nom.*/ ! wxString GetName()const{return m_strName;} ! /** Accesseur de description.*/ ! wxString GetDescript()const{return m_strDescript;} ! ! /** @name Gestion des extensions de fichiers du type du projet. ! * @{ */ ! /** Ajoute des extensions de fichiers de projets. ! * @param strExt extensions séparées par des point-virgules ';'.*/ ! void AddFileProjectExtension(wxString strExt); ! /** Retourne le nombre d'extensions associées au type de projets.*/ ! unsigned int GetExtensionCount()const{return m_strExtArray.GetCount();} ! /** Retourne une extension associée au type de projets.*/ ! wxString GetExtension(unsigned int n)const{return m_strExtArray[n];} ! /** Retourne le wildcard associé au fichier du projet. ! * @param bShowStarDotStar Si vrai, ajoute l'entrée *.*.*/ ! wxString GetDocWildcard(bool bShowStarDotStar)const; ! /** @} */ ! ! /** Crée un objet projet. ! * Ne fait que allouer la mémoire et appeler le constructeur par défaut.*/ ! Project* CreateProject(); ! }; ! ! /** Définition du type tableau dynamique de patrons de projets. ! */ ! WX_DEFINE_USER_EXPORTED_ARRAY(ProjectTemplate*, ProjectTemplateArray, class WXDC_DLL_BASE); ! ! ! /** Gestionnaire de projets. ! * Enregistre les différents types de projets et gère le projet actuellement ouvert. ! */ ! class WXDC_DLL_BASE ProjectManager : protected ProjectTemplateArray ! { ! protected: ! /** Projet actuellement ouvert. NULL si aucun.*/ ! Project* m_pCurrentProject; ! ! public: ! /** Constructeur par défaut.*/ ! ProjectManager(); ! /** Destructeur.*/ ! ~ProjectManager(); ! ! /** Initialisation du gestionnaire.*/ ! void Initialize(); ! /** Finalisation du gestionnaire.*/ ! void Finalize(); ! ! ! /** @name Gestion du projet courant. ! * @{ */ ! /** Test si un projet est actuellement ouvert.*/ ! bool HasProject()const{return m_pCurrentProject!=NULL;} ! /** Retourne l'adresse du projet courant.*/ ! Project* GetProject(){return m_pCurrentProject;} ! /** Retourne l'adresse du projet courant.*/ ! const Project* GetProject()const{return m_pCurrentProject;} ! /** Ferme le projet en cours. ! * @param bForce Vrai si le projet doit être fermé impérativement. ! * @return Vrai si le document a été fermé et faux si la femreture n'est pas imérative et que le projet n'a pas pu se fermer. ! */ ! bool CloseProject(bool bForce=false); ! /** Ouvre un projet depuis un fichier spécifié. ! * @param strFile Chemin du fichier de projet à ouvrir. ! * @param iTemplateIndex Indice du patron de projet à utiliser. -1 si autodétection. ! * @return Faux si erreur d'ouverture.*/ ! bool OpenProject(FilePath strFile, int iTemplateIndex = -1); ! /** Crée un nouveau projet. ! * Provoque le choix d'un type de projet et le crée. ! * @param iTemplateIndex Indice du patron de projet à utiliser. -1 si autodétection. ! * @return Faux si erreur. de création.*/ ! bool CreateProject(int iTemplateIndex = -1); ! /** Sauvegarde les données du projet. ! * @return Faux si erreur de sauvegarde.*/ ! bool SaveProject(); ! /** @} */ ! ! /** @name Gestion des types de projets. ! * @{ */ ! /** Nombre de type de projets.*/ ! unsigned int GetProjectTemplateCount()const{return GetCount();} ! /** Accès à un type de projet par son index.*/ ! ProjectTemplate* GetProjectTemplate(int index){return Item(index);} ! const ProjectTemplate* GetProjectTemplate(int index)const{return Item(index);} ! /** Accès à l'index d'un type de projet.*/ ! int GetProjectTemplateIndex(const ProjectTemplate* pTemplate); ! /** Enregistre un type de projet.*/ ! bool RegisterProjectType(ProjectTemplate* pTemplate); ! /** Retourne le wildcard de tous les types de projets. ! * @param bShowStarDotStar Si vrai, ajoute le wildcard "*.*". ! * @param bShowAllRegisteredExt Si vrai, ajoute, le wildcard "All registered".*/ ! wxString GetAllWildcard(bool bShowStarDotStar=true, bool bShowAllRegisteredExt=true)const; ! /** Fait choisir un patron de projet à l'utilisateur. ! * @return Index du patron, -1 si annulé.*/ ! int ChooseProjectTemplate()const; ! /** Choisit un type de projet en fonction de l'extensions d'un fichier. ! * @param strFile Chemin du fichier. ! * @return Index du type de projet ou -1 si aucun ne correspond.*/ ! int ChooseProjectTemplateFromExtension(const FilePath& strFile)const; ! /** @} */ }; Index: Application.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Application.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Application.h 12 Feb 2005 11:32:29 -0000 1.5 --- Application.h 3 Mar 2005 16:20:27 -0000 1.6 *************** *** 27,30 **** --- 27,31 ---- #include <wxDevCenter/Plugin.h> + #include <wxDevCenter/Project.h> #include <wxDevCenter/DocManager.h> #include <wxDevCenter/FileSystem.h> *************** *** 40,44 **** class MainFrame; - class Project; class DocManager; class FileSystemManager; --- 41,44 ---- *************** *** 63,68 **** { protected : ! /** Projet.*/ ! Project* m_pProject; /** Gestionnaire des plugins.*/ PluginManager m_PluginManager; --- 63,68 ---- { protected : ! /** Gestionnaire de projets.*/ ! ProjectManager m_ProjectManager; /** Gestionnaire des plugins.*/ PluginManager m_PluginManager; *************** *** 150,153 **** --- 150,155 ---- /** Charge un projet depui un fichier.*/ void LoadProject(); + /** Sauvegarde le projet.*/ + void SaveProject(); /** Ferme le projet actif.*/ void CloseProject(); *************** *** 156,160 **** bool IsProjectActive(void); /** Projet.*/ ! const Project* GetProject()const{return m_pProject;} /** @}*/ --- 158,163 ---- bool IsProjectActive(void); /** Projet.*/ ! Project* GetProject(){return m_ProjectManager.GetProject();} ! const Project* GetProject()const{return m_ProjectManager.GetProject();} /** @}*/ Index: language.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/language.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** language.h 12 Feb 2005 16:54:34 -0000 1.6 --- language.h 3 Mar 2005 16:20:27 -0000 1.7 *************** *** 136,142 **** ////////////////////////////////////////////////////////////////////// // Gestion des projets ! #define WXDC_PROJECT_WILDCARD "Orx Project (*.orx)|*.orx|All files|*.*" ! #define WXDC_PROJECT_QUERY_OPEN "Choose a GameProject package file to load" ! #define WXDC_PROJECT_QUERY_SAVE "Choose a name to save your GameProject package file" #define WXDC_DOCUMENT_REQUEST_OPEN "Open document" --- 136,143 ---- ////////////////////////////////////////////////////////////////////// // Gestion des projets ! #define WXDC_PROJECT_QUERY_OPEN "Choose a project to load" ! #define WXDC_PROJECT_QUERY_SAVE "Choose a name to save your project" ! #define WXDC_PROJECT_QUERY_TYPE "Choose a project type" ! #define WXDC_DOCUMENT_REQUEST_OPEN "Open document" |
|
From: Emilien K. <cur...@us...> - 2005-03-01 14:40:37
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6586 Added Files: CHANGELOG Log Message: Initial commit. --- NEW FILE: CHANGELOG --- wxDevCenter changelog : ======================= CVS : ----- - Make wxDevCenter::FilePath extractors constants. - Move document iconlist management from DocManager to FileSystem. |
|
From: Emilien K. <cur...@us...> - 2005-03-01 14:36:40
|
Update of /cvsroot/wxdevcenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5406 Added Files: CHANGELOG Log Message: Import initial. --- NEW FILE: CHANGELOG --- Standard plugin changelog : =========================== CVS : ----- |
|
From: Emilien K. <cur...@us...> - 2005-02-28 20:22:27
|
Update of /cvsroot/wxdevcenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29317 Modified Files: StdPlugin.bkl wx.bkl Log Message: Nouveau mécanisme de wx.bkl Index: wx.bkl =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/wx.bkl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wx.bkl 3 Dec 2004 16:51:28 -0000 1.1 --- wx.bkl 28 Feb 2005 20:22:14 -0000 1.2 *************** *** 1,73 **** <?xml version="1.0" ?> <makefile> ! <!-- Options --> ! <!-- Static or shared library compilation. --> <option name="SHARED"> ! <values>0,1</values> ! <values-description>LIB,DLL</values-description> ! <default-value>0</default-value> ! <description> ! What type of library to build ? ! </description> ! </option> ! <!-- Unicode strings or not (unicode or ansi). --> ! <option name="UNICODE"> ! <values>0,1</values> ! <values-description>ANSI,Unicode</values-description> ! <default-value>0</default-value> ! <description> ! Compile Unicode build of wxWidgets ? ! </description> ! </option> ! <!-- Build mode. --> <option name="BUILD"> <values>debug,release</values> <values-description>Debug,Release</values-description> ! <default-value>debug</default-value> ! <description> ! Type of compiled binaries. ! </description> </option> ! <!-- wxWidgets version. --> ! <option name="WXVER"> ! <values>25, 26</values> ! <values-description>wx2.5.x, wx2.6.x</values-description> ! <default-value>25</default-value> ! <description> ! Version of wxWidgets. ! </description> ! </option> ! ! <!-- wxWidgets port. --> ! <option name="WXPORTNAME"> ! <values>msw,gtk,x11,mac,os2</values> ! <default-value>msw</default-value> ! <description>Port to use for wxWidgets library.</description> </option> - <!-- Variables declarations. --> - <!-- ISDLL : 1 if choose to compile library for dynamic use. --> - <set var="ISDLL" cond="SHARED=='1'">1</set> - <set var="ISDLL" cond="SHARED=='0'">0</set> ! ! <!-- UNICODE_DEFINE : Preprocessor definition for unicode use. --> <set var="UNICODE_DEFINE"> <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if> </set> ! <!-- DEBUGINFO : is debug mode actived ? --> ! <set var="DEBUGINFO"> <if cond="BUILD=='debug'">on</if> <if cond="BUILD=='release'">off</if> </set> ! <!-- DEBUGRUNTIME : is runtime debug library used ? --> <set var="DEBUGRUNTIME"> <if cond="BUILD=='debug'">on</if> --- 1,294 ---- <?xml version="1.0" ?> + <!-- Generic bakefile for wxWidgets projects. --> + <!-- Based on the wxWiki generic bakefile : http://wiki.wxwidgets.org/wiki.pl?Bakefile_Wxbase . --> + + <!-- GENERIC WXWIDGETS BAKEFILE --> + <!-- --> + <!-- This is a generic bakefile, heavily commented for --> + <!-- explanatory reasons. --> + <!-- This bakefile provides: --> + <!-- --> + <!-- 1) SHARED=1/0, UNICODE=0/1, BUILD=debug/release, --> + <!-- WXVER=2_4/2_5 options --> + <!-- --> + <!-- 2) ISDLL, UNICODE_DEFINE, DEBUGINFO, DEBUGRUNTIME, --> + <!-- OPTIMIZEFLAG, WXLIBPOSTFIX, WXLIBSUBPOSTFIX, --> + <!-- WARNINGS, WX25, WXLIBPATH, WXDLLPATH, WXLIBINCLUDE, --> + <!-- WXDLLINCLUDE variables --> + <!-- --> + <!-- 3) WXLIB_FL, WXLIB_STC --> + <!-- for extended wxlibs use. --> + <!-- --> + <!-- --> + <!-- --> + <!-- --> + <!-- --> + <!-- 4) the WXLIBS and SYSLIBS tags --> + <!-- --> + <!-- 5) the WXBASE template --> + <!-- --> + + <!-- --> + <!-- A TYPICAL BAKEFILE & CONFIGURE.AC USING WXBASE --> + <!-- --> + <!-- + + <?xml version="1.0" ?> + <makefile> + + <include file="wxbase.bkl"/> + + <option name="WXWIN" category="path"> + <default-value>c:\wxWidgets</default-value> + <description>The wxWidgets library main folder</description> + </option> + + <exe id="myprog" template="wxbase"> + + <if cond="FORMAT!='autoconf'"> + <include>$(WXWIN)\include</include> + <include>$(WXWIN)$(WXLIBINCLUDE)</include> + <lib-path>$(WXWIN)$(WXLIBPATH)</lib-path> + </if> + + <app-type>gui</app-type> + <sources>mysources.cpp</sources> + <win32-res>myresources.rc</win32-res> + + <sys-lib>mylib_which_requires_wx</sys-lib> + <wxlibs/> + <syslibs/> + </exe> + </makefile> + + + + # ====================================================== + # A basic "configure.ac" using a WXBASE-based bakefile + # ====================================================== + + AC_PREREQ(2.57) + AC_INIT(myprog, 1.2.3, [my...@my...]) + + # This allows us to use Bakefile, recognizing the system type + # (and sets the AC_CANONICAL_BUILD, AC_CANONICAL_HOST and + # AC_CANONICAL_TARGET variables) + AC_CANONICAL_SYSTEM + + # This adds some standard wxWidgets options to the configure script + AM_OPTIONS_WXCONFIG + + # Two little custom macros which define the ENABLE/WITH configure arguments. + # Macro arguments: + # $1 = the name of the - -enable- feature + # $2 = the description of that feature + # $3 = the default value for that feature + # + # NOTE: the space between the two hyphens (-) are required since in XML + # they are forbidden... remove them before using this file + # + AC_DEFUN([MY_ARG_ENABLE], [AC_ARG_ENABLE($1, + AC_HELP_STRING([- -enable-$1], # Remove the space between the two hyphens + [$2 (default is $3)]),, [enable_$1=$3])]) + AC_DEFUN([MY_ARG_WITH], [AC_ARG_WITH($1, + AC_HELP_STRING([- -with-$1], # Remove the space between the two hyphens + [$2 (default is $3)]),, [with_$1=$3])]) + + MY_ARG_ENABLE([shared], [Builds shared libraries instead of static libraries], [no]) + MY_ARG_ENABLE([debug], [Builds in debug mode], [yes]) + MY_ARG_ENABLE([unicode], [Builds in UNICODE mode], [no]) + + if test "$enable_shared" = "yes"; then + SHARED=1 + AC_MSG_RESULT([Checking for the SHARED option... yes]) + else + SHARED=0 + AC_MSG_RESULT([Checking for the SHARED option... no]) + fi + + if test "$enable_debug" = "yes"; then + BUILD=debug + AC_MSG_RESULT([Checking for the DEBUG option... yes]) + else + BUILD=release + AC_MSG_RESULT([Checking for the DEBUG option... no]) + fi + + if test "$enable_unicode" = "yes"; then + UNICODE=1 + AC_MSG_RESULT([Checking for the UNICODE option... yes]) + else + UNICODE=0 + AC_MSG_RESULT([Checking for the UNICODE option... no]) + fi + + # check for wxWin version & presence + AM_PATH_WXCONFIG([2.4.2], [wxWin=1], [wxWin=0]) + if test "$wxWin" != 1; then + AC_MSG_ERROR([ + wxWindows must be installed on your system + but wx-config script couldn't be found. + Please check that wx-config is in path, the directory + where wxWindows libraries are installed (returned by + 'wx-config - -libs' command) is in LD_LIBRARY_PATH or + equivalent variable and wxWindows version is 2.3.4 or above. + ]) + fi + + # The final lines of the configure script + AC_BAKEFILE + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT + + --> + + + <!-- makefile tag signifies the beginning of the bakefile --> <makefile> ! <requires version="0.1.5"/> ! <!-- These variables are used to specify if a wx contrib library is link when use <wxlibs /> tag. ! Set to 1 if you want tou use it. ! you should write <set var="WXLIB_FL">1</set> before including wxbase.bkl. ! --> ! <set var="WXLIB_FL" overwrite="0">0</set> ! <set var="WXLIB_STC" overwrite="0">0</set> ! ! <!-- these variables are used to make default values customizable ! from an external bakefile without touching this one: if you ! want a different default setting for one of the wxbase options, ! you just should write: ! <set var="DEFBUILD_VALUE">release</set> ! *before* including wxbase.bkl ! --> ! <set var="DEFSHARED_VALUE" overwrite="0">0</set> ! <set var="DEFUNICODE_VALUE" overwrite="0">0</set> ! <set var="DEFBUILD_VALUE" overwrite="0">debug</set> ! <set var="DEFWXVER_VALUE" overwrite="0">2_5</set> ! ! <!-- OPTIONS --> ! <!-- --> ! <!-- These are essentially the configurations you --> ! <!-- want in bakefile. --> ! <!-- --> ! <!-- In MSVC these are the different build --> ! <!-- configurations you can have (in the build menu), --> ! <!-- and in autoconf is enabled with enable-xxx=xx. --> ! <!-- For other compilers a seperate configuration --> ! <!-- file is created (such as config.gcc on gcc) --> ! <!-- which has several options a user can modify. --> ! <!-- --> ! <!-- Note that the above only happens if an option --> ! <!-- is not constant, i.e. if it cannot be determined --> ! <!-- by bakefile itself. --> ! ! <!-- This is a standard option that determines --> ! <!-- whether the user wants to build this library as --> ! <!-- a dll or as a static library. --> <option name="SHARED"> ! <values>0,1</values> ! <values-description>,DLL</values-description> ! <default-value>$(DEFSHARED_VALUE)</default-value> ! <description>What type of library to build ?</description> ! </option> ! <!-- Configuration for building the bakefile with --> ! <!-- unicode strings or not (unicode or ansi). --> ! <option name="UNICODE"> ! <values>0,1</values> ! <values-description>,Unicode</values-description> ! <default-value>$(DEFUNICODE_VALUE)</default-value> ! <description>Should UNICODE be enabled ?</description> ! </option> ! <!-- There are several options that deal with build --> ! <!-- types. First, there's this one, BUILD. --> ! <!-- --> ! <!-- BUILD determines whether or not we want to build --> ! <!-- in release or debug mode. Note that in practice --> ! <!-- this means modifying the optimize tag, which by --> ! <!-- default is set to off. In this case debug means --> ! <!-- off (no optimizations), and release means speed --> ! <!-- (fast with inlining). There is also a size option --> ! <!-- that is not addressed in this example bakefile. --> <option name="BUILD"> <values>debug,release</values> <values-description>Debug,Release</values-description> ! <default-value>$(DEFBUILD_VALUE)</default-value> ! <description>Type of compiled binaries</description> </option> ! <!-- Determines which version of wxWindows we want. --> ! <!-- This option has big effects on the WXLIBS tag --> ! <!-- (the wxWidgets library names are version-dependent). --> ! <option name="WXVER"> ! <values>2_4,2_5</values> ! <values-description>2.4.x, 2.5.x</values-description> ! <default-value>$(DEFWXVER_VALUE)</default-value> ! <description>The version of wxWidgets to use</description> </option> ! <!-- --> ! <!-- VARIABLES --> ! <!-- --> ! <!-- These are variables, the same way global --> ! <!-- variables are in c/c++. --> ! <!-- --> ! <!-- To "use" a variable you use the form $(VAR) --> ! <!-- where VAR is the name of the variable, and the --> ! <!-- contants of the variable will be expanded, much --> ! <!-- like a #define in c/c++. --> ! <!-- --> ! <!-- Variables in bakefile have their hitches though. --> ! <!-- --> ! <!-- The real thing to watch out for is when using --> ! <!-- variables in if expressions - these variables --> ! <!-- must be a constant value, usually 1 or 0. In --> ! <!-- practice this means declaring the variable --> ! <!-- with the cond statement INSIDE the tag, rather --> ! <!-- then having an if statement inside the variable. --> ! ! <!-- A simple variable used to understand if we are --> ! <!-- creating a makefile for a Win32 target or a more --> ! <!-- generic linux/GNU-based system. --> ! <set var="TARGETING_WIN32"> ! <if cond="FORMAT=='autoconf' or FORMAT=='gnu'">0</if> ! <if cond="FORMAT!='autoconf' and FORMAT!='gnu'">1</if> ! </set> ! ! <!-- Set the ISDLL variable, so that we can use it --> ! <!-- inside an if statement later on (options not --> ! <!-- allowed in if statements). --> ! <set var="ISDLL" cond="SHARED=='1'">1</set> ! <set var="ISDLL" cond="SHARED=='0'">0</set> ! ! <!-- The unicode define we want. By default bakefile --> ! <!-- makes variables an empty string, so if unicode --> ! <!-- is not defined $(UNICODE_DEFINE) would expand --> ! <!-- to nothing (literally). --> <set var="UNICODE_DEFINE"> <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if> + </set> + + <!-- The debug define we need with win32 compilers --> + <!-- (on Linux, the wx-config program is used). --> + <set var="DEBUG_DEFINE"> + <if cond="FORMAT!='autoconf' and BUILD=='debug'"> + __WXDEBUG__ + </if> </set> ! <!-- Value we will use later on for the debug-info --> ! <!-- tag inside our templates. --> ! <set var="DEBUGINFO"> <if cond="BUILD=='debug'">on</if> <if cond="BUILD=='release'">off</if> </set> ! <!-- Value we will use later on for the debug-runtime --> ! <!-- tag inside our templates. --> <set var="DEBUGRUNTIME"> <if cond="BUILD=='debug'">on</if> *************** *** 75,189 **** </set> ! <!-- OPTIMIZEFLAG : type of optimization. --> <set var="OPTIMIZEFLAG"> <if cond="BUILD=='debug'">off</if> <if cond="BUILD=='release'">speed</if> </set> ! <!-- WARNINGS : level of compilation warning to show. --> ! <set var="WARNINGS"> ! <if cond="BUILD=='debug'">max</if> ! <if cond="BUILD=='release'">no</if> ! </set> ! <!-- wxWidgets libraries string flags. --> ! <set var="WXLIBPOSTFIX"> ! <if cond="BUILD=='debug' and UNICODE=='1'">ud</if> ! <if cond="BUILD=='debug' and UNICODE=='0'">d</if> ! <if cond="BUILD=='release' and UNICODE=='1'">u</if> ! </set> ! <!-- wxWidgets library name definitions. --> ! <if cond="FORMAT=='autoconf' or FORMAT=='gnu'"> ! <set var="WXNAMEPREFIX">wx_base</set> ! <set var="WXNAMEPREFIXGUI">wx_$(WXPORTNAME)</set> ! <set var="WXVERSIONTAG"> ! <if cond="WXVER=='25'">-2.5</if> ! <if cond="WXVER=='26'">-2.6</if> </set> - <set var="wxlib" >lib$(WXNAMEPREFIX)$(WXVERSIONTAG)</set> - <set var="wxlib_net" >lib$(WXNAMEPREFIX)_net$(WXVERSIONTAG)</set> - <set var="wxlib_odbc" >lib$(WXNAMEPREFIX)_odbc$(WXVERSIONTAG)</set> - <set var="wxlib_xml" >lib$(WXNAMEPREFIX)_xml$(WXVERSIONTAG)</set> - - <set var="wxlib_adv" >lib$(WXNAMEPREFIXGUI)_adv$(WXVERSIONTAG)</set> - <set var="wxlib_animate" >lib$(WXNAMEPREFIXGUI)_animate$(WXVERSIONTAG)</set> - <set var="wxlib_core" >lib$(WXNAMEPREFIXGUI)_core$(WXVERSIONTAG)</set> - <set var="wxlib_dbgrid" >lib$(WXNAMEPREFIXGUI)_dbgrid$(WXVERSIONTAG)</set> - <set var="wxlib_deprecated" >lib$(WXNAMEPREFIXGUI)_deprecated$(WXVERSIONTAG)</set> - <set var="wxlib_fl" >lib$(WXNAMEPREFIXGUI)_fl$(WXVERSIONTAG)</set> - <set var="wxlib_gizmos" >lib$(WXNAMEPREFIXGUI)_gizmos$(WXVERSIONTAG)</set> - <set var="wxlib_gl" >lib$(WXNAMEPREFIXGUI)_gl$(WXVERSIONTAG)</set> - <set var="wxlib_html" >lib$(WXNAMEPREFIXGUI)_html$(WXVERSIONTAG)</set> - <set var="wxlib_mmedia" >lib$(WXNAMEPREFIXGUI)_mmedia$(WXVERSIONTAG)</set> - <set var="wxlib_ogl" >lib$(WXNAMEPREFIXGUI)_ogl$(WXVERSIONTAG)</set> - <set var="wxlib_plot" >lib$(WXNAMEPREFIXGUI)_plot$(WXVERSIONTAG)</set> - <set var="wxlib_stc" >lib$(WXNAMEPREFIXGUI)_stc$(WXVERSIONTAG)</set> - <set var="wxlib_svg" >lib$(WXNAMEPREFIXGUI)_svg$(WXVERSIONTAG)</set> - <set var="wxlib_xrc" >lib$(WXNAMEPREFIXGUI)_xrc$(WXVERSIONTAG)</set> ! <set var="wxlib_expat" >$(wxlib)</set> ! <set var="wxlib_jpeg" >$(wxlib)</set> ! <set var="wxlib_png" >$(wxlib)</set> ! <set var="wxlib_regex" >$(wxlib)</set> ! <set var="wxlib_tiff" >$(wxlib)</set> ! <set var="wxlib_zlib" >$(wxlib)</set> </if> - <if cond="FORMAT!='autoconf' and FORMAT!='gnu'"> - <set var="WXVERSIONTAG"> - <if cond="WXVER=='25'">25</if> - <if cond="WXVER=='26'">26</if> - </set> - <set var="WXNAMEPREFIX">wxbase$(WXVERSIONTAG)$(WXLIBPOSTFIX)</set> - <set var="WXNAMEPREFIXGUI">wx$(WXPORTNAME)$(WXVERSIONTAG)$(WXLIBPOSTFIX)</set> - <set var="wxlib" >$(WXNAMEPREFIX)</set> - <set var="wxlib_net" >$(WXNAMEPREFIX)_net</set> - <set var="wxlib_odbc" >$(WXNAMEPREFIX)_odbc</set> - <set var="wxlib_xml" >$(WXNAMEPREFIX)_xml</set> - - <set var="wxlib_adv" >$(WXNAMEPREFIXGUI)_adv</set> - <set var="wxlib_animate" >$(WXNAMEPREFIXGUI)_animate</set> - <set var="wxlib_core" >$(WXNAMEPREFIXGUI)_core</set> - <set var="wxlib_dbgrid" >$(WXNAMEPREFIXGUI)_dbgrid</set> - <set var="wxlib_deprecated" >$(WXNAMEPREFIXGUI)_deprecated</set> - <set var="wxlib_fl" >$(WXNAMEPREFIXGUI)_fl</set> - <set var="wxlib_gizmos" >$(WXNAMEPREFIXGUI)_gizmos</set> - <set var="wxlib_gl" >$(WXNAMEPREFIXGUI)_gl</set> - <set var="wxlib_html" >$(WXNAMEPREFIXGUI)_html</set> - <set var="wxlib_mmedia" >$(WXNAMEPREFIXGUI)_mmedia</set> - <set var="wxlib_ogl" >$(WXNAMEPREFIXGUI)_ogl</set> - <set var="wxlib_plot" >$(WXNAMEPREFIXGUI)_plot</set> - <set var="wxlib_stc" >$(WXNAMEPREFIXGUI)_stc</set> - <set var="wxlib_svg" >$(WXNAMEPREFIXGUI)_svg</set> - <set var="wxlib_xrc" >$(WXNAMEPREFIXGUI)_xrc</set> - - <set var="wxlib_expat" >wxexpat$(WXLIBPOSTFIX)</set> - <set var="wxlib_jpeg" >wxjpeg$(WXLIBPOSTFIX)</set> - <set var="wxlib_png" >wxpng$(WXLIBPOSTFIX)</set> - <set var="wxlib_regex" >wxregex$(WXLIBPOSTFIX)</set> - <set var="wxlib_tiff" >wxtiff$(WXLIBPOSTFIX)</set> - <set var="wxlib_zlib" >wxzlib$(WXLIBPOSTFIX)</set> - </if> ! <!-- Template definitions. --> ! <!-- Base template. --> ! <template id="wxWidgets"> ! <!-- If targeting the Windows OS, link with the libraries manually. --> ! <if cond="FORMAT!='autoconf' and FORMAT!='gnu'"> ! <if cond="FORMAT=='borland'"> <sys-lib>ole2w32</sys-lib> </if> ! <if cond="FORMAT!='borland'"> <sys-lib>kernel32</sys-lib> <sys-lib>user32</sys-lib> --- 296,498 ---- </set> ! <!-- Value for optimize tag. --> <set var="OPTIMIZEFLAG"> <if cond="BUILD=='debug'">off</if> <if cond="BUILD=='release'">speed</if> </set> + + <!-- These are handy ways of dealing with the --> + <!-- extensions in the library names of the --> + <!-- wxWindows library. --> + <set var="WXLIBPOSTFIX"> + <if cond="BUILD=='debug' and UNICODE=='1'">ud</if> + <if cond="BUILD=='debug' and UNICODE=='0'">d</if> + <if cond="BUILD=='release' and UNICODE=='1'">u</if> + </set> + <set var="WXSUBLIBPOSTFIX"> + <if cond="BUILD=='debug' and UNICODE=='0'">d</if> + </set> ! <!-- Level of warnings. Here we max it out in debug --> ! <!-- mode, and turn them off in release mode. --> ! <set var="WARNINGS"> ! <if cond="BUILD=='debug'">max</if> ! <if cond="BUILD=='release'">no</if> ! </set> ! <!-- Set WXCPPFLAGS as empty; maybe it will be filled later... --> ! <set var="WXCPPFLAGS"></set> ! <if cond="FORMAT=='mingw' or FORMAT=='autoconf'"> + <!-- With GCC, settings warnings to MAX would force --> + <!-- Bakefile to call GCC with "-W -Wall" which generates --> + <!-- a *lot* of warnings about wxWidgets headers... --> + <!-- this is why "-W -Wall" is here replaced by "-Wall". --> + <set var="WARNINGS">default</set> + <set var="WXCPPFLAGS">-Wall</set> + </if> ! <!-- wx 2.5? --> ! <set var="WX25" cond="WXVER=='2_4'">0</set> ! <set var="WX25" cond="WXVER=='2_5'">1</set> ! ! <!-- The name of the subfolder containing the wxWidgets lib(s) --> ! <!-- Use in this way: --> ! <!-- <lib-path>$(MYPATHTOWXWIN)$(WXLIBPATH$)</lib-path> --> ! <!-- This variable is useful when the user of the makefile has --> ! <!-- not added to the wxWidgets libpath to the system path or --> ! <!-- for those developers which need to test their program --> ! <!-- with various compilers and thus have a --> ! <!-- - bcc_lib containing OMF wxWidgets libraries --> ! <!-- - vc_lib containing COFF wxWidgets libraries --> ! <!-- - gcc_lib containing GCC wxWidgets libraries --> ! <!-- [...] --> ! <!-- in their wxWidgets/lib folder. --> ! <!-- --> ! <!-- Note (1): this variable will always include only the --> ! <!-- static lib path; see WXDLLPATH --> ! <if cond="TARGETING_WIN32=='1'"> ! <set var="WXLIBPATH" cond="FORMAT!='autoconf'"> ! $(DIRSEP)lib$(DIRSEP)$(COMPILER)_lib </set> + </if> + <!-- Like WXLIBPATH except that this variable will include --> + <!-- the path to the DLL wxWidgets lib(s). --> + <if cond="TARGETING_WIN32=='1'"> + <set var="WXDLLPATH">$(DIRSEP)lib$(DIRSEP)$(COMPILER)_dll</set> + </if> ! <!-- The name of the subfolder of the LIB directory of --> ! <!-- wxWidgets which should be included in the path searched --> ! <!-- for SETUP.H. --> ! <!-- Note (1): this variable should be used with MSW compilers --> ! <!-- only and in this way: --> ! <!-- <include>$(MYPATHTOWXWIN)$(WXLIBINCLUDE) --> ! <!-- Note (2): this variable will always include only the --> ! <!-- static SETUP.H-path; see WXDLLINCLUDE --> ! <if cond="TARGETING_WIN32=='1'"> ! <set var="WXLIBINCLUDE">$(WXLIBPATH)$(DIRSEP)msw$(WXLIBPOSTFIX)</set> </if> + <!-- Like WXLIBINCLUDE except that this variable will include --> + <!-- the path to the SETUP.H required for DLL. --> + <if cond="TARGETING_WIN32=='1'"> + <set var="WXDLLINCLUDE">$(WXDLLPATH)$(DIRSEP)msw$(WXLIBPOSTFIX)</set> + </if> + <!-- --> + <!-- NEW TAGS --> + <!-- --> + <!-- The powerful <define-tag> tag allows the Bakefile --> + <!-- user to extend it, working as a sort of macros. --> + <!-- --> + <!-- This defines a tag which includes headers on MSVC --> + <!-- Note that $(value) is stuck in there by bakefile, --> + <!-- and is the value between the beginning and end tag. --> + <define-tag name="headers" rules="dll,lib,exe"> + <if cond="FORMAT=='msvc6prj'"> + <msvc-project-files> + $(value) + </msvc-project-files> + </if> + </define-tag> ! <!-- Defines the WXLIBS tag which links wxWidgets libraries. --> ! <!-- Use this tag _after_ declaring, through the SYS-LIB tag, --> ! <!-- all other libraries based upon wxWidgets but _before_ --> ! <!-- using the SYSLIBS tag (defined below). --> ! <!-- This is required because some compilers (like GCC and --> ! <!-- thus also MinGW) require the libraries to be listed in --> ! <!-- 'dependency-order': if mylib1 requires mylib2 then mylib1 --> ! <!-- must be given to the linker before mylib2. --> ! <!-- To tell Bakefile to put mylib1 before mylib2 you must put --> ! <!-- the <SYS-LIB>s tags in the right order: --> ! <!-- --> ! <!-- <lib/exe/dll id="abc"> --> ! <!-- <sys-lib>mylib1</sys-lib> --> ! <!-- <sys-lib>mylib2</sys-lib> --> ! <!-- </lib/exe/dll> --> ! <!-- --> ! <!-- If you swap the order of the two SYS-LIB tags in the --> ! <!-- example above, you'll get linker errors (with GCC). --> ! <!-- Thus, instead of just declaring wxWidgets libraries in the --> ! <!-- WXBASE template, it's better to define a new tag: WXLIBS --> ! <!-- Example: --> ! <!-- --> ! <!-- <lib/exe/dll id="abc"> --> ! <!-- <sys-lib>mylib_requiring_wx</sys-lib> --> ! <!-- <wxlibs/> --> ! <!-- <syslibs/> --> ! <!-- </lib/exe/dll> --> ! <!-- --> ! <define-tag name="wxlibs" rules="exe,dll,lib"> ! <!-- wxWindows-specific stuff --> ! <!-- Note: these libs must be declared *before* --> ! <!-- system libs if you want MINGW linker to work --> ! <if cond="TARGETING_WIN32=='1'"> ! <if cond="WX25=='1'"> ! <sys-lib>wxmsw25$(WXLIBPOSTFIX)_core</sys-lib> ! <sys-lib>wxmsw25$(WXLIBPOSTFIX)_html</sys-lib> ! <sys-lib>wxbase25$(WXLIBPOSTFIX)</sys-lib> ! ! <if cond="WXLIB_FL==1"><sys-lib>wxmsw25$(WXLIBPOSTFIX)_fl</sys-lib></if> ! <if cond="WXLIB_STC==1"><sys-lib>wxmsw25$(WXLIBPOSTFIX)_stc</sys-lib></if> ! </if> ! <if cond="WX25=='0'"> ! <sys-lib>wxmsw$(WXLIBPOSTFIX)</sys-lib> ! </if> ! <sys-lib>wxtiff$(WXSUBLIBPOSTFIX)</sys-lib> ! <sys-lib>wxjpeg$(WXSUBLIBPOSTFIX)</sys-lib> ! <sys-lib>wxpng$(WXSUBLIBPOSTFIX)</sys-lib> ! <sys-lib>wxzlib$(WXSUBLIBPOSTFIX)</sys-lib> ! ! <!-- For regex we won't use the WXSUBLIBPOSTIX postfix: ! unliked tiff, jpeg, png, zlib, expat, when building ! in Unicode mode, the "u" suffix is appended to regex --> ! <sys-lib>wxregex$(WXLIBPOSTFIX)</sys-lib> ! ! <sys-lib>wxexpat$(WXSUBLIBPOSTFIX)</sys-lib> ! <!-- <sys-lib>$(UNICOWS_LIB)</sys-lib> --> ! ! <!-- this is defined to __WXDEBUG__ on win32. --> ! <define>$(DEBUG_DEFINE)</define> ! <define>__WXMSW__</define> ! </if> ! ! ! <!-- If not on windows, we can use wxWindows configuration --> ! <!-- utilities to include the libs and defines for us. --> ! <if cond="TARGETING_WIN32=='0'"> ! <if cond="WXLIB_FL==1"><set var="USE_WXLIB_FL">,fl</set></if> ! <if cond="WXLIB_STC==1"><set var="USE_WXLIB_STC">,stc</set></if> ! ! <ldflags>`wx-config --libs std$(USE_WXLIB_FL)$(USE_WXLIB_STC)`</ldflags> ! </if> ! </define-tag> ! ! ! <!-- Like the WXLIBS tag defined above, but this one declares --> ! <!-- the standard non-wxWidgets libraries. This tag should be --> ! <!-- used _after_ you declare all other libraries. --> ! <!-- See WXLIBS tag for more info. --> ! <define-tag name="syslibs" rules="exe,dll,lib"> ! <!-- If targeting the Windows OS, link with the --> ! <!-- libraries manually --> ! <if cond="TARGETING_WIN32=='1'"> ! <!-- If on borland, we don't need to do much --> ! <if cond="FORMAT=='borland'"> <sys-lib>ole2w32</sys-lib> </if> ! ! <!-- Non-borland, on the other hand... --> ! <if cond="FORMAT!='borland'"> <sys-lib>kernel32</sys-lib> <sys-lib>user32</sys-lib> *************** *** 194,198 **** <sys-lib>shell32</sys-lib> <sys-lib>comctl32</sys-lib> - <sys-lib>odbc32</sys-lib> <sys-lib>ole32</sys-lib> <sys-lib>oleaut32</sys-lib> --- 503,506 ---- *************** *** 201,224 **** <sys-lib>advapi32</sys-lib> <sys-lib>wsock32</sys-lib> </if> <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'"> <sys-lib>oleacc</sys-lib> </if> - </if> <!-- end if windows. --> - <cxx-rtti>on</cxx-rtti> - <cxx-exceptions>on</cxx-exceptions> - <threading>multi</threading> - <sys-lib>$(wxlib)</sys-lib> <warnings>$(WARNINGS)</warnings> ! <define>$(UNICODE_DEFINE)</define> ! <optimize>$(OPTIMIZEFLAG)</optimize> ! <debug-info>$(DEBUGINFO)</debug-info> ! <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs> </template> - - </makefile> --- 509,566 ---- <sys-lib>advapi32</sys-lib> <sys-lib>wsock32</sys-lib> + <sys-lib>odbc32</sys-lib> </if> + + <!-- Libs common to both borland and MSVC --> <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'"> <sys-lib>oleacc</sys-lib> </if> + </if> <!-- end if windows --> + </define-tag> + <!-- --> + <!-- TEMPLATES --> + <!-- --> + <!-- While not required, templates make your --> + <!-- bakefiles much more readable. Templates, in --> + <!-- essence, are abstract classes like c++. --> + <!-- --> + <!-- Your build targets "inherit" the template, --> + <!-- along with the info associated with the template --> + + <!-- --> + <!-- wxWidgets LIBRARY/APP TEMPLATE --> + <!-- --> + <!-- The "base class" of all our build targets --> + <!-- This links with the appropriate native --> + <!-- libraries required by the platform, the libaries --> + <!-- we want for our stuff, and the wxWindows libs. --> + <!-- --> + <!-- HOW TO USE THIS TEMPLATE: see the beginning of this --> + <!-- bakefile for an example: this template misses the --> + <!-- <wxlibs/> and <syslibs/> tags which should be added --> + <!-- in the right order in derived targets. --> + <template id="wxbase"> + + <!-- MISCELLANEOUS --> + <if cond="FORMAT=='mingw'"> + <define>HAVE_W32API_H</define> + <ldflags>-mthreads</ldflags> + </if> + + <if cond="TARGETING_WIN32=='0'"> + <cxxflags>`wx-config --cxxflags`</cxxflags> + </if> + + <cxxflags>$(WXCPPFLAGS)</cxxflags> <warnings>$(WARNINGS)</warnings> ! <define>$(UNICODE_DEFINE)</define> ! <optimize>$(OPTIMIZEFLAG)</optimize> ! <debug-info>$(DEBUGINFO)</debug-info> ! <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs> </template> + </makefile> \ No newline at end of file Index: StdPlugin.bkl =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/StdPlugin.bkl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StdPlugin.bkl 25 Feb 2005 14:31:15 -0000 1.3 --- StdPlugin.bkl 28 Feb 2005 20:22:12 -0000 1.4 *************** *** 2,10 **** <makefile> <include file="wx.bkl"/> <using module="datafiles"/> ! <set var="DIRSPEC"> <if cond="PLATFORM_WIN32=='1'">msw</if> --- 2,20 ---- <makefile> + <set var="DEFSHARED_VALUE">1</set><!-- wxDevCenter do not work in static mode. --> + <set var="DEFWXVER_VALUE">2_5</set><!-- wxDevCenter do not work with wx24API. --> + + <set var="WXLIB_FL">1</set><!-- wxDevCenter require wxFrameLayout. --> + <set var="WXLIB_STC">1</set><!-- wxDevCenter require wxStyledTextCtrl. --> + <include file="wx.bkl"/> <using module="datafiles"/> ! <option name="WXWIN" category="path"> ! <default-value>c:\wxWidgets</default-value> ! <description>The wxWidgets library main folder</description> ! </option> ! <set var="DIRSPEC"> <if cond="PLATFORM_WIN32=='1'">msw</if> *************** *** 16,25 **** </set> ! ! <!-- wxDevCenter executable. --> ! <dll id="StdPlugin" template="wxWidgets"> <libname>StdPlugin$(DEBUGFLAG)</libname> <include>include</include> <sources> src/BitmapCtrl.cpp --- 26,41 ---- </set> ! <dll id="StdPlugin" template="wxbase"> <libname>StdPlugin$(DEBUGFLAG)</libname> + <if cond="FORMAT!='autoconf'"> + <include>$(WXWIN)\include</include> + <include>$(WXWIN)$(WXLIBINCLUDE)</include> + <lib-path>$(WXWIN)$(WXLIBPATH)</lib-path> + </if> + <include>include</include> + <precomp-headers>on</precomp-headers> + <precomp-headers-header>wxDevCenter.h</precomp-headers-header> <sources> src/BitmapCtrl.cpp *************** *** 31,37 **** src/StdPlugin.cpp </sources> ! <precomp-headers>on</precomp-headers> ! <precomp-headers-header>StdPlugin.h</precomp-headers-header> ! <install-to>$(LIBDIR)/wxDevCenter/plugins</install-to> </dll> --- 47,55 ---- src/StdPlugin.cpp </sources> ! <win32-res>res-win32/wxDevCenter.rc</win32-res> ! ! <wxlibs/> ! <syslibs/> ! <install-to>$(LIBDIR)/wxDevCenter/plugins</install-to> </dll> |
|
From: Emilien K. <cur...@us...> - 2005-02-28 20:17:35
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27737 Modified Files: wx.bkl wxDevCenter.bkl Log Message: Libs wx additionnelles. Index: wx.bkl =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/wx.bkl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wx.bkl 28 Feb 2005 17:51:48 -0000 1.2 --- wx.bkl 28 Feb 2005 20:17:24 -0000 1.3 *************** *** 17,23 **** <!-- WXDLLINCLUDE variables --> <!-- --> ! <!-- 3) the WXLIBS and SYSLIBS tags --> <!-- --> ! <!-- 4) the WXBASE template --> <!-- --> --- 17,30 ---- <!-- WXDLLINCLUDE variables --> <!-- --> ! <!-- 3) WXLIB_FL, WXLIB_STC --> ! <!-- for extended wxlibs use. --> ! <!-- --> ! <!-- --> ! <!-- --> <!-- --> ! <!-- --> ! <!-- 4) the WXLIBS and SYSLIBS tags --> ! <!-- --> ! <!-- 5) the WXBASE template --> <!-- --> *************** *** 142,145 **** --- 149,159 ---- <requires version="0.1.5"/> + <!-- These variables are used to specify if a wx contrib library is link when use <wxlibs /> tag. + Set to 1 if you want tou use it. + you should write <set var="WXLIB_FL">1</set> before including wxbase.bkl. + --> + <set var="WXLIB_FL" overwrite="0">0</set> + <set var="WXLIB_STC" overwrite="0">0</set> + <!-- these variables are used to make default values customizable from an external bakefile without touching this one: if you *************** *** 428,431 **** --- 442,449 ---- <sys-lib>wxmsw25$(WXLIBPOSTFIX)_html</sys-lib> <sys-lib>wxbase25$(WXLIBPOSTFIX)</sys-lib> + + <if cond="WXLIB_FL==1"><sys-lib>wxmsw25$(WXLIBPOSTFIX)_fl</sys-lib></if> + <if cond="WXLIB_STC==1"><sys-lib>wxmsw25$(WXLIBPOSTFIX)_stc</sys-lib></if> + </if> <if cond="WX25=='0'"> *************** *** 454,461 **** <!-- utilities to include the libs and defines for us. --> <if cond="TARGETING_WIN32=='0'"> ! <ldflags>`wx-config --libs`</ldflags> </if> </define-tag> <!-- Like the WXLIBS tag defined above, but this one declares --> <!-- the standard non-wxWidgets libraries. This tag should be --> --- 472,483 ---- <!-- utilities to include the libs and defines for us. --> <if cond="TARGETING_WIN32=='0'"> ! <if cond="WXLIB_FL==1"><set var="USE_WXLIB_FL">,fl</set></if> ! <if cond="WXLIB_STC==1"><set var="USE_WXLIB_STC">,stc</set></if> ! ! <ldflags>`wx-config --libs std$(USE_WXLIB_FL)$(USE_WXLIB_STC)`</ldflags> </if> </define-tag> + <!-- Like the WXLIBS tag defined above, but this one declares --> <!-- the standard non-wxWidgets libraries. This tag should be --> Index: wxDevCenter.bkl =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/wxDevCenter.bkl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxDevCenter.bkl 28 Feb 2005 17:51:48 -0000 1.6 --- wxDevCenter.bkl 28 Feb 2005 20:17:24 -0000 1.7 *************** *** 2,5 **** --- 2,11 ---- <makefile> + <set var="DEFSHARED_VALUE">1</set><!-- wxDevCenter do not work in static mode. --> + <set var="DEFWXVER_VALUE">2_5</set><!-- wxDevCenter do not work with wx24API. --> + + <set var="WXLIB_FL">1</set><!-- wxDevCenter require wxFrameLayout. --> + <set var="WXLIB_STC">1</set><!-- wxDevCenter require wxStyledTextCtrl. --> + <include file="wx.bkl"/> *************** *** 64,68 **** <precomp-headers>on</precomp-headers> <precomp-headers-header>wxDevCenter.h</precomp-headers-header> ! <sources> src/AboutBox.cpp --- 70,74 ---- <precomp-headers>on</precomp-headers> <precomp-headers-header>wxDevCenter.h</precomp-headers-header> ! <sources> src/AboutBox.cpp *************** *** 85,95 **** src/View.cpp </sources> ! <wxlibs/> <syslibs/> ! ! <!-- <sys-lib>$(wxlib_net)</sys-lib> ! <sys-lib>$(wxlib_fl)</sys-lib> --> ! <install-to>$(BINDIR)</install-to> --- 91,99 ---- src/View.cpp </sources> ! <win32-res>res-win32/wxDevCenter.rc</win32-res> ! <wxlibs/> <syslibs/> ! <install-to>$(BINDIR)</install-to> |
|
From: Emilien K. <cur...@us...> - 2005-02-28 17:52:05
|
Update of /cvsroot/wxdevcenter/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16449 Modified Files: wx.bkl wxDevCenter.bkl Log Message: Nouveau mécanisme bakefile basé sur le wxbase.bkl du wxWiki. Index: wx.bkl =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/wx.bkl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wx.bkl 3 Dec 2004 16:47:40 -0000 1.1 --- wx.bkl 28 Feb 2005 17:51:48 -0000 1.2 *************** *** 1,73 **** <?xml version="1.0" ?> <makefile> ! <!-- Options --> ! <!-- Static or shared library compilation. --> <option name="SHARED"> ! <values>0,1</values> ! <values-description>LIB,DLL</values-description> ! <default-value>0</default-value> ! <description> ! What type of library to build ? ! </description> ! </option> ! <!-- Unicode strings or not (unicode or ansi). --> ! <option name="UNICODE"> ! <values>0,1</values> ! <values-description>ANSI,Unicode</values-description> ! <default-value>0</default-value> ! <description> ! Compile Unicode build of wxWidgets ? ! </description> ! </option> ! <!-- Build mode. --> <option name="BUILD"> <values>debug,release</values> <values-description>Debug,Release</values-description> ! <default-value>debug</default-value> ! <description> ! Type of compiled binaries. ! </description> </option> ! <!-- wxWidgets version. --> ! <option name="WXVER"> ! <values>25, 26</values> ! <values-description>wx2.5.x, wx2.6.x</values-description> ! <default-value>25</default-value> ! <description> ! Version of wxWidgets. ! </description> ! </option> ! ! <!-- wxWidgets port. --> ! <option name="WXPORTNAME"> ! <values>msw,gtk,x11,mac,os2</values> ! <default-value>msw</default-value> ! <description>Port to use for wxWidgets library.</description> </option> - <!-- Variables declarations. --> - <!-- ISDLL : 1 if choose to compile library for dynamic use. --> - <set var="ISDLL" cond="SHARED=='1'">1</set> - <set var="ISDLL" cond="SHARED=='0'">0</set> ! ! <!-- UNICODE_DEFINE : Preprocessor definition for unicode use. --> <set var="UNICODE_DEFINE"> <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if> </set> ! <!-- DEBUGINFO : is debug mode actived ? --> ! <set var="DEBUGINFO"> <if cond="BUILD=='debug'">on</if> <if cond="BUILD=='release'">off</if> </set> ! <!-- DEBUGRUNTIME : is runtime debug library used ? --> <set var="DEBUGRUNTIME"> <if cond="BUILD=='debug'">on</if> --- 1,280 ---- <?xml version="1.0" ?> + <!-- Generic bakefile for wxWidgets projects. --> + <!-- Based on the wxWiki generic bakefile : http://wiki.wxwidgets.org/wiki.pl?Bakefile_Wxbase . --> + + <!-- GENERIC WXWIDGETS BAKEFILE --> + <!-- --> + <!-- This is a generic bakefile, heavily commented for --> + <!-- explanatory reasons. --> + <!-- This bakefile provides: --> + <!-- --> + <!-- 1) SHARED=1/0, UNICODE=0/1, BUILD=debug/release, --> + <!-- WXVER=2_4/2_5 options --> + <!-- --> + <!-- 2) ISDLL, UNICODE_DEFINE, DEBUGINFO, DEBUGRUNTIME, --> + <!-- OPTIMIZEFLAG, WXLIBPOSTFIX, WXLIBSUBPOSTFIX, --> + <!-- WARNINGS, WX25, WXLIBPATH, WXDLLPATH, WXLIBINCLUDE, --> + <!-- WXDLLINCLUDE variables --> + <!-- --> + <!-- 3) the WXLIBS and SYSLIBS tags --> + <!-- --> + <!-- 4) the WXBASE template --> + <!-- --> + + <!-- --> + <!-- A TYPICAL BAKEFILE & CONFIGURE.AC USING WXBASE --> + <!-- --> + <!-- + + <?xml version="1.0" ?> + <makefile> + + <include file="wxbase.bkl"/> + + <option name="WXWIN" category="path"> + <default-value>c:\wxWidgets</default-value> + <description>The wxWidgets library main folder</description> + </option> + + <exe id="myprog" template="wxbase"> + + <if cond="FORMAT!='autoconf'"> + <include>$(WXWIN)\include</include> + <include>$(WXWIN)$(WXLIBINCLUDE)</include> + <lib-path>$(WXWIN)$(WXLIBPATH)</lib-path> + </if> + + <app-type>gui</app-type> + <sources>mysources.cpp</sources> + <win32-res>myresources.rc</win32-res> + + <sys-lib>mylib_which_requires_wx</sys-lib> + <wxlibs/> + <syslibs/> + </exe> + </makefile> + + + + # ====================================================== + # A basic "configure.ac" using a WXBASE-based bakefile + # ====================================================== + + AC_PREREQ(2.57) + AC_INIT(myprog, 1.2.3, [my...@my...]) + + # This allows us to use Bakefile, recognizing the system type + # (and sets the AC_CANONICAL_BUILD, AC_CANONICAL_HOST and + # AC_CANONICAL_TARGET variables) + AC_CANONICAL_SYSTEM + + # This adds some standard wxWidgets options to the configure script + AM_OPTIONS_WXCONFIG + + # Two little custom macros which define the ENABLE/WITH configure arguments. + # Macro arguments: + # $1 = the name of the - -enable- feature + # $2 = the description of that feature + # $3 = the default value for that feature + # + # NOTE: the space between the two hyphens (-) are required since in XML + # they are forbidden... remove them before using this file + # + AC_DEFUN([MY_ARG_ENABLE], [AC_ARG_ENABLE($1, + AC_HELP_STRING([- -enable-$1], # Remove the space between the two hyphens + [$2 (default is $3)]),, [enable_$1=$3])]) + AC_DEFUN([MY_ARG_WITH], [AC_ARG_WITH($1, + AC_HELP_STRING([- -with-$1], # Remove the space between the two hyphens + [$2 (default is $3)]),, [with_$1=$3])]) + + MY_ARG_ENABLE([shared], [Builds shared libraries instead of static libraries], [no]) + MY_ARG_ENABLE([debug], [Builds in debug mode], [yes]) + MY_ARG_ENABLE([unicode], [Builds in UNICODE mode], [no]) + + if test "$enable_shared" = "yes"; then + SHARED=1 + AC_MSG_RESULT([Checking for the SHARED option... yes]) + else + SHARED=0 + AC_MSG_RESULT([Checking for the SHARED option... no]) + fi + + if test "$enable_debug" = "yes"; then + BUILD=debug + AC_MSG_RESULT([Checking for the DEBUG option... yes]) + else + BUILD=release + AC_MSG_RESULT([Checking for the DEBUG option... no]) + fi + + if test "$enable_unicode" = "yes"; then + UNICODE=1 + AC_MSG_RESULT([Checking for the UNICODE option... yes]) + else + UNICODE=0 + AC_MSG_RESULT([Checking for the UNICODE option... no]) + fi + + # check for wxWin version & presence + AM_PATH_WXCONFIG([2.4.2], [wxWin=1], [wxWin=0]) + if test "$wxWin" != 1; then + AC_MSG_ERROR([ + wxWindows must be installed on your system + but wx-config script couldn't be found. + Please check that wx-config is in path, the directory + where wxWindows libraries are installed (returned by + 'wx-config - -libs' command) is in LD_LIBRARY_PATH or + equivalent variable and wxWindows version is 2.3.4 or above. + ]) + fi + + # The final lines of the configure script + AC_BAKEFILE + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT + + --> + + + <!-- makefile tag signifies the beginning of the bakefile --> <makefile> ! <requires version="0.1.5"/> ! <!-- these variables are used to make default values customizable ! from an external bakefile without touching this one: if you ! want a different default setting for one of the wxbase options, ! you just should write: ! <set var="DEFBUILD_VALUE">release</set> ! *before* including wxbase.bkl ! --> ! <set var="DEFSHARED_VALUE" overwrite="0">0</set> ! <set var="DEFUNICODE_VALUE" overwrite="0">0</set> ! <set var="DEFBUILD_VALUE" overwrite="0">debug</set> ! <set var="DEFWXVER_VALUE" overwrite="0">2_5</set> ! ! <!-- OPTIONS --> ! <!-- --> ! <!-- These are essentially the configurations you --> ! <!-- want in bakefile. --> ! <!-- --> ! <!-- In MSVC these are the different build --> ! <!-- configurations you can have (in the build menu), --> ! <!-- and in autoconf is enabled with enable-xxx=xx. --> ! <!-- For other compilers a seperate configuration --> ! <!-- file is created (such as config.gcc on gcc) --> ! <!-- which has several options a user can modify. --> ! <!-- --> ! <!-- Note that the above only happens if an option --> ! <!-- is not constant, i.e. if it cannot be determined --> ! <!-- by bakefile itself. --> ! ! <!-- This is a standard option that determines --> ! <!-- whether the user wants to build this library as --> ! <!-- a dll or as a static library. --> <option name="SHARED"> ! <values>0,1</values> ! <values-description>,DLL</values-description> ! <default-value>$(DEFSHARED_VALUE)</default-value> ! <description>What type of library to build ?</description> ! </option> ! <!-- Configuration for building the bakefile with --> ! <!-- unicode strings or not (unicode or ansi). --> ! <option name="UNICODE"> ! <values>0,1</values> ! <values-description>,Unicode</values-description> ! <default-value>$(DEFUNICODE_VALUE)</default-value> ! <description>Should UNICODE be enabled ?</description> ! </option> ! <!-- There are several options that deal with build --> ! <!-- types. First, there's this one, BUILD. --> ! <!-- --> ! <!-- BUILD determines whether or not we want to build --> ! <!-- in release or debug mode. Note that in practice --> ! <!-- this means modifying the optimize tag, which by --> ! <!-- default is set to off. In this case debug means --> ! <!-- off (no optimizations), and release means speed --> ! <!-- (fast with inlining). There is also a size option --> ! <!-- that is not addressed in this example bakefile. --> <option name="BUILD"> <values>debug,release</values> <values-description>Debug,Release</values-description> ! <default-value>$(DEFBUILD_VALUE)</default-value> ! <description>Type of compiled binaries</description> </option> ! <!-- Determines which version of wxWindows we want. --> ! <!-- This option has big effects on the WXLIBS tag --> ! <!-- (the wxWidgets library names are version-dependent). --> ! <option name="WXVER"> ! <values>2_4,2_5</values> ! <values-description>2.4.x, 2.5.x</values-description> ! <default-value>$(DEFWXVER_VALUE)</default-value> ! <description>The version of wxWidgets to use</description> </option> ! <!-- --> ! <!-- VARIABLES --> ! <!-- --> ! <!-- These are variables, the same way global --> ! <!-- variables are in c/c++. --> ! <!-- --> ! <!-- To "use" a variable you use the form $(VAR) --> ! <!-- where VAR is the name of the variable, and the --> ! <!-- contants of the variable will be expanded, much --> ! <!-- like a #define in c/c++. --> ! <!-- --> ! <!-- Variables in bakefile have their hitches though. --> ! <!-- --> ! <!-- The real thing to watch out for is when using --> ! <!-- variables in if expressions - these variables --> ! <!-- must be a constant value, usually 1 or 0. In --> ! <!-- practice this means declaring the variable --> ! <!-- with the cond statement INSIDE the tag, rather --> ! <!-- then having an if statement inside the variable. --> ! ! <!-- A simple variable used to understand if we are --> ! <!-- creating a makefile for a Win32 target or a more --> ! <!-- generic linux/GNU-based system. --> ! <set var="TARGETING_WIN32"> ! <if cond="FORMAT=='autoconf' or FORMAT=='gnu'">0</if> ! <if cond="FORMAT!='autoconf' and FORMAT!='gnu'">1</if> ! </set> ! ! <!-- Set the ISDLL variable, so that we can use it --> ! <!-- inside an if statement later on (options not --> ! <!-- allowed in if statements). --> ! <set var="ISDLL" cond="SHARED=='1'">1</set> ! <set var="ISDLL" cond="SHARED=='0'">0</set> ! ! <!-- The unicode define we want. By default bakefile --> ! <!-- makes variables an empty string, so if unicode --> ! <!-- is not defined $(UNICODE_DEFINE) would expand --> ! <!-- to nothing (literally). --> <set var="UNICODE_DEFINE"> <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if> + </set> + + <!-- The debug define we need with win32 compilers --> + <!-- (on Linux, the wx-config program is used). --> + <set var="DEBUG_DEFINE"> + <if cond="FORMAT!='autoconf' and BUILD=='debug'"> + __WXDEBUG__ + </if> </set> ! <!-- Value we will use later on for the debug-info --> ! <!-- tag inside our templates. --> ! <set var="DEBUGINFO"> <if cond="BUILD=='debug'">on</if> <if cond="BUILD=='release'">off</if> </set> ! <!-- Value we will use later on for the debug-runtime --> ! <!-- tag inside our templates. --> <set var="DEBUGRUNTIME"> <if cond="BUILD=='debug'">on</if> *************** *** 75,189 **** </set> ! <!-- OPTIMIZEFLAG : type of optimization. --> <set var="OPTIMIZEFLAG"> <if cond="BUILD=='debug'">off</if> <if cond="BUILD=='release'">speed</if> </set> ! <!-- WARNINGS : level of compilation warning to show. --> ! <set var="WARNINGS"> ! <if cond="BUILD=='debug'">max</if> ! <if cond="BUILD=='release'">no</if> ! </set> ! <!-- wxWidgets libraries string flags. --> ! <set var="WXLIBPOSTFIX"> ! <if cond="BUILD=='debug' and UNICODE=='1'">ud</if> ! <if cond="BUILD=='debug' and UNICODE=='0'">d</if> ! <if cond="BUILD=='release' and UNICODE=='1'">u</if> ! </set> ! <!-- wxWidgets library name definitions. --> ! <if cond="FORMAT=='autoconf' or FORMAT=='gnu'"> ! <set var="WXNAMEPREFIX">wx_base</set> ! <set var="WXNAMEPREFIXGUI">wx_$(WXPORTNAME)</set> ! <set var="WXVERSIONTAG"> ! <if cond="WXVER=='25'">-2.5</if> ! <if cond="WXVER=='26'">-2.6</if> </set> - <set var="wxlib" >lib$(WXNAMEPREFIX)$(WXVERSIONTAG)</set> - <set var="wxlib_net" >lib$(WXNAMEPREFIX)_net$(WXVERSIONTAG)</set> - <set var="wxlib_odbc" >lib$(WXNAMEPREFIX)_odbc$(WXVERSIONTAG)</set> - <set var="wxlib_xml" >lib$(WXNAMEPREFIX)_xml$(WXVERSIONTAG)</set> - - <set var="wxlib_adv" >lib$(WXNAMEPREFIXGUI)_adv$(WXVERSIONTAG)</set> - <set var="wxlib_animate" >lib$(WXNAMEPREFIXGUI)_animate$(WXVERSIONTAG)</set> - <set var="wxlib_core" >lib$(WXNAMEPREFIXGUI)_core$(WXVERSIONTAG)</set> - <set var="wxlib_dbgrid" >lib$(WXNAMEPREFIXGUI)_dbgrid$(WXVERSIONTAG)</set> - <set var="wxlib_deprecated" >lib$(WXNAMEPREFIXGUI)_deprecated$(WXVERSIONTAG)</set> - <set var="wxlib_fl" >lib$(WXNAMEPREFIXGUI)_fl$(WXVERSIONTAG)</set> - <set var="wxlib_gizmos" >lib$(WXNAMEPREFIXGUI)_gizmos$(WXVERSIONTAG)</set> - <set var="wxlib_gl" >lib$(WXNAMEPREFIXGUI)_gl$(WXVERSIONTAG)</set> - <set var="wxlib_html" >lib$(WXNAMEPREFIXGUI)_html$(WXVERSIONTAG)</set> - <set var="wxlib_mmedia" >lib$(WXNAMEPREFIXGUI)_mmedia$(WXVERSIONTAG)</set> - <set var="wxlib_ogl" >lib$(WXNAMEPREFIXGUI)_ogl$(WXVERSIONTAG)</set> - <set var="wxlib_plot" >lib$(WXNAMEPREFIXGUI)_plot$(WXVERSIONTAG)</set> - <set var="wxlib_stc" >lib$(WXNAMEPREFIXGUI)_stc$(WXVERSIONTAG)</set> - <set var="wxlib_svg" >lib$(WXNAMEPREFIXGUI)_svg$(WXVERSIONTAG)</set> - <set var="wxlib_xrc" >lib$(WXNAMEPREFIXGUI)_xrc$(WXVERSIONTAG)</set> ! <set var="wxlib_expat" >$(wxlib)</set> ! <set var="wxlib_jpeg" >$(wxlib)</set> ! <set var="wxlib_png" >$(wxlib)</set> ! <set var="wxlib_regex" >$(wxlib)</set> ! <set var="wxlib_tiff" >$(wxlib)</set> ! <set var="wxlib_zlib" >$(wxlib)</set> </if> - <if cond="FORMAT!='autoconf' and FORMAT!='gnu'"> - <set var="WXVERSIONTAG"> - <if cond="WXVER=='25'">25</if> - <if cond="WXVER=='26'">26</if> - </set> - <set var="WXNAMEPREFIX">wxbase$(WXVERSIONTAG)$(WXLIBPOSTFIX)</set> - <set var="WXNAMEPREFIXGUI">wx$(WXPORTNAME)$(WXVERSIONTAG)$(WXLIBPOSTFIX)</set> - <set var="wxlib" >$(WXNAMEPREFIX)</set> - <set var="wxlib_net" >$(WXNAMEPREFIX)_net</set> - <set var="wxlib_odbc" >$(WXNAMEPREFIX)_odbc</set> - <set var="wxlib_xml" >$(WXNAMEPREFIX)_xml</set> - - <set var="wxlib_adv" >$(WXNAMEPREFIXGUI)_adv</set> - <set var="wxlib_animate" >$(WXNAMEPREFIXGUI)_animate</set> - <set var="wxlib_core" >$(WXNAMEPREFIXGUI)_core</set> - <set var="wxlib_dbgrid" >$(WXNAMEPREFIXGUI)_dbgrid</set> - <set var="wxlib_deprecated" >$(WXNAMEPREFIXGUI)_deprecated</set> - <set var="wxlib_fl" >$(WXNAMEPREFIXGUI)_fl</set> - <set var="wxlib_gizmos" >$(WXNAMEPREFIXGUI)_gizmos</set> - <set var="wxlib_gl" >$(WXNAMEPREFIXGUI)_gl</set> - <set var="wxlib_html" >$(WXNAMEPREFIXGUI)_html</set> - <set var="wxlib_mmedia" >$(WXNAMEPREFIXGUI)_mmedia</set> - <set var="wxlib_ogl" >$(WXNAMEPREFIXGUI)_ogl</set> - <set var="wxlib_plot" >$(WXNAMEPREFIXGUI)_plot</set> - <set var="wxlib_stc" >$(WXNAMEPREFIXGUI)_stc</set> - <set var="wxlib_svg" >$(WXNAMEPREFIXGUI)_svg</set> - <set var="wxlib_xrc" >$(WXNAMEPREFIXGUI)_xrc</set> - - <set var="wxlib_expat" >wxexpat$(WXLIBPOSTFIX)</set> - <set var="wxlib_jpeg" >wxjpeg$(WXLIBPOSTFIX)</set> - <set var="wxlib_png" >wxpng$(WXLIBPOSTFIX)</set> - <set var="wxlib_regex" >wxregex$(WXLIBPOSTFIX)</set> - <set var="wxlib_tiff" >wxtiff$(WXLIBPOSTFIX)</set> - <set var="wxlib_zlib" >wxzlib$(WXLIBPOSTFIX)</set> - </if> ! <!-- Template definitions. --> ! <!-- Base template. --> ! <template id="wxWidgets"> ! <!-- If targeting the Windows OS, link with the libraries manually. --> ! <if cond="FORMAT!='autoconf' and FORMAT!='gnu'"> ! <if cond="FORMAT=='borland'"> <sys-lib>ole2w32</sys-lib> </if> ! <if cond="FORMAT!='borland'"> <sys-lib>kernel32</sys-lib> <sys-lib>user32</sys-lib> --- 282,476 ---- </set> ! <!-- Value for optimize tag. --> <set var="OPTIMIZEFLAG"> <if cond="BUILD=='debug'">off</if> <if cond="BUILD=='release'">speed</if> </set> + + <!-- These are handy ways of dealing with the --> + <!-- extensions in the library names of the --> + <!-- wxWindows library. --> + <set var="WXLIBPOSTFIX"> + <if cond="BUILD=='debug' and UNICODE=='1'">ud</if> + <if cond="BUILD=='debug' and UNICODE=='0'">d</if> + <if cond="BUILD=='release' and UNICODE=='1'">u</if> + </set> + <set var="WXSUBLIBPOSTFIX"> + <if cond="BUILD=='debug' and UNICODE=='0'">d</if> + </set> ! <!-- Level of warnings. Here we max it out in debug --> ! <!-- mode, and turn them off in release mode. --> ! <set var="WARNINGS"> ! <if cond="BUILD=='debug'">max</if> ! <if cond="BUILD=='release'">no</if> ! </set> ! <!-- Set WXCPPFLAGS as empty; maybe it will be filled later... --> ! <set var="WXCPPFLAGS"></set> ! <if cond="FORMAT=='mingw' or FORMAT=='autoconf'"> + <!-- With GCC, settings warnings to MAX would force --> + <!-- Bakefile to call GCC with "-W -Wall" which generates --> + <!-- a *lot* of warnings about wxWidgets headers... --> + <!-- this is why "-W -Wall" is here replaced by "-Wall". --> + <set var="WARNINGS">default</set> + <set var="WXCPPFLAGS">-Wall</set> + </if> ! <!-- wx 2.5? --> ! <set var="WX25" cond="WXVER=='2_4'">0</set> ! <set var="WX25" cond="WXVER=='2_5'">1</set> ! ! <!-- The name of the subfolder containing the wxWidgets lib(s) --> ! <!-- Use in this way: --> ! <!-- <lib-path>$(MYPATHTOWXWIN)$(WXLIBPATH$)</lib-path> --> ! <!-- This variable is useful when the user of the makefile has --> ! <!-- not added to the wxWidgets libpath to the system path or --> ! <!-- for those developers which need to test their program --> ! <!-- with various compilers and thus have a --> ! <!-- - bcc_lib containing OMF wxWidgets libraries --> ! <!-- - vc_lib containing COFF wxWidgets libraries --> ! <!-- - gcc_lib containing GCC wxWidgets libraries --> ! <!-- [...] --> ! <!-- in their wxWidgets/lib folder. --> ! <!-- --> ! <!-- Note (1): this variable will always include only the --> ! <!-- static lib path; see WXDLLPATH --> ! <if cond="TARGETING_WIN32=='1'"> ! <set var="WXLIBPATH" cond="FORMAT!='autoconf'"> ! $(DIRSEP)lib$(DIRSEP)$(COMPILER)_lib </set> + </if> + <!-- Like WXLIBPATH except that this variable will include --> + <!-- the path to the DLL wxWidgets lib(s). --> + <if cond="TARGETING_WIN32=='1'"> + <set var="WXDLLPATH">$(DIRSEP)lib$(DIRSEP)$(COMPILER)_dll</set> + </if> ! <!-- The name of the subfolder of the LIB directory of --> ! <!-- wxWidgets which should be included in the path searched --> ! <!-- for SETUP.H. --> ! <!-- Note (1): this variable should be used with MSW compilers --> ! <!-- only and in this way: --> ! <!-- <include>$(MYPATHTOWXWIN)$(WXLIBINCLUDE) --> ! <!-- Note (2): this variable will always include only the --> ! <!-- static SETUP.H-path; see WXDLLINCLUDE --> ! <if cond="TARGETING_WIN32=='1'"> ! <set var="WXLIBINCLUDE">$(WXLIBPATH)$(DIRSEP)msw$(WXLIBPOSTFIX)</set> </if> + <!-- Like WXLIBINCLUDE except that this variable will include --> + <!-- the path to the SETUP.H required for DLL. --> + <if cond="TARGETING_WIN32=='1'"> + <set var="WXDLLINCLUDE">$(WXDLLPATH)$(DIRSEP)msw$(WXLIBPOSTFIX)</set> + </if> + <!-- --> + <!-- NEW TAGS --> + <!-- --> + <!-- The powerful <define-tag> tag allows the Bakefile --> + <!-- user to extend it, working as a sort of macros. --> + <!-- --> + + <!-- This defines a tag which includes headers on MSVC --> + <!-- Note that $(value) is stuck in there by bakefile, --> + <!-- and is the value between the beginning and end tag. --> + <define-tag name="headers" rules="dll,lib,exe"> + <if cond="FORMAT=='msvc6prj'"> + <msvc-project-files> + $(value) + </msvc-project-files> + </if> + </define-tag> + <!-- Defines the WXLIBS tag which links wxWidgets libraries. --> + <!-- Use this tag _after_ declaring, through the SYS-LIB tag, --> + <!-- all other libraries based upon wxWidgets but _before_ --> + <!-- using the SYSLIBS tag (defined below). --> + <!-- This is required because some compilers (like GCC and --> + <!-- thus also MinGW) require the libraries to be listed in --> + <!-- 'dependency-order': if mylib1 requires mylib2 then mylib1 --> + <!-- must be given to the linker before mylib2. --> + <!-- To tell Bakefile to put mylib1 before mylib2 you must put --> + <!-- the <SYS-LIB>s tags in the right order: --> + <!-- --> + <!-- <lib/exe/dll id="abc"> --> + <!-- <sys-lib>mylib1</sys-lib> --> + <!-- <sys-lib>mylib2</sys-lib> --> + <!-- </lib/exe/dll> --> + <!-- --> + <!-- If you swap the order of the two SYS-LIB tags in the --> + <!-- example above, you'll get linker errors (with GCC). --> + <!-- Thus, instead of just declaring wxWidgets libraries in the --> + <!-- WXBASE template, it's better to define a new tag: WXLIBS --> + <!-- Example: --> + <!-- --> + <!-- <lib/exe/dll id="abc"> --> + <!-- <sys-lib>mylib_requiring_wx</sys-lib> --> + <!-- <wxlibs/> --> + <!-- <syslibs/> --> + <!-- </lib/exe/dll> --> + <!-- --> + <define-tag name="wxlibs" rules="exe,dll,lib"> ! <!-- wxWindows-specific stuff --> ! <!-- Note: these libs must be declared *before* --> ! <!-- system libs if you want MINGW linker to work --> ! <if cond="TARGETING_WIN32=='1'"> ! <if cond="WX25=='1'"> ! <sys-lib>wxmsw25$(WXLIBPOSTFIX)_core</sys-lib> ! <sys-lib>wxmsw25$(WXLIBPOSTFIX)_html</sys-lib> ! <sys-lib>wxbase25$(WXLIBPOSTFIX)</sys-lib> ! </if> ! <if cond="WX25=='0'"> ! <sys-lib>wxmsw$(WXLIBPOSTFIX)</sys-lib> ! </if> ! <sys-lib>wxtiff$(WXSUBLIBPOSTFIX)</sys-lib> ! <sys-lib>wxjpeg$(WXSUBLIBPOSTFIX)</sys-lib> ! <sys-lib>wxpng$(WXSUBLIBPOSTFIX)</sys-lib> ! <sys-lib>wxzlib$(WXSUBLIBPOSTFIX)</sys-lib> ! ! <!-- For regex we won't use the WXSUBLIBPOSTIX postfix: ! unliked tiff, jpeg, png, zlib, expat, when building ! in Unicode mode, the "u" suffix is appended to regex --> ! <sys-lib>wxregex$(WXLIBPOSTFIX)</sys-lib> ! ! <sys-lib>wxexpat$(WXSUBLIBPOSTFIX)</sys-lib> ! <!-- <sys-lib>$(UNICOWS_LIB)</sys-lib> --> ! ! <!-- this is defined to __WXDEBUG__ on win32. --> ! <define>$(DEBUG_DEFINE)</define> ! <define>__WXMSW__</define> ! </if> ! ! <!-- If not on windows, we can use wxWindows configuration --> ! <!-- utilities to include the libs and defines for us. --> ! <if cond="TARGETING_WIN32=='0'"> ! <ldflags>`wx-config --libs`</ldflags> ! </if> ! </define-tag> ! <!-- Like the WXLIBS tag defined above, but this one declares --> ! <!-- the standard non-wxWidgets libraries. This tag should be --> ! <!-- used _after_ you declare all other libraries. --> ! <!-- See WXLIBS tag for more info. --> ! <define-tag name="syslibs" rules="exe,dll,lib"> ! <!-- If targeting the Windows OS, link with the --> ! <!-- libraries manually --> ! <if cond="TARGETING_WIN32=='1'"> ! <!-- If on borland, we don't need to do much --> ! <if cond="FORMAT=='borland'"> <sys-lib>ole2w32</sys-lib> </if> ! ! <!-- Non-borland, on the other hand... --> ! <if cond="FORMAT!='borland'"> <sys-lib>kernel32</sys-lib> <sys-lib>user32</sys-lib> *************** *** 194,198 **** <sys-lib>shell32</sys-lib> <sys-lib>comctl32</sys-lib> - <sys-lib>odbc32</sys-lib> <sys-lib>ole32</sys-lib> <sys-lib>oleaut32</sys-lib> --- 481,484 ---- *************** *** 201,224 **** <sys-lib>advapi32</sys-lib> <sys-lib>wsock32</sys-lib> </if> <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'"> <sys-lib>oleacc</sys-lib> </if> - </if> <!-- end if windows. --> - <cxx-rtti>on</cxx-rtti> - <cxx-exceptions>on</cxx-exceptions> - <threading>multi</threading> - <sys-lib>$(wxlib)</sys-lib> <warnings>$(WARNINGS)</warnings> ! <define>$(UNICODE_DEFINE)</define> ! <optimize>$(OPTIMIZEFLAG)</optimize> ! <debug-info>$(DEBUGINFO)</debug-info> ! <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs> </template> - - </makefile> --- 487,544 ---- <sys-lib>advapi32</sys-lib> <sys-lib>wsock32</sys-lib> + <sys-lib>odbc32</sys-lib> </if> + + <!-- Libs common to both borland and MSVC --> <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'"> <sys-lib>oleacc</sys-lib> </if> + </if> <!-- end if windows --> + </define-tag> + <!-- --> + <!-- TEMPLATES --> + <!-- --> + <!-- While not required, templates make your --> + <!-- bakefiles much more readable. Templates, in --> + <!-- essence, are abstract classes like c++. --> + <!-- --> + <!-- Your build targets "inherit" the template, --> + <!-- along with the info associated with the template --> + + <!-- --> + <!-- wxWidgets LIBRARY/APP TEMPLATE --> + <!-- --> + <!-- The "base class" of all our build targets --> + <!-- This links with the appropriate native --> + <!-- libraries required by the platform, the libaries --> + <!-- we want for our stuff, and the wxWindows libs. --> + <!-- --> + <!-- HOW TO USE THIS TEMPLATE: see the beginning of this --> + <!-- bakefile for an example: this template misses the --> + <!-- <wxlibs/> and <syslibs/> tags which should be added --> + <!-- in the right order in derived targets. --> + <template id="wxbase"> + + <!-- MISCELLANEOUS --> + <if cond="FORMAT=='mingw'"> + <define>HAVE_W32API_H</define> + <ldflags>-mthreads</ldflags> + </if> + + <if cond="TARGETING_WIN32=='0'"> + <cxxflags>`wx-config --cxxflags`</cxxflags> + </if> + + <cxxflags>$(WXCPPFLAGS)</cxxflags> <warnings>$(WARNINGS)</warnings> ! <define>$(UNICODE_DEFINE)</define> ! <optimize>$(OPTIMIZEFLAG)</optimize> ! <debug-info>$(DEBUGINFO)</debug-info> ! <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs> </template> + </makefile> \ No newline at end of file Index: wxDevCenter.bkl =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/wxDevCenter.bkl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxDevCenter.bkl 24 Feb 2005 09:43:12 -0000 1.5 --- wxDevCenter.bkl 28 Feb 2005 17:51:48 -0000 1.6 *************** *** 5,10 **** <using module="datafiles"/> ! ! <set var="DIRSPEC"> <if cond="PLATFORM_WIN32=='1'">msw</if> --- 5,16 ---- <using module="datafiles"/> ! ! <option name="WXWIN" category="path"> ! <default-value>c:\wxWidgets</default-value> ! <description>The wxWidgets library main folder</description> ! </option> ! ! ! <set var="DIRSPEC"> <if cond="PLATFORM_WIN32=='1'">msw</if> *************** *** 17,38 **** ! <!-- wxDevCenter plateform-specific intermediate library. --> ! <lib id="wxdcSpecific"> <include>include</include> <sources> src/$(DIRSPEC)/Config.cpp src/$(DIRSPEC)/FileSystemStandard.cpp </sources> </lib> ! <!-- wxDevCenter executable. --> ! <exe id="wxDevCenter" template="wxWidgets"> <app-type>gui</app-type> <exename>wxDevCenter$(DEBUGFLAG)</exename> - <depends>wxdcSpecific</depends> - <library>wxdcSpecific</library> - <include>include</include> <sources> src/AboutBox.cpp --- 23,68 ---- ! ! <lib id="specific" template="wxbase"> ! <if cond="FORMAT!='autoconf'"> ! <include>$(WXWIN)\include</include> ! <include>$(WXWIN)$(WXLIBINCLUDE)</include> ! <lib-path>$(WXWIN)$(WXLIBPATH)</lib-path> ! </if> ! <include>include</include> + <precomp-headers>on</precomp-headers> + <precomp-headers-header>wxDevCenter.h</precomp-headers-header> + <sources> src/$(DIRSPEC)/Config.cpp src/$(DIRSPEC)/FileSystemStandard.cpp </sources> + + <wxlibs/> + <syslibs/> </lib> + ! ! <exe id="wxDevCenter" template="wxbase"> ! ! <if cond="FORMAT!='autoconf'"> ! <include>$(WXWIN)\include</include> ! <include>$(WXWIN)$(WXLIBINCLUDE)</include> ! <lib-path>$(WXWIN)$(WXLIBPATH)</lib-path> ! </if> ! <app-type>gui</app-type> <exename>wxDevCenter$(DEBUGFLAG)</exename> + <depends>specific</depends> + <library>specific</library> + + <app-type>gui</app-type> <include>include</include> + <precomp-headers>on</precomp-headers> + <precomp-headers-header>wxDevCenter.h</precomp-headers-header> + <sources> src/AboutBox.cpp *************** *** 55,66 **** src/View.cpp </sources> ! <precomp-headers>on</precomp-headers> ! <precomp-headers-header>wxDevCenter.h</precomp-headers-header> ! <sys-lib>$(wxlib_net)</sys-lib> ! <sys-lib>$(wxlib_fl)</sys-lib> <install-to>$(BINDIR)</install-to> </exe> <!-- Install headers. --> <data-files-tree > --- 85,100 ---- src/View.cpp </sources> ! ! <wxlibs/> ! <syslibs/> ! ! <!-- <sys-lib>$(wxlib_net)</sys-lib> ! <sys-lib>$(wxlib_fl)</sys-lib> --> <install-to>$(BINDIR)</install-to> + </exe> + <!-- Install headers. --> <data-files-tree > *************** *** 120,123 **** </data-files-tree> - </makefile> --- 154,156 ---- |