-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathLuaDoc.cpp
More file actions
executable file
·72 lines (54 loc) · 1.43 KB
/
LuaDoc.cpp
File metadata and controls
executable file
·72 lines (54 loc) · 1.43 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*-----------------------------------------------------------------------------
Lua Studio
Copyright (c) 1996-2008 Michal Kowalski
-----------------------------------------------------------------------------*/
#include "stdafx.h"
#include "LuaDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// LuaSrcDoc
IMPLEMENT_DYNCREATE(LuaSrcDoc, CScintillaDoc)
BEGIN_MESSAGE_MAP(LuaSrcDoc, CScintillaDoc)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// LuaSrcDoc construction/destruction
LuaSrcDoc::LuaSrcDoc()
{}
LuaSrcDoc::~LuaSrcDoc()
{}
BOOL LuaSrcDoc::OnNewDocument()
{
if (!CScintillaDoc::OnNewDocument())
return FALSE;
static UINT no= 1;
CString name;
name.Format(_T("NewFile %u"), no++);
SetPathName(name, false);
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// LuaSrcDoc diagnostics
#ifdef _DEBUG
void LuaSrcDoc::AssertValid() const
{
CScintillaDoc::AssertValid();
}
void LuaSrcDoc::Dump(CDumpContext& dc) const
{
CScintillaDoc::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
BOOL LuaSrcDoc::OnOpenDocument(LPCTSTR path_name)
{
if (CDocument::OnOpenDocument(path_name))
{
GetView()->GetCtrl().Colourise(0, -1);
return true;
}
return false;
}