Update of /cvsroot/simspark/simspark/contrib/rsgedit
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27689
Modified Files:
Tag: RSGEDIT_SCINTILLA
sparkedit.cpp sparkedit.h
Log Message:
- added 'select' option to GetEdit() method that allows to open an edit control in the background
Index: sparkedit.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/Attic/sparkedit.cpp,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** sparkedit.cpp 21 Jun 2007 19:18:00 -0000 1.1.2.4
--- sparkedit.cpp 21 Jun 2007 19:26:38 -0000 1.1.2.5
***************
*** 59,63 ****
}
! wxScintilla* SparkEdit::GetEdit(const wxString& fname, wxFlatNotebook* notebook)
{
if (notebook == 0)
--- 59,63 ----
}
! wxScintilla* SparkEdit::GetEdit(const wxString& fname, wxFlatNotebook* notebook, bool select)
{
if (notebook == 0)
***************
*** 79,86 ****
if (fn.GetFullPath() == entry.fname)
{
- notebook->SetSelection(entry.page);
-
wxScintilla* edit = (*iter).first;
! edit->SetFocus();
return edit;
--- 79,89 ----
if (fn.GetFullPath() == entry.fname)
{
wxScintilla* edit = (*iter).first;
!
! if (select)
! {
! notebook->SetSelection(entry.page);
! edit->SetFocus();
! }
return edit;
***************
*** 99,106 ****
}
- bool select = true;
wxString title(GetTitle(edit, entry));
notebook->AddPage(edit,title,select);
! edit->SetFocus();
entry.page = static_cast<int>(notebook->GetPageCount() - 1);
--- 102,112 ----
}
wxString title(GetTitle(edit, entry));
notebook->AddPage(edit,title,select);
!
! if (select)
! {
! edit->SetFocus();
! }
entry.page = static_cast<int>(notebook->GetPageCount() - 1);
Index: sparkedit.h
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/Attic/sparkedit.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** sparkedit.h 21 Jun 2007 19:18:00 -0000 1.1.2.3
--- sparkedit.h 21 Jun 2007 19:26:38 -0000 1.1.2.4
***************
*** 48,52 ****
public:
! static wxScintilla* GetEdit(const wxString& fname, wxFlatNotebook* notebook);
static void PutEdit(wxScintilla* edit);
static void UpdateTitle(wxFlatNotebook* notebook, wxScintilla* edit);
--- 48,52 ----
public:
! static wxScintilla* GetEdit(const wxString& fname, wxFlatNotebook* notebook, bool select);
static void PutEdit(wxScintilla* edit);
static void UpdateTitle(wxFlatNotebook* notebook, wxScintilla* edit);
|