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-01-26 16:11:55
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7874/src/unix Added Files: FileSystemStandard.cpp Log Message: Séparation des classes spécifiques aux plateformes. --- NEW FILE: FileSystemStandard.cpp --- (This appears to be a binary file; contents omitted.) |
|
From: Emilien K. <cur...@us...> - 2005-01-26 16:11:54
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7874/include/wxDevCenter/unix Added Files: FileSystemStandard.h Log Message: Séparation des classes spécifiques aux plateformes. --- NEW FILE: FileSystemStandard.h --- (This appears to be a binary file; contents omitted.) |
|
From: Emilien K. <cur...@us...> - 2005-01-26 16:11:54
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7874/include/wxDevCenter/msw Added Files: FileSystemStandard.h Log Message: Séparation des classes spécifiques aux plateformes. --- NEW FILE: FileSystemStandard.h --- (This appears to be a binary file; contents omitted.) |
|
From: Emilien K. <cur...@us...> - 2005-01-26 16:11:54
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7874/src Modified Files: FileSystemStandard.cpp Log Message: Séparation des classes spécifiques aux plateformes. Index: FileSystemStandard.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystemStandard.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** FileSystemStandard.cpp 15 Jan 2005 14:53:47 -0000 1.10 --- FileSystemStandard.cpp 26 Jan 2005 16:11:43 -0000 1.11 *************** *** 3,7 **** * @author Cursor * ! * @brief Implémentation des classes du système de fichiers virtuel standard. */ // --- 3,8 ---- * @author Cursor * ! * @brief Implémentation de la classes du système de fichiers virtuel standard de base et de la classe de l'archive de fichiers. ! * */ // *************** *** 53,458 **** - #ifdef __WINDOWS__ - ////////////////////////////////////////////////////////////////////// - // Implémentation spécifique WINDOWS - ////////////////////////////////////////////////////////////////////// - - - #define WXDC_WSFS_ERROR -1 // une erreur (ou la fin de l'énumération) s'est produite - #define WXDC_WSFS_OK 0x00000000 // tout va bien - #define WXDC_WSFS_DESKTOP1 0x00000001 // viens de retourner le "My computer" - #define WXDC_WSFS_DESKTOP2 0x00000002 // viens de retourner le "My docs" - #define WXDC_WSFS_COMPUTER 0x00000100 // flag pour l'énumération des disques - - - // Convertit un chemin logique en chemin physique. - wxString FileSystemStandardWindows::LogicalToPhysical(FilePath strPath) - { - wxString str; - - // On retire le file: - strPath.RemoveProtocol(); - - if(strPath.StartsWith(m_strNameDesktop, &str)) // "Bureau" - return m_strPathDesktop + str; - else if(strPath.StartsWith(m_strNameMyDocs, &str)) // "Mes documents" - return m_strPathDocuments + str; - else if(strPath.StartsWith(m_strNameComputer, &str)) // "Poste de travail" - { - str.Remove(0, 1); - return str; - } - else - return strPath; - } - - - Archive* FileSystemStandardWindows::GetFileArchive(FilePath strPath, unsigned int nMode) - { - return new ArchiveFile(LogicalToPhysical(strPath), (Archive::ARCHIVE_OPEN_MODE)nMode); - } - - wxString FileSystemStandardWindows::FindFirst(FilePath strPath, int iFlags) - { - m_strFindPath = strPath; - m_iFindFlags = iFlags; - - wxString str; - - strPath.RemoveProtocol(); - m_strCurrentFile = GetProtocoleName() + wxT(":"); - - if(strPath.IsEmpty()) // Racine - { - if(m_iFindFlags&wxDIR_DIRS) - { - m_strCurrentFile += m_strNameDesktop; - return m_strNameDesktop; - } - } - else if(strPath == m_strNameDesktop) // Bureau - { - m_Dir.Open(LogicalToPhysical(m_strNameDesktop)); - if(m_Dir.GetFirst(&str, wxEmptyString, m_iFindFlags)) - { - m_strCurrentFile.Append(m_strNameDesktop).Append(wxT("/")).Append(str); - return str; - } - } - else if(strPath == m_strNameMyDocs) // Mes Documents - { - m_Dir.Open(LogicalToPhysical(m_strNameMyDocs)); - if(m_Dir.GetFirst(&str, wxEmptyString, m_iFindFlags)) - { - m_strCurrentFile.Append(m_strNameMyDocs).Append(wxT("/")).Append(str); - return str; - } - - } - else if(strPath == m_strNameComputer) // Poste de travail - { - if(m_iFindFlags&wxDIR_DIRS) - { - PopulateDrives(); - if(m_arDrives.GetCount()>0) - { - m_strCurrentFile.Append(m_strNameComputer).Append(wxT("/")).Append(m_arDrives[0]).Append(wxT(":")); - return m_arDrives[0] + wxT(":"); - } - } - } - else // Listage standard - { - wxString strPhysical = LogicalToPhysical(m_strFindPath); - if(!wxDirExists(strPhysical)) - { - m_strCurrentFile = wxT(""); - return wxT(""); - } - m_Dir.Open(strPhysical); - if(!m_Dir.IsOpened()) - { - m_strCurrentFile = wxT(""); - return wxT(""); - } - if(m_Dir.GetFirst(&str, wxEmptyString, m_iFindFlags)) - { - m_strCurrentFile.Append(strPath).Append(wxT("/")).Append(str); - return str; - } - } - m_strCurrentFile = wxT(""); - return wxT(""); - } - - - wxString FileSystemStandardWindows::FindNext() - { - wxString str; - - if(m_strCurrentFile.IsEmpty()) - { - return wxT(""); - } - else if(m_strCurrentFile == (GetProtocoleName() + wxT(":") + m_strNameDesktop)) - { - m_strCurrentFile = GetProtocoleName() + wxT(":") + m_strNameMyDocs; - return m_strNameMyDocs; - } - else if(m_strCurrentFile == (GetProtocoleName() + wxT(":") + m_strNameMyDocs)) - { - m_strCurrentFile = GetProtocoleName() + wxT(":") + m_strNameComputer; - return m_strNameComputer; - } - else if(m_strCurrentFile == (GetProtocoleName() + wxT(":") + m_strNameComputer)) - { - m_strCurrentFile.Empty(); - return wxT(""); - } - else if(m_strFindPath == (GetProtocoleName() + wxT(":") + m_strNameComputer)) - { - wxChar c = m_strCurrentFile[m_strCurrentFile.Length()-2]; - for(unsigned int n=0; n<m_arDrives.GetCount(); n++) - { - if(m_arDrives[n]==c && (n+1)<m_arDrives.GetCount()) - { - m_strCurrentFile.Empty(); - m_strCurrentFile << GetProtocoleName() << wxT(":") - << m_strNameComputer << wxT("/") - << m_arDrives[n+1] << wxT(":"); - return m_arDrives[n+1] + wxT(":"); - } - } - m_strCurrentFile.Empty(); - return wxT(""); - } - else - { - if(m_Dir.GetNext(&str)) - { - m_strCurrentFile.Empty(); - m_strCurrentFile.Append(m_strFindPath).Append(wxT("/")).Append(str); - return str; - } - else - { - m_strCurrentFile.Empty(); - return wxT(""); - } - } - - } - - // Retorune le chemin logique vers le dernier fichier trouvé - // nom et extension de fichier compris - FilePath FileSystemStandardWindows::GetCurrentFilePath() - { - return m_strCurrentFile; - } - - - bool FileSystemStandardWindows::IsDirectory(FilePath strPath) - { - if(strPath.Last()=='\\' || strPath.Last()=='/') - strPath.RemoveLast(); - - if(strPath.IsEmpty()) - return true; - else if(strPath==(GetProtocoleName() + wxT(":"))) - return true; - else if(strPath==(GetProtocoleName() + wxT(":") + m_strNameDesktop)) - return true; - else if(strPath==(GetProtocoleName() + wxT(":") + m_strNameMyDocs)) - return true; - else if(strPath==(GetProtocoleName() + wxT(":") + m_strNameComputer)) - return true; - else if(strPath.Matches(GetProtocoleName() + wxT(":") + m_strNameComputer + wxT("??:"))) - return true; - else - return wxDir::Exists(LogicalToPhysical(strPath)); - } - - int FileSystemStandardWindows::GetDirectorySystemType(FilePath strPath) - { - if(strPath.IsEmpty()) - return WXDC_FS_DIRTYPE_MOUNT; - else if(strPath==(GetProtocoleName() + wxT(":"))) - return WXDC_FS_DIRTYPE_MOUNT; - else if(strPath==(GetProtocoleName() + wxT(":") + m_strNameDesktop)) - return WXDC_FS_DIRTYPE_DESKTOP; - else if(strPath==(GetProtocoleName() + wxT(":") + m_strNameMyDocs)) - return WXDC_FS_DIRTYPE_DOC; - else if(strPath==(GetProtocoleName() + wxT(":") + m_strNameComputer)) - return WXDC_FS_DIRTYPE_MOUNT; - else if(strPath.Matches(GetProtocoleName() + wxT(":") + m_strNameComputer + wxT("??:"))) - { - wxChar c = strPath[strPath.Length()-2]; - wxString strDrive = c; - strDrive << wxT(":\\"); - switch(GetDriveType(strDrive.GetData())) - { - case DRIVE_REMOVABLE: - return WXDC_FS_DIRTYPE_FLOPPY; - case DRIVE_FIXED: - return WXDC_FS_DIRTYPE_HARDDRIVE; - case DRIVE_REMOTE: - return WXDC_FS_DIRTYPE_REMOTE; - case DRIVE_CDROM: - return WXDC_FS_DIRTYPE_CDROM; - case DRIVE_RAMDISK: - return WXDC_FS_DIRTYPE_RAMDISK; - default: - return WXDC_DOCMANAGER_TYPE_UNKNOW; - } - } - else - return wxDir::Exists(LogicalToPhysical(strPath))?WXDC_FS_DIRTYPE_NORMAL:-1; - } - - - FilePath FileSystemStandardWindows::GetParentDirectory(FilePath strPath) - { - if(strPath.IsEmpty()) - return wxT(""); - else if(strPath==(GetProtocoleName() + wxT(":"))) - return GetProtocoleName() + wxT(":"); - else if(strPath==(GetProtocoleName() + wxT(":") + m_strNameDesktop)) - return GetProtocoleName() + wxT(":"); - else if(strPath==(GetProtocoleName() + wxT(":") + m_strNameMyDocs)) - return GetProtocoleName() + wxT(":"); - else if(strPath==(GetProtocoleName() + wxT(":") + m_strNameComputer)) - return GetProtocoleName() + wxT(":"); - else - { - int i, j; - i = strPath.Last(wxT('/')); - j = strPath.Last(wxT('\\')); - if(i==-1) - i = j; - if(i==-1) - return GetProtocoleName() + wxT(":"); - if(i<j) - i = j; - return strPath.Left(i); - } - } - - /** Teste si un lecteur est présent.*/ - bool FileSystemStandardWindows::HasDrive(wxChar cLetter) - { - for(unsigned int n=0; n<m_arDrives.GetCount(); n++) - if(m_arDrives[n] == cLetter) - return true; - return false; - } - - - // Peuple le Drapeau des disques. - #include <direct.h> - void FileSystemStandardWindows::PopulateDrives() - { - RAZDrives(); - unsigned long ulDrives = GetLogicalDrives(); - for(int i=0, l=65; i<26; i++, l++) - { - unsigned long n = 1 << i; - if(ulDrives&n) - { - m_arDrives.Add(wxChar(l)); - } - } - } - - - // N'inclure <Windows.h> qu'à la fin car il à la sale manie de renommer - // CreateDirectory et RemoveDirectory. - #include <Windows.h> - FileSystemStandardWindows::FileSystemStandardWindows(): - FileSystemStandardBase(), - m_strNameDesktop(WXDC_WINDOWS_DESKTOP), - m_strNameMyDocs(WXDC_WINDOWS_MYDOCS), - m_strNameComputer(WXDC_WINDOWS_COMPUTER) - { - HKEY key; - char buffer[MAX_PATH]; - unsigned long size; - - - if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", 0, KEY_READ, &key)==ERROR_SUCCESS) - { - size=MAX_PATH; - RegQueryValueEx(key, "Desktop", NULL, NULL, (unsigned char*)buffer, &size); - m_strPathDesktop = FilePath(buffer); - - size=MAX_PATH; - RegQueryValueEx(key, "Personal", NULL, NULL, (unsigned char*)buffer, &size); - m_strPathDocuments = FilePath(buffer); - } - else - m_strFindPath = "Error"; - - - m_strComputerName = wxGetHostName(); - } - - - - #elif defined __UNIX_LIKE__ - ////////////////////////////////////////////////////////////////////// - // Implémentation spécifique UNIX - ////////////////////////////////////////////////////////////////////// - - FileSystemStandardUnix::FileSystemStandardUnix(): - FileSystemStandardBase() - { - } - - Archive* FileSystemStandardUnix::GetFileArchive(FilePath strPath, unsigned int nMode) - { - return new ArchiveFile(strPath.GetFilePath(), (Archive::ARCHIVE_OPEN_MODE)nMode); - } - - wxString FileSystemStandardUnix::FindFirst(FilePath strPath, int iFlags) - { - wxString str; - m_strFindPath = strPath; - m_iFindFlags = iFlags; - - strPath.RemoveProtocol(); - str = strPath; - if(str.IsEmpty()) - str = wxT("/"); - - if(!m_Dir.Open(str)) - return ""; - m_Dir.GetFirst(&str, wxEmptyString, m_iFindFlags); - m_strCurrentFile = m_strFindPath + "/" + str; - return str; - } - - wxString FileSystemStandardUnix::FindNext() - { - wxString str; - m_Dir.GetNext(&str); - m_strCurrentFile = m_strFindPath + "/" + str; - return str; - } - - FilePath FileSystemStandardUnix::GetCurrentFilePath() - { - return m_strCurrentFile; - } - - - bool FileSystemStandardUnix::IsDirectory(FilePath strPath) - { - strPath.RemoveProtocol(); - if(strPath.IsEmpty()) - return true; - else - return wxDir::Exists(strPath); - } - - int FileSystemStandardUnix::GetDirectorySystemType(FilePath strPath) - { - if(strPath.IsEmpty()) - return WXDC_FS_DIRTYPE_MOUNT; - else if(strPath=="file:/mnt") - return WXDC_FS_DIRTYPE_MOUNT; - else if(strPath=="file:/home") - return WXDC_FS_DIRTYPE_HOME; - else if(strPath.GetFileDir()=="file:/home") - return WXDC_FS_DIRTYPE_DOC; - else - return WXDC_FS_DIRTYPE_NORMAL; - } - - #endif // Fin des implémentations spécifiques - - - - - - ////////////////////////////////////////////////////////////////////// // Archive de fichiers --- 54,57 ---- |
|
From: Emilien K. <cur...@us...> - 2005-01-26 16:07:47
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6628/unix Log Message: Directory /cvsroot/wxdevcenter/wxDevCenter/src/unix added to the repository |
|
From: Emilien K. <cur...@us...> - 2005-01-26 16:07:46
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6628/msw Log Message: Directory /cvsroot/wxdevcenter/wxDevCenter/src/msw added to the repository |
|
From: Emilien K. <cur...@us...> - 2005-01-26 16:06:53
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6410/msw Log Message: Directory /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/msw added to the repository |
|
From: Emilien K. <cur...@us...> - 2005-01-26 16:06:53
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6410/unix Log Message: Directory /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/unix added to the repository |
|
From: Emilien K. <cur...@us...> - 2005-01-15 17:31:53
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv568/include/wxDevCenter/StdPlugin Modified Files: BitmapDocView.h language.h Log Message: Ajout du spray sur les bitmaps Index: BitmapDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/BitmapDocView.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BitmapDocView.h 14 Jan 2005 17:08:15 -0000 1.7 --- BitmapDocView.h 15 Jan 2005 17:31:30 -0000 1.8 *************** *** 176,185 **** BVD_NONE = 0, BVD_HANDDRAW = 1, ! BVD_BRUSH = 2, ! BVD_SPRAY = 3, ! BVD_LINE = 4, ! BVD_RECT = 5, ! BVD_ELLIPSE = 6, ! BVD_RRECT = 7 }; /** Fonction de tracé courante.*/ --- 176,184 ---- BVD_NONE = 0, BVD_HANDDRAW = 1, ! BVD_SPRAY = 2, ! BVD_LINE = 3, ! BVD_RECT = 4, ! BVD_ELLIPSE = 5, ! BVD_RRECT = 6 }; /** Fonction de tracé courante.*/ Index: language.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/language.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** language.h 10 Jan 2005 15:38:56 -0000 1.5 --- language.h 15 Jan 2005 17:31:31 -0000 1.6 *************** *** 274,277 **** --- 274,278 ---- #define WXDC_BITMAP_MENU_TOOLS wxT("Tools") #define WXDC_BITMAP_MENU_TOOLS_HANDDRAW wxT("Hand-drawing") + #define WXDC_BITMAP_MENU_TOOLS_SPRAY wxT("Spray") #define WXDC_BITMAP_MENU_TOOLS_LINE wxT("Line") #define WXDC_BITMAP_MENU_TOOLS_RECT wxT("Rectangle") |
|
From: Emilien K. <cur...@us...> - 2005-01-15 17:31:53
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv568/src Modified Files: BitmapDocView.cpp Log Message: Ajout du spray sur les bitmaps Index: BitmapDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/BitmapDocView.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** BitmapDocView.cpp 14 Jan 2005 17:08:16 -0000 1.11 --- BitmapDocView.cpp 15 Jan 2005 17:31:31 -0000 1.12 *************** *** 182,191 **** #define ID_TOOL_NONE (IDM_VIEW_MIN + 200) #define ID_TOOL_HANDDRAW (IDM_VIEW_MIN + 201) ! #define ID_TOOL_BRUSH (IDM_VIEW_MIN + 202) ! #define ID_TOOL_SPRAY (IDM_VIEW_MIN + 203) ! #define ID_TOOL_LINE (IDM_VIEW_MIN + 204) ! #define ID_TOOL_RECT (IDM_VIEW_MIN + 205) ! #define ID_TOOL_ELLIPSE (IDM_VIEW_MIN + 206) ! #define ID_TOOL_RRECT (IDM_VIEW_MIN + 207) #define ID_TOOL_FIRST ID_TOOL_NONE --- 182,190 ---- #define ID_TOOL_NONE (IDM_VIEW_MIN + 200) #define ID_TOOL_HANDDRAW (IDM_VIEW_MIN + 201) ! #define ID_TOOL_SPRAY (IDM_VIEW_MIN + 202) ! #define ID_TOOL_LINE (IDM_VIEW_MIN + 203) ! #define ID_TOOL_RECT (IDM_VIEW_MIN + 204) ! #define ID_TOOL_ELLIPSE (IDM_VIEW_MIN + 205) ! #define ID_TOOL_RRECT (IDM_VIEW_MIN + 206) #define ID_TOOL_FIRST ID_TOOL_NONE *************** *** 259,262 **** --- 258,262 ---- pMenu = new wxMenu(); pMenu->AppendCheckItem(ID_TOOL_HANDDRAW , WXDC_BITMAP_MENU_TOOLS_HANDDRAW); + pMenu->AppendCheckItem(ID_TOOL_SPRAY , WXDC_BITMAP_MENU_TOOLS_SPRAY); pMenu->AppendCheckItem(ID_TOOL_LINE , WXDC_BITMAP_MENU_TOOLS_LINE); pMenu->AppendCheckItem(ID_TOOL_RECT , WXDC_BITMAP_MENU_TOOLS_RECT); *************** *** 420,425 **** bmp = wxGetApp().LoadAppBitmap("bmp/handdraw.png", wxBITMAP_TYPE_PNG); pTB->AddTool(ID_TOOL_HANDDRAW, "Hand draw", bmp, "Hand draw", wxITEM_CHECK); - bmp = wxGetApp().LoadAppBitmap("bmp/brush.png", wxBITMAP_TYPE_PNG); - pTB->AddTool(ID_TOOL_BRUSH, "Brush", bmp, "Brush", wxITEM_CHECK); bmp = wxGetApp().LoadAppBitmap("bmp/spray.png", wxBITMAP_TYPE_PNG); pTB->AddTool(ID_TOOL_SPRAY, "Spray", bmp, "Spray", wxITEM_CHECK); --- 420,423 ---- *************** *** 665,668 **** --- 663,667 ---- { case BVD_HANDDRAW: + case BVD_SPRAY: SetStatusText(wxString::Format("(%d,%d)", pt.x, pt.y)); break; *************** *** 678,682 **** { case BVD_HANDDRAW: ! if(pt !=wxDefaultPosition) { GetDocument()->DrawLine(m_pt, pt, m_Pen); --- 677,681 ---- { case BVD_HANDDRAW: ! if(pt!=wxDefaultPosition) { GetDocument()->DrawLine(m_pt, pt, m_Pen); *************** *** 684,687 **** --- 683,698 ---- } break; + case BVD_SPRAY: + if(pt!=wxDefaultPosition) + { + int x, y, s = m_pPenSize->GetValue(), t; + for(t=0; t<s; t++) + { + x = rand() % (2*s) - s; + y = rand() % (2*s) - s; + GetDocument()->SetPixel(pt + wxPoint(x, y), m_Pen.GetColour()); + } + } + break; case BVD_LINE: m_pBitmapCtrl->RestoreBitmapRect(); *************** *** 741,744 **** --- 752,756 ---- { case BVD_HANDDRAW: + case BVD_SPRAY: case BVD_LINE: case BVD_RECT: |
|
From: Emilien K. <cur...@us...> - 2005-01-15 15:55:19
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12717/src Modified Files: SimpleTextDocView.cpp Log Message: Status de la vue de texte. Enregistrement des controles Scintilla pour utilisation de vues multiples. Index: SimpleTextDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/SimpleTextDocView.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SimpleTextDocView.cpp 14 Jan 2005 15:36:34 -0000 1.3 --- SimpleTextDocView.cpp 15 Jan 2005 15:55:08 -0000 1.4 *************** *** 643,647 **** SimpleTextDocument::SimpleTextDocument(): Document(), ! m_strText("") { m_strName = WXDC_SIMPLETEXT_EMPTYTEXT; --- 643,648 ---- SimpleTextDocument::SimpleTextDocument(): Document(), ! m_strText(""), ! m_pScintillaDoc(NULL) { m_strName = WXDC_SIMPLETEXT_EMPTYTEXT; *************** *** 708,711 **** --- 709,743 ---- } + // Enregistre un controle scintilla. + void SimpleTextDocument::RegisterScintillaCtrl(wxStyledTextCtrl* pCtrl) + { + // Rapporte le document ou enregistre le controle + if(m_pScintillaDoc==NULL) + m_pScintillaDoc = pCtrl->GetDocPointer(); + else + { + pCtrl->SetDocPointer(m_pScintillaDoc); + pCtrl->AddRefDocument(m_pScintillaDoc); + } + + // Fixe le texte si aucun controle n'était attaché. + if(m_arAttachedStyleTextCtrl.GetCount()==0) + pCtrl->SetText(m_strText); + // Enregistre le controle + m_arAttachedStyleTextCtrl.Add(pCtrl); + + } + + // Désenregistre un controle scintilla. + void SimpleTextDocument::UnregisterScintillaCtrl(wxStyledTextCtrl* pCtrl) + { + // Stockage du texte si plus de controle. + m_arAttachedStyleTextCtrl.Remove(pCtrl); + if(m_arAttachedStyleTextCtrl.GetCount()==0) + m_strText = pCtrl->GetText(); + + // Désinscrit le controle. + pCtrl->ReleaseDocument(m_pScintillaDoc); + } ////////////////////////////////////////////////////////////////////// *************** *** 880,883 **** --- 912,918 ---- SetStyle(strPath); + GetDocument()->RegisterScintillaCtrl(m_pText); + + m_pText->SetText(GetDocument()->GetText()); m_pText->SetSavePoint(); |
|
From: Emilien K. <cur...@us...> - 2005-01-15 15:55:18
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12717/include/wxDevCenter/StdPlugin Modified Files: SimpleTextDocView.h Log Message: Status de la vue de texte. Enregistrement des controles Scintilla pour utilisation de vues multiples. Index: SimpleTextDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/SimpleTextDocView.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SimpleTextDocView.h 14 Jan 2005 15:36:34 -0000 1.3 --- SimpleTextDocView.h 15 Jan 2005 15:55:07 -0000 1.4 *************** *** 170,173 **** --- 170,182 ---- /** Buffer du texte. */ wxString m_strText; + + /** Document Scintilla.*/ + void* m_pScintillaDoc; + + WX_DEFINE_ARRAY(wxStyledTextCtrl*, wxStyledTextCtrlArray); + + /** Liste des controles scintilla attaché au document.*/ + wxStyledTextCtrlArray m_arAttachedStyleTextCtrl; + /** Charge le texte depuis l'archive.*/ bool LoadDocument(wxDevCenter::Archive *ar); *************** *** 183,186 **** --- 192,200 ---- /** Fixe le texte du document.*/ void SetText(wxString strText); + + /** Enregistre un controle scintilla.*/ + void RegisterScintillaCtrl(wxStyledTextCtrl* pCtrl); + /** Désenregistre un controle scintilla.*/ + void UnregisterScintillaCtrl(wxStyledTextCtrl* pCtrl); }; |
|
From: Emilien K. <cur...@us...> - 2005-01-15 15:34:06
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8594/include/wxDevCenter/StdPlugin Modified Files: extmouse.h Log Message: Déclaration exporté des types d'évènements (prévient du linkage inconsistant des évènements). Index: extmouse.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/extmouse.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** extmouse.h 13 Jan 2005 14:52:21 -0000 1.6 --- extmouse.h 15 Jan 2005 15:33:57 -0000 1.7 *************** *** 92,120 **** /** Déclaration des évènements étendus de souris.*/ BEGIN_DECLARE_EVENT_TYPES() ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_LEFT_CLICK , 22001) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_LEFT_DBLCLICK , 22002) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_LEFT_DOWN , 22003) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_LEFT_UP , 22004) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_LEFT_BEGIN_DRAG , 22005) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_LEFT_END_DRAG , 22006) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_LEFT_MOVE_DRAG , 22007) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_RIGHT_CLICK , 22011) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_RIGHT_DBLCLICK , 22012) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_RIGHT_DOWN , 22013) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_RIGHT_UP , 22014) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_RIGHT_BEGIN_DRAG , 22015) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_RIGHT_END_DRAG , 22016) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_RIGHT_MOVE_DRAG , 22017) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_MIDDLE_CLICK , 22021) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_MIDDLE_DBLCLICK , 22022) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_MIDDLE_DOWN , 22023) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_MIDDLE_UP , 22024) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_MIDDLE_BEGIN_DRAG , 22025) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_MIDDLE_END_DRAG , 22026) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_MIDDLE_MOVE_DRAG , 22027) ! DECLARE_EVENT_TYPE(wxEVT_EXTMOUSE_MOVE , 22000) END_DECLARE_EVENT_TYPES() --- 92,120 ---- /** Déclaration des évènements étendus de souris.*/ BEGIN_DECLARE_EVENT_TYPES() ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_LEFT_CLICK , 22001) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_LEFT_DBLCLICK , 22002) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_LEFT_DOWN , 22003) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_LEFT_UP , 22004) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_LEFT_BEGIN_DRAG , 22005) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_LEFT_END_DRAG , 22006) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_LEFT_MOVE_DRAG , 22007) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_RIGHT_CLICK , 22011) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_RIGHT_DBLCLICK , 22012) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_RIGHT_DOWN , 22013) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_RIGHT_UP , 22014) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_RIGHT_BEGIN_DRAG , 22015) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_RIGHT_END_DRAG , 22016) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_RIGHT_MOVE_DRAG , 22017) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_MIDDLE_CLICK , 22021) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_MIDDLE_DBLCLICK , 22022) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_MIDDLE_DOWN , 22023) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_MIDDLE_UP , 22024) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_MIDDLE_BEGIN_DRAG , 22025) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_MIDDLE_END_DRAG , 22026) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_MIDDLE_MOVE_DRAG , 22027) ! DECLARE_EXPORTED_EVENT_TYPE(STD_DLL_PLUGIN, wxEVT_EXTMOUSE_MOVE , 22000) END_DECLARE_EVENT_TYPES() |
|
From: Emilien K. <cur...@us...> - 2005-01-15 15:33:33
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8496/include/wxDevCenter Modified Files: DocView.h Frame.h StatusBar.h Log Message: Déclaration exporté des types d'évènements (prévient du linkage inconsistant des évènements). Index: DocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocView.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DocView.h 15 Jan 2005 09:47:22 -0000 1.5 --- DocView.h 15 Jan 2005 15:33:23 -0000 1.6 *************** *** 518,525 **** BEGIN_DECLARE_EVENT_TYPES() ! DECLARE_EVENT_TYPE(WXDC_EVT_MINIVIEW_CLICK, 12020) ! DECLARE_EVENT_TYPE(WXDC_EVT_MINIVIEW_DBLCLICK, 12021) ! DECLARE_EVENT_TYPE(WXDC_EVT_MINIVIEW_DRAG, 12022) ! DECLARE_EVENT_TYPE(WXDC_EVT_MINIVIEW_CONTEXTMENU, 12023) END_DECLARE_EVENT_TYPES() --- 518,525 ---- BEGIN_DECLARE_EVENT_TYPES() ! DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDC_EVT_MINIVIEW_CLICK, 12020) ! DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDC_EVT_MINIVIEW_DBLCLICK, 12021) ! 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() Index: StatusBar.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/StatusBar.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StatusBar.h 14 Jan 2005 14:34:58 -0000 1.2 --- StatusBar.h 15 Jan 2005 15:33:23 -0000 1.3 *************** *** 70,74 **** BEGIN_DECLARE_EVENT_TYPES() ! DECLARE_EVENT_TYPE(WXDC_EVT_STATUS_PANEL, 12010) END_DECLARE_EVENT_TYPES() --- 70,74 ---- BEGIN_DECLARE_EVENT_TYPES() ! DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDC_EVT_STATUS_PANEL, 12010) END_DECLARE_EVENT_TYPES() Index: Frame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Frame.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Frame.h 12 Jan 2005 13:50:54 -0000 1.2 --- Frame.h 15 Jan 2005 15:33:23 -0000 1.3 *************** *** 40,45 **** BEGIN_DECLARE_EVENT_TYPES() ! DECLARE_EVENT_TYPE(WXDCEVT_VIEW_CHANGING, 12000) ! DECLARE_EVENT_TYPE(WXDCEVT_VIEW_CHANGED, 12001) END_DECLARE_EVENT_TYPES() --- 40,45 ---- BEGIN_DECLARE_EVENT_TYPES() ! DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDCEVT_VIEW_CHANGING, 12000) ! DECLARE_EXPORTED_EVENT_TYPE(WXDC_DLL_BASE, WXDCEVT_VIEW_CHANGED, 12001) END_DECLARE_EVENT_TYPES() |
|
From: Emilien K. <cur...@us...> - 2005-01-15 15:03:04
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1662/include/wxDevCenter Modified Files: language.h Log Message: Changement du nom du système de fichiers std unix : "/" -> HostName Index: language.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/language.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** language.h 12 Jan 2005 17:35:05 -0000 1.4 --- language.h 15 Jan 2005 15:02:48 -0000 1.5 *************** *** 73,77 **** #elif defined __UNIX_LIKE__ ! #define WXDC_SYSTEM_STDFS_NAME wxT("/") #define WXDC_SYSTEM_DEFAULT_PATH wxT("file:/") --- 73,79 ---- #elif defined __UNIX_LIKE__ ! #include <wx/utils.h> ! ! #define WXDC_SYSTEM_STDFS_NAME (wxGetHostName()) #define WXDC_SYSTEM_DEFAULT_PATH wxT("file:/") |
|
From: Emilien K. <cur...@us...> - 2005-01-15 14:53:59
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31656/src Modified Files: FileSystemStandard.cpp Log Message: Erreur de listage des périphériques sous windows Index: FileSystemStandard.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystemStandard.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FileSystemStandard.cpp 15 Jan 2005 14:43:35 -0000 1.9 --- FileSystemStandard.cpp 15 Jan 2005 14:53:47 -0000 1.10 *************** *** 197,202 **** if(m_arDrives[n]==c && (n+1)<m_arDrives.GetCount()) { ! m_strCurrentFile = GetProtocoleName() + wxT(":") + m_strNameComputer + wxT("/"); ! m_strCurrentFile.Append(m_arDrives[n+1]).Append(wxT(":")); return m_arDrives[n+1] + wxT(":"); } --- 197,204 ---- if(m_arDrives[n]==c && (n+1)<m_arDrives.GetCount()) { ! m_strCurrentFile.Empty(); ! m_strCurrentFile << GetProtocoleName() << wxT(":") ! << m_strNameComputer << wxT("/") ! << m_arDrives[n+1] << wxT(":"); return m_arDrives[n+1] + wxT(":"); } *************** *** 253,259 **** int FileSystemStandardWindows::GetDirectorySystemType(FilePath strPath) { - if(strPath.Last()=='\\' || strPath.Last()=='/') - strPath.RemoveLast(); - if(strPath.IsEmpty()) return WXDC_FS_DIRTYPE_MOUNT; --- 255,258 ---- |
|
From: Emilien K. <cur...@us...> - 2005-01-15 14:43:45
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29637/src Modified Files: FileSystemStandard.cpp Log Message: Petite erreur de récursion dans l'ouverture d'un FSListCtrl sous nunux Index: FileSystemStandard.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystemStandard.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FileSystemStandard.cpp 13 Jan 2005 16:09:39 -0000 1.8 --- FileSystemStandard.cpp 15 Jan 2005 14:43:35 -0000 1.9 *************** *** 428,435 **** bool FileSystemStandardUnix::IsDirectory(FilePath strPath) { ! if(strPath=="") return true; else ! return wxDir::Exists(strPath.GetFilePath()); } --- 428,436 ---- bool FileSystemStandardUnix::IsDirectory(FilePath strPath) { ! strPath.RemoveProtocol(); ! if(strPath.IsEmpty()) return true; else ! return wxDir::Exists(strPath); } |
|
From: Emilien K. <cur...@us...> - 2005-01-15 14:43:45
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29637/include/wxDevCenter Modified Files: FileSystemCtrl.h Log Message: Petite erreur de récursion dans l'ouverture d'un FSListCtrl sous nunux Index: FileSystemCtrl.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystemCtrl.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FileSystemCtrl.h 15 Jan 2005 14:05:17 -0000 1.4 --- FileSystemCtrl.h 15 Jan 2005 14:43:35 -0000 1.5 *************** *** 216,225 **** * @param nMode Mode d'ouverture du répertoire. */ ! void Open(FilePath strPath, wxString strWild = "*.*", unsigned int nMode=WXDC_FSLC_MODE_NORMAL); /** Ouvre la liste dans le répertoire racine. * @param strWild Filtrage des noms de fichiers à afficher. * @param nMode Mode d'ouverture du répertoire. */ ! void OpenRoot(wxString strWild = "*.*", unsigned int nMode=WXDC_FSLC_MODE_NORMAL); /** Ouvre la liste dans un répertoire en conservant les infos de listages. --- 216,225 ---- * @param nMode Mode d'ouverture du répertoire. */ ! void Open(FilePath strPath, wxString strWild = wxT("*.*"), unsigned int nMode=WXDC_FSLC_MODE_NORMAL); /** Ouvre la liste dans le répertoire racine. * @param strWild Filtrage des noms de fichiers à afficher. * @param nMode Mode d'ouverture du répertoire. */ ! void OpenRoot(wxString strWild = wxT("*.*"), unsigned int nMode=WXDC_FSLC_MODE_NORMAL); /** Ouvre la liste dans un répertoire en conservant les infos de listages. |
|
From: Emilien K. <cur...@us...> - 2005-01-15 14:05:48
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22486/src Modified Files: Application.cpp FileSystemCtrl.cpp Log Message: Choix du type de document selon le choix de filtrage de la boite de dialogue à l'ouverture. Si "Tous document enregistrés" ou "*.*" est choisi, alors l'extension est utilisé pour reconnaitre le document. Index: FileSystemCtrl.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystemCtrl.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FileSystemCtrl.cpp 12 Jan 2005 17:40:25 -0000 1.4 --- FileSystemCtrl.cpp 15 Jan 2005 14:05:17 -0000 1.5 *************** *** 782,785 **** --- 782,792 ---- + // Retourne l'index du filtre sélectionné. + int FileSystemDialog::GetFilterIndex() + { + return m_pWildChoice->GetSelection(); + } + + // Intercepte le chngement de wildcard. void FileSystemDialog::OnChoice(wxCommandEvent& event) Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Application.cpp 12 Jan 2005 17:35:05 -0000 1.6 --- Application.cpp 15 Jan 2005 14:05:17 -0000 1.7 *************** *** 230,234 **** // Ouvre un document (depuis un fichier ou le package selon la source spécifiée). // Retourne false si l'ouverture à échouée. ! bool Application::OpenDocument(FilePath &strPath) { wxString strProtocol, strExt; --- 230,234 ---- // Ouvre un document (depuis un fichier ou le package selon la source spécifiée). // Retourne false si l'ouverture à échouée. ! bool Application::OpenDocument(FilePath &strPath, int iDocType) { wxString strProtocol, strExt; *************** *** 256,263 **** ! int nDocType, nDocView; ! nDocType = m_DocManager.GetDocTemplateID(strExt); ! if(nDocType==-1) { wxMessageBox(WXDC_ERROR_FILEEXTNOTREGISTERED); --- 256,268 ---- ! int nDocView; ! // Détermine le type de document si non précisé. ! if(iDocType==-1) ! { ! iDocType = m_DocManager.GetDocTemplateID(strExt); ! } ! ! if(iDocType==-1) { wxMessageBox(WXDC_ERROR_FILEEXTNOTREGISTERED); *************** *** 265,275 **** } ! if(m_DocManager.GetDocTemplate((unsigned int)nDocType)->GetViewCount()<2) ! nDocView = nDocType; else ! nDocView = m_DocManager.ChooseViewType(nDocType); // Création du document ! pDoc = m_DocManager.CreateDocument(nDocType); // Chargement du document if(!pDoc->OnOpenDocument(strPath)) --- 270,281 ---- } ! // Détermine le type de vue. ! if(m_DocManager.GetDocTemplate((unsigned int)iDocType)->GetViewCount()<2) ! nDocView = iDocType; else ! nDocView = m_DocManager.ChooseViewType(iDocType); // Création du document ! pDoc = m_DocManager.CreateDocument(iDocType); // Chargement du document if(!pDoc->OnOpenDocument(strPath)) *************** *** 296,299 **** --- 302,315 ---- if(FD.ShowModal()==wxID_OK) { + int iDocType = FD.GetFilterIndex(); + if(iDocType==wxNOT_FOUND // Pas de sélection de type + || iDocType==0 // "Tous les types enregistrés" + || iDocType==(int)GetDocManager().GetDocTemplateCount()) // "*.*" + iDocType = -1; + + // On transforme l'index du wildcard en identifiant de type de document (ID ET PAS INDEX). + if(iDocType!=-1) + iDocType = GetDocManager().DocTemplateIDFromIndex((unsigned int)iDocType-1); + wxArrayString files; FD.GetSelectedFileList(files); *************** *** 301,305 **** { FilePath path = files[n]; ! OpenDocument(path); } } --- 317,321 ---- { FilePath path = files[n]; ! OpenDocument(path, iDocType); } } |
|
From: Emilien K. <cur...@us...> - 2005-01-15 14:05:48
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22486/include/wxDevCenter Modified Files: Application.h DocManager.h FileSystemCtrl.h Log Message: Choix du type de document selon le choix de filtrage de la boite de dialogue à l'ouverture. Si "Tous document enregistrés" ou "*.*" est choisi, alors l'extension est utilisé pour reconnaitre le document. Index: FileSystemCtrl.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystemCtrl.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FileSystemCtrl.h 12 Jan 2005 17:40:24 -0000 1.3 --- FileSystemCtrl.h 15 Jan 2005 14:05:17 -0000 1.4 *************** *** 422,425 **** --- 422,430 ---- void GetSelectedFileList(wxArrayString& files); + /** Retourne l'index du filtre sélectionné. + * @return L'index du filtre sélectionné. + */ + int GetFilterIndex(); + /** Navigue vers un répertoire. * @param strPath Chemin vers le répertoire.*/ Index: DocManager.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocManager.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DocManager.h 15 Jan 2005 09:47:21 -0000 1.5 --- DocManager.h 15 Jan 2005 14:05:17 -0000 1.6 *************** *** 315,319 **** /** Patron de document par son indice dans le tableau de référencement.*/ DocTemplate* GetDocTemplate(unsigned int nID)const{return m_DocTemplateArray[DocTemplateIndexFromID(nID)];} ! /** Patron de document correspondant à une extension.*/ int GetDocTemplateID(wxString strExt)const; --- 315,319 ---- /** Patron de document par son indice dans le tableau de référencement.*/ DocTemplate* GetDocTemplate(unsigned int nID)const{return m_DocTemplateArray[DocTemplateIndexFromID(nID)];} ! /** Patron de document correspondant à une extension.*/ int GetDocTemplateID(wxString strExt)const; *************** *** 338,341 **** --- 338,351 ---- */ void AddDocTemplate(DocTemplate* pTemplate); + /** Identifiant de patron depuis son indice dans le tableau de référencement. + * @param nIndex Indice de référencement. + * @return Identifiant de patron (-1 si erreur). + */ + int DocTemplateIDFromIndex(unsigned int nIndex)const{return nIndex<m_DocTemplateArray.GetCount()?m_DocTemplateArray[nIndex]->m_nID:-1;} + /** Indice de patron dans le tableau de référencement depuis l'index. + * @param nID Identifiant de patron. + * @return Indice de référencement (-1 si erreur). + */ + int DocTemplateIndexFromID(unsigned int nID)const{for(unsigned int n=0; n<m_DocTemplateArray.GetCount(); n++)if(m_DocTemplateArray[n]->m_nID==nID)return n; return -1;} /** @}*/ *************** *** 405,423 **** /** @}*/ - protected: - /** @name Manipulation interne des patrons de documents. - * @{*/ - /** Identifiant de patron depuis son indice dans le tableau de référencement. - * @param nIndex Indice de référencement. - * @return Identifiant de patron (-1 si erreur). - */ - int DocTemplateIDFromIndex(unsigned int nIndex)const{return nIndex<m_DocTemplateArray.GetCount()?m_DocTemplateArray[nIndex]->m_nID:-1;} - /** Indice de patron dans le tableau de référencement depuis l'index. - * @param nID Identifiant de patron. - * @return Indice de référencement (-1 si erreur). - */ - int DocTemplateIndexFromID(unsigned int nID)const{for(unsigned int n=0; n<m_DocTemplateArray.GetCount(); n++)if(m_DocTemplateArray[n]->m_nID==nID)return n; return -1;} - /** @}*/ - /** Supprime une vue. Supprime une vue sans aucun test d'attachement aux documents. * Enlève la vue des différentes listes et la détruit. --- 415,418 ---- Index: Application.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Application.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Application.h 3 Jan 2005 15:07:38 -0000 1.3 --- Application.h 15 Jan 2005 14:05:17 -0000 1.4 *************** *** 194,200 **** * Si le document est déjà ouvert, sa vue s'affiche au premier plan. * @param strPath Chemin du document. * @return True si OK. */ ! bool OpenDocument(FilePath& strPath); /** Enregistre un document dans un fichier. * Ouvre une boite de dialogue pour demander à l'utilisateur le chemin du fichier du document. --- 194,201 ---- * Si le document est déjà ouvert, sa vue s'affiche au premier plan. * @param strPath Chemin du document. + * @param iDocType Identifiant du type de document. -1 si indéterminé. * @return True si OK. */ ! bool OpenDocument(FilePath& strPath, int iDocType=-1); /** Enregistre un document dans un fichier. * Ouvre une boite de dialogue pour demander à l'utilisateur le chemin du fichier du document. |
|
From: Emilien K. <cur...@us...> - 2005-01-15 09:47:34
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13814/src Modified Files: DocManager.cpp Document.cpp View.cpp Log Message: Quelques changements dans les mecanismes internes de l'architecture doc/vue. Fin de l'implementation des fonctions de l'archi doc/vue. Index: Document.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Document.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Document.cpp 12 Jan 2005 13:50:55 -0000 1.2 --- Document.cpp 15 Jan 2005 09:47:22 -0000 1.3 *************** *** 237,240 **** --- 237,245 ---- } + // Prétraitement du document avant fermeture. + bool Document::OnCloseDocument() + { + return true; + } // Fonction appelée à la fermeture du document. Index: DocManager.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/DocManager.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DocManager.cpp 12 Jan 2005 13:50:55 -0000 1.4 --- DocManager.cpp 15 Jan 2005 09:47:22 -0000 1.5 *************** *** 167,184 **** bool DocManager::CloseDocument(Document *pDoc) { if(pDoc->CanCloseDocument()) { ! while(!pDoc->m_ViewArray.IsEmpty()) ! { ! DeleteView(pDoc->m_ViewArray.Item(0)); ! } ! m_DocArray.Remove(pDoc); ! delete pDoc; return true; } else - { return false; - } } --- 167,181 ---- bool DocManager::CloseDocument(Document *pDoc) { + // On teste si le document peut etre fermé if(pDoc->CanCloseDocument()) { ! // On ferme toutes les vues attachées au document. ! // Le document sera détruit automatiquement par la fermeture de la dernière vue. ! for(int i = pDoc->m_ViewArray.GetCount()-1; i>=0; i--) ! CloseView(pDoc->m_ViewArray.Item(i)); return true; } else return false; } *************** *** 202,205 **** --- 199,212 ---- } + // Detruit le document spécifié. + void DocManager::DeleteDocument(Document* pDocument) + { + // Pré-ferme le document. + pDocument->OnCloseDocument(); + // Retire le document de la liste des documents du DocManager + m_DocArray.Remove(pDocument); + // Détruit le document. + delete pDocument; + } *************** *** 345,357 **** bool DocManager::CloseView(View *pView) { - Document *pDoc = pView->GetDocument(); if(pDoc->m_ViewArray.GetCount()==1) { ! return CloseDocument(pDoc); } ! else { ! DeleteView(pView); } --- 352,371 ---- bool DocManager::CloseView(View *pView) { Document *pDoc = pView->GetDocument(); + + // On s'assure que le document peut etre fermé si s'est la dernière vue. if(pDoc->m_ViewArray.GetCount()==1) { ! if(!pDoc->CanCloseDocument()) ! return false; } ! ! // Détruit la vue. ! DeleteView(pView); ! ! //On ferme le document si il n'a plus de vue. ! if(pDoc->m_ViewArray.GetCount()==0) { ! DeleteDocument(pDoc); } *************** *** 362,384 **** void DocManager::DeleteView(View *pView) { ! int i = 0; ! for(i=0; i<(int)pView->GetDocument()->m_ViewArray.GetCount(); i++) ! { ! if(pView->GetDocument()->m_ViewArray[i]==pView) ! { ! pView->GetDocument()->m_ViewArray.RemoveAt(i); ! break; ! } ! } ! for(i=0; i<(int)m_ViewArray.GetCount(); i++) ! { ! if(m_ViewArray[i]==pView) ! { ! m_ViewArray.RemoveAt(i); ! break; ! } ! } pView->GetFrame()->DeleteView(pView); } --- 376,389 ---- void DocManager::DeleteView(View *pView) { ! // Processus pre-fermeture de la vue. ! pView->OnClose(); ! // Détache la vue du document. ! pView->GetDocument()->DetachView(pView); ! // Détache la vue de la liste des vues du DocManager. ! m_ViewArray.Remove(pView); ! ! // Destruction de la vue. pView->GetFrame()->DeleteView(pView); } Index: View.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/View.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** View.cpp 14 Jan 2005 14:34:59 -0000 1.3 --- View.cpp 15 Jan 2005 09:47:22 -0000 1.4 *************** *** 117,121 **** ////////////////////////////////////////////////////////////////////// ! // Fonctions virtuelles de mise à jour et de création des vues // Appellée tout de suite après la création de la vue. --- 117,121 ---- ////////////////////////////////////////////////////////////////////// ! // Fonctions virtuelles de création, mise à jour et fermeture des vues // Appellée tout de suite après la création de la vue. *************** *** 141,144 **** --- 141,149 ---- } + // Processus pre-fermeture. + void View::OnClose() + { + } + ////////////////////////////////////////////////////////////////////// // Interception des évènements des menus |
|
From: Emilien K. <cur...@us...> - 2005-01-15 09:47:34
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13814/include/wxDevCenter Modified Files: DocManager.h DocView.h Log Message: Quelques changements dans les mecanismes internes de l'architecture doc/vue. Fin de l'implementation des fonctions de l'archi doc/vue. Index: DocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocView.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DocView.h 14 Jan 2005 14:34:58 -0000 1.4 --- DocView.h 15 Jan 2005 09:47:22 -0000 1.5 *************** *** 147,166 **** /** Processus post-création. ! * Fonction à dériver pour implémenter la création de fenêtres filles. ! * En effet, comme les vues sont crées via la RTTI, on ne peut créer de fenêtres filles dans le constructeurs, donc il faut le faire ici. ! * @return Vrai si la Post-création s'est correctement déroulée.*/ virtual bool OnCreate(); /** Première mise à jour de la vue. ! * Mise à jour initiale de la vue. Utile pour initialiser la première fois des paramètres ou des objets de dessin (police, pinceau ...). ! * La fonction de base appelle un OnUpdate(NULL, 0, NULL).*/ virtual void OnInitialUpdate(); /** Mise à jour de la vue. ! * Fonction appelée à chaque fois qu'il y a une demande de mise à jour de la vue à cause d'une modification potentielle des données. ! * Ne pas confondre avec le rafraichissement de l'affichage de la vue. ! * @param pSender Vue ayant modifiée les données. NULL si la mise à jour est provoquée par le document lui-même. ! * @param nUpdateCode Identifiant permettant de savoir ce qui a été changé (propre à chaque type de document). ! * @param pUpdateInfo Pointeur vers une classe ou une structure précisant les modifications apportées (propre à chaque type de document). ! * @see Document::UpdateAllViews*/ virtual void OnUpdate(View *pSender, unsigned int nUpdateCode, void* pUpdateInfo); }; --- 147,171 ---- /** Processus post-création. ! * Fonction à dériver pour implémenter la création de fenêtres filles. ! * En effet, comme les vues sont crées via la RTTI, on ne peut créer de fenêtres filles dans le constructeurs, donc il faut le faire ici. ! * @return Vrai si la Post-création s'est correctement déroulée.*/ virtual bool OnCreate(); /** Première mise à jour de la vue. ! * Mise à jour initiale de la vue. Utile pour initialiser la première fois des paramètres ou des objets de dessin (police, pinceau ...). ! * La fonction de base appelle un OnUpdate(NULL, 0, NULL).*/ virtual void OnInitialUpdate(); /** Mise à jour de la vue. ! * Fonction appelée à chaque fois qu'il y a une demande de mise à jour de la vue à cause d'une modification potentielle des données. ! * Ne pas confondre avec le rafraichissement de l'affichage de la vue. ! * @param pSender Vue ayant modifiée les données. NULL si la mise à jour est provoquée par le document lui-même. ! * @param nUpdateCode Identifiant permettant de savoir ce qui a été changé (propre à chaque type de document). ! * @param pUpdateInfo Pointeur vers une classe ou une structure précisant les modifications apportées (propre à chaque type de document). ! * @see Document::UpdateAllViews*/ virtual void OnUpdate(View *pSender, unsigned int nUpdateCode, void* pUpdateInfo); + /** Processus pre-fermeture. + * Fonction virtuelle appelée juste avant la fermeture de la vue. + * La fonction de base ne fait rien. + */ + virtual void OnClose(); }; *************** *** 173,178 **** /** Interface "document" (classe de base). ! * Classe Interface de document à dériver pour créer des documents spécifiques. ! */ class WXDC_DLL_BASE Document : public wxObject { --- 178,183 ---- /** Interface "document" (classe de base). ! * Classe Interface de document à dériver pour créer des documents spécifiques. ! */ class WXDC_DLL_BASE Document : public wxObject { *************** *** 233,273 **** protected: /** Sauvegarde du document. ! * A dériver pour implémenter la sauvegarde des données. ! * Note : la fonction de base procède à la sérialisation via la fonction SerializeDocument ! * @param ar Archive dans laquelle sauvegarder le document.*/ virtual bool SaveDocument(Archive *ar); /** Lecture du document. ! * A dériver pour implémenter la lecture des documents. ! * Note : la fonction de base procède à la sérialisation via la fonction SerializeDocument ! * @param ar Archive depuis laquelle lire le document.*/ virtual bool LoadDocument(Archive *ar); /** Sérialisation du document. ! * La sérialisation est le processus de lecture/sauvegarde parallèle du document. ! * C'est à dire si la lecture suit le même chemin que l'écriture. ! * @param ar Archive dans laquelle sérialiser le document.*/ virtual bool SerializeDocument(Archive *ar); /** Initialisation du document en cas de création. ! * Initialise le document après sa création depuis une commande "nouveau document". ! * A dériver pour l'initialisation des données du document. ! * @return Retourne false si l'initialisation a échouée.*/ virtual bool OnNewDocument(); /** Prétraitement du document avant lecture des données depuis une archive. ! * A dériver pour initialiser les données du document. ! * Note : la fonction de base fixe le nom et le chemin du document et procède à la lecture de celui-ci via LoadDocument ! * @return Retourne false si l'initialisation du document a échouée.*/ virtual bool OnOpenDocument(FilePath strDocumentPath); /** Prétraitement du document avant écriture des données dans une archive. ! * A dériver pour sauvegarder les données du document dans le fichier. ! * Note : la fonction de base force enregistre les données depuis le fichier spécifié via la fonction SaveDocument modifie le drapeau de modification. ! * @return Retourne false si l'enregistrement du document a échouée.*/ virtual bool OnSaveDocument(FilePath strDocumentPath); /** Teste si le document peut être fermé. ! * Retourner false entraine l'annulation de la fermeture de la vue. ! * @return Retourne false si le document ne doit pas etre fermé.*/ virtual bool CanCloseDocument(); /** Sauvegarde les modifications apportées au document. ! * Note : la fonction de base appelle OnSaveDocument ! * @return Retourne false si le document ne peut etre fermé.*/ virtual bool SaveModified(); }; --- 238,284 ---- protected: /** Sauvegarde du document. ! * A dériver pour implémenter la sauvegarde des données. ! * Note : la fonction de base procède à la sérialisation via la fonction SerializeDocument ! * @param ar Archive dans laquelle sauvegarder le document.*/ virtual bool SaveDocument(Archive *ar); /** Lecture du document. ! * A dériver pour implémenter la lecture des documents. ! * Note : la fonction de base procède à la sérialisation via la fonction SerializeDocument ! * @param ar Archive depuis laquelle lire le document.*/ virtual bool LoadDocument(Archive *ar); /** Sérialisation du document. ! * La sérialisation est le processus de lecture/sauvegarde parallèle du document. ! * C'est à dire si la lecture suit le même chemin que l'écriture. ! * @param ar Archive dans laquelle sérialiser le document.*/ virtual bool SerializeDocument(Archive *ar); /** Initialisation du document en cas de création. ! * Initialise le document après sa création depuis une commande "nouveau document". ! * A dériver pour l'initialisation des données du document. ! * @return Retourne false si l'initialisation a échouée.*/ virtual bool OnNewDocument(); /** Prétraitement du document avant lecture des données depuis une archive. ! * A dériver pour initialiser les données du document. ! * Note : la fonction de base fixe le nom et le chemin du document et procède à la lecture de celui-ci via LoadDocument ! * @return Retourne false si l'initialisation du document a échouée.*/ virtual bool OnOpenDocument(FilePath strDocumentPath); /** Prétraitement du document avant écriture des données dans une archive. ! * A dériver pour sauvegarder les données du document dans le fichier. ! * Note : la fonction de base force enregistre les données depuis le fichier spécifié via la fonction SaveDocument modifie le drapeau de modification. ! * @return Retourne false si l'enregistrement du document a échouée.*/ virtual bool OnSaveDocument(FilePath strDocumentPath); /** Teste si le document peut être fermé. ! * Retourner false entraine l'annulation de la fermeture de la vue. ! * @return Retourne false si le document ne doit pas etre fermé.*/ virtual bool CanCloseDocument(); + /** Prétraitement du document avant fermeture. + * Fonction prévue pour libérer des ressources avant fermeture. + * La fonction par défaut ne fait rien. + * @return False si une erreur de fermeture s'est produite. Ignorée pour l'instant. + */ + virtual bool OnCloseDocument(); /** Sauvegarde les modifications apportées au document. ! * Note : la fonction de base appelle OnSaveDocument ! * @return Retourne false si le document ne peut etre fermé.*/ virtual bool SaveModified(); }; Index: DocManager.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/DocManager.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DocManager.h 12 Jan 2005 13:50:54 -0000 1.4 --- DocManager.h 15 Jan 2005 09:47:21 -0000 1.5 *************** *** 265,272 **** /** Tableau des associations ISs <=> Bundles d'icones.*/ IconBundleArray m_arIconBundle; - public: /** @name Manipulation des documents. * @{*/ /** Nombre de documents.*/ unsigned int GetDocCount()const{return m_DocArray.GetCount();} --- 265,272 ---- /** Tableau des associations ISs <=> Bundles d'icones.*/ IconBundleArray m_arIconBundle; /** @name Manipulation des documents. * @{*/ + public: /** Nombre de documents.*/ unsigned int GetDocCount()const{return m_DocArray.GetCount();} *************** *** 298,301 **** --- 298,306 ---- /** Sauvegarde les données modifiées du documents.*/ bool SaveDocument(Document *pDoc); + protected: + /** Supprime le document spécifié. + * Le document est supposé libre de vue et sauevgardé si besoin est. + * Aucune vérification ne sera effectuée.*/ + void DeleteDocument(Document* pDocument); /** @}*/ *************** *** 303,306 **** --- 308,312 ---- /** @name Manipulation des patrons de documents. * @{*/ + public: /** Nombre de patrons de documents.*/ unsigned int GetDocTemplateCount()const{return m_DocTemplateArray.GetCount();} |
|
From: Emilien K. <cur...@us...> - 2005-01-14 17:08:26
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18226/src Modified Files: BitmapCtrl.cpp BitmapDocView.cpp Log Message: Fixe le bug (plantage) de la sauvegarde d'une partie d'un BitmapCtrl (valide le rectangle de sauvegarde). Ajoute le status de vue du BitmapView. Index: BitmapCtrl.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/BitmapCtrl.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BitmapCtrl.cpp 8 Jan 2005 17:49:13 -0000 1.8 --- BitmapCtrl.cpp 14 Jan 2005 17:08:16 -0000 1.9 *************** *** 331,334 **** --- 331,335 ---- void BitmapCtrl::SaveBitmapRect(wxRect r) { + r.Intersect(wxRect(0, 0, m_Bmp.GetWidth(), m_Bmp.GetHeight())); m_SaveBuffer = m_Bmp.GetSubBitmap(r); m_ptSaveBuffer = r.GetLeftTop(); Index: BitmapDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/BitmapDocView.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** BitmapDocView.cpp 13 Jan 2005 14:47:10 -0000 1.10 --- BitmapDocView.cpp 14 Jan 2005 17:08:16 -0000 1.11 *************** *** 222,225 **** --- 222,226 ---- EVT_UPDATE_UI(IDM_VIEW_EXTRASCROLL, BitmapView::OnUpdateExtraScroll) + EVT_EXTMOUSE_MOVE(ID_BITMAP_CTRL, BitmapView::OnLeftMove) EVT_EXTMOUSE_LEFT_MOVE_DRAG(ID_BITMAP_CTRL, BitmapView::OnLeftDrag) EVT_EXTMOUSE_LEFT_BEGIN_DRAG(ID_BITMAP_CTRL, BitmapView::OnLeftDragStart) *************** *** 649,652 **** --- 650,659 ---- + // Interception d'un déplacement de souris (non drag). + void BitmapView::OnLeftMove(wxExtendedMouseEvent& event) + { + wxPoint pt = m_pBitmapCtrl->ClientToBitmap(event.GetToPos()); + SetStatusText(wxString::Format("(%d,%d)", pt.x, pt.y)); + } // Interception d'un drag gauche. *************** *** 658,661 **** --- 665,681 ---- { case BVD_HANDDRAW: + SetStatusText(wxString::Format("(%d,%d)", pt.x, pt.y)); + break; + case BVD_LINE: + case BVD_RECT: + case BVD_RRECT: + case BVD_ELLIPSE: + SetStatusText(wxString::Format("(%d,%d) -> (%d,%d) : (%d,%d)",m_pt.x, m_pt.y, pt.x, pt.y, pt.x-m_pt.x, pt.y-m_pt.y)); + break; + } + + switch(m_BVD) + { + case BVD_HANDDRAW: if(pt !=wxDefaultPosition) { |
|
From: Emilien K. <cur...@us...> - 2005-01-14 17:08:26
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18226/include/wxDevCenter/StdPlugin Modified Files: BitmapDocView.h Log Message: Fixe le bug (plantage) de la sauvegarde d'une partie d'un BitmapCtrl (valide le rectangle de sauvegarde). Ajoute le status de vue du BitmapView. Index: BitmapDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/BitmapDocView.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BitmapDocView.h 11 Jan 2005 13:45:54 -0000 1.6 --- BitmapDocView.h 14 Jan 2005 17:08:15 -0000 1.7 *************** *** 211,214 **** --- 211,217 ---- wxPoint m_pt; + + /** Interception d'un déplacement de souris (non drag).*/ + void OnLeftMove(wxExtendedMouseEvent& event); /** Interception d'un drag gauche.*/ void OnLeftDrag(wxExtendedMouseEvent& event); |
|
From: Emilien K. <cur...@us...> - 2005-01-14 15:36:46
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30821/src Modified Files: SimpleTextDocView.cpp Log Message: Statistiques du texte et de la position courante dans le panneau dédié (vue) de la barre de status Index: SimpleTextDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/SimpleTextDocView.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimpleTextDocView.cpp 19 Dec 2004 17:01:29 -0000 1.2 --- SimpleTextDocView.cpp 14 Jan 2005 15:36:34 -0000 1.3 *************** *** 773,776 **** --- 773,777 ---- EVT_STC_MARGINCLICK(ID_TEXT, SimpleTextView::OnMarginClick) + EVT_STC_UPDATEUI(ID_TEXT, SimpleTextView::OnNotifyTextChanged) END_EVENT_TABLE() *************** *** 841,844 **** --- 842,859 ---- } + + // Met à jour le status de la vue. + void SimpleTextView::UpdateStatus() + { + wxString str; + int iCurPos = m_pText->GetCurrentPos(); + + str.Printf(wxT("Ln %d/%d Col %d/%d Char %d/%d"), + m_pText->GetCurrentLine(), m_pText->GetLineCount(), + m_pText->GetColumn(iCurPos), m_pText->LineLength(m_pText->LineFromPosition(iCurPos)), + iCurPos, m_pText->GetTextLength()); + SetStatusText(str); + } + void SimpleTextView::OnSize(wxSizeEvent &event) { *************** *** 873,876 **** --- 888,892 ---- void SimpleTextView::OnUpdate(View *WXUNUSED(pSender), unsigned int WXUNUSED(nUpdateCode), void* WXUNUSED(pUpdateInfo)) { + UpdateStatus(); } *************** *** 1137,1141 **** } ! /** Retourne le texte dans le buffer de scintilla.*/ wxString SimpleTextView::GetText()const { --- 1153,1165 ---- } ! // Interception de la notification de changement de texte. ! void SimpleTextView::OnNotifyTextChanged(wxStyledTextEvent& event) ! { ! event.Skip(); ! UpdateStatus(); ! } ! ! ! // Retourne le texte dans le buffer de scintilla. wxString SimpleTextView::GetText()const { |