Skip to content

Commit

Permalink
Changing branch scintilla 2.0 into trunk
Browse files Browse the repository at this point in the history
git-svn-id: https://codelite.svn.sourceforge.net/svnroot/codelite/trunk@2923 9da81c78-c036-0410-9e1f-a2b0375e4b5a
  • Loading branch information
eranif committed Sep 3, 2009
1 parent fd3c869 commit 7412ccc
Show file tree
Hide file tree
Showing 199 changed files with 61,249 additions and 54,978 deletions.
2 changes: 1 addition & 1 deletion CodeLite/CodeLite.project
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,6 @@
<File Name="np_connections_server.cpp"/>
<File Name="../sdk/codelite_indexer/network/cl_indexer_macros.h"/>
</VirtualDirectory>
<Dependencies Name="WinReleaseUnicode"/>
<Dependencies Name="WinDebugUnicode"/>
<Dependencies Name="WinReleaseUnicode"/>
</CodeLite_Project>
36 changes: 17 additions & 19 deletions File2Hex/File2Hex.project
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
<Preprocessor Value="__WX__"/>
</Compiler>
<Linker Required="yes" Options="-O2;$(shell wx-config --debug=yes --libs --unicode=yes);"/>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort=""></Debugger>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort=""/>
<ResourceCompiler Required="yes" Options="$(shell wx-config --rcflags)"/>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="no">
<CleanCommand></CleanCommand>
<BuildCommand></BuildCommand>
<SingleFileCommand></SingleFileCommand>
<MakefileGenerationCommand></MakefileGenerationCommand>
<ThirdPartyToolName></ThirdPartyToolName>
<WorkingDirectory></WorkingDirectory>
<CleanCommand/>
<BuildCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName/>
<WorkingDirectory/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild></CustomPostBuild>
<CustomPreBuild></CustomPreBuild>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
<Configuration Name="ReleaseUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable">
Expand All @@ -35,23 +35,21 @@
<Preprocessor Value="__WX__"/>
</Compiler>
<Linker Required="yes" Options="-O2;$(shell wx-config --debug=no --libs --unicode=yes);"/>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort=""></Debugger>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort=""/>
<ResourceCompiler Required="yes" Options="$(shell wx-config --rcflags)"/>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="no">
<CleanCommand></CleanCommand>
<BuildCommand></BuildCommand>
<SingleFileCommand></SingleFileCommand>
<MakefileGenerationCommand></MakefileGenerationCommand>
<CleanCommand/>
<BuildCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory></WorkingDirectory>
<WorkingDirectory/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild></CustomPostBuild>
<CustomPreBuild>

</CustomPreBuild>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
</Settings>
Expand Down
2 changes: 1 addition & 1 deletion InnoSetup/lite_editor.iss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescrip
[Files]
Source: "C:\Development\C++\codelite\trunk\Runtime\CodeLite.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: Editor
Source: "C:\Development\C++\codelite\trunk\LICENSE"; DestDir: "{app}"; Flags: ignoreversion; Components: Editor
Source: "C:\wxWidgets-2.8.7\lib\gcc_dll\wxmsw28u_gcc_custom.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: Editor
Source: "C:\wxWidgets-2.8.10\lib\gcc_dll\wxmsw28u_gcc_custom.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: Editor
Source: "C:\Development\C++\codelite\trunk\InnoSetup\license.txt"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor
Source: "C:\Program Files\CodeLite\common.tags"; DestDir: "{app}"; Flags: onlyifdoesntexist; Components: Editor
Source: "C:\Development\C++\codelite\trunk\sdk\wxconfig\wx-config.exe"; DestDir: "{app}"; Components: Editor
Expand Down
59 changes: 34 additions & 25 deletions LiteEditor/aboutdlg.cpp
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright : (C) 2008 by Eran Ifrah
// file name : aboutdlg.cpp
//
// copyright : (C) 2008 by Eran Ifrah
// file name : aboutdlg.cpp
//
// -------------------------------------------------------------------------
// A
// _____ _ _ _ _
// / __ \ | | | | (_) |
// | / \/ ___ __| | ___| | _| |_ ___
// | | / _ \ / _ |/ _ \ | | | __/ _ )
// | \__/\ (_) | (_| | __/ |___| | || __/
// \____/\___/ \__,_|\___\_____/_|\__\___|
//
// F i l e
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// A
// _____ _ _ _ _
// / __ \ | | | | (_) |
// | / \/ ___ __| | ___| | _| |_ ___
// | | / _ \ / _ |/ _ \ | | | __/ _ )
// | \__/\ (_) | (_| | __/ |___| | || __/
// \____/\___/ \__,_|\___\_____/_|\__\___|
//
// F i l e
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

#include <wx/dcmemory.h>
#include <wx/xrc/xmlres.h>
#include "aboutdlg.h"
#include "contributers.h"
#include "windowattrmanager.h"

static void DrawBitmap( wxBitmap& bitmap, const wxString &mainTitle)
{
wxMemoryDC dcMem;

dcMem.SelectObject(bitmap);

//write the main title
wxCoord w, h;
wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
Expand All @@ -43,15 +44,15 @@ static void DrawBitmap( wxBitmap& bitmap, const wxString &mainTitle)
dcMem.SetFont(font);
dcMem.GetMultiLineTextExtent(mainTitle, &w, &h);
wxCoord bmpW = bitmap.GetWidth();
//draw shadow

//draw shadow
dcMem.SetTextForeground(wxT("LIGHT GRAY"));

dcMem.DrawText(mainTitle, bmpW - w - 9, 11);
//draw the text
//draw the text
dcMem.SetTextForeground(wxT("BLACK"));
dcMem.SetFont(font);

//draw the main title
wxCoord textX = bmpW - w - 10;
wxCoord textY = 10;
Expand All @@ -69,9 +70,17 @@ AboutDlg::AboutDlg( wxWindow* parent, const wxString &mainTitle )
// set the page content
m_htmlWin3->SetPage(wxString::FromUTF8(about_hex));
m_buttonOk->SetFocus();
GetSizer()->Fit(this);
GetSizer()->Fit(this);

WindowAttrManager::Load(this, wxT("AboutDialog"), NULL);
}

AboutDlg::~AboutDlg()
{
WindowAttrManager::Save(this, wxT("AboutDialog"), NULL);
}


void AboutDlg::SetInfo(const wxString& info)
{
m_staticTextInformation->SetLabel(info);
Expand Down
39 changes: 20 additions & 19 deletions LiteEditor/aboutdlg.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright : (C) 2008 by Eran Ifrah
// file name : aboutdlg.h
//
// copyright : (C) 2008 by Eran Ifrah
// file name : aboutdlg.h
//
// -------------------------------------------------------------------------
// A
// _____ _ _ _ _
// / __ \ | | | | (_) |
// | / \/ ___ __| | ___| | _| |_ ___
// | | / _ \ / _ |/ _ \ | | | __/ _ )
// | \__/\ (_) | (_| | __/ |___| | || __/
// \____/\___/ \__,_|\___\_____/_|\__\___|
//
// F i l e
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// A
// _____ _ _ _ _
// / __ \ | | | | (_) |
// | / \/ ___ __| | ___| | _| |_ ___
// | | / _ \ / _ |/ _ \ | | | __/ _ )
// | \__/\ (_) | (_| | __/ |___| | || __/
// \____/\___/ \__,_|\___\_____/_|\__\___|
//
// F i l e
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

Expand All @@ -40,7 +40,8 @@ class AboutDlg : public AboutDlgBase
wxBitmap m_bmp;
public:
/** Constructor */
AboutDlg( wxWindow* parent, const wxString &mainTitle );
AboutDlg( wxWindow* parent, const wxString &mainTitle );
virtual ~AboutDlg();
void SetInfo(const wxString &info);
wxString GetInfo() const;
};
Expand Down
50 changes: 38 additions & 12 deletions LiteEditor/buidltab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ void BuildTab::Clear()
Frame::Get()->GetOutputPane()->GetErrorsTab()->ClearLines();
LEditor *editor = Frame::Get()->GetMainBook()->GetActiveEditor();
if ( editor ) {
editor->DelAllCompilerMarkers();
editor->AnnotationClearAll();
editor->AnnotationSetVisible(0); // Hidden
editor->Refresh();
}
}

Expand Down Expand Up @@ -313,23 +315,36 @@ void BuildTab::MarkEditor ( LEditor *editor )
{
if ( !editor )
return;
editor->DelAllCompilerMarkers();

editor->AnnotationClearAll();
editor->AnnotationSetVisible(2); // Visible with box around it

std::pair<std::multimap<wxString,int>::iterator,
std::multimap<wxString,int>::iterator> iters = m_fileMap.equal_range(editor->GetFileName().GetFullPath());
std::multimap<wxString,int>::iterator b = iters.first;
std::multimap<wxString,int>::iterator e = iters.second;
if (b == m_fileMap.end())
return;
for (; b != e; b++ ) {

std::map<int,LineInfo>::iterator i = m_lineInfo.find ( b->second ) ;

if ( i == m_lineInfo.end() )
continue; // safety check -- should not normally happen
if ( i->second.linecolor == wxSCI_LEX_GCC_ERROR ) {
editor->SetErrorMarker ( i->second.linenum );
} else if ( i->second.linecolor == wxSCI_LEX_GCC_WARNING ) {
editor->SetWarningMarker ( i->second.linenum );

if ( i->second.linecolor == wxSCI_LEX_GCC_ERROR || i->second.linecolor == wxSCI_LEX_GCC_WARNING ) {

wxMemoryBuffer style_bytes;
int line_number = i->second.linenum;
wxString tip = GetBuildToolTip(editor->GetFileName().GetFullPath(), line_number, style_bytes);

editor->AnnotationSetText (line_number, tip);
editor->AnnotationSetStyles(line_number, style_bytes );

}

}
editor->Refresh();
}

void BuildTab::OnClearAll ( wxCommandEvent &e )
Expand Down Expand Up @@ -513,7 +528,7 @@ void BuildTab::OnMouseDClick ( wxScintillaEvent &e )
PERF_END();
}

wxString BuildTab::GetBuildToolTip(const wxString& fileName, int lineno)
wxString BuildTab::GetBuildToolTip(const wxString& fileName, int lineno, wxMemoryBuffer &styleBits)
{
std::pair<std::multimap<wxString,int>::iterator,
std::multimap<wxString,int>::iterator> iters = m_fileMap.equal_range(fileName);
Expand All @@ -524,17 +539,28 @@ wxString BuildTab::GetBuildToolTip(const wxString& fileName, int lineno)
if(i1 == m_fileMap.end())
return wxEmptyString;

wxString tip;
wxString tip(wxT("\n "));
styleBits.AppendByte((char)eAnnotationStyleError);
styleBits.AppendByte((char)eAnnotationStyleError);
for ( ; i1 != i2; i1++ ) {
std::map<int,LineInfo>::iterator i = m_lineInfo.find ( i1->second ) ;
if ( i != m_lineInfo.end() && i->second.linenum == lineno &&
(i->second.linecolor == wxSCI_LEX_GCC_ERROR || i->second.linecolor == wxSCI_LEX_GCC_WARNING )) {
if ( i != m_lineInfo.end() && i->second.linenum == lineno && (i->second.linecolor == wxSCI_LEX_GCC_ERROR || i->second.linecolor == wxSCI_LEX_GCC_WARNING )) {
wxString text = i->second.linetext.Mid(i->second.filestart+i->second.filelen);
if (!text.IsEmpty() && text[0] == wxT(':')) {
text.erase(0, 1);
}
tip << text.Trim(false).Trim() << wxT("\n");

wxString tmpTip (text.Trim(false).Trim() << wxT("\n "));

for(size_t j=0; j<tmpTip.Length(); j++) {
if( i->second.linecolor == wxSCI_LEX_GCC_WARNING ) {
styleBits.AppendByte((char)eAnnotationStyleWarning);
} else {
styleBits.AppendByte((char)eAnnotationStyleError);
}
}
tip << tmpTip;
}
}
return tip.Trim(false).Trim();
return tip ;
}
2 changes: 1 addition & 1 deletion LiteEditor/buidltab.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class BuildTab : public OutputTabWindow
BuildTab(wxWindow *parent, wxWindowID id, const wxString &name);
~BuildTab();

wxString GetBuildToolTip(const wxString &fileName, int lineno);
wxString GetBuildToolTip(const wxString &fileName, int lineno, wxMemoryBuffer &styleBits);
};
#endif // __buidltab__

Loading

0 comments on commit 7412ccc

Please sign in to comment.