-
Notifications
You must be signed in to change notification settings - Fork 0
/
Comment.cpp
44 lines (39 loc) · 884 Bytes
/
Comment.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "Comment.h"
#include <manager.h>
#include <configmanager.h>
#include <editormanager.h>
#include <editorcolourset.h>
CComment::CComment()
{
//ctor
}
CComment::~CComment()
{
//dtor
}
void CComment::AddContent(wxListCtrl* liste)
{
InsertContent(liste);
if( IsComment())
{
liste->SetItem(GetIndex(), 1, m_Comment);
wxListItem comment;
comment.m_itemId = GetIndex();
EditorColourSet* cset = Manager::Get()->GetEditorManager()->GetColourSet();
HighlightLanguage ln = cset->GetHighlightLanguage(wxSCI_LEX_INNOSETUP);
comment.SetTextColour(cset->GetOptionByIndex(ln, 1)->fore);
comment.SetBackgroundColour(cset->GetOptionByIndex(ln, 1)->back);
liste->SetItem(comment);
}
else
FillContent(liste);
}
void CComment::Write(wxTextFile* File)
{
if( IsComment())
{
File->AddLine(m_Comment);
}
else
WriteInFile(File);
}