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-02-16 17:46:38
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24897/include/wxDevCenter/StdPlugin Modified Files: SimpleTextDocView.h Log Message: Suite du transfert de la conf des textes vers les fichiers .conf Index: SimpleTextDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/SimpleTextDocView.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SimpleTextDocView.h 16 Feb 2005 15:10:01 -0000 1.6 --- SimpleTextDocView.h 16 Feb 2005 17:45:54 -0000 1.7 *************** *** 67,71 **** /** Propriété d'affichage d'un langage. ! * Classe de stockage des propriétés d'affichage d'un langage : couleur, taille de police,etc ... pour chaque sous-type de langage.*/ struct LanguageProperty { --- 67,71 ---- /** Propriété d'affichage d'un langage. ! * Classe de stockage des propriétés d'affichage d'un langage : couleur, taille de police, etc ... pour chaque sous-type de langage.*/ struct LanguageProperty { *************** *** 97,102 **** extern LanguageProperty g_LangagePropertyArray[WXDC_NB_LEX]; - /** Fonction d'initialisation des styles.*/ - void InitPreferences(); /** Fonction de lecture des préférences.*/ void LoadPreferences(); --- 97,100 ---- |
|
From: Emilien K. <cur...@us...> - 2005-02-16 15:10:12
|
Update of /cvsroot/wxdevcenter/wxDevCenter/conf/Text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15794/conf/Text Added Files: CPP.conf LUA.conf Log Message: Déplacement de la configuration de base des vues de texte dans des fichiers de configs. Création d'une nouvelle boite de dialogue de modif des styles de texte. --- NEW FILE: LUA.conf --- folds=7 name=LUA [keywords00] keywords=and break do else elseif end false for function if in local nil not or repeat return then true until while keyname= [keywords01] keywords=_VERSION assert collectgarbage dofile error gcinfo loadfile loadstring print tonumber tostring type unpack _ALERT _ERRORMESSAGE _INPUT _PROMPT _OUTPUT _STDERR _STDIN _STDOUT call dostring foreach foreachi getn globals newtype rawget rawset require sort tinsert tremove _G getfenv getmetatable ipairs loadlib next pairs pcall rawegal rawget rawset require setfenv setmetatable xpcall string table math coroutine io os debug keyname= [keywords02] keywords=abs acos asin atan atan2 ceil cos deg exp floor format frexp gsub ldexp log log10 max min mod rad random randomseed sin sqrt strbyte strchar strfind strlen strlower strrep strsub strupper tan string.byte string.char string.dump string.find string.len string.lower string.rep string.sub string.upper string.format string.gfind string.gsub table.concat table.foreach table.foreachi table.getn table.sort table.insert table.remove table.setn math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.deg math.exp math.floor math.frexp math.ldexp math.log math.log10 math.max math.min math.mod math.pi math.rad math.random math.randomseed math.sin math.sqrt math.tan keyname= [keywords03] keywords=openfile closefile readfrom writeto appendto remove rename flush seek tmpfile tmpname read write clock date difftime execute exit getenv setlocale time coroutine.create coroutine.resume coroutine.status coroutine.wrap coroutine.yield io.close io.flush io.input io.lines io.open io.output io.read io.tmpfile io.type io.write io.stdin io.stdout io.stderr os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename os.setlocale os.time os.tmpname keyname= [keywords04] keywords= keyname= [keywords05] keywords= keyname= [keywords06] keywords= keyname= [keywords07] keywords= keyname= [keywords08] keywords= keyname= [style00] used=1 style-label=Default [style01] used=1 style-label=Comment [style02] used=1 style-label=Line comment [style03] used=1 style-label=Doc comment [style04] used=1 style-label=Number [style06] used=1 style-label=Word [style07] used=1 style-label=String [style08] used=1 style-label=Character [style09] used=1 style-label=Literal string [style10] used=1 style-label=Preprocessor [style11] used=1 style-label=Operator [style12] used=1 style-label=Identifier [style13] used=1 style-label=End of line not closed string --- NEW FILE: CPP.conf --- folds=7 name=C/C++ - Java [keywords00] keywords=asm auto bool break case catch char class const const_cast continue default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable namespace new operator private protected public register reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while keyname=C/C++ standard keywords [keywords01] keywords= keyname= [keywords02] keywords= keyname=User custom keywords [keywords03] keywords=a addindex addtogroup anchor arg attention author b brief bug c class code date def defgroup deprecated dontinclude e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception f$ f[ f] file fn hideinitializer htmlinclude htmlonly if image include ingroup internal invariant interface latexonly li line link mainpage name namespace nosubgrouping note overload p page par param post pre ref relates remarks return retval sa section see showinitializer since skip skipline struct subsection test throw todo typedef union until var verbatim verbinclude version warning weakgroup $ @ & < > # { } keyname=Doxygen documentation markers [keywords04] keywords= keyname= [keywords05] keywords= keyname= [keywords06] keywords= keyname= [keywords07] keywords= keyname= [keywords08] keywords= keyname= [style00] used=1 style-label=Default [style01] used=1 style-label=Comment [style02] used=1 style-label=Line comment [style03] used=1 style-label=Doc comment [style04] used=1 style-label=Number [style05] used=0 style-label=C/C++ key-word [style06] used=1 style-label=String [style07] used=1 style-label=Character [style08] used=1 style-label=UUID [style09] used=1 style-label=Preprocessor [style10] used=1 style-label=Operator [style11] used=1 style-label=Custom identifier [style12] used=1 style-label=End of line not closed string [style13] used=0 style-label=Not used [style14] used=1 style-label=Regular expression [style15] used=1 style-label=Comment line doc [style16] used=1 style-label=C/C++ additionnal key-word [style17] used=1 style-label=Doxygen document [style18] used=1 style-label=Doxygen document error [style19] used=1 style-label=Global class |
|
From: Emilien K. <cur...@us...> - 2005-02-16 15:10:12
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15794/src Modified Files: SimpleTextDocView.cpp Log Message: Déplacement de la configuration de base des vues de texte dans des fichiers de configs. Création d'une nouvelle boite de dialogue de modif des styles de texte. Index: SimpleTextDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/SimpleTextDocView.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SimpleTextDocView.cpp 14 Feb 2005 15:26:37 -0000 1.5 --- SimpleTextDocView.cpp 16 Feb 2005 15:10:02 -0000 1.6 *************** *** 33,36 **** --- 33,37 ---- #include <wx/confbase.h> #include <wx/gdicmn.h> + #include <wx/spinctrl.h> #include <stdio.h> *************** *** 382,386 **** --- 383,390 ---- } } + + Config.Flush(); } + GlobalConfig.Flush(); } *************** *** 535,540 **** void QueryPreferences() { ! SimpleTextViewPrefDialog Diag; ! if(Diag.ShowModal()==wxID_OK) { SavePreferences(); --- 539,544 ---- void QueryPreferences() { ! SimpleTextPrefDialog Dialog; ! if(Dialog.ShowModal()==wxID_OK) { SavePreferences(); *************** *** 563,732 **** } - ////////////////////////////////////////////////////////////////////// // Boite de dialogue des préférences utilisateur. ! // SimpleTextViewPrefDialog ! #define ID_BUTTON_REINIT 20 ! BEGIN_EVENT_TABLE(SimpleTextViewPrefDialog, wxDialog) ! EVT_BUTTON(ID_BUTTON_REINIT, SimpleTextViewPrefDialog::OnReinitButton) END_EVENT_TABLE() ! SimpleTextViewPrefDialog::SimpleTextViewPrefDialog(): ! wxDialog(NULL, -1, wxString(WXDC_NAME).Append(" - ").Append(WXDC_SIMPLETEXT_USERCONFIGDIALOG), wxDefaultPosition, wxSize(400, 300), wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE) { ! m_pNotebook = new wxNotebook(this, -1); ! wxSizer *pGlobalSizer = new wxBoxSizer(wxVERTICAL); ! pGlobalSizer->Add(m_pNotebook, 1, wxGROW); ! int i; ! for(i=0; i<WXDC_NB_LEX; i++) ! m_pNotebook->AddPage(new SimpleTextViewLangagePage(m_pNotebook, -1, i), g_LangagePropertyArray[i].strName); ! wxSizer *pSizer = new wxBoxSizer(wxHORIZONTAL); ! pSizer->Add(new wxButton(this, wxID_OK, WXDC_GENERIC_OK), 1, wxGROW|wxALL, 4); ! pSizer->Add(new wxButton(this, wxID_CANCEL, WXDC_GENERIC_CANCEL), 1, wxGROW|wxALL, 4); ! pSizer->Add(new wxButton(this, ID_BUTTON_REINIT, WXDC_SIMPLETEXT_REINIT), 1, wxGROW|wxALL,4); ! pGlobalSizer->Add(pSizer, 0, wxALIGN_CENTER); SetSizer(pGlobalSizer); } ! void SimpleTextViewPrefDialog::OnReinitButton(wxCommandEvent& WXUNUSED(event)) { ! int iPage = m_pNotebook->GetSelection(); ! if(iPage>0 && iPage<WXDC_NB_LEX) ! { ! g_LangagePropertyArray[iPage].ReInit(); ! ((SimpleTextViewPrefDialog::SimpleTextViewLangagePage*)m_pNotebook->GetPage(iPage))->UpdatePanel(); ! } } ! ////////////////////////////////////////////////////////////////////// ! // Feuille propre à un langage pour ! // la boite de dialogue des préférences utilisateur. ! // SimpleTextViewLangagePage ! ! #define WXDC_STVPD_CHOICE 10 ! #define WXDC_STVPD_BOLD 11 ! #define WXDC_STVPD_ITALIC 12 ! #define WXDC_STVPD_UNDER 13 ! #define WXDC_STVPD_FORE 14 ! #define WXDC_STVPD_BACK 15 ! ! BEGIN_EVENT_TABLE(SimpleTextViewPrefDialog::SimpleTextViewLangagePage, wxWindow) ! EVT_SIZE(SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnSize) ! EVT_CHOICE(WXDC_STVPD_CHOICE, SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnChangeActiveStyle) ! EVT_CHECKBOX(WXDC_STVPD_BOLD, SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnControlClic) ! EVT_CHECKBOX(WXDC_STVPD_ITALIC, SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnControlClic) ! EVT_CHECKBOX(WXDC_STVPD_UNDER, SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnControlClic) ! EVT_BUTTON(WXDC_STVPD_FORE, SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnControlClic) ! EVT_BUTTON(WXDC_STVPD_BACK, SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnControlClic) ! END_EVENT_TABLE() ! SimpleTextViewPrefDialog::SimpleTextViewLangagePage::SimpleTextViewLangagePage(wxWindow *pParent, wxWindowID id, int iLangID): ! wxWindow(pParent, id), ! m_iLangID(iLangID), ! m_iActiveStyle(0) { ! wxChoice *pChoice = new wxChoice(this, WXDC_STVPD_CHOICE, wxDefaultPosition, wxDefaultSize, 0, NULL); ! ! wxSizer *pGlobalSizer = new wxBoxSizer(wxVERTICAL); ! wxSizer *pSizer, *pGroupSizer; ! ! pSizer = new wxBoxSizer(wxHORIZONTAL); ! pSizer->Add(new wxStaticText(this, -1, WXDC_SIMPLETEXT_LANG), 0, wxGROW); ! pSizer->Add(pChoice, 1, wxGROW); ! pGlobalSizer->Add(pSizer, 0, wxGROW); ! pGroupSizer = new wxBoxSizer(wxVERTICAL); ! pGroupSizer->Add(m_pCheckBold = new wxCheckBox(this, WXDC_STVPD_BOLD, WXDC_SIMPLETEXT_BOLD), 1, wxGROW|wxALL, 4); ! pGroupSizer->Add(m_pCheckItalic =new wxCheckBox(this, WXDC_STVPD_ITALIC, WXDC_SIMPLETEXT_ITALIC) , 1, wxGROW|wxALL, 4); ! pGroupSizer->Add(m_pCheckUnderline =new wxCheckBox(this, WXDC_STVPD_UNDER, WXDC_SIMPLETEXT_UNDERLINE) , 1, wxGROW|wxALL, 4); ! m_pButtonFore = new wxButton(this, WXDC_STVPD_FORE, WXDC_SIMPLETEXT_FORE); ! pGroupSizer->Add(m_pButtonFore , 2, wxGROW|wxALL, 4); ! m_pButtonBack = new wxButton(this, WXDC_STVPD_BACK, WXDC_SIMPLETEXT_BACK); ! pGroupSizer->Add(m_pButtonBack , 2, wxGROW|wxALL, 4); ! ! pSizer = new wxBoxSizer(wxHORIZONTAL); ! pSizer->Add(pGroupSizer, 1, wxGROW); ! pSizer->Add(m_pButtonStyle = new wxButton(this, -1, ""), 2, wxGROW); ! pGlobalSizer->Add(pSizer, 1, wxGROW); ! SetSizer(pGlobalSizer); ! for(int iID = 0; iID<wxSTC_STYLE_DEFAULT; iID++) ! if(g_LangagePropertyArray[iLangID].Styles[iID].bUsed) ! pChoice->Append(g_LangagePropertyArray[iLangID].Styles[iID].strLabel, (void*)iID); ! pChoice->SetSelection(0); ! UpdatePanel(); } ! void SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnSize(wxSizeEvent &event) { ! Layout(); ! event.Skip(); } ! void SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnChangeActiveStyle(wxCommandEvent &event) { ! m_iActiveStyle = (int)event.GetClientData(); ! UpdatePanel(); } ! void SimpleTextViewPrefDialog::SimpleTextViewLangagePage::UpdatePanel() { ! LanguageProperty* pLang = &g_LangagePropertyArray[m_iLangID]; ! LanguageProperty::LangagePropertyStyle* pCurStyle = &(pLang->Styles[m_iActiveStyle]); ! wxFont font(pCurStyle->iFontSize, wxMODERN, ! (pCurStyle->iFontStyle&WXDC_STC_STYLE_ITALIC)?wxITALIC:wxNORMAL, ! (pCurStyle->iFontStyle&WXDC_STC_STYLE_BOLD)?wxBOLD:wxNORMAL, ! (pCurStyle->iFontStyle&WXDC_STC_STYLE_UNDERL)!=0); ! ! m_pCheckBold->SetValue((pCurStyle->iFontStyle&WXDC_STC_STYLE_BOLD)!=0); ! m_pCheckItalic->SetValue((pCurStyle->iFontStyle&WXDC_STC_STYLE_ITALIC)!=0); ! m_pCheckUnderline->SetValue((pCurStyle->iFontStyle&WXDC_STC_STYLE_UNDERL)!=0); - m_pButtonFore->SetForegroundColour(pCurStyle->colForeground); - m_pButtonBack->SetBackgroundColour(pCurStyle->colBackground); ! m_pButtonStyle->SetLabel(pCurStyle->strLabel); ! m_pButtonStyle->SetForegroundColour(pCurStyle->colForeground); ! m_pButtonStyle->SetBackgroundColour(pCurStyle->colBackground); ! m_pButtonStyle->SetFont(font); } ! void SimpleTextViewPrefDialog::SimpleTextViewLangagePage::OnControlClic(wxCommandEvent &event) { ! wxColour col; ! LanguageProperty* pLang = &g_LangagePropertyArray[m_iLangID]; ! LanguageProperty::LangagePropertyStyle* pCurStyle = &(pLang->Styles[m_iActiveStyle]); switch(event.GetId()) { ! case WXDC_STVPD_BOLD: ! pCurStyle->iFontStyle = (pCurStyle->iFontStyle&!WXDC_STC_STYLE_BOLD)|(event.IsChecked()?WXDC_STC_STYLE_BOLD:0); break; ! case WXDC_STVPD_ITALIC: ! pCurStyle->iFontStyle = (pCurStyle->iFontStyle&!WXDC_STC_STYLE_ITALIC)|(event.IsChecked()?WXDC_STC_STYLE_ITALIC:0); break; ! case WXDC_STVPD_UNDER: ! pCurStyle->iFontStyle = (pCurStyle->iFontStyle&!WXDC_STC_STYLE_UNDERL)|(event.IsChecked()?WXDC_STC_STYLE_UNDERL:0); break; ! case WXDC_STVPD_FORE: col = wxGetColourFromUser(NULL, pCurStyle->colForeground); if(col.Ok()) pCurStyle->colForeground = col; break; ! case WXDC_STVPD_BACK: col = wxGetColourFromUser(NULL, pCurStyle->colBackground); if(col.Ok()) --- 567,792 ---- } ////////////////////////////////////////////////////////////////////// // Boite de dialogue des préférences utilisateur. ! // SimpleTextPrefDialog ! #define ID_LANGUAGE 10 ! #define ID_STYLE 11 ! #define ID_FOREGROUND 12 ! #define ID_BACKGROUND 13 ! #define ID_FONTSIZE 14 ! #define ID_BOLD 15 ! #define ID_ITALIC 16 ! #define ID_UNDERLINE 17 ! #define ID_TEST 18 ! #define ID_KEYNAME 19 ! #define ID_KEYWORDS 20 ! #define ID_REINIT 21 ! ! BEGIN_EVENT_TABLE(SimpleTextPrefDialog, wxDialog) ! EVT_CHOICE(ID_LANGUAGE, SimpleTextPrefDialog::OnChangeLanguage) ! EVT_CHOICE(ID_STYLE, SimpleTextPrefDialog::OnChangeStyle) ! EVT_CHOICE(ID_KEYNAME, SimpleTextPrefDialog::OnChangeKeyword) ! ! EVT_TEXT(ID_FONTSIZE, SimpleTextPrefDialog::OnStyleCtrlEvent) ! EVT_CHECKBOX(ID_BOLD, SimpleTextPrefDialog::OnStyleCtrlEvent) ! EVT_CHECKBOX(ID_ITALIC, SimpleTextPrefDialog::OnStyleCtrlEvent) ! EVT_CHECKBOX(ID_UNDERLINE, SimpleTextPrefDialog::OnStyleCtrlEvent) ! EVT_BUTTON( ID_FOREGROUND, SimpleTextPrefDialog::OnStyleCtrlEvent) ! EVT_BUTTON( ID_BACKGROUND, SimpleTextPrefDialog::OnStyleCtrlEvent) ! ! EVT_BUTTON(ID_REINIT, SimpleTextPrefDialog::OnRevert) END_EVENT_TABLE() ! SimpleTextPrefDialog::SimpleTextPrefDialog(): ! wxDialog(NULL, -1, wxString(WXDC_NAME).Append(" - ").Append(WXDC_SIMPLETEXT_USERCONFIGDIALOG), wxDefaultPosition, wxSize(500, 400), wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE) { ! wxSizer *pGlobalSizer = new wxBoxSizer(wxVERTICAL), ! *pStyleSizer = new wxBoxSizer(wxVERTICAL), ! *pKeysSizer = new wxBoxSizer(wxVERTICAL), ! *pHSizer; ! m_pLanguage = new wxChoice(this, ID_LANGUAGE); ! m_pStyle = new wxChoice(this, ID_STYLE); ! m_pForeground = new wxButton(this, ID_FOREGROUND, WXDC_SIMPLETEXT_FORE); ! m_pBackground = new wxButton(this, ID_BACKGROUND, WXDC_SIMPLETEXT_BACK); ! m_pFontSize = new wxSpinCtrl(this, ID_FONTSIZE); ! m_pCheckBold = new wxCheckBox(this, ID_BOLD, WXDC_SIMPLETEXT_BOLD); ! m_pCheckItalic = new wxCheckBox(this, ID_ITALIC, WXDC_SIMPLETEXT_ITALIC); ! m_pCheckUnderline = new wxCheckBox(this, ID_UNDERLINE, WXDC_SIMPLETEXT_UNDERLINE); ! m_pTest = new wxButton(this, ID_TEST, wxT(""), wxDefaultPosition, wxDefaultSize, wxNO_BORDER); ! m_pKeywords = new wxChoice(this, ID_KEYNAME); ! m_pKeys = new wxTextCtrl(this, ID_KEYWORDS, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_LINEWRAP); ! m_pOK = new wxButton(this, wxID_OK, WXDC_GENERIC_OK); ! m_pCancel = new wxButton(this, wxID_CANCEL, WXDC_GENERIC_CANCEL); ! m_pRevert = new wxButton(this, ID_REINIT, WXDC_SIMPLETEXT_REINIT); ! pStyleSizer->Add(m_pStyle, 0, wxGROW|wxALL, 4); ! pStyleSizer->AddSpacer(8); ! pStyleSizer->Add(m_pFontSize, 0, wxGROW|wxALL, 4); ! pStyleSizer->AddSpacer(4); ! pStyleSizer->Add(m_pCheckBold, 0, wxGROW|wxALL, 4); ! pStyleSizer->Add(m_pCheckItalic, 0, wxGROW|wxALL, 4); ! pStyleSizer->Add(m_pCheckUnderline, 0, wxGROW|wxALL, 4); ! pStyleSizer->AddSpacer(4); ! pStyleSizer->Add(m_pForeground, 0, wxGROW|wxALL, 4); ! pStyleSizer->Add(m_pBackground, 0, wxGROW|wxALL, 4); ! pStyleSizer->AddSpacer(8); ! pStyleSizer->Add(m_pTest, 1, wxGROW|wxALL, 4); + pKeysSizer->Add(m_pKeywords, 0, wxGROW|wxALL, 4); + pKeysSizer->Add(m_pKeys, 1, wxGROW|wxALL, 4); + + + pGlobalSizer->Add(m_pLanguage, 0, wxGROW|wxALL, 4); + pHSizer = new wxBoxSizer(wxHORIZONTAL); + pHSizer->Add(pStyleSizer, 1, wxGROW|wxALL, 4); + pHSizer->Add(pKeysSizer, 1, wxGROW|wxALL, 4); + pGlobalSizer->Add(pHSizer, 1, wxGROW); + pHSizer = new wxBoxSizer(wxHORIZONTAL); + pHSizer->Add(m_pOK, 0, wxGROW|wxALL, 4); + pHSizer->Add(m_pCancel, 0, wxGROW|wxALL, 4); + pHSizer->AddSpacer(8); + pHSizer->Add(m_pRevert, 0, wxGROW|wxALL, 4); + pGlobalSizer->Add(pHSizer, 0, wxALIGN_CENTER_HORIZONTAL); SetSizer(pGlobalSizer); + + FillLanguage(); } ! void SimpleTextPrefDialog::FillLanguage() { ! m_pLanguage->Clear(); ! for(int i=0; i<WXDC_NB_LEX; i++) ! m_pLanguage->Append(g_LangagePropertyArray[i].strName); ! if(!m_pLanguage->IsEmpty()) ! m_pLanguage->SetSelection(0); } ! void SimpleTextPrefDialog::UpdateLangageDependancies() ! { ! LanguageProperty* pCurLang = GetCurrentLanguage(); ! if(pCurLang==NULL) ! return; ! int i; ! m_pStyle->Clear(); ! for(i=0; i<wxSTC_STYLE_DEFAULT; i++) ! if(pCurLang->Styles[i].bUsed) ! m_pStyle->Append(pCurLang->Styles[i].strLabel, (void*)i); ! if(!m_pStyle->IsEmpty()) ! m_pStyle->SetSelection(0); ! m_pKeywords->Clear(); ! for(i=0; i<=wxSTC_KEYWORDSET_MAX; i++) ! m_pKeywords->Append(pCurLang->Keywords[i].strName, (void*)i); ! if(!m_pKeywords->IsEmpty()) ! m_pKeywords->SetSelection(0); ! UpdateStyleDependancies(); ! UpdateKeywordDependancies(); ! } ! void SimpleTextPrefDialog::UpdateStyleDependancies() { ! LanguageProperty::LangagePropertyStyle* pCurStyle = GetCurrentStyle(); ! if(pCurStyle==NULL) ! return; + wxFont font(pCurStyle->iFontSize, wxMODERN, + (pCurStyle->iFontStyle&WXDC_STC_STYLE_ITALIC)?wxITALIC:wxNORMAL, + (pCurStyle->iFontStyle&WXDC_STC_STYLE_BOLD)?wxBOLD:wxNORMAL, + (pCurStyle->iFontStyle&WXDC_STC_STYLE_UNDERL)!=0); ! m_pCheckBold->SetValue((pCurStyle->iFontStyle&WXDC_STC_STYLE_BOLD)!=0); ! m_pCheckItalic->SetValue((pCurStyle->iFontStyle&WXDC_STC_STYLE_ITALIC)!=0); ! m_pCheckUnderline->SetValue((pCurStyle->iFontStyle&WXDC_STC_STYLE_UNDERL)!=0); ! m_pForeground->SetForegroundColour(pCurStyle->colForeground); ! m_pBackground->SetBackgroundColour(pCurStyle->colBackground); ! m_pTest->SetLabel(pCurStyle->strLabel); ! m_pTest->SetForegroundColour(pCurStyle->colForeground); ! m_pTest->SetBackgroundColour(pCurStyle->colBackground); ! m_pTest->SetFont(font); ! } ! void SimpleTextPrefDialog::UpdateKeywordDependancies() ! { ! LanguageProperty::KeywordProperty* pCurKey = GetCurrentKeyword(); ! if(pCurKey==NULL) ! return; ! ! m_pKeys->SetValue(pCurKey->strKeys); ! } ! void SimpleTextPrefDialog::OnChangeLanguage(wxCommandEvent& WXUNUSED(event)) ! { ! UpdateLangageDependancies(); } ! void SimpleTextPrefDialog::OnChangeStyle(wxCommandEvent& WXUNUSED(event)) { ! UpdateStyleDependancies(); } ! void SimpleTextPrefDialog::OnChangeKeyword(wxCommandEvent& WXUNUSED(event)) { ! UpdateKeywordDependancies(); } ! LanguageProperty* SimpleTextPrefDialog::GetCurrentLanguage() { ! int iLang = m_pLanguage->GetSelection(); ! return (iLang!=wxNOT_FOUND)?&g_LangagePropertyArray[iLang]:NULL; ! } ! LanguageProperty::LangagePropertyStyle* SimpleTextPrefDialog::GetCurrentStyle() ! { ! LanguageProperty* pLang = GetCurrentLanguage(); ! if(pLang==NULL) ! return NULL; ! if(m_pStyle->GetSelection()==wxNOT_FOUND) ! return NULL; ! return &(pLang->Styles[(long)m_pStyle->GetClientData(m_pStyle->GetSelection())]); ! } ! LanguageProperty::KeywordProperty* SimpleTextPrefDialog::GetCurrentKeyword() ! { ! LanguageProperty* pLang = GetCurrentLanguage(); ! if(pLang==NULL) ! return NULL; ! if(m_pKeywords->GetSelection()==wxNOT_FOUND) ! return NULL; ! return &(pLang->Keywords[(long)m_pKeywords->GetClientData(m_pStyle->GetSelection())]); } ! void SimpleTextPrefDialog::OnStyleCtrlEvent(wxCommandEvent& event) { ! LanguageProperty::LangagePropertyStyle* pCurStyle = GetCurrentStyle(); ! if(pCurStyle==NULL) ! return; + wxColour col; switch(event.GetId()) { ! case ID_BOLD: ! pCurStyle->iFontStyle = (pCurStyle->iFontStyle&~WXDC_STC_STYLE_BOLD)|(event.IsChecked()?WXDC_STC_STYLE_BOLD:0); break; ! case ID_ITALIC: ! pCurStyle->iFontStyle = (pCurStyle->iFontStyle&~WXDC_STC_STYLE_ITALIC)|(event.IsChecked()?WXDC_STC_STYLE_ITALIC:0); break; ! case ID_UNDERLINE: ! pCurStyle->iFontStyle = (pCurStyle->iFontStyle&~WXDC_STC_STYLE_UNDERL)|(event.IsChecked()?WXDC_STC_STYLE_UNDERL:0); break; ! case ID_FOREGROUND: col = wxGetColourFromUser(NULL, pCurStyle->colForeground); if(col.Ok()) pCurStyle->colForeground = col; break; ! case ID_BACKGROUND: col = wxGetColourFromUser(NULL, pCurStyle->colBackground); if(col.Ok()) *************** *** 734,744 **** break; } - UpdatePanel(); - } - - - --- 794,810 ---- break; } + UpdateStyleDependancies(); + } + void SimpleTextPrefDialog::OnRevert(wxCommandEvent& WXUNUSED(event)) + { + LanguageProperty* pCurLang = GetCurrentLanguage(); + if(pCurLang!=NULL) + { + pCurLang->ReInit(); + UpdateLangageDependancies(); + } + } |
|
From: Emilien K. <cur...@us...> - 2005-02-16 15:10:12
|
Update of /cvsroot/wxdevcenter/StdPlugin/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15794/conf Added Files: Text.conf Log Message: Déplacement de la configuration de base des vues de texte dans des fichiers de configs. Création d'une nouvelle boite de dialogue de modif des styles de texte. --- NEW FILE: Text.conf --- name00= name01=Text name02=Python name03=CPP name04=HTML name05=XML name06=Perl name07=SQL name08=Visual Basic name09=Properties name10=Error list name11=Makefile name12=Batch name13=XCode name14=LaTeX name15=LUA name16=Diff name17=Config name18=Pascal name19=AVE name20=ADA name21=Lisp name22=Ruby name23=Eiffel name24=EiffelKW name25=TCL name26=NN Cron Table name27=Bullant name28=Visual Basic Script name29=ASP name30=PHP name31=BAAM name32=MATLab name33=Scriptol name34=ASM name35=CPP no case name36=Fortran name37=F77 name38=CSS name39=POV name40=LOUT name41=ESCRIPT name42=PS name43=NSIS name44=MMIXAL name45=CLW name46=CLW no case name47=LOT name48=YAML name49=TeX name50=METAPOST name51=Power Basic name52=FORTH name53=ERLANG name54=Octave name55=MS-SQL name56=Verilog name57=KIX name58=GUI2CLI name59=SPECMAN name60=AU3 name61=APDL name62=BASH |
|
From: Emilien K. <cur...@us...> - 2005-02-16 15:10:11
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15794/include/wxDevCenter/StdPlugin Modified Files: SimpleTextDocView.h language.h Log Message: Déplacement de la configuration de base des vues de texte dans des fichiers de configs. Création d'une nouvelle boite de dialogue de modif des styles de texte. Index: SimpleTextDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/SimpleTextDocView.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SimpleTextDocView.h 14 Feb 2005 15:26:36 -0000 1.5 --- SimpleTextDocView.h 16 Feb 2005 15:10:01 -0000 1.6 *************** *** 110,165 **** ! ! /** Choix des préférences utilisateur. ! * Définition de la boite de dialogue des préférences utilisateurs. ! */ ! class SimpleTextViewPrefDialog : public wxDialog { protected: /** Déclaration de la table d'interception des évènements.*/ DECLARE_EVENT_TABLE() - /** Interception du bouton "Réinit".*/ - void OnReinitButton(wxCommandEvent &event); - /** Notebook.*/ - wxNotebook *m_pNotebook; ! /** Page "langage" des préférences utilisateur. ! * Un langage par page. ! */ ! class SimpleTextViewLangagePage : public wxWindow ! { ! friend class SimpleTextViewPrefDialog; ! protected: ! /** Déclaration de la table d'interception des évènements.*/ ! DECLARE_EVENT_TABLE() ! /** Identifiant du langage propre à la page.*/ ! int m_iLangID; ! /** Numéro du style sélectionné.*/ ! int m_iActiveStyle; ! /** Interception de l'évènement de redimensionement.*/ ! void OnSize(wxSizeEvent &event); ! /** Interception de l'évènement de changement de style actif.*/ ! void OnChangeActiveStyle(wxCommandEvent &event); ! /** CheckBox de style.*/ ! wxCheckBox *m_pCheckBold, ! *m_pCheckItalic, ! *m_pCheckUnderline; ! /** Boutons de style de texte.*/ ! wxButton *m_pButtonFore, ! *m_pButtonBack; ! /** Zone de style.*/ ! wxButton *m_pButtonStyle; ! /** Rafraichie la zone d'affichage depuis les préférences utilisateur.*/ ! void UpdatePanel(); ! /** Intercepte les messages de clic sur les controles de style.*/ ! void OnControlClic(wxCommandEvent &event); ! public: ! SimpleTextViewLangagePage(wxWindow *pParent, wxWindowID id, int iLangID); ! }; ! public: ! SimpleTextViewPrefDialog(); ! }; --- 110,160 ---- ! class SimpleTextPrefDialog : public wxDialog { protected: /** Déclaration de la table d'interception des évènements.*/ DECLARE_EVENT_TABLE() ! /** Choix du langage.*/ ! wxChoice* m_pLanguage; ! ! /** Choix du style.*/ ! wxChoice* m_pStyle; ! wxButton* m_pForeground; ! wxButton* m_pBackground; ! wxSpinCtrl* m_pFontSize; ! wxCheckBox* m_pCheckBold, ! * m_pCheckItalic, ! * m_pCheckUnderline; ! wxButton* m_pTest; ! ! /** Choix des mots-clefs.*/ ! wxChoice* m_pKeywords; ! wxTextCtrl* m_pKeys; ! ! /** Boutons.*/ ! wxButton* m_pOK, ! * m_pCancel, ! * m_pRevert; + void FillLanguage(); + void UpdateLangageDependancies(); + void UpdateStyleDependancies(); + void UpdateKeywordDependancies(); + + void OnChangeLanguage(wxCommandEvent& event); + void OnChangeStyle(wxCommandEvent& event); + void OnChangeKeyword(wxCommandEvent& event); + void OnStyleCtrlEvent(wxCommandEvent& event); + + LanguageProperty::LangagePropertyStyle* GetCurrentStyle(); + LanguageProperty* GetCurrentLanguage(); + LanguageProperty::KeywordProperty* GetCurrentKeyword(); + + void OnRevert(wxCommandEvent& event); + public: + SimpleTextPrefDialog(); + }; Index: language.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/language.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** language.h 14 Feb 2005 15:26:36 -0000 1.11 --- language.h 16 Feb 2005 15:10:02 -0000 1.12 *************** *** 135,138 **** --- 135,139 ---- #define WXDC_SIMPLETEXT_FORE "Foreground" #define WXDC_SIMPLETEXT_BACK "Background" + #define WXDC_SIMPLETEXT_SIZE "Font Size" #define WXDC_SIMPLETEXT_LANG "Language : " |
|
From: Emilien K. <cur...@us...> - 2005-02-16 15:01:41
|
Update of /cvsroot/wxdevcenter/StdPlugin/conf/Text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13561/Text Log Message: Directory /cvsroot/wxdevcenter/StdPlugin/conf/Text added to the repository |
|
From: Emilien K. <cur...@us...> - 2005-02-16 15:01:22
|
Update of /cvsroot/wxdevcenter/StdPlugin/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13462/conf Log Message: Directory /cvsroot/wxdevcenter/StdPlugin/conf added to the repository |
|
From: Emilien K. <cur...@us...> - 2005-02-16 10:09:50
|
Update of /cvsroot/wxdevcenter/wxDevCenter/conf/Text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9097/Text Log Message: Directory /cvsroot/wxdevcenter/wxDevCenter/conf/Text added to the repository |
|
From: Emilien K. <cur...@us...> - 2005-02-16 10:09:38
|
Update of /cvsroot/wxdevcenter/wxDevCenter/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9011/conf Log Message: Directory /cvsroot/wxdevcenter/wxDevCenter/conf added to the repository |
|
From: Emilien K. <cur...@us...> - 2005-02-14 15:26:51
|
Update of /cvsroot/wxdevcenter/StdPlugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5635/src Modified Files: SimpleTextDocView.cpp Log Message: Utilisation du nouveau mécanisme de configuration pour la sauvegarde des styles des textes. Index: SimpleTextDocView.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/src/SimpleTextDocView.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SimpleTextDocView.cpp 15 Jan 2005 15:55:08 -0000 1.4 --- SimpleTextDocView.cpp 14 Feb 2005 15:26:37 -0000 1.5 *************** *** 31,34 **** --- 31,37 ---- #include <wx/fdrepdlg.h> #include <wx/notebook.h> + #include <wx/confbase.h> + #include <wx/gdicmn.h> + #include <stdio.h> using namespace wxDevCenter; *************** *** 69,73 **** for(i=0; i<wxSTC_KEYWORDSET_MAX+1; i++) { ! strKeywords[i] = ""; } --- 72,77 ---- for(i=0; i<wxSTC_KEYWORDSET_MAX+1; i++) { ! Keywords[i].strKeys = wxT(""); ! Keywords[i].strName = wxT(""); } *************** *** 211,223 **** }; ! #define COLOR_TO_LONG(col) ((unsigned int) (col.Red()<<16)|(col.Green()<<8)|(col.Blue())) ! #define LONG_TO_COLOR(l) wxColour(l>>16, (l>>8)%256, l%256) /** Fonction de lecture des préférences.*/ void LoadPreferences() { ! int iLang; ! wxString strRoot, strLabel, str; ! int NumStyle; LanguageProperty *pLang; LanguageProperty::LangagePropertyStyle* pCurStyle; --- 215,291 ---- }; ! ! /** Traduction d'une couleur vers sa forme de sauvegarde de config. ! * @param col Couleur à sauvegarder. ! * @return Chaine de configuration. ! */ ! wxString ColourToString(wxColour col) ! { ! wxString str = wxTheColourDatabase->FindName(col); ! if(str.IsEmpty()) ! str.Printf(wxT("#%02d%02d%02d"), col.Red(), col.Green(), col.Blue()); ! return str; ! } ! ! /** Traduction d'une couleur depuis sa forme de sauvegarde de config. ! * @param Chaine de configuration. ! * @return Couleur. ! */ ! wxColour StringToColour(wxString str) ! { ! wxColour col = wxTheColourDatabase->Find(str); ! if(!col.Ok()) ! { ! unsigned short r, g, b; ! str.Replace(wxT("#"), wxT("")); ! str.UpperCase(); ! sscanf(str.GetData(), wxT("%02hX%02hX%02hX"), &r, &g, &b); ! col.Set((unsigned char)r, (unsigned char)g, (unsigned char)b); ! } ! return col; ! } ! ! /** Traduction d'un style de police vers sa forme de sauvegarde de config. ! * @param FontStyle Style à sauvegarder. ! * @return Chaine de configuration. ! */ ! wxString FontStyleToString(long FontStyle) ! { ! wxString str; ! if((FontStyle&WXDC_STC_STYLE_ITALIC)!=0) ! str << "I"; ! if((FontStyle&WXDC_STC_STYLE_BOLD)!=0) ! str << "B"; ! if((FontStyle&WXDC_STC_STYLE_UNDERL)!=0) ! str << "U"; ! if((FontStyle&WXDC_STC_STYLE_HIDDEN)!=0) ! str << "H"; ! return str; ! } ! ! /** Traduction d'un style de police depuis sa forme de sauvegarde de config. ! * @param str Chaine de configuration. ! * @return Style de police. ! */ ! long StringToFontStyle(wxString str) ! { ! long l = 0; ! if(str.Find(wxT("I"))!=-1) ! l |= WXDC_STC_STYLE_ITALIC; ! if(str.Find(wxT("B"))!=-1) ! l |= WXDC_STC_STYLE_BOLD; ! if(str.Find(wxT("U"))!=-1) ! l |= WXDC_STC_STYLE_UNDERL; ! if(str.Find(wxT("H"))!=-1) ! l |= WXDC_STC_STYLE_HIDDEN; ! return l; ! } ! /** Fonction de lecture des préférences.*/ void LoadPreferences() { ! int iLang, NumStyle, NumKeyword; ! wxString strLabel, strRoot, str; LanguageProperty *pLang; LanguageProperty::LangagePropertyStyle* pCurStyle; *************** *** 225,244 **** InitPreferences(); for(iLang=0; iLang<WXDC_NB_LEX; iLang++) { pLang = &g_LangagePropertyArray[iLang]; ! strRoot = wxString(WXDC_SIMPLETEXT_VIEWCONFIGROOT) + pLang->strShortName + "/"; for(NumStyle = 0; NumStyle<wxSTC_STYLE_DEFAULT; NumStyle++) { pCurStyle = &(pLang->Styles[NumStyle]); - /** @todo Ajouter la vérification de l'utilisation du style.*/ - strLabel.Printf("%d", NumStyle); ! str = strRoot + wxString(WXDC_SIMPLETEXT_VIEWCONFIGSTYLE) + strLabel; ! pCurStyle->iFontStyle = wxGetApp().ReadConfig(str, pCurStyle->iFontStyle); ! str = strRoot + wxString(WXDC_SIMPLETEXT_VIEWCONFIGFORE) + strLabel; ! pCurStyle->colForeground = LONG_TO_COLOR(wxGetApp().ReadConfig(str, COLOR_TO_LONG(pCurStyle->colForeground))); ! str = strRoot + wxString(WXDC_SIMPLETEXT_VIEWCONFIGBACK) + strLabel; ! pCurStyle->colBackground = LONG_TO_COLOR(wxGetApp().ReadConfig(str, COLOR_TO_LONG(pCurStyle->colBackground))); } } --- 293,333 ---- InitPreferences(); + wxConfigBase& GlobalConfig = wxGetApp().GetConfig()[WXDC_SIMPLETEXT_CONFIG_ROOT]; + GlobalConfig.SetPath(wxT("/")); + for(iLang=0; iLang<WXDC_NB_LEX; iLang++) { pLang = &g_LangagePropertyArray[iLang]; ! pLang->strShortName = GlobalConfig.Read(wxString::Format(wxT("%s%02d"), WXDC_SIMPLETEXT_VIEWCONFIGNAME, iLang), pLang->strShortName); ! ! strRoot.Empty(); ! strRoot << WXDC_SIMPLETEXT_CONFIG_ROOT << wxT("/") << pLang->strShortName; ! wxConfigBase& Config = wxGetApp().GetConfig()[strRoot]; ! ! Config.SetPath(wxT("/")); ! pLang->iFolds = Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGFOLDS, pLang->iFolds); ! pLang->strName = Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGNAME, pLang->strName); ! ! for(NumKeyword = 0; NumKeyword<=wxSTC_KEYWORDSET_MAX; NumKeyword++) ! { ! Config.SetPath(wxString::Format(wxT("/%s%02d"), WXDC_SIMPLETEXT_VIEWCONFIGKEYWORD, NumKeyword)); ! pLang->Keywords[NumKeyword].strKeys = Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGKEYWORD, pLang->Keywords[NumKeyword].strKeys); ! pLang->Keywords[NumKeyword].strName = Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGKEYNAME, pLang->Keywords[NumKeyword].strName); ! } ! for(NumStyle = 0; NumStyle<wxSTC_STYLE_DEFAULT; NumStyle++) { + str.Printf(wxT("/style%02d"), NumStyle); + Config.SetPath(str); + pCurStyle = &(pLang->Styles[NumStyle]); ! pCurStyle->bUsed = Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGUSED, pCurStyle->bUsed); ! pCurStyle->strLabel = Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGLABEL, pCurStyle->strLabel); ! pCurStyle->iFontSize = Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGFONTSIZE, pCurStyle->iFontSize); ! pCurStyle->iFontStyle = StringToFontStyle(Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGFONTSTYLE, FontStyleToString(pCurStyle->iFontStyle))); ! pCurStyle->colForeground = StringToColour(Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGFORE, ColourToString(pCurStyle->colForeground))); ! pCurStyle->colBackground = StringToColour(Config.Read(WXDC_SIMPLETEXT_VIEWCONFIGBACK, ColourToString(pCurStyle->colBackground))); ! } } *************** *** 248,275 **** void SavePreferences() { ! int iLang; ! wxString strRoot, strLabel, str; ! int NumStyle; LanguageProperty *pLang; LanguageProperty::LangagePropertyStyle* pCurStyle; for(iLang=0; iLang<WXDC_NB_LEX; iLang++) { pLang = &g_LangagePropertyArray[iLang]; ! strRoot = wxString(WXDC_SIMPLETEXT_VIEWCONFIGROOT) + pLang->strShortName + "/"; /** @todo : ajouter la suppression de la clef de configuration.*/ for(NumStyle = 0; NumStyle<wxSTC_STYLE_DEFAULT; NumStyle++) { pCurStyle = &(pLang->Styles[NumStyle]); if(pCurStyle->bUsed) { ! strLabel.Printf("%d", NumStyle); ! ! str = strRoot + wxString(WXDC_SIMPLETEXT_VIEWCONFIGSTYLE) + strLabel; ! wxGetApp().WriteConfig(str, pCurStyle->iFontStyle); ! str = strRoot + wxString(WXDC_SIMPLETEXT_VIEWCONFIGFORE) + strLabel; ! wxGetApp().WriteConfig(str, COLOR_TO_LONG(pCurStyle->colForeground)); ! str = strRoot + wxString(WXDC_SIMPLETEXT_VIEWCONFIGBACK) + strLabel; ! wxGetApp().WriteConfig(str, COLOR_TO_LONG(pCurStyle->colBackground)); } } --- 337,383 ---- void SavePreferences() { ! int iLang, NumStyle, NumKeyword; ! wxString strLabel, str, strRoot; LanguageProperty *pLang; LanguageProperty::LangagePropertyStyle* pCurStyle; + wxConfigBase& GlobalConfig = wxGetApp().GetConfig()[WXDC_SIMPLETEXT_CONFIG_ROOT]; + GlobalConfig.SetPath(wxT("/")); + for(iLang=0; iLang<WXDC_NB_LEX; iLang++) { pLang = &g_LangagePropertyArray[iLang]; ! GlobalConfig.Write(wxString::Format(wxT("%s%02d"), WXDC_SIMPLETEXT_VIEWCONFIGNAME, iLang), pLang->strShortName); ! ! strRoot.Empty(); ! strRoot << WXDC_SIMPLETEXT_CONFIG_ROOT << wxT("/") << pLang->strShortName; ! wxConfigBase& Config = wxGetApp().GetConfig()[strRoot]; ! ! Config.SetPath(wxT("/")); ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGFOLDS, pLang->iFolds); ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGNAME, pLang->strName); ! ! for(NumKeyword = 0; NumKeyword<=wxSTC_KEYWORDSET_MAX; NumKeyword++) ! { ! Config.SetPath(wxString::Format(wxT("/%s%02d"), WXDC_SIMPLETEXT_VIEWCONFIGKEYWORD, NumKeyword)); ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGKEYWORD, pLang->Keywords[NumKeyword].strKeys); ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGKEYNAME, pLang->Keywords[NumKeyword].strName); ! } ! /** @todo : ajouter la suppression de la clef de configuration.*/ for(NumStyle = 0; NumStyle<wxSTC_STYLE_DEFAULT; NumStyle++) { + str.Printf(wxT("/style%02d"), NumStyle); + Config.SetPath(str); + pCurStyle = &(pLang->Styles[NumStyle]); if(pCurStyle->bUsed) { ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGUSED, pCurStyle->bUsed); ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGLABEL, pCurStyle->strLabel); ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGFONTSIZE, pCurStyle->iFontSize); ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGFONTSTYLE, FontStyleToString(pCurStyle->iFontStyle)); ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGFORE, ColourToString(pCurStyle->colForeground)); ! Config.Write(WXDC_SIMPLETEXT_VIEWCONFIGBACK, ColourToString(pCurStyle->colBackground)); } } *************** *** 317,321 **** pLang->iFolds = WXDC_STC_FOLD_COMMENT | WXDC_STC_FOLD_COMPACT | WXDC_STC_FOLD_PREPROC; /** Lexemes.*/ ! pLang->strKeywords[0] = _T("asm auto bool break case catch char class const const_cast \ continue default delete do double dynamic_cast else enum explicit \ export extern false float for friend goto if inline int long \ --- 425,429 ---- pLang->iFolds = WXDC_STC_FOLD_COMMENT | WXDC_STC_FOLD_COMPACT | WXDC_STC_FOLD_PREPROC; /** Lexemes.*/ ! pLang->Keywords[0].strKeys = _T("asm auto bool break case catch char class const const_cast \ continue default delete do double dynamic_cast else enum explicit \ export extern false float for friend goto if inline int long \ *************** *** 325,330 **** typename union unsigned using virtual void volatile wchar_t \ while"); ! pLang->strKeywords[1] = _T("file class"); ! pLang->strKeywords[2] = _T("a addindex addtogroup anchor arg attention author b brief bug c \ class code date def defgroup deprecated dontinclude e em endcode \ endhtmlonly endif endlatexonly endlink endverbatim enum example \ --- 433,438 ---- typename union unsigned using virtual void volatile wchar_t \ while"); ! pLang->Keywords[2].strKeys = _T("file class"); ! pLang->Keywords[3].strKeys = _T("a addindex addtogroup anchor arg attention author b brief bug c \ class code date def defgroup deprecated dontinclude e em endcode \ endhtmlonly endif endlatexonly endlink endverbatim enum example \ *************** *** 379,385 **** pLang->iFolds = WXDC_STC_FOLD_COMMENT | WXDC_STC_FOLD_COMPACT | WXDC_STC_FOLD_PREPROC; /** Lexemes.*/ ! pLang->strKeywords[0] = _T("and break do else elseif end false for function if \ in local nil not or repeat return then true until while"); ! pLang->strKeywords[1] = _T("_VERSION assert collectgarbage dofile error gcinfo loadfile loadstring \ print tonumber tostring type unpack \ _ALERT _ERRORMESSAGE _INPUT _PROMPT _OUTPUT \ --- 487,493 ---- pLang->iFolds = WXDC_STC_FOLD_COMMENT | WXDC_STC_FOLD_COMPACT | WXDC_STC_FOLD_PREPROC; /** Lexemes.*/ ! pLang->Keywords[0].strKeys = _T("and break do else elseif end false for function if \ in local nil not or repeat return then true until while"); ! pLang->Keywords[1].strKeys = _T("_VERSION assert collectgarbage dofile error gcinfo loadfile loadstring \ print tonumber tostring type unpack \ _ALERT _ERRORMESSAGE _INPUT _PROMPT _OUTPUT \ *************** *** 389,393 **** rawegal rawget rawset require setfenv setmetatable xpcall \ string table math coroutine io os debug"); ! pLang->strKeywords[2] = _T("abs acos asin atan atan2 ceil cos deg exp \ floor format frexp gsub ldexp log log10 max min mod rad random randomseed \ sin sqrt strbyte strchar strfind strlen strlower strrep strsub strupper tan\ --- 497,501 ---- rawegal rawget rawset require setfenv setmetatable xpcall \ string table math coroutine io os debug"); ! pLang->Keywords[2].strKeys = _T("abs acos asin atan atan2 ceil cos deg exp \ floor format frexp gsub ldexp log log10 max min mod rad random randomseed \ sin sqrt strbyte strchar strfind strlen strlower strrep strsub strupper tan\ *************** *** 398,402 **** math.floor math.frexp math.ldexp math.log math.log10 math.max math.min math.mod \ math.pi math.rad math.random math.randomseed math.sin math.sqrt math.tan"); ! pLang->strKeywords[3] = _T("openfile closefile readfrom writeto appendto \ remove rename flush seek tmpfile tmpname read write \ clock date difftime execute exit getenv setlocale time \ --- 506,510 ---- math.floor math.frexp math.ldexp math.log math.log10 math.max math.min math.mod \ math.pi math.rad math.random math.randomseed math.sin math.sqrt math.tan"); ! pLang->Keywords[3].strKeys = _T("openfile closefile readfrom writeto appendto \ remove rename flush seek tmpfile tmpname read write \ clock date difftime execute exit getenv setlocale time \ *************** *** 1312,1316 **** /** Lexemes.*/ for(NumStyle = 0; NumStyle<=wxSTC_KEYWORDSET_MAX; NumStyle++) ! m_pText->SetKeyWords(NumStyle, pLang->strKeywords[NumStyle]); // set spaces and indention --- 1420,1424 ---- /** Lexemes.*/ for(NumStyle = 0; NumStyle<=wxSTC_KEYWORDSET_MAX; NumStyle++) ! m_pText->SetKeyWords(NumStyle, pLang->Keywords[NumStyle].strKeys); // set spaces and indention |
|
From: Emilien K. <cur...@us...> - 2005-02-14 15:26:45
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5635/include/wxDevCenter/StdPlugin Modified Files: SimpleTextDocView.h language.h Log Message: Utilisation du nouveau mécanisme de configuration pour la sauvegarde des styles des textes. Index: SimpleTextDocView.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/SimpleTextDocView.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SimpleTextDocView.h 15 Jan 2005 15:55:07 -0000 1.4 --- SimpleTextDocView.h 14 Feb 2005 15:26:36 -0000 1.5 *************** *** 80,84 **** } Styles[wxSTC_STYLE_DEFAULT]; int iFolds; ! wxString strKeywords[wxSTC_KEYWORDSET_MAX+1]; wxString strName; --- 80,89 ---- } Styles[wxSTC_STYLE_DEFAULT]; int iFolds; ! ! struct KeywordProperty ! { ! wxString strKeys; ! wxString strName; ! }Keywords[wxSTC_KEYWORDSET_MAX+1]; wxString strName; Index: language.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/language.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** language.h 11 Feb 2005 20:52:02 -0000 1.10 --- language.h 14 Feb 2005 15:26:36 -0000 1.11 *************** *** 69,76 **** #define WXDC_SIMPLETEXT_USERCONFIGDIALOG "User style configuration" #define WXDC_SIMPLETEXT_VIEWCONFIGROOT "/SimpleTextView/" ! #define WXDC_SIMPLETEXT_VIEWCONFIGSTYLE "style" ! #define WXDC_SIMPLETEXT_VIEWCONFIGFORE "fore" ! #define WXDC_SIMPLETEXT_VIEWCONFIGBACK "back" #define WXDC_SIMPLETEXT_TEXT "text" --- 69,85 ---- #define WXDC_SIMPLETEXT_USERCONFIGDIALOG "User style configuration" + #define WXDC_SIMPLETEXT_CONFIG_ROOT "Text" #define WXDC_SIMPLETEXT_VIEWCONFIGROOT "/SimpleTextView/" ! ! #define WXDC_SIMPLETEXT_VIEWCONFIGFOLDS "folds" ! #define WXDC_SIMPLETEXT_VIEWCONFIGNAME "name" ! #define WXDC_SIMPLETEXT_VIEWCONFIGKEYWORD "keywords" ! #define WXDC_SIMPLETEXT_VIEWCONFIGKEYNAME "keyname" ! #define WXDC_SIMPLETEXT_VIEWCONFIGFORE "fore" ! #define WXDC_SIMPLETEXT_VIEWCONFIGBACK "back" ! #define WXDC_SIMPLETEXT_VIEWCONFIGUSED "used" ! #define WXDC_SIMPLETEXT_VIEWCONFIGFONTSTYLE "font-style" ! #define WXDC_SIMPLETEXT_VIEWCONFIGFONTSIZE "font-size" ! #define WXDC_SIMPLETEXT_VIEWCONFIGLABEL "style-label" #define WXDC_SIMPLETEXT_TEXT "text" *************** *** 203,207 **** #define WXDC_LEXSHORTNAME_NULL wxT("Text") #define WXDC_LEXSHORTNAME_PYTHON wxT("Python") ! #define WXDC_LEXSHORTNAME_CPP wxT("C/C++ - Java") #define WXDC_LEXSHORTNAME_HTML wxT("HTML") #define WXDC_LEXSHORTNAME_XML wxT("XML") --- 212,216 ---- #define WXDC_LEXSHORTNAME_NULL wxT("Text") #define WXDC_LEXSHORTNAME_PYTHON wxT("Python") ! #define WXDC_LEXSHORTNAME_CPP wxT("CPP") #define WXDC_LEXSHORTNAME_HTML wxT("HTML") #define WXDC_LEXSHORTNAME_XML wxT("XML") *************** *** 235,239 **** #define WXDC_LEXSHORTNAME_SCRIPTOL wxT("Scriptol") #define WXDC_LEXSHORTNAME_ASM wxT("ASM") ! #define WXDC_LEXSHORTNAME_CPPNOCASE wxT("C++ no case") #define WXDC_LEXSHORTNAME_FORTRAN wxT("Fortran") #define WXDC_LEXSHORTNAME_F77 wxT("F77") --- 244,248 ---- #define WXDC_LEXSHORTNAME_SCRIPTOL wxT("Scriptol") #define WXDC_LEXSHORTNAME_ASM wxT("ASM") ! #define WXDC_LEXSHORTNAME_CPPNOCASE wxT("CPP no case") #define WXDC_LEXSHORTNAME_FORTRAN wxT("Fortran") #define WXDC_LEXSHORTNAME_F77 wxT("F77") |
|
From: Emilien K. <cur...@us...> - 2005-02-13 15:20:00
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27359/src/unix Modified Files: Config.cpp Log Message: Flushing de config Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/unix/Config.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Config.cpp 12 Feb 2005 16:54:36 -0000 1.2 --- Config.cpp 13 Feb 2005 15:19:51 -0000 1.3 *************** *** 36,39 **** --- 36,41 ---- ConfigUnix::~ConfigUnix(void) { + if(m_pConfig!=NULL) + delete m_pConfig; } *************** *** 42,46 **** --- 44,51 ---- { if(m_pConfig!=NULL) + { + m_pConfig->Flush(); delete m_pConfig; + } m_pConfig = new wxConfig(WXDC_SETUP_APPIDENT, WXDC_SETUP_VENDOR); *************** *** 54,58 **** --- 59,70 ---- } + // Finalise la configuration. + void ConfigWindows::Finalize() + { + if(m_pConfig!=NULL) + m_pConfig->Flush(); + Config::Finalize(); + } |
|
From: Emilien K. <cur...@us...> - 2005-02-13 15:20:00
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27359/src/msw Modified Files: Config.cpp Log Message: Flushing de config Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/msw/Config.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Config.cpp 13 Feb 2005 14:15:27 -0000 1.3 --- Config.cpp 13 Feb 2005 15:19:51 -0000 1.4 *************** *** 39,42 **** --- 39,44 ---- ConfigWindows::~ConfigWindows(void) { + if(m_pConfig!=NULL) + delete m_pConfig; } *************** *** 45,49 **** --- 47,54 ---- { if(m_pConfig!=NULL) + { + m_pConfig->Flush(); delete m_pConfig; + } m_pConfig = new wxConfig(WXDC_SETUP_APPIDENT, WXDC_SETUP_VENDOR); *************** *** 56,59 **** --- 61,72 ---- } + // Finalise la configuration. + void ConfigWindows::Finalize() + { + if(m_pConfig!=NULL) + m_pConfig->Flush(); + + Config::Finalize(); + } |
|
From: Emilien K. <cur...@us...> - 2005-02-13 15:20:00
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27359/src Modified Files: Application.cpp Config.cpp Log Message: Flushing de config Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Config.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Config.cpp 13 Feb 2005 14:15:26 -0000 1.3 --- Config.cpp 13 Feb 2005 15:19:51 -0000 1.4 *************** *** 47,50 **** --- 47,56 ---- } + // Finalise la configuration. + void Config::Finalize() + { + CloseSubConfig(); + } + /** * Sous-configurations. *************** *** 84,85 **** --- 90,103 ---- return true; } + + // Vide le buffer des sous-configurations. + void Config::CloseSubConfig() + { + wxConfigMap::iterator it; + for(it = m_SubConfigMap.begin(); it != m_SubConfigMap.end(); ++it ) + { + delete it->second; + it->second = NULL; + } + m_SubConfigMap.clear(); + } Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Application.cpp 12 Feb 2005 16:54:35 -0000 1.9 --- Application.cpp 13 Feb 2005 15:19:51 -0000 1.10 *************** *** 93,96 **** --- 93,98 ---- int Application::OnExit(void) { + // Enregistrement de la config + m_ConfigManager.Finalize(); // Finalisation des plugins. m_PluginManager.FinalPlugins(); |
|
From: Emilien K. <cur...@us...> - 2005-02-13 15:20:00
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27359/include/wxDevCenter/msw Modified Files: Config.h Log Message: Flushing de config Index: Config.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/msw/Config.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Config.h 13 Feb 2005 14:15:26 -0000 1.3 --- Config.h 13 Feb 2005 15:19:50 -0000 1.4 *************** *** 57,60 **** --- 57,64 ---- * Relit les informations de chemins dans lees registres.*/ virtual void Initialize(); + /** Finalise la configuration. + * Flush toutes les configs.*/ + virtual void Finalize(); + /** @name Configuration utilisateur. |
|
From: Emilien K. <cur...@us...> - 2005-02-13 15:20:00
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27359/include/wxDevCenter Modified Files: Config.h Log Message: Flushing de config Index: Config.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Config.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Config.h 13 Feb 2005 14:15:26 -0000 1.3 --- Config.h 13 Feb 2005 15:19:50 -0000 1.4 *************** *** 106,109 **** --- 106,113 ---- virtual void Initialize(); + /** Finalise la configuration. + * Flush toutes les configs.*/ + virtual void Finalize(); + /** @name Configuration utilisateur. * @{*/ *************** *** 164,167 **** --- 168,175 ---- * Configurations des sous modules et des plugins. * @{ */ + /** Vide le buffer des sous-configurations. + * Flush les sous config avant de les supprimer. + */ + void CloseSubConfig(); /** Retourne un accesseur sur la sous-configuration voulue. * @param strSubConfName Nom de la sous-configuration à retourner. |
|
From: Emilien K. <cur...@us...> - 2005-02-13 15:20:00
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27359/include/wxDevCenter/unix Modified Files: Config.h Log Message: Flushing de config Index: Config.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/unix/Config.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Config.h 12 Feb 2005 16:54:35 -0000 1.2 --- Config.h 13 Feb 2005 15:19:51 -0000 1.3 *************** *** 55,58 **** --- 55,61 ---- * Relit les informations de chemins dans lees registres.*/ virtual void Initialize(); + /** Finalise la configuration. + * Flush toutes les configs.*/ + virtual void Finalize(); /** @name Configuration utilisateur. |
|
From: Emilien K. <cur...@us...> - 2005-02-13 14:15:44
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31497/src Modified Files: Config.cpp Log Message: Ajout du système de sous-configuration. Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Config.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Config.cpp 12 Feb 2005 16:54:36 -0000 1.2 --- Config.cpp 13 Feb 2005 14:15:26 -0000 1.3 *************** *** 25,32 **** --- 25,36 ---- #include <wxDevCenter/Config.h> + #include <wx/fileconf.h> using namespace wxDevCenter; + wxNullConfig Config::m_ConfigNull; + + Config::Config(void): wxObject() *************** *** 42,43 **** --- 46,85 ---- { } + + /** + * Sous-configurations. + */ + + // Retourne un accesseur sur la sous-configuration voulue. + wxConfigBase& Config::GetSubConfig(wxString strSubConfName) + { + wxConfigMap::iterator it = m_SubConfigMap.find(strSubConfName); + if(it!=m_SubConfigMap.end()) + return *(it->second); + + CreateSubConfig(strSubConfName); + it = m_SubConfigMap.find(strSubConfName); + if(it!=m_SubConfigMap.end()) + return *(it->second); + + return m_ConfigNull; + } + + // Crée une sous-configuration et la place dans le dictionnaire. + bool Config::CreateSubConfig(wxString strSubConfName) + { + wxFileConfig* pFC; + wxString str; + str << WXDC_SETUP_APPIDENT << wxT("/") << strSubConfName; + + pFC = new wxFileConfig(str, WXDC_SETUP_VENDOR, + GetUserConfPath() + wxT("/") + strSubConfName + wxT(".conf"), + GetGlobalConfPath() + wxT("/") + strSubConfName + wxT(".conf")); + + wxConfigBase* pConf = m_SubConfigMap[strSubConfName]; + if(pConf!=NULL) + delete pConf; + m_SubConfigMap[strSubConfName] = pFC; + + return true; + } |
|
From: Emilien K. <cur...@us...> - 2005-02-13 14:15:44
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31497/include/wxDevCenter Modified Files: Config.h Log Message: Ajout du système de sous-configuration. Index: Config.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Config.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Config.h 12 Feb 2005 16:54:34 -0000 1.2 --- Config.h 13 Feb 2005 14:15:26 -0000 1.3 *************** *** 26,29 **** --- 26,93 ---- #define __WXDEVCENTER_CONFIG + + #include <wx/confbase.h> + #include <wx/hashmap.h> + + /** Déclaration d'un dictionnaire de configurations pour stocker les configurations. + */ + WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxConfigBase*, wxConfigMap, class WXDC_DLL_BASE); + + + /** Classe de configuration nulle. + * Aucune donnée n'est enregistrée ni lue. + */ + class WXDC_DLL_BASE wxNullConfig : public wxConfigBase + { + public: + wxNullConfig(const wxString& WXUNUSED(appName) = wxEmptyString, + const wxString& WXUNUSED(vendorName) = wxEmptyString, + const wxString& WXUNUSED(localFilename) = wxEmptyString, + const wxString& WXUNUSED(globalFilename) = wxEmptyString, + long WXUNUSED(style) = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE, + wxMBConv& WXUNUSED(conv) = wxConvUTF8) + { + } + + #if wxUSE_STREAMS + wxNullConfig(wxInputStream &WXUNUSED(inStream), wxMBConv& WXUNUSED(conv = wxConvUTF8)) {} + #endif + + virtual ~wxNullConfig() {} + + void SetUmask(int WXUNUSED(mode)) { } + virtual void SetPath(const wxString& WXUNUSED(strPath)) {} + virtual const wxString& GetPath() const { return wxEmptyString; } + virtual bool GetFirstGroup(wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const {return false;} + virtual bool GetNextGroup (wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const {return false;} + virtual bool GetFirstEntry(wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const {return false;} + virtual bool GetNextEntry (wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const {return false;} + virtual size_t GetNumberOfEntries(bool WXUNUSED(bRecursive) = false) const {return 0;} + virtual size_t GetNumberOfGroups(bool WXUNUSED(bRecursive) = false) const {return 0;} + virtual bool HasGroup(const wxString& WXUNUSED(strName)) const {return false;} + virtual bool HasEntry(const wxString& WXUNUSED(strName)) const {return false;} + virtual bool Flush(bool WXUNUSED(bCurrentOnly) = false) {return true;} + virtual bool RenameEntry(const wxString& WXUNUSED(oldName), const wxString& WXUNUSED(newName)) {return false;} + virtual bool RenameGroup(const wxString& WXUNUSED(oldName), const wxString& WXUNUSED(newName)) {return false;} + virtual bool DeleteEntry(const wxString& WXUNUSED(key), bool WXUNUSED(bGroupIfEmptyAlso) = true) {return false;} + virtual bool DeleteGroup(const wxString& WXUNUSED(szKey)) {return false;} + virtual bool DeleteAll() {return false;} + + #if wxUSE_STREAMS + virtual bool Save(wxOutputStream& WXUNUSED(os), wxMBConv& WXUNUSED(conv) = wxConvUTF8) {return true;} + #endif + + protected: + virtual bool DoReadString(const wxString& WXUNUSED(key), wxString *WXUNUSED(pStr)) const {return false;} + virtual bool DoReadLong(const wxString& WXUNUSED(key), long *WXUNUSED(pl)) const {return false;} + virtual bool DoWriteString(const wxString& WXUNUSED(key), const wxString& WXUNUSED(szValue)) {return false;} + virtual bool DoWriteLong(const wxString& WXUNUSED(key), long WXUNUSED(lValue)) {return false;} + + DECLARE_NO_COPY_CLASS(wxNullConfig) + }; + + + + namespace wxDevCenter { *************** *** 95,98 **** --- 159,187 ---- virtual void CreateUserProfile()=0; /** @} */ + + + /** @name Sous-configurations + * Configurations des sous modules et des plugins. + * @{ */ + /** Retourne un accesseur sur la sous-configuration voulue. + * @param strSubConfName Nom de la sous-configuration à retourner. + * @return Accesseur sur la sous-configuration.*/ + virtual wxConfigBase& GetSubConfig(wxString strSubConfName); + /** Opérateur d'accesseur sur les sous-configurations. + * @param strSubConfName Nom de la sous-configuration à retourner. + * @return Accesseur sur la sous-configuration.*/ + virtual wxConfigBase& operator[](wxString strSubConfName){return GetSubConfig(strSubConfName);} + protected: + /** Crée une sous-configuration et la place dans le dictionnaire. + * @param strSubConfName Nom de la sous-configuration à créer. + * @return True si sous-configuration crée avec succes.*/ + virtual bool CreateSubConfig(wxString strSubConfName); + /** Dictionnaire des sous-configurations.*/ + wxConfigMap m_SubConfigMap; + /** Sous-configuration nulle.*/ + static wxNullConfig m_ConfigNull; + /** @} */ + + }; |
|
From: Emilien K. <cur...@us...> - 2005-02-13 14:15:44
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31497/include/wxDevCenter/msw Modified Files: Config.h Log Message: Ajout du système de sous-configuration. Index: Config.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/msw/Config.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Config.h 12 Feb 2005 16:54:35 -0000 1.2 --- Config.h 13 Feb 2005 14:15:26 -0000 1.3 *************** *** 26,30 **** #define __WXDEVCENTER_CONFIG_WINDOWS ! #include <wx/config.h> namespace wxDevCenter --- 26,30 ---- #define __WXDEVCENTER_CONFIG_WINDOWS ! class wxConfig; namespace wxDevCenter |
|
From: Emilien K. <cur...@us...> - 2005-02-13 14:15:44
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31497/src/msw Modified Files: Config.cpp Log Message: Ajout du système de sous-configuration. Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/msw/Config.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Config.cpp 12 Feb 2005 16:54:36 -0000 1.2 --- Config.cpp 13 Feb 2005 14:15:27 -0000 1.3 *************** *** 26,29 **** --- 26,31 ---- #include <wxDevCenter/msw/Config.h> + #include <wx/config.h> + using namespace wxDevCenter; |
|
From: Emilien K. <cur...@us...> - 2005-02-12 16:54:49
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7454/include/wxDevCenter/unix Modified Files: Config.h Log Message: Réécriture de l'implémentation des configurations spécifiques Index: Config.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/unix/Config.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Config.h 12 Feb 2005 11:32:29 -0000 1.1 --- Config.h 12 Feb 2005 16:54:35 -0000 1.2 *************** *** 34,41 **** --- 34,59 ---- class WXDC_DLL_BASE ConfigUnix : public Config { + protected: + /** Chemin d'installation.*/ + wxString m_strInstallPath; + /** Chemin d'installation des données.*/ + wxString m_strDataPath; + /** Chemin d'installation des plugins.*/ + wxString m_strPluginsPath; + /** Chemin d'installation des fichiers de configurations.*/ + wxString m_strConfPath; + /** Chemin d'installation des fichiers de configurations utilisateur.*/ + wxString m_strUserConfPath; + + wxConfig *m_pConfig; + public: ConfigUnix(void); virtual ~ConfigUnix(void); + /** (Re)Initialise la configuration. + * Relit les informations de chemins dans lees registres.*/ + virtual void Initialize(); + /** @name Configuration utilisateur. * @{*/ *************** *** 94,97 **** --- 112,116 ---- + typedef ConfigUnix Configuration; } |
|
From: Emilien K. <cur...@us...> - 2005-02-12 16:54:49
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7454/src Modified Files: Application.cpp Config.cpp Log Message: Réécriture de l'implémentation des configurations spécifiques Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Config.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Config.cpp 12 Feb 2005 11:32:29 -0000 1.1 --- Config.cpp 12 Feb 2005 16:54:36 -0000 1.2 *************** *** 37,38 **** --- 37,43 ---- { } + + // (Re)Initialise la configuration. + void Config::Initialize() + { + } Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Application.cpp 12 Feb 2005 11:32:29 -0000 1.8 --- Application.cpp 12 Feb 2005 16:54:35 -0000 1.9 *************** *** 54,59 **** // Change les paramètres système. wxSystemOptions::SetOption(wxT("msw.remap"), 0); ! SetAppName(WXDC_NAME); ! SetVendorName(WXDC_ARCALLIANS); // Initialise le DocManager --- 54,63 ---- // Change les paramètres système. wxSystemOptions::SetOption(wxT("msw.remap"), 0); ! SetAppName(WXDC_SETUP_APPIDENT); ! SetVendorName(WXDC_SETUP_VENDOR); ! ! // Initialise le gestionnaire de configuration. ! m_ConfigManager.Initialize(); ! m_ConfigManager.CreateUserProfile(); // Initialise le DocManager |
|
From: Emilien K. <cur...@us...> - 2005-02-12 16:54:49
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7454/src/unix Modified Files: Config.cpp Log Message: Réécriture de l'implémentation des configurations spécifiques Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/unix/Config.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Config.cpp 12 Feb 2005 11:32:30 -0000 1.1 --- Config.cpp 12 Feb 2005 16:54:36 -0000 1.2 *************** *** 28,37 **** using namespace wxDevCenter; ! Config::Config(void) { } ! Config::~Config(void) { } --- 28,125 ---- using namespace wxDevCenter; + ConfigUnix::ConfigUnix(void): + Config(), + m_pConfig(NULL) + { + } ! ConfigUnix::~ConfigUnix(void) { } ! // (Re)Initialise la configuration. ! void ConfigUnix::Initialize() ! { ! if(m_pConfig!=NULL) ! delete m_pConfig; ! ! m_pConfig = new wxConfig(WXDC_SETUP_APPIDENT, WXDC_SETUP_VENDOR); ! ! m_strInstallPath = ReadConfig(WXDC_CONF_KEYNAME_INSTALLDIR , wxT("/usr")); ! m_strDataPath = ReadConfig(WXDC_CONF_KEYNAME_DATADIR , wxString(wxT("/usr/shared/")) + WXDC_SETUP_APPIDENT + wxT("/data")); ! m_strPluginsPath = ReadConfig(WXDC_CONF_KEYNAME_PLUGINSDIR , wxString(wxT("/usr/lib/")) + WXDC_SETUP_APPIDENT + wxT("/plugins")); ! m_strConfPath = ReadConfig(WXDC_CONF_KEYNAME_CONFDIR , wxString(wxT("/usr/shared/")) + WXDC_SETUP_APPIDENT + wxT("/conf")); ! m_strUserConfPath = ReadConfig(WXDC_CONF_KEYNAME_USERCONFDIR , wxGetHomeDir() + wxT("/.") + WXDC_SETUP_APPIDENT + wxT("/conf")); ! ! } ! ! ! ! ! ////////////////////////////////////////////////////////////////////// ! // Configuration utilisateur ! ! wxString ConfigUnix::ReadConfig(wxString strKeyName, wxString strDefaultValue) ! { ! return m_pConfig->Read(strKeyName, strDefaultValue); ! } ! ! long ConfigUnix::ReadConfig(wxString strKeyName, long lDefaultValue) ! { ! return m_pConfig->Read(strKeyName, lDefaultValue); ! } ! ! void ConfigUnix::WriteConfig(wxString strKeyName, wxString strValue) ! { ! m_pConfig->Write(strKeyName, strValue); ! } ! ! void ConfigUnix::WriteConfig(wxString strKeyName, long lValue) { + m_pConfig->Write(strKeyName, lValue); + } + + void ConfigUnix::FlushConfig() + { + m_pConfig->Flush(); + } + + + ////////////////////////////////////////////////////////////////////// + // Configuration système + + // Retourne le chemin d'instalation de l'application. + wxString ConfigUnix::GetInstallPath() + { + return m_strInstallPath; + } + + // Retourne le chemin racine des données (images, icones, etc). + wxString ConfigUnix::GetDataPath() + { + return m_strDataPath; + } + + // Retourne le chemin racine des pluggins. + wxString ConfigUnix::GetPluginsPath() + { + return m_strPluginsPath; + } + + // Retourne le chemin racine de la configuration globale. + wxString ConfigUnix::GetGlobalConfPath() + { + return m_strConfPath; + } + + // Retourne le chemin racine de la configuration utilisateur. + wxString ConfigUnix::GetUserConfPath() + { + return m_strUserConfPath; + } + + // Crée un profile utilisateur si aucun n'existe. + void ConfigUnix::CreateUserProfile() + { + // Ne fait rien sous unix } |
|
From: Emilien K. <cur...@us...> - 2005-02-12 16:54:49
|
Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7454/include/wxDevCenter Modified Files: Config.h language.h setup.h Log Message: Réécriture de l'implémentation des configurations spécifiques Index: Config.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Config.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Config.h 12 Feb 2005 11:32:29 -0000 1.1 --- Config.h 12 Feb 2005 16:54:34 -0000 1.2 *************** *** 38,41 **** --- 38,45 ---- virtual ~Config(void); + /** (Re)Initialise la configuration. + * Relit les informations de chemins dans lees registres.*/ + virtual void Initialize(); + /** @name Configuration utilisateur. * @{*/ *************** *** 94,97 **** --- 98,109 ---- + #define WXDC_CONF_KEYNAME_INSTALLDIR wxT("InstallDir") + #define WXDC_CONF_KEYNAME_DATADIR wxT("DataDir") + #define WXDC_CONF_KEYNAME_PLUGINSDIR wxT("PluginDir") + #define WXDC_CONF_KEYNAME_CONFDIR wxT("ConfDir") + #define WXDC_CONF_KEYNAME_USERCONFDIR wxT("UserConfDir") + + + } Index: language.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/language.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** language.h 15 Jan 2005 15:02:48 -0000 1.5 --- language.h 12 Feb 2005 16:54:34 -0000 1.6 *************** *** 37,41 **** #define WXDC_NAME "wxDevCenter" ! #define WXDC_VERSION "0.1 devel" #define WXDC_URL "http://www.arcallians.org" #define WXDC_ARCALLIANS "Arcallians" --- 37,41 ---- #define WXDC_NAME "wxDevCenter" ! #define WXDC_VERSION "0.1.x - developpment version" #define WXDC_URL "http://www.arcallians.org" #define WXDC_ARCALLIANS "Arcallians" Index: setup.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/setup.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup.h 12 Jan 2005 13:50:54 -0000 1.2 --- setup.h 12 Feb 2005 16:54:34 -0000 1.3 *************** *** 25,28 **** --- 25,38 ---- #define __WXDEVCENTER_SETUP + + /** Identifiant de l'application. + * Sert pour identifier l'application et ses composants.*/ + #define WXDC_SETUP_APPIDENT wxT("wxDevCenter") + /** Vesrion de l'application.*/ + #define WXDC_SETUP_APPVERSION wxT("0.1.3") + /** Vendeur de l'application.*/ + #define WXDC_SETUP_VENDOR wxT("Arcallians") + + #define WXDC_SETUP_DATAPATH "../data" #define WXDC_SETUP_ICONDATAPATH "../data/icons" *************** *** 40,43 **** --- 50,54 ---- #define WXUSINGDLL + #ifdef _WINDOWS |