Update of /cvsroot/simspark/simspark/contrib/rsgedit
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13200
Modified Files:
Tag: RSGEDIT_SCINTILLA
sparkedit.cpp sparkedit.h
Log Message:
- addedd method GetFileType() and SelectEdit()
Index: sparkedit.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/Attic/sparkedit.cpp,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -C2 -d -r1.1.2.9 -r1.1.2.10
*** sparkedit.cpp 23 Jun 2007 09:22:27 -0000 1.1.2.9
--- sparkedit.cpp 23 Jun 2007 10:13:45 -0000 1.1.2.10
***************
*** 289,292 ****
--- 289,293 ----
}
+ notebook->SetPageImageIndex(entry.page, -1);
notebook->SetPageImageIndex(entry.page, GetImageIndex(edit, entry));
}
***************
*** 365,366 ****
--- 366,398 ----
}
+ SparkEdit::EEditType SparkEdit::GetFileType(wxScintilla* edit)
+ {
+ TEditMap::iterator iter = mEditMap.find(edit);
+ if (iter == mEditMap.end())
+ {
+ return ET_NONE;
+ }
+
+ const EditEntry& entry = (*iter).second;
+ return entry.type;
+ }
+
+ void SparkEdit::SelectEdit(wxFlatNotebook* notebook, wxScintilla* edit)
+ {
+ if (notebook == 0)
+ {
+ assert(false);
+ return;
+ }
+
+ TEditMap::iterator iter = mEditMap.find(edit);
+ if (iter == mEditMap.end())
+ {
+ assert(false);
+ return;
+ }
+
+ const EditEntry& entry = (*iter).second;
+ notebook->SetSelection(entry.page);
+ edit->SetFocus();
+ }
Index: sparkedit.h
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/Attic/sparkedit.h,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -d -r1.1.2.6 -r1.1.2.7
*** sparkedit.h 23 Jun 2007 09:22:27 -0000 1.1.2.6
--- sparkedit.h 23 Jun 2007 10:13:45 -0000 1.1.2.7
***************
*** 32,35 ****
--- 32,36 ----
enum EEditType
{
+ ET_NONE,
ET_RSG,
ET_RB,
***************
*** 71,76 ****
--- 72,79 ----
static void SetStartScript(wxFlatNotebook* notebook, wxScintilla* edit);
static wxScintilla* GetStartScript();
+ static EEditType GetFileType(wxScintilla* edit);
static wxString GetStartScriptFile();
static void PrepareImageList(wxFlatNotebook* notebook);
+ static void SelectEdit(wxFlatNotebook* notebook, wxScintilla* edit);
protected:
|