mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
uppsrc: docs & cosmetics
git-svn-id: svn://ultimatepp.org/upp/trunk@15254 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
263382f30b
commit
33ff83e72a
57 changed files with 4617 additions and 4544 deletions
28
README.md
28
README.md
|
|
@ -8,7 +8,7 @@ Rapid development is achieved by the [smart and aggressive use of C++](https://w
|
|||
|
||||
The U++ integrated development environment, TheIDE, introduces modular concepts to C++ programming. It features BLITZ-build technology to speedup C++ rebuilds up to 4 times, Visual designers for U++ libraries, a [Topic++](https://www.ultimatepp.org/app$ide$Topic$en-us.html) system for documenting code and creating rich text resources for applications (like help and code documentation) and [Assist++](https://www.ultimatepp.org/app$ide$Assist$en-us.html) - a powerful C++ code analyzer that provides features like code completion, navigation and transformation.
|
||||
|
||||
TheIDE can work with GCC, MinGW and Visual C++ and contains a full featured debugger. TheIDE can also be used to develop non-U++ applications.
|
||||
TheIDE can work with GCC, Clang, MinGW and Visual C++ and contains a full featured debugger. TheIDE can also be used to develop non-U++ applications.
|
||||
|
||||
U++ supports following platforms on the production level: **Windows**, **macOS**, **GNU/Linux** & **FreeBSD**.
|
||||
|
||||
|
|
@ -44,30 +44,40 @@ Below is the code of trivial GUI application that displays "Hello World" string
|
|||
```c++
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
class MyAppWindow : public Upp::TopWindow {
|
||||
class MyApp: public Upp::TopWindow {
|
||||
public:
|
||||
MyAppWindow() {
|
||||
Title("My application").Zoomable().Sizeable();
|
||||
MyApp()
|
||||
{
|
||||
Title("My application").Zoomable().Sizeable().SetRect(0, 0, 320, 200);
|
||||
}
|
||||
|
||||
virtual void Paint(Upp::Draw& w) override {
|
||||
virtual void Paint(Upp::Draw& w) override
|
||||
{
|
||||
w.DrawRect(GetSize(), Upp::SWhite);
|
||||
w.DrawText(20, 20, "Hello world!", Upp::Arial(30), Upp::Magenta);
|
||||
w.DrawText(10, 10, "Hello, world!", Upp::Arial(30), Upp::Magenta);
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyAppWindow app;
|
||||
app.SetRect(0, 0, 200, 100);
|
||||
app.Run();
|
||||
MyApp().Run();
|
||||
}
|
||||
```
|
||||
|
||||
### TheIDE
|
||||
|
||||
Standard part of U++ framework is integrated development environment, TheIDE.
|
||||
|
||||
<p align="center">
|
||||
<img alt="TheIDE - U++ Integrated Developemnt Enviroment" src="/uppbox/uppweb/Resources/Images/TheIDE.png" width="80%" height="80%">
|
||||
</p>
|
||||
|
||||
### Additional examples
|
||||
|
||||
See here: [examples](https://www.ultimatepp.org/www$uppweb$examples$en-us.html). Moreover, exactly the same examples can be found in the **examples** and **references** directories located in this repository.
|
||||
|
||||
If you would like to see more screenshots, click [here](https://www.ultimatepp.org/www$uppweb$ss$en-us.html).
|
||||
|
||||
# Repository
|
||||
|
||||
## Repository layout
|
||||
|
|
|
|||
|
|
@ -1,98 +1,98 @@
|
|||
#include "PaintGL.h"
|
||||
|
||||
#pragma comment( lib, "opengl32.lib" ) // Search For OpenGL32.lib While Linking
|
||||
#pragma comment( lib, "glu32.lib" ) // Search For GLu32.lib While Linking
|
||||
#pragma comment( lib, "glaux.lib" ) // Search For GLaux.lib While Linking
|
||||
|
||||
PaintGL::PaintGL()
|
||||
{
|
||||
size = Null;
|
||||
hbmp = ohbmp = NULL;
|
||||
hdc = NULL;
|
||||
hrc = NULL;
|
||||
}
|
||||
|
||||
PaintGL::~PaintGL()
|
||||
{
|
||||
Free();
|
||||
}
|
||||
|
||||
void PaintGL::Free()
|
||||
{
|
||||
if(hrc) {
|
||||
wglMakeCurrent(NULL, NULL);
|
||||
wglDeleteContext(hrc);
|
||||
SelectObject(hdc, ohbmp);
|
||||
DeleteDC(hdc);
|
||||
DeleteObject(hbmp);
|
||||
hrc = NULL;
|
||||
hbmp = ohbmp = NULL;
|
||||
hdc = NULL;
|
||||
hbmp = NULL;
|
||||
}
|
||||
size = Null;
|
||||
}
|
||||
|
||||
|
||||
void PaintGL::Init(Size sz) {
|
||||
Free();
|
||||
|
||||
size = sz;
|
||||
|
||||
BITMAPINFOHEADER bih;
|
||||
memset(&bih, 0, sizeof(bih));
|
||||
bih.biSize = sizeof(bih);
|
||||
bih.biWidth = ((((int) sz.cx * 8) + 31) & ~31) >> 3;
|
||||
bih.biHeight = sz.cy;
|
||||
bih.biPlanes = 1;
|
||||
bih.biBitCount = 32;
|
||||
bih.biCompression = BI_RGB;
|
||||
|
||||
hdc = CreateCompatibleDC(NULL);
|
||||
|
||||
void *dummy;
|
||||
|
||||
hbmp = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_PAL_COLORS, &dummy, NULL, 0);
|
||||
|
||||
ohbmp = (HBITMAP)SelectObject(hdc, hbmp);
|
||||
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
memset(&pfd, 0, sizeof(pfd));
|
||||
pfd.nSize = sizeof(pfd);
|
||||
pfd.nVersion = 1;
|
||||
pfd.dwFlags = PFD_DRAW_TO_BITMAP | PFD_SUPPORT_OPENGL/* | PFD_SUPPORT_GDI | PFD_ACCELERATED*/;
|
||||
pfd.iPixelType = PFD_TYPE_RGBA;
|
||||
pfd.cColorBits = 32;
|
||||
pfd.cDepthBits = 32;
|
||||
pfd.iLayerType = PFD_MAIN_PLANE;
|
||||
|
||||
GLuint PixelFormat = ChoosePixelFormat(hdc, &pfd);
|
||||
SetPixelFormat(hdc, PixelFormat, &pfd);
|
||||
hrc = wglCreateContext(hdc);
|
||||
wglMakeCurrent(hdc, hrc);
|
||||
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
|
||||
glClearDepth(1.0f);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
|
||||
glViewport(0, 0, (GLsizei)sz.cx, (GLsizei)sz.cy);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(45.0f, (GLfloat)(sz.cx)/(GLfloat)(sz.cy), 1.0f, 100.0f);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
void PaintGL::Paint(Draw& w, const Rect& r, Callback gl)
|
||||
{
|
||||
if(r.Size() != size)
|
||||
Init(r.Size());
|
||||
gl();
|
||||
glFlush();
|
||||
HDC whdc = w.BeginGdi();
|
||||
BitBlt(whdc, 0, 0, size.cx, size.cy, hdc, r.left, r.top, SRCCOPY);
|
||||
w.EndGdi();
|
||||
}
|
||||
#include "PaintGL.h"
|
||||
|
||||
#pragma comment( lib, "opengl32.lib" ) // Search For OpenGL32.lib While Linking
|
||||
#pragma comment( lib, "glu32.lib" ) // Search For GLu32.lib While Linking
|
||||
#pragma comment( lib, "glaux.lib" ) // Search For GLaux.lib While Linking
|
||||
|
||||
PaintGL::PaintGL()
|
||||
{
|
||||
size = Null;
|
||||
hbmp = ohbmp = NULL;
|
||||
hdc = NULL;
|
||||
hrc = NULL;
|
||||
}
|
||||
|
||||
PaintGL::~PaintGL()
|
||||
{
|
||||
Free();
|
||||
}
|
||||
|
||||
void PaintGL::Free()
|
||||
{
|
||||
if(hrc) {
|
||||
wglMakeCurrent(NULL, NULL);
|
||||
wglDeleteContext(hrc);
|
||||
SelectObject(hdc, ohbmp);
|
||||
DeleteDC(hdc);
|
||||
DeleteObject(hbmp);
|
||||
hrc = NULL;
|
||||
hbmp = ohbmp = NULL;
|
||||
hdc = NULL;
|
||||
hbmp = NULL;
|
||||
}
|
||||
size = Null;
|
||||
}
|
||||
|
||||
|
||||
void PaintGL::Init(Size sz) {
|
||||
Free();
|
||||
|
||||
size = sz;
|
||||
|
||||
BITMAPINFOHEADER bih;
|
||||
memset(&bih, 0, sizeof(bih));
|
||||
bih.biSize = sizeof(bih);
|
||||
bih.biWidth = ((((int) sz.cx * 8) + 31) & ~31) >> 3;
|
||||
bih.biHeight = sz.cy;
|
||||
bih.biPlanes = 1;
|
||||
bih.biBitCount = 32;
|
||||
bih.biCompression = BI_RGB;
|
||||
|
||||
hdc = CreateCompatibleDC(NULL);
|
||||
|
||||
void *dummy;
|
||||
|
||||
hbmp = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_PAL_COLORS, &dummy, NULL, 0);
|
||||
|
||||
ohbmp = (HBITMAP)SelectObject(hdc, hbmp);
|
||||
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
memset(&pfd, 0, sizeof(pfd));
|
||||
pfd.nSize = sizeof(pfd);
|
||||
pfd.nVersion = 1;
|
||||
pfd.dwFlags = PFD_DRAW_TO_BITMAP | PFD_SUPPORT_OPENGL/* | PFD_SUPPORT_GDI | PFD_ACCELERATED*/;
|
||||
pfd.iPixelType = PFD_TYPE_RGBA;
|
||||
pfd.cColorBits = 32;
|
||||
pfd.cDepthBits = 32;
|
||||
pfd.iLayerType = PFD_MAIN_PLANE;
|
||||
|
||||
GLuint PixelFormat = ChoosePixelFormat(hdc, &pfd);
|
||||
SetPixelFormat(hdc, PixelFormat, &pfd);
|
||||
hrc = wglCreateContext(hdc);
|
||||
wglMakeCurrent(hdc, hrc);
|
||||
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
|
||||
glClearDepth(1.0f);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
|
||||
glViewport(0, 0, (GLsizei)sz.cx, (GLsizei)sz.cy);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(45.0f, (GLfloat)(sz.cx)/(GLfloat)(sz.cy), 1.0f, 100.0f);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
void PaintGL::Paint(Draw& w, const Rect& r, Callback gl)
|
||||
{
|
||||
if(r.Size() != size)
|
||||
Init(r.Size());
|
||||
gl();
|
||||
glFlush();
|
||||
HDC whdc = w.BeginGdi();
|
||||
BitBlt(whdc, 0, 0, size.cx, size.cy, hdc, r.left, r.top, SRCCOPY);
|
||||
w.EndGdi();
|
||||
}
|
||||
|
|
@ -1,27 +1,27 @@
|
|||
#ifndef _PaintGL_PaintGL_h
|
||||
#define _PaintGL_PaintGL_h
|
||||
|
||||
#include <Draw/Draw.h>
|
||||
|
||||
#include <gl\gl.h>
|
||||
#include <gl\glu.h>
|
||||
#include <gl\glaux.h>
|
||||
|
||||
class PaintGL {
|
||||
Size size;
|
||||
HBITMAP hbmp, ohbmp;
|
||||
HDC hdc;
|
||||
HGLRC hrc;
|
||||
|
||||
void Free();
|
||||
void Init(Size sz);
|
||||
|
||||
public:
|
||||
void Paint(Draw& w, const Rect& r, Callback gl);
|
||||
|
||||
PaintGL();
|
||||
~PaintGL();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#ifndef _PaintGL_PaintGL_h
|
||||
#define _PaintGL_PaintGL_h
|
||||
|
||||
#include <Draw/Draw.h>
|
||||
|
||||
#include <gl\gl.h>
|
||||
#include <gl\glu.h>
|
||||
#include <gl\glaux.h>
|
||||
|
||||
class PaintGL {
|
||||
Size size;
|
||||
HBITMAP hbmp, ohbmp;
|
||||
HDC hdc;
|
||||
HGLRC hrc;
|
||||
|
||||
void Free();
|
||||
void Init(Size sz);
|
||||
|
||||
public:
|
||||
void Paint(Draw& w, const Rect& r, Callback gl);
|
||||
|
||||
PaintGL();
|
||||
~PaintGL();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
file
|
||||
PaintGL.h,
|
||||
PaintGL.cpp,
|
||||
Info readonly separator,
|
||||
Copying;
|
||||
|
||||
file
|
||||
PaintGL.h,
|
||||
PaintGL.cpp,
|
||||
Info readonly separator,
|
||||
Copying;
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,134 +1,134 @@
|
|||
#ifndef _RichBook_RichBook_h
|
||||
#define _RichBook_RichBook_h
|
||||
|
||||
#include <RichText/RichText.h>
|
||||
|
||||
namespace Upp {
|
||||
|
||||
RichPara::FieldType& FieldTypeVar();
|
||||
Id FieldTypeVarID();
|
||||
|
||||
class RichIndexEntry : DeepCopyOption<RichIndexEntry>
|
||||
{
|
||||
public:
|
||||
RichIndexEntry() {}
|
||||
RichIndexEntry(const RichIndexEntry& rti, bool deep) : reflist(rti.reflist, deep) {}
|
||||
|
||||
public:
|
||||
Vector<String> reflist;
|
||||
};
|
||||
|
||||
RichPara::FieldType& FieldTypeIndexEntry();
|
||||
Id FieldTypeIndexEntryID();
|
||||
String EncodeIndexEntry(const RichIndexEntry& idx);
|
||||
RichIndexEntry DecodeIndexEntry(String encoded_indexentry);
|
||||
|
||||
class RichBookSection {
|
||||
public:
|
||||
RichBookSection();
|
||||
|
||||
Rect GetPageRect(Size pagesize) const;
|
||||
Rect GetTextRect(Size pagesize, int columnindex) const;
|
||||
Size GetTextSize(Size pagesize) const;
|
||||
|
||||
public:
|
||||
bool nested;
|
||||
int columns;
|
||||
int firstpage;
|
||||
Rect margin;
|
||||
int header_space;
|
||||
int footer_space;
|
||||
int column_space;
|
||||
String header[3], footer[3];
|
||||
RichPara::CharFormat charformat;
|
||||
};
|
||||
|
||||
class RichPrintSection : public RichBookSection {
|
||||
public:
|
||||
RichPrintSection(const RichBookSection& s, pick_ RichText& t)
|
||||
: RichBookSection(s), text(t) {}
|
||||
|
||||
Vector<Drawing> Print(Size pagesize, Gate2<int, int> progress, int& progress_pos) const;
|
||||
|
||||
public:
|
||||
RichText text;
|
||||
};
|
||||
|
||||
class RichTocEntry {
|
||||
public:
|
||||
RichTocEntry(String topic = Null, int level = 1, bool numbered = true, bool appendix = false, WString text = Null)
|
||||
: topic(topic), level(level), numbered(numbered), text(text) {}
|
||||
|
||||
String topic;
|
||||
int level;
|
||||
bool numbered;
|
||||
bool appendix;
|
||||
WString text;
|
||||
};
|
||||
|
||||
class RichToc : DeepCopyOption<RichToc> {
|
||||
public:
|
||||
RichToc() {}
|
||||
RichToc(const RichToc& rtoc, int deep) : entries(rtoc.entries, deep) {}
|
||||
|
||||
void Add(String topic, int level, bool numbered = true, bool appendix = false, WString text = Null)
|
||||
{ entries.Add(new RichTocEntry(topic, level, numbered, appendix, text)); }
|
||||
|
||||
Array<RichTocEntry> entries;
|
||||
};
|
||||
|
||||
void MakeOnlineToc(RichText& out, const RichToc& toc);
|
||||
void MakeStdToc(RichText& out, const RichToc& toc, int print_width);
|
||||
void MakeTocTopics(RichText& out, const RichToc& toc);
|
||||
//RichText MakeStdIndex(
|
||||
|
||||
class RichBook {
|
||||
public:
|
||||
RichBook(Size page_size = Size(3968, 6074));
|
||||
|
||||
RichPrintSection& AddSection();
|
||||
|
||||
Vector<Drawing> Print(Size pagesize, Gate2<int, int> progress);
|
||||
|
||||
public:
|
||||
Size page_size;
|
||||
RichBookSection default_section;
|
||||
RichStyles default_styles;
|
||||
enum { TOC_DEPTH = 4 };
|
||||
Array<RichPrintSection> sections;
|
||||
};
|
||||
|
||||
void CreateHelpBook(RichBook& book);
|
||||
String CreateHelpPDF(RichBook& book);
|
||||
String CreateHelpRTF(RichBook& book, byte charset);
|
||||
|
||||
class RichBookHtml {
|
||||
public:
|
||||
RichBookHtml();
|
||||
|
||||
void AddFile(String url, String data);
|
||||
void AddImage(String url, String data);
|
||||
String GetURLFile(String url) const;
|
||||
|
||||
public:
|
||||
String output_path;
|
||||
enum { STYLE_DEEP, STYLE_FLAT, STYLE_ONEFILE };
|
||||
int style;
|
||||
VectorMap<String, String> files;
|
||||
VectorMap<String, String> images;
|
||||
};
|
||||
|
||||
void CreateHelpHtml(const RichBook& book, RichBookHtml& html);
|
||||
|
||||
Callback1<RichBook&>& DefaultBook();
|
||||
|
||||
void CreateDefaultBook();
|
||||
void CreateDefaultPDF();
|
||||
void CreateDefaultRTF();
|
||||
void CreateDefaultHTML();
|
||||
|
||||
void HelpBookMenu(Bar& bar);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifndef _RichBook_RichBook_h
|
||||
#define _RichBook_RichBook_h
|
||||
|
||||
#include <RichText/RichText.h>
|
||||
|
||||
namespace Upp {
|
||||
|
||||
RichPara::FieldType& FieldTypeVar();
|
||||
Id FieldTypeVarID();
|
||||
|
||||
class RichIndexEntry : DeepCopyOption<RichIndexEntry>
|
||||
{
|
||||
public:
|
||||
RichIndexEntry() {}
|
||||
RichIndexEntry(const RichIndexEntry& rti, bool deep) : reflist(rti.reflist, deep) {}
|
||||
|
||||
public:
|
||||
Vector<String> reflist;
|
||||
};
|
||||
|
||||
RichPara::FieldType& FieldTypeIndexEntry();
|
||||
Id FieldTypeIndexEntryID();
|
||||
String EncodeIndexEntry(const RichIndexEntry& idx);
|
||||
RichIndexEntry DecodeIndexEntry(String encoded_indexentry);
|
||||
|
||||
class RichBookSection {
|
||||
public:
|
||||
RichBookSection();
|
||||
|
||||
Rect GetPageRect(Size pagesize) const;
|
||||
Rect GetTextRect(Size pagesize, int columnindex) const;
|
||||
Size GetTextSize(Size pagesize) const;
|
||||
|
||||
public:
|
||||
bool nested;
|
||||
int columns;
|
||||
int firstpage;
|
||||
Rect margin;
|
||||
int header_space;
|
||||
int footer_space;
|
||||
int column_space;
|
||||
String header[3], footer[3];
|
||||
RichPara::CharFormat charformat;
|
||||
};
|
||||
|
||||
class RichPrintSection : public RichBookSection {
|
||||
public:
|
||||
RichPrintSection(const RichBookSection& s, pick_ RichText& t)
|
||||
: RichBookSection(s), text(t) {}
|
||||
|
||||
Vector<Drawing> Print(Size pagesize, Gate2<int, int> progress, int& progress_pos) const;
|
||||
|
||||
public:
|
||||
RichText text;
|
||||
};
|
||||
|
||||
class RichTocEntry {
|
||||
public:
|
||||
RichTocEntry(String topic = Null, int level = 1, bool numbered = true, bool appendix = false, WString text = Null)
|
||||
: topic(topic), level(level), numbered(numbered), text(text) {}
|
||||
|
||||
String topic;
|
||||
int level;
|
||||
bool numbered;
|
||||
bool appendix;
|
||||
WString text;
|
||||
};
|
||||
|
||||
class RichToc : DeepCopyOption<RichToc> {
|
||||
public:
|
||||
RichToc() {}
|
||||
RichToc(const RichToc& rtoc, int deep) : entries(rtoc.entries, deep) {}
|
||||
|
||||
void Add(String topic, int level, bool numbered = true, bool appendix = false, WString text = Null)
|
||||
{ entries.Add(new RichTocEntry(topic, level, numbered, appendix, text)); }
|
||||
|
||||
Array<RichTocEntry> entries;
|
||||
};
|
||||
|
||||
void MakeOnlineToc(RichText& out, const RichToc& toc);
|
||||
void MakeStdToc(RichText& out, const RichToc& toc, int print_width);
|
||||
void MakeTocTopics(RichText& out, const RichToc& toc);
|
||||
//RichText MakeStdIndex(
|
||||
|
||||
class RichBook {
|
||||
public:
|
||||
RichBook(Size page_size = Size(3968, 6074));
|
||||
|
||||
RichPrintSection& AddSection();
|
||||
|
||||
Vector<Drawing> Print(Size pagesize, Gate2<int, int> progress);
|
||||
|
||||
public:
|
||||
Size page_size;
|
||||
RichBookSection default_section;
|
||||
RichStyles default_styles;
|
||||
enum { TOC_DEPTH = 4 };
|
||||
Array<RichPrintSection> sections;
|
||||
};
|
||||
|
||||
void CreateHelpBook(RichBook& book);
|
||||
String CreateHelpPDF(RichBook& book);
|
||||
String CreateHelpRTF(RichBook& book, byte charset);
|
||||
|
||||
class RichBookHtml {
|
||||
public:
|
||||
RichBookHtml();
|
||||
|
||||
void AddFile(String url, String data);
|
||||
void AddImage(String url, String data);
|
||||
String GetURLFile(String url) const;
|
||||
|
||||
public:
|
||||
String output_path;
|
||||
enum { STYLE_DEEP, STYLE_FLAT, STYLE_ONEFILE };
|
||||
int style;
|
||||
VectorMap<String, String> files;
|
||||
VectorMap<String, String> images;
|
||||
};
|
||||
|
||||
void CreateHelpHtml(const RichBook& book, RichBookHtml& html);
|
||||
|
||||
Callback1<RichBook&>& DefaultBook();
|
||||
|
||||
void CreateDefaultBook();
|
||||
void CreateDefaultPDF();
|
||||
void CreateDefaultRTF();
|
||||
void CreateDefaultHTML();
|
||||
|
||||
void HelpBookMenu(Bar& bar);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,38 +1,38 @@
|
|||
|
||||
// RichBook.cpp
|
||||
|
||||
T_("Typesetting page %d...")
|
||||
csCZ("Sázím stranu %d...")
|
||||
|
||||
T_("Printing page %d...")
|
||||
csCZ("Tisknu stranu %d...")
|
||||
|
||||
T_("Typesetting...")
|
||||
csCZ("Sázím...")
|
||||
|
||||
T_("Exporting PDF...")
|
||||
csCZ("Exportuji PDF...")
|
||||
|
||||
T_("PDF documents (*.pdf)")
|
||||
csCZ("Dokumenty PDF (*.pdf)")
|
||||
|
||||
T_("PDF export")
|
||||
csCZ("Export PDF")
|
||||
|
||||
T_("Rich text documents (*.rtf)")
|
||||
csCZ("Dokumenty Rich text (*.rtf)")
|
||||
|
||||
T_("Save manual as")
|
||||
csCZ("Uložit pøíruèku jako")
|
||||
|
||||
T_("Print manual")
|
||||
csCZ("Tisk pøíruèky")
|
||||
|
||||
T_("RTF export")
|
||||
csCZ("Export do RTF")
|
||||
|
||||
T_("HTML export")
|
||||
csCZ("Export do HTML")
|
||||
|
||||
T_("Save manual")
|
||||
csCZ("Uložit pøíruèku")
|
||||
|
||||
// RichBook.cpp
|
||||
|
||||
T_("Typesetting page %d...")
|
||||
csCZ("Sázím stranu %d...")
|
||||
|
||||
T_("Printing page %d...")
|
||||
csCZ("Tisknu stranu %d...")
|
||||
|
||||
T_("Typesetting...")
|
||||
csCZ("Sázím...")
|
||||
|
||||
T_("Exporting PDF...")
|
||||
csCZ("Exportuji PDF...")
|
||||
|
||||
T_("PDF documents (*.pdf)")
|
||||
csCZ("Dokumenty PDF (*.pdf)")
|
||||
|
||||
T_("PDF export")
|
||||
csCZ("Export PDF")
|
||||
|
||||
T_("Rich text documents (*.rtf)")
|
||||
csCZ("Dokumenty Rich text (*.rtf)")
|
||||
|
||||
T_("Save manual as")
|
||||
csCZ("Uložit pøíruèku jako")
|
||||
|
||||
T_("Print manual")
|
||||
csCZ("Tisk pøíruèky")
|
||||
|
||||
T_("RTF export")
|
||||
csCZ("Export do RTF")
|
||||
|
||||
T_("HTML export")
|
||||
csCZ("Export do HTML")
|
||||
|
||||
T_("Save manual")
|
||||
csCZ("Uložit pøíruèku")
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
uses
|
||||
RichText,
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
RichBook.h,
|
||||
RichBook_init.icpp,
|
||||
RichBook.t,
|
||||
RichBook.cpp;
|
||||
uses
|
||||
RichText,
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
RichBook.h,
|
||||
RichBook_init.icpp,
|
||||
RichBook.t,
|
||||
RichBook.cpp;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
#include "RichBook.h"
|
||||
|
||||
namespace Upp {
|
||||
|
||||
#define TFILE <RichBook/RichBook.t>
|
||||
#include <Core/t.h>
|
||||
|
||||
}
|
||||
#include "RichBook.h"
|
||||
|
||||
namespace Upp {
|
||||
|
||||
#define TFILE <RichBook/RichBook.t>
|
||||
#include <Core/t.h>
|
||||
|
||||
}
|
||||
|
|
@ -1,346 +1,346 @@
|
|||
#include "Docedit.h"
|
||||
|
||||
#define IMAGECLASS DppImg
|
||||
#define IMAGEFILE <Docedit/Docedit.iml>
|
||||
#include <Draw/iml_source.h>
|
||||
|
||||
bool IsCppKeyword(const String& id)
|
||||
{
|
||||
static Index<String> kw;
|
||||
if(kw.GetCount() == 0)
|
||||
for(int i = 0; CppKeyword[i]; i++)
|
||||
kw.Add(CppKeyword[i]);
|
||||
return kw.Find(id) >= 0;
|
||||
}
|
||||
|
||||
void DocItemDisplay::Paint(Draw& w, const Rect& r, const Value& q,
|
||||
Color _ink, Color paper, dword style) const
|
||||
{
|
||||
ValueArray va = q;
|
||||
String txt = va.Get(0);
|
||||
String name = va.Get(1);
|
||||
int kind = va.Get(2);
|
||||
int access = va.Get(3);
|
||||
int status = va.Get(4);
|
||||
String pname = va.Get(5);
|
||||
String tname = va.Get(6);
|
||||
Color c = Color(230, 255, 230);
|
||||
switch(status) {
|
||||
case DocDir::IGNORED: c = SGray; break;
|
||||
case DocDir::OBSOLETELINK:
|
||||
case DocDir::OBSOLETE: c = SLtRed; break;
|
||||
case DocDir::UNDOCUMENTED: c = paper; break;
|
||||
}
|
||||
w.DrawRect(r, style & (FOCUS|CURSOR) ? paper : c);
|
||||
if(IsNull(q)) return;
|
||||
int x0 = r.left;
|
||||
if(access == PROTECTED)
|
||||
w.DrawImage(x0, r.top + 1, DppImg::Protected());
|
||||
x0 += 6;
|
||||
Image img = DppImg::Other();
|
||||
switch(kind) {
|
||||
case FUNCTION:
|
||||
img = DppImg::Function();
|
||||
break;
|
||||
case INSTANCEFUNCTION:
|
||||
img = DppImg::InstanceFunction();
|
||||
break;
|
||||
case CLASSFUNCTION:
|
||||
img = DppImg::ClassFunction();
|
||||
break;
|
||||
case FUNCTIONTEMPLATE:
|
||||
img = DppImg::FunctionTemplate();
|
||||
break;
|
||||
case INSTANCEFUNCTIONTEMPLATE:
|
||||
img = DppImg::InstanceFunctionTemplate();
|
||||
break;
|
||||
case CLASSFUNCTIONTEMPLATE:
|
||||
img = DppImg::ClassFunctionTemplate();
|
||||
break;
|
||||
case STRUCT:
|
||||
img = DppImg::Struct();
|
||||
break;
|
||||
case STRUCTTEMPLATE:
|
||||
img = DppImg::StructTemplate();
|
||||
break;
|
||||
case INSTANCEVARIABLE:
|
||||
img = DppImg::InstanceVariable();
|
||||
break;
|
||||
case CLASSVARIABLE:
|
||||
img = DppImg::ClassVariable();
|
||||
break;
|
||||
case VARIABLE:
|
||||
img = DppImg::Variable();
|
||||
break;
|
||||
case ENUM:
|
||||
img = DppImg::Enum();
|
||||
break;
|
||||
case INLINEFRIEND:
|
||||
img = DppImg::InlineFriend();
|
||||
break;
|
||||
case TYPEDEF:
|
||||
img = DppImg::Typedef();
|
||||
break;
|
||||
case CONSTRUCTOR:
|
||||
img = DppImg::Constructor();
|
||||
break;
|
||||
case DESTRUCTOR:
|
||||
img = DppImg::Destructor();
|
||||
break;
|
||||
case MACRO:
|
||||
img = DppImg::Macro();
|
||||
break;
|
||||
}
|
||||
if(style & (CURSOR|FOCUS))
|
||||
DrawHighlightImage(w, x0, r.top + 1, img);
|
||||
else
|
||||
w.DrawImage(x0, r.top + 1, img);
|
||||
x0 += 20;
|
||||
int x = x0;
|
||||
int y = r.top + 2;
|
||||
const char *s = txt;
|
||||
while(*s && y < r.bottom) {
|
||||
Font f = Arial(11);
|
||||
Color ink = SBlack;
|
||||
int n = 1;
|
||||
if(*s >= '0' && *s <= '9') {
|
||||
while(s[n] >= '0' && s[n] <= '9')
|
||||
n++;
|
||||
ink = SRed;
|
||||
}
|
||||
else
|
||||
if(iscid(*s)) {
|
||||
if(strncmp(s, name, name.GetLength()) == 0 && !iscid(s[name.GetLength()])) {
|
||||
f = Arial(11).Bold();
|
||||
n = name.GetLength();
|
||||
name.Clear();
|
||||
}
|
||||
else {
|
||||
String id;
|
||||
n = 0;
|
||||
while(IsAlNum(s[n]) || s[n] == '_') {
|
||||
id.Cat(s[n]);
|
||||
n++;
|
||||
}
|
||||
if(IsCppKeyword(id))
|
||||
ink = SLtBlue;
|
||||
else
|
||||
if(InScList(id, pname)) {
|
||||
ink = SRed;
|
||||
f = Arial(11).Bold();
|
||||
}
|
||||
else
|
||||
if(InScList(id, tname)) {
|
||||
ink = SGreen;
|
||||
f = Arial(11).Bold();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
ink = SMagenta;
|
||||
if(style & (CURSOR|FOCUS)) ink = _ink;
|
||||
Size fsz = w.GetTextSize(s, f, n);
|
||||
if(x + fsz.cx >= r.right && fsz.cx < r.Width()) {
|
||||
if(x0 + 70 < r.right)
|
||||
x = x0 + 24;
|
||||
else
|
||||
x = x0;
|
||||
y += fsz.cy;
|
||||
}
|
||||
w.DrawText(x, y, s, f, ink, n);
|
||||
x += fsz.cx;
|
||||
s += n;
|
||||
}
|
||||
}
|
||||
|
||||
void DocNestDisplay::Paint(Draw& w, const Rect& r, const Value& q,
|
||||
Color _ink, Color paper, dword style) const
|
||||
{
|
||||
String text = q;
|
||||
w.DrawRect(r, paper);
|
||||
if(IsNull(text)) {
|
||||
w.DrawText(r.left, r.top, "Globals", Arial(11).Bold().Italic(),
|
||||
style & (CURSOR|FOCUS) ? _ink : SBlue);
|
||||
return;
|
||||
}
|
||||
int x = r.left;
|
||||
int y = r.top;
|
||||
const char *s = text;
|
||||
Font idf = Arial(11).Bold();
|
||||
Color idink = SBlack;
|
||||
while(*s && y < r.bottom) {
|
||||
Font f = Arial(11);
|
||||
Color ink = SBlack;
|
||||
int n = 1;
|
||||
if(*s >= '0' && *s <= '9') {
|
||||
while(s[n] >= '0' && s[n] <= '9')
|
||||
n++;
|
||||
ink = SRed;
|
||||
}
|
||||
else
|
||||
if(iscid(*s)) {
|
||||
String id;
|
||||
n = 0;
|
||||
while(IsAlNum(s[n]) || s[n] == '_') {
|
||||
id.Cat(s[n]);
|
||||
n++;
|
||||
}
|
||||
if(IsCppKeyword(id)) {
|
||||
ink = SLtBlue;
|
||||
if(id == "class" || id == "typename")
|
||||
idink = SGreen;
|
||||
}
|
||||
else {
|
||||
ink = idink;
|
||||
f = idf;
|
||||
idink = SBlack;
|
||||
idf = Arial(11);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ink = SMagenta;
|
||||
if(*s == ':') {
|
||||
idf = Arial(11).Bold();
|
||||
idink = SBlack;
|
||||
}
|
||||
}
|
||||
if(style & (CURSOR|FOCUS)) ink = _ink;
|
||||
Size fsz = w.GetTextSize(s, f, n);
|
||||
w.DrawText(x, y, s, f, ink, n);
|
||||
x += fsz.cx;
|
||||
s += n;
|
||||
}
|
||||
}
|
||||
|
||||
int GetItemHeight(const String& txt, const String& nm, const String& pname,
|
||||
const String& tname, int cx)
|
||||
{
|
||||
String name = nm;
|
||||
int x = 26;
|
||||
int y = ScreenInfo().GetFontInfo(Arial(11)).GetHeight() + 3;
|
||||
const char *s = txt;
|
||||
while(*s) {
|
||||
Font f = Arial(11);
|
||||
int n = 1;
|
||||
if(*s >= '0' && *s <= '9')
|
||||
while(s[n] >= '0' && s[n] <= '9')
|
||||
n++;
|
||||
else
|
||||
if(iscid(*s)) {
|
||||
if(strncmp(s, name, name.GetLength()) == 0 && !iscid(s[name.GetLength()])) {
|
||||
f = Arial(11).Bold();
|
||||
n = name.GetLength();
|
||||
name.Clear();
|
||||
}
|
||||
else {
|
||||
String id;
|
||||
n = 0;
|
||||
while(IsAlNum(s[n]) || s[n] == '_') {
|
||||
id.Cat(s[n]);
|
||||
n++;
|
||||
}
|
||||
if(!IsCppKeyword(id) && InScList(id, pname) || InScList(id, tname))
|
||||
f = Arial(11).Bold();
|
||||
}
|
||||
}
|
||||
Size fsz = ScreenInfo().GetTextSize(s, f, n);
|
||||
if(x + fsz.cx >= cx && fsz.cx < cx) {
|
||||
if(26 + 70 < cx)
|
||||
x = 26 + 24;
|
||||
else
|
||||
x = 26;
|
||||
y += fsz.cy;
|
||||
}
|
||||
x += fsz.cx;
|
||||
s += n;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
void InitItemArray(ArrayCtrl& item)
|
||||
{
|
||||
item.NoHeader();
|
||||
item.AddIndex();
|
||||
item.AddIndex().Accel();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddColumnAt(0, "").Add(1).Add(2).Add(3).Add(4).Add(5).Add(6).Add(7).Add(8)
|
||||
.SetDisplay(Single<DocItemDisplay>()).Accel().HeaderTab().SetMargin(0);
|
||||
item.HeaderObject().Tab(0).SetMargin(0);
|
||||
}
|
||||
|
||||
void LoadItems(const DocSet& set, const String& nameing, const String& nesting, ArrayCtrl& item)
|
||||
{
|
||||
const ArrayMap<String, DocItem>& nt = set.Get(~nameing).Get(nesting);
|
||||
item.Clear();
|
||||
int cx = item.HeaderObject().GetTabWidth(0) - 2 * item.HeaderObject().Tab(0).GetMargin();
|
||||
for(int i = 0; i < nt.GetCount(); i++) {
|
||||
const DocItem& im = nt[i];
|
||||
if(im.cppitem) {
|
||||
item.Add(nt.GetKey(i), im.cppitem->name, im.cppitem->kind, im.cppitem->access,
|
||||
im.status, im.cppitem->pname, im.cppitem->tname,
|
||||
im.package, im.cppitem->file, im.cppitem->line);
|
||||
item.SetLineCy(item.GetCount() - 1,
|
||||
GetItemHeight(nt.GetKey(i), im.cppitem->name,
|
||||
im.cppitem->pname, im.cppitem->tname, cx));
|
||||
}
|
||||
else {
|
||||
item.Add(nt.GetKey(i), Null, Null, Null, im.status, Null, Null, im.package,
|
||||
Null, Null);
|
||||
item.SetLineCy(item.GetCount() - 1,
|
||||
GetItemHeight(nt.GetKey(i), Null, Null, Null, cx));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int ByOrder(int a1, int a2, int *order)
|
||||
{
|
||||
if(a1 == a2) return 0;
|
||||
while(*order != -1) {
|
||||
if(a1 == *order) return -1;
|
||||
if(a2 == *order) return 1;
|
||||
order++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CompareItems(const Vector<Value>& row1, const Vector<Value>& row2)
|
||||
{
|
||||
int q;
|
||||
int status_order[] = {
|
||||
STATUS_UNDOCUMENTED, STATUS_OBSOLETE, STATUS_IGNORED, STATUS_EXTERNAL, STATUS_NORMAL,
|
||||
-1
|
||||
};
|
||||
int kind1 = row1[2];
|
||||
int kind2 = row2[2];
|
||||
if(kind1 != STRUCT && kind2 != STRUCT && kind1 != STRUCTTEMPLATE && kind2 != STRUCTTEMPLATE) {
|
||||
q = (int)row2[3] - (int)row1[3];
|
||||
if(q) return q;
|
||||
q = ByOrder(row1[4], row2[4], status_order);
|
||||
if(q) return q;
|
||||
}
|
||||
int kind_order[] = {
|
||||
STRUCT, STRUCTTEMPLATE,
|
||||
MACRO,
|
||||
CONSTRUCTOR, DESTRUCTOR,
|
||||
ENUM, TYPEDEF,
|
||||
INSTANCEFUNCTION, CLASSFUNCTION, INLINEFRIEND,
|
||||
INSTANCEVARIABLE, CLASSVARIABLE,
|
||||
INSTANCEFUNCTION, INSTANCEVARIABLE,
|
||||
VARIABLE, FUNCTION, FUNCTIONTEMPLATE,
|
||||
-1
|
||||
};
|
||||
q = ByOrder(kind1, kind2, kind_order);
|
||||
if(q) return q;
|
||||
return strcmp((String)row1[1], (String)row2[1]);
|
||||
}
|
||||
|
||||
int CompareNests(const Value& v1, const Value& v2)
|
||||
{
|
||||
return strcmp(String(v1), String(v2));
|
||||
}
|
||||
#include "Docedit.h"
|
||||
|
||||
#define IMAGECLASS DppImg
|
||||
#define IMAGEFILE <Docedit/Docedit.iml>
|
||||
#include <Draw/iml_source.h>
|
||||
|
||||
bool IsCppKeyword(const String& id)
|
||||
{
|
||||
static Index<String> kw;
|
||||
if(kw.GetCount() == 0)
|
||||
for(int i = 0; CppKeyword[i]; i++)
|
||||
kw.Add(CppKeyword[i]);
|
||||
return kw.Find(id) >= 0;
|
||||
}
|
||||
|
||||
void DocItemDisplay::Paint(Draw& w, const Rect& r, const Value& q,
|
||||
Color _ink, Color paper, dword style) const
|
||||
{
|
||||
ValueArray va = q;
|
||||
String txt = va.Get(0);
|
||||
String name = va.Get(1);
|
||||
int kind = va.Get(2);
|
||||
int access = va.Get(3);
|
||||
int status = va.Get(4);
|
||||
String pname = va.Get(5);
|
||||
String tname = va.Get(6);
|
||||
Color c = Color(230, 255, 230);
|
||||
switch(status) {
|
||||
case DocDir::IGNORED: c = SGray; break;
|
||||
case DocDir::OBSOLETELINK:
|
||||
case DocDir::OBSOLETE: c = SLtRed; break;
|
||||
case DocDir::UNDOCUMENTED: c = paper; break;
|
||||
}
|
||||
w.DrawRect(r, style & (FOCUS|CURSOR) ? paper : c);
|
||||
if(IsNull(q)) return;
|
||||
int x0 = r.left;
|
||||
if(access == PROTECTED)
|
||||
w.DrawImage(x0, r.top + 1, DppImg::Protected());
|
||||
x0 += 6;
|
||||
Image img = DppImg::Other();
|
||||
switch(kind) {
|
||||
case FUNCTION:
|
||||
img = DppImg::Function();
|
||||
break;
|
||||
case INSTANCEFUNCTION:
|
||||
img = DppImg::InstanceFunction();
|
||||
break;
|
||||
case CLASSFUNCTION:
|
||||
img = DppImg::ClassFunction();
|
||||
break;
|
||||
case FUNCTIONTEMPLATE:
|
||||
img = DppImg::FunctionTemplate();
|
||||
break;
|
||||
case INSTANCEFUNCTIONTEMPLATE:
|
||||
img = DppImg::InstanceFunctionTemplate();
|
||||
break;
|
||||
case CLASSFUNCTIONTEMPLATE:
|
||||
img = DppImg::ClassFunctionTemplate();
|
||||
break;
|
||||
case STRUCT:
|
||||
img = DppImg::Struct();
|
||||
break;
|
||||
case STRUCTTEMPLATE:
|
||||
img = DppImg::StructTemplate();
|
||||
break;
|
||||
case INSTANCEVARIABLE:
|
||||
img = DppImg::InstanceVariable();
|
||||
break;
|
||||
case CLASSVARIABLE:
|
||||
img = DppImg::ClassVariable();
|
||||
break;
|
||||
case VARIABLE:
|
||||
img = DppImg::Variable();
|
||||
break;
|
||||
case ENUM:
|
||||
img = DppImg::Enum();
|
||||
break;
|
||||
case INLINEFRIEND:
|
||||
img = DppImg::InlineFriend();
|
||||
break;
|
||||
case TYPEDEF:
|
||||
img = DppImg::Typedef();
|
||||
break;
|
||||
case CONSTRUCTOR:
|
||||
img = DppImg::Constructor();
|
||||
break;
|
||||
case DESTRUCTOR:
|
||||
img = DppImg::Destructor();
|
||||
break;
|
||||
case MACRO:
|
||||
img = DppImg::Macro();
|
||||
break;
|
||||
}
|
||||
if(style & (CURSOR|FOCUS))
|
||||
DrawHighlightImage(w, x0, r.top + 1, img);
|
||||
else
|
||||
w.DrawImage(x0, r.top + 1, img);
|
||||
x0 += 20;
|
||||
int x = x0;
|
||||
int y = r.top + 2;
|
||||
const char *s = txt;
|
||||
while(*s && y < r.bottom) {
|
||||
Font f = Arial(11);
|
||||
Color ink = SBlack;
|
||||
int n = 1;
|
||||
if(*s >= '0' && *s <= '9') {
|
||||
while(s[n] >= '0' && s[n] <= '9')
|
||||
n++;
|
||||
ink = SRed;
|
||||
}
|
||||
else
|
||||
if(iscid(*s)) {
|
||||
if(strncmp(s, name, name.GetLength()) == 0 && !iscid(s[name.GetLength()])) {
|
||||
f = Arial(11).Bold();
|
||||
n = name.GetLength();
|
||||
name.Clear();
|
||||
}
|
||||
else {
|
||||
String id;
|
||||
n = 0;
|
||||
while(IsAlNum(s[n]) || s[n] == '_') {
|
||||
id.Cat(s[n]);
|
||||
n++;
|
||||
}
|
||||
if(IsCppKeyword(id))
|
||||
ink = SLtBlue;
|
||||
else
|
||||
if(InScList(id, pname)) {
|
||||
ink = SRed;
|
||||
f = Arial(11).Bold();
|
||||
}
|
||||
else
|
||||
if(InScList(id, tname)) {
|
||||
ink = SGreen;
|
||||
f = Arial(11).Bold();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
ink = SMagenta;
|
||||
if(style & (CURSOR|FOCUS)) ink = _ink;
|
||||
Size fsz = w.GetTextSize(s, f, n);
|
||||
if(x + fsz.cx >= r.right && fsz.cx < r.Width()) {
|
||||
if(x0 + 70 < r.right)
|
||||
x = x0 + 24;
|
||||
else
|
||||
x = x0;
|
||||
y += fsz.cy;
|
||||
}
|
||||
w.DrawText(x, y, s, f, ink, n);
|
||||
x += fsz.cx;
|
||||
s += n;
|
||||
}
|
||||
}
|
||||
|
||||
void DocNestDisplay::Paint(Draw& w, const Rect& r, const Value& q,
|
||||
Color _ink, Color paper, dword style) const
|
||||
{
|
||||
String text = q;
|
||||
w.DrawRect(r, paper);
|
||||
if(IsNull(text)) {
|
||||
w.DrawText(r.left, r.top, "Globals", Arial(11).Bold().Italic(),
|
||||
style & (CURSOR|FOCUS) ? _ink : SBlue);
|
||||
return;
|
||||
}
|
||||
int x = r.left;
|
||||
int y = r.top;
|
||||
const char *s = text;
|
||||
Font idf = Arial(11).Bold();
|
||||
Color idink = SBlack;
|
||||
while(*s && y < r.bottom) {
|
||||
Font f = Arial(11);
|
||||
Color ink = SBlack;
|
||||
int n = 1;
|
||||
if(*s >= '0' && *s <= '9') {
|
||||
while(s[n] >= '0' && s[n] <= '9')
|
||||
n++;
|
||||
ink = SRed;
|
||||
}
|
||||
else
|
||||
if(iscid(*s)) {
|
||||
String id;
|
||||
n = 0;
|
||||
while(IsAlNum(s[n]) || s[n] == '_') {
|
||||
id.Cat(s[n]);
|
||||
n++;
|
||||
}
|
||||
if(IsCppKeyword(id)) {
|
||||
ink = SLtBlue;
|
||||
if(id == "class" || id == "typename")
|
||||
idink = SGreen;
|
||||
}
|
||||
else {
|
||||
ink = idink;
|
||||
f = idf;
|
||||
idink = SBlack;
|
||||
idf = Arial(11);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ink = SMagenta;
|
||||
if(*s == ':') {
|
||||
idf = Arial(11).Bold();
|
||||
idink = SBlack;
|
||||
}
|
||||
}
|
||||
if(style & (CURSOR|FOCUS)) ink = _ink;
|
||||
Size fsz = w.GetTextSize(s, f, n);
|
||||
w.DrawText(x, y, s, f, ink, n);
|
||||
x += fsz.cx;
|
||||
s += n;
|
||||
}
|
||||
}
|
||||
|
||||
int GetItemHeight(const String& txt, const String& nm, const String& pname,
|
||||
const String& tname, int cx)
|
||||
{
|
||||
String name = nm;
|
||||
int x = 26;
|
||||
int y = ScreenInfo().GetFontInfo(Arial(11)).GetHeight() + 3;
|
||||
const char *s = txt;
|
||||
while(*s) {
|
||||
Font f = Arial(11);
|
||||
int n = 1;
|
||||
if(*s >= '0' && *s <= '9')
|
||||
while(s[n] >= '0' && s[n] <= '9')
|
||||
n++;
|
||||
else
|
||||
if(iscid(*s)) {
|
||||
if(strncmp(s, name, name.GetLength()) == 0 && !iscid(s[name.GetLength()])) {
|
||||
f = Arial(11).Bold();
|
||||
n = name.GetLength();
|
||||
name.Clear();
|
||||
}
|
||||
else {
|
||||
String id;
|
||||
n = 0;
|
||||
while(IsAlNum(s[n]) || s[n] == '_') {
|
||||
id.Cat(s[n]);
|
||||
n++;
|
||||
}
|
||||
if(!IsCppKeyword(id) && InScList(id, pname) || InScList(id, tname))
|
||||
f = Arial(11).Bold();
|
||||
}
|
||||
}
|
||||
Size fsz = ScreenInfo().GetTextSize(s, f, n);
|
||||
if(x + fsz.cx >= cx && fsz.cx < cx) {
|
||||
if(26 + 70 < cx)
|
||||
x = 26 + 24;
|
||||
else
|
||||
x = 26;
|
||||
y += fsz.cy;
|
||||
}
|
||||
x += fsz.cx;
|
||||
s += n;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
void InitItemArray(ArrayCtrl& item)
|
||||
{
|
||||
item.NoHeader();
|
||||
item.AddIndex();
|
||||
item.AddIndex().Accel();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddIndex();
|
||||
item.AddColumnAt(0, "").Add(1).Add(2).Add(3).Add(4).Add(5).Add(6).Add(7).Add(8)
|
||||
.SetDisplay(Single<DocItemDisplay>()).Accel().HeaderTab().SetMargin(0);
|
||||
item.HeaderObject().Tab(0).SetMargin(0);
|
||||
}
|
||||
|
||||
void LoadItems(const DocSet& set, const String& nameing, const String& nesting, ArrayCtrl& item)
|
||||
{
|
||||
const ArrayMap<String, DocItem>& nt = set.Get(~nameing).Get(nesting);
|
||||
item.Clear();
|
||||
int cx = item.HeaderObject().GetTabWidth(0) - 2 * item.HeaderObject().Tab(0).GetMargin();
|
||||
for(int i = 0; i < nt.GetCount(); i++) {
|
||||
const DocItem& im = nt[i];
|
||||
if(im.cppitem) {
|
||||
item.Add(nt.GetKey(i), im.cppitem->name, im.cppitem->kind, im.cppitem->access,
|
||||
im.status, im.cppitem->pname, im.cppitem->tname,
|
||||
im.package, im.cppitem->file, im.cppitem->line);
|
||||
item.SetLineCy(item.GetCount() - 1,
|
||||
GetItemHeight(nt.GetKey(i), im.cppitem->name,
|
||||
im.cppitem->pname, im.cppitem->tname, cx));
|
||||
}
|
||||
else {
|
||||
item.Add(nt.GetKey(i), Null, Null, Null, im.status, Null, Null, im.package,
|
||||
Null, Null);
|
||||
item.SetLineCy(item.GetCount() - 1,
|
||||
GetItemHeight(nt.GetKey(i), Null, Null, Null, cx));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int ByOrder(int a1, int a2, int *order)
|
||||
{
|
||||
if(a1 == a2) return 0;
|
||||
while(*order != -1) {
|
||||
if(a1 == *order) return -1;
|
||||
if(a2 == *order) return 1;
|
||||
order++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CompareItems(const Vector<Value>& row1, const Vector<Value>& row2)
|
||||
{
|
||||
int q;
|
||||
int status_order[] = {
|
||||
STATUS_UNDOCUMENTED, STATUS_OBSOLETE, STATUS_IGNORED, STATUS_EXTERNAL, STATUS_NORMAL,
|
||||
-1
|
||||
};
|
||||
int kind1 = row1[2];
|
||||
int kind2 = row2[2];
|
||||
if(kind1 != STRUCT && kind2 != STRUCT && kind1 != STRUCTTEMPLATE && kind2 != STRUCTTEMPLATE) {
|
||||
q = (int)row2[3] - (int)row1[3];
|
||||
if(q) return q;
|
||||
q = ByOrder(row1[4], row2[4], status_order);
|
||||
if(q) return q;
|
||||
}
|
||||
int kind_order[] = {
|
||||
STRUCT, STRUCTTEMPLATE,
|
||||
MACRO,
|
||||
CONSTRUCTOR, DESTRUCTOR,
|
||||
ENUM, TYPEDEF,
|
||||
INSTANCEFUNCTION, CLASSFUNCTION, INLINEFRIEND,
|
||||
INSTANCEVARIABLE, CLASSVARIABLE,
|
||||
INSTANCEFUNCTION, INSTANCEVARIABLE,
|
||||
VARIABLE, FUNCTION, FUNCTIONTEMPLATE,
|
||||
-1
|
||||
};
|
||||
q = ByOrder(kind1, kind2, kind_order);
|
||||
if(q) return q;
|
||||
return strcmp((String)row1[1], (String)row2[1]);
|
||||
}
|
||||
|
||||
int CompareNests(const Value& v1, const Value& v2)
|
||||
{
|
||||
return strcmp(String(v1), String(v2));
|
||||
}
|
||||
|
|
@ -1,114 +1,114 @@
|
|||
#include "Docedit.h"
|
||||
|
||||
void DocLinkDlg::Nameing()
|
||||
{
|
||||
nesting.Clear();
|
||||
if(IsNull(nameing)) {
|
||||
Nesting();
|
||||
return;
|
||||
}
|
||||
const VectorMap<String, ArrayMap<String, DocItem> >& ns = set->Get(~nameing);
|
||||
nesting.Clear();
|
||||
for(int i = 0; i < ns.GetCount(); i++)
|
||||
nesting.Add(ns.GetKey(i));
|
||||
nesting.Sort(0, CompareNests);
|
||||
nesting.GoBegin();
|
||||
Nesting();
|
||||
}
|
||||
|
||||
void DocLinkDlg::Nesting()
|
||||
{
|
||||
item.Clear();
|
||||
if(!nesting.IsCursor()) {
|
||||
Item();
|
||||
return;
|
||||
}
|
||||
LoadItems(*set, ~nameing, nesting.GetKey(), item);
|
||||
if(sort)
|
||||
item.Sort(CompareItems);
|
||||
item.GoBegin();
|
||||
}
|
||||
|
||||
String DocLinkDlg::Get()
|
||||
{
|
||||
return "dpp://" + String(~nameing) + "/" + String(nesting.GetKey()) + "/"
|
||||
+ String(item.GetKey());
|
||||
}
|
||||
|
||||
void DocLinkDlg::Item()
|
||||
{
|
||||
link <<= Get();
|
||||
String s = doc_dir.GetText(DocKey(~nameing, nesting.GetKey(), item.GetKey(), lang));
|
||||
label.KillCursor();
|
||||
label.Clear();
|
||||
label.Disable();
|
||||
if(IsNull(s)) return;
|
||||
Array<RichPosInfo> pi = ParseQTF(s).GetPosInfo(Rect(0, 0, 5000, 5000), PageY());
|
||||
for(int i = 0; i < pi.GetCount(); i++)
|
||||
if(pi[i].type == RichPosInfo::LABEL)
|
||||
label.Add(FromUnicode(pi[i].data, CHARSET_WIN1252));
|
||||
if(label.GetCount())
|
||||
label.Enable();
|
||||
}
|
||||
|
||||
void DocLinkDlg::Label()
|
||||
{
|
||||
if(label.IsCursor())
|
||||
link <<= Get() + "#" + String(label.GetKey());
|
||||
}
|
||||
|
||||
bool DocLinkDlg::Perform(const DocSet& _set, bool _sort, String& _link, dword _lang,
|
||||
const String& _nameing, const String& _nesting)
|
||||
{
|
||||
lang = _lang;
|
||||
set = &_set;
|
||||
sort = _sort;
|
||||
nameing.Clear();
|
||||
for(int i = 0; i < _set.GetCount(); i++)
|
||||
nameing.Add(_set.GetKey(i));
|
||||
if(nameing.GetCount())
|
||||
nameing.SetIndex(0);
|
||||
if(!IsNull(_nameing) && nameing.HasKey(_nameing))
|
||||
nameing <<= _nameing;
|
||||
Nameing();
|
||||
if(!IsNull(_nesting))
|
||||
nesting.FindSetCursor(_nesting);
|
||||
link <<= _link;
|
||||
link.SetFocus();
|
||||
if(Execute() == IDOK) {
|
||||
link.AddHistory();
|
||||
_link = link;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
DocLinkDlg::DocLinkDlg()
|
||||
{
|
||||
CtrlLayoutOKCancel(*this, "Link");
|
||||
nesting.AddColumn().SetDisplay(Single<DocNestDisplay>());
|
||||
nesting.NoHeader().NoGrid();
|
||||
nameing <<= THISBACK(Nameing);
|
||||
nesting.WhenEnterRow = THISBACK(Nesting);
|
||||
InitItemArray(item);
|
||||
item.WhenLeftClick = THISBACK(Item);
|
||||
label.NoHeader().NoGrid();
|
||||
label.AddColumn();
|
||||
label.WhenLeftClick = THISBACK(Label);
|
||||
}
|
||||
|
||||
bool ParseLink(const String& link, DocKey& key, String& label)
|
||||
{
|
||||
if(memcmp(link, "dpp://", 6)) return false;
|
||||
Vector<String> p = Split(~link + 6, '/', false);
|
||||
if(p.GetCount() != 3) return false;
|
||||
key.nameing = p[0];
|
||||
key.nesting = p[1];
|
||||
key.item = p[2];
|
||||
int q = key.item.Find('#');
|
||||
label = Null;
|
||||
if(q < 0) return true;
|
||||
label = key.item.Mid(q + 1);
|
||||
key.item = key.item.Mid(0, q);
|
||||
return true;
|
||||
}
|
||||
#include "Docedit.h"
|
||||
|
||||
void DocLinkDlg::Nameing()
|
||||
{
|
||||
nesting.Clear();
|
||||
if(IsNull(nameing)) {
|
||||
Nesting();
|
||||
return;
|
||||
}
|
||||
const VectorMap<String, ArrayMap<String, DocItem> >& ns = set->Get(~nameing);
|
||||
nesting.Clear();
|
||||
for(int i = 0; i < ns.GetCount(); i++)
|
||||
nesting.Add(ns.GetKey(i));
|
||||
nesting.Sort(0, CompareNests);
|
||||
nesting.GoBegin();
|
||||
Nesting();
|
||||
}
|
||||
|
||||
void DocLinkDlg::Nesting()
|
||||
{
|
||||
item.Clear();
|
||||
if(!nesting.IsCursor()) {
|
||||
Item();
|
||||
return;
|
||||
}
|
||||
LoadItems(*set, ~nameing, nesting.GetKey(), item);
|
||||
if(sort)
|
||||
item.Sort(CompareItems);
|
||||
item.GoBegin();
|
||||
}
|
||||
|
||||
String DocLinkDlg::Get()
|
||||
{
|
||||
return "dpp://" + String(~nameing) + "/" + String(nesting.GetKey()) + "/"
|
||||
+ String(item.GetKey());
|
||||
}
|
||||
|
||||
void DocLinkDlg::Item()
|
||||
{
|
||||
link <<= Get();
|
||||
String s = doc_dir.GetText(DocKey(~nameing, nesting.GetKey(), item.GetKey(), lang));
|
||||
label.KillCursor();
|
||||
label.Clear();
|
||||
label.Disable();
|
||||
if(IsNull(s)) return;
|
||||
Array<RichPosInfo> pi = ParseQTF(s).GetPosInfo(Rect(0, 0, 5000, 5000), PageY());
|
||||
for(int i = 0; i < pi.GetCount(); i++)
|
||||
if(pi[i].type == RichPosInfo::LABEL)
|
||||
label.Add(FromUnicode(pi[i].data, CHARSET_WIN1252));
|
||||
if(label.GetCount())
|
||||
label.Enable();
|
||||
}
|
||||
|
||||
void DocLinkDlg::Label()
|
||||
{
|
||||
if(label.IsCursor())
|
||||
link <<= Get() + "#" + String(label.GetKey());
|
||||
}
|
||||
|
||||
bool DocLinkDlg::Perform(const DocSet& _set, bool _sort, String& _link, dword _lang,
|
||||
const String& _nameing, const String& _nesting)
|
||||
{
|
||||
lang = _lang;
|
||||
set = &_set;
|
||||
sort = _sort;
|
||||
nameing.Clear();
|
||||
for(int i = 0; i < _set.GetCount(); i++)
|
||||
nameing.Add(_set.GetKey(i));
|
||||
if(nameing.GetCount())
|
||||
nameing.SetIndex(0);
|
||||
if(!IsNull(_nameing) && nameing.HasKey(_nameing))
|
||||
nameing <<= _nameing;
|
||||
Nameing();
|
||||
if(!IsNull(_nesting))
|
||||
nesting.FindSetCursor(_nesting);
|
||||
link <<= _link;
|
||||
link.SetFocus();
|
||||
if(Execute() == IDOK) {
|
||||
link.AddHistory();
|
||||
_link = link;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
DocLinkDlg::DocLinkDlg()
|
||||
{
|
||||
CtrlLayoutOKCancel(*this, "Link");
|
||||
nesting.AddColumn().SetDisplay(Single<DocNestDisplay>());
|
||||
nesting.NoHeader().NoGrid();
|
||||
nameing <<= THISBACK(Nameing);
|
||||
nesting.WhenEnterRow = THISBACK(Nesting);
|
||||
InitItemArray(item);
|
||||
item.WhenLeftClick = THISBACK(Item);
|
||||
label.NoHeader().NoGrid();
|
||||
label.AddColumn();
|
||||
label.WhenLeftClick = THISBACK(Label);
|
||||
}
|
||||
|
||||
bool ParseLink(const String& link, DocKey& key, String& label)
|
||||
{
|
||||
if(memcmp(link, "dpp://", 6)) return false;
|
||||
Vector<String> p = Split(~link + 6, '/', false);
|
||||
if(p.GetCount() != 3) return false;
|
||||
key.nameing = p[0];
|
||||
key.nesting = p[1];
|
||||
key.item = p[2];
|
||||
int q = key.item.Find('#');
|
||||
label = Null;
|
||||
if(q < 0) return true;
|
||||
label = key.item.Mid(q + 1);
|
||||
key.item = key.item.Mid(0, q);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1,66 +1,66 @@
|
|||
#include "Docedit.h"
|
||||
|
||||
String PackageDirectory(const String& name)
|
||||
{
|
||||
return AppendFileName("F:/uppsrc", name);
|
||||
}
|
||||
|
||||
String SourcePath(const String& package, const String& name)
|
||||
{
|
||||
return AppendFileName(PackageDirectory(package), name);
|
||||
}
|
||||
|
||||
String CommonPath(const String& filename)
|
||||
{
|
||||
return AppendFileName("f:/theide", filename);
|
||||
}
|
||||
|
||||
DocBase doc_base;
|
||||
|
||||
void DocBase::RemoveFile(const String& file)
|
||||
{
|
||||
CppBase base;
|
||||
CppBase& doc_base = *this;
|
||||
for(int i = 0; i < doc_base.GetCount(); i++) {
|
||||
String m = doc_base.GetKey(i);
|
||||
CppNamespace& mm = doc_base[i];
|
||||
for(int i = 0; i < mm.GetCount(); i++) {
|
||||
String n = mm.GetKey(i);
|
||||
CppNest& nn = mm[i];
|
||||
for(int i = 0; i < nn.GetCount(); i++) {
|
||||
CppItem& q = nn[i];
|
||||
if(q.file != file)
|
||||
base.GetAdd(m).GetAdd(n).GetAdd(nn.GetKey(i)) = q;
|
||||
}
|
||||
}
|
||||
}
|
||||
doc_base = base;
|
||||
}
|
||||
|
||||
void DocBase::ParseFile(const String& file, const String& package) throw(CParser::Error)
|
||||
{
|
||||
Parse(FileIn(file), ignore, doc_base, package, file);
|
||||
}
|
||||
|
||||
void DocBase::RefreshFile(const String& file, const String& package) throw(CParser::Error)
|
||||
{
|
||||
RemoveFile(file);
|
||||
ParseFile(file, package);
|
||||
}
|
||||
|
||||
Vector<String> DocBase::GetHeaders()
|
||||
{
|
||||
Index<String> h;
|
||||
for(int i = 0; i < doc_base.GetCount(); i++) {
|
||||
String m = doc_base.GetKey(i);
|
||||
CppNamespace& mm = doc_base[i];
|
||||
for(int i = 0; i < mm.GetCount(); i++) {
|
||||
String n = mm.GetKey(i);
|
||||
CppNest& nn = mm[i];
|
||||
for(int i = 0; i < nn.GetCount(); i++) {
|
||||
h.FindAdd(nn[i].file);
|
||||
}
|
||||
}
|
||||
}
|
||||
return h.PickKeys();
|
||||
}
|
||||
#include "Docedit.h"
|
||||
|
||||
String PackageDirectory(const String& name)
|
||||
{
|
||||
return AppendFileName("F:/uppsrc", name);
|
||||
}
|
||||
|
||||
String SourcePath(const String& package, const String& name)
|
||||
{
|
||||
return AppendFileName(PackageDirectory(package), name);
|
||||
}
|
||||
|
||||
String CommonPath(const String& filename)
|
||||
{
|
||||
return AppendFileName("f:/theide", filename);
|
||||
}
|
||||
|
||||
DocBase doc_base;
|
||||
|
||||
void DocBase::RemoveFile(const String& file)
|
||||
{
|
||||
CppBase base;
|
||||
CppBase& doc_base = *this;
|
||||
for(int i = 0; i < doc_base.GetCount(); i++) {
|
||||
String m = doc_base.GetKey(i);
|
||||
CppNamespace& mm = doc_base[i];
|
||||
for(int i = 0; i < mm.GetCount(); i++) {
|
||||
String n = mm.GetKey(i);
|
||||
CppNest& nn = mm[i];
|
||||
for(int i = 0; i < nn.GetCount(); i++) {
|
||||
CppItem& q = nn[i];
|
||||
if(q.file != file)
|
||||
base.GetAdd(m).GetAdd(n).GetAdd(nn.GetKey(i)) = q;
|
||||
}
|
||||
}
|
||||
}
|
||||
doc_base = base;
|
||||
}
|
||||
|
||||
void DocBase::ParseFile(const String& file, const String& package) throw(CParser::Error)
|
||||
{
|
||||
Parse(FileIn(file), ignore, doc_base, package, file);
|
||||
}
|
||||
|
||||
void DocBase::RefreshFile(const String& file, const String& package) throw(CParser::Error)
|
||||
{
|
||||
RemoveFile(file);
|
||||
ParseFile(file, package);
|
||||
}
|
||||
|
||||
Vector<String> DocBase::GetHeaders()
|
||||
{
|
||||
Index<String> h;
|
||||
for(int i = 0; i < doc_base.GetCount(); i++) {
|
||||
String m = doc_base.GetKey(i);
|
||||
CppNamespace& mm = doc_base[i];
|
||||
for(int i = 0; i < mm.GetCount(); i++) {
|
||||
String n = mm.GetKey(i);
|
||||
CppNest& nn = mm[i];
|
||||
for(int i = 0; i < nn.GetCount(); i++) {
|
||||
h.FindAdd(nn[i].file);
|
||||
}
|
||||
}
|
||||
}
|
||||
return h.PickKeys();
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,241 +1,241 @@
|
|||
#include <RichEdit/RichEdit.h>
|
||||
#include <docpp/docpp.h>
|
||||
|
||||
#define IMAGECLASS DppImg
|
||||
#define IMAGEFILE <Docedit/Docedit.iml>
|
||||
#include <Draw/iml_header.h>
|
||||
|
||||
// before placed to IDE...
|
||||
|
||||
String SourcePath(const String& package, const String& name);
|
||||
String PackageDirectory(const String& name);
|
||||
String CommonPath(const String& filename);
|
||||
|
||||
// ------
|
||||
|
||||
struct DocBase : public CppBase {
|
||||
Vector<String> DocBase::ignore;
|
||||
Vector<String> package;
|
||||
|
||||
void RemoveFile(const String& file);
|
||||
void ParseFile(const String& file, const String& package) throw(Parser::Error);
|
||||
void RefreshFile(const String& file, const String& package) throw(Parser::Error);
|
||||
Vector<String> GetHeaders();
|
||||
Vector<String> GetPackages();
|
||||
};
|
||||
|
||||
extern DocBase doc_base;
|
||||
|
||||
Time GetFileTime(const char *path);
|
||||
String DocFile(const String& package, const String& name);
|
||||
|
||||
struct DocKey {
|
||||
String nameing;
|
||||
String nesting;
|
||||
String item;
|
||||
dword lang;
|
||||
|
||||
bool operator==(const DocKey& b) const;
|
||||
dword GetHashValue(const DocKey& k);
|
||||
operator bool() const { return item.GetLength(); }
|
||||
void Clear() { item.Clear(); nesting.Clear(); nameing.Clear(); lang = 0; }
|
||||
|
||||
DocKey() {}
|
||||
DocKey(const String& m, const String& n, const String& s, dword l)
|
||||
: nameing(m), nesting(n), item(s), lang(l) {}
|
||||
};
|
||||
|
||||
dword GetHashValue(const DocKey& k);
|
||||
|
||||
struct DocQuery {
|
||||
String name, text, package, header;
|
||||
bool undocumented, normal, external, obsolete, ignored;
|
||||
dword lang;
|
||||
};
|
||||
|
||||
struct DocItem {
|
||||
CppItem *cppitem;
|
||||
String item;
|
||||
int status;
|
||||
String package;
|
||||
};
|
||||
|
||||
typedef VectorMap<String, VectorMap<String, ArrayMap<String, DocItem> > > DocSet;
|
||||
|
||||
class DocDir {
|
||||
struct Entry {
|
||||
int type;
|
||||
String text;
|
||||
};
|
||||
VectorMap<String, ArrayMap<DocKey, Entry> > dir;
|
||||
|
||||
int ReadDocHeader(const char *filename, DocKey& key);
|
||||
String GetAddFileName(const String& package, const DocKey& key, int type);
|
||||
bool GetFileName(const DocKey& key, String& fn, String& package);
|
||||
|
||||
bool LoadLinks(const String& package);
|
||||
void SaveLinks(const String& package) const;
|
||||
|
||||
void RemoveOtherKey(const DocKey& k, int t1, int t2 = UNDOCUMENTED);
|
||||
Entry *Find(const DocKey& key, String& package) const;
|
||||
Entry *Find(const DocKey& key) const;
|
||||
|
||||
public:
|
||||
enum {
|
||||
NORMAL, EXTERNAL, LINK, IGNORED,
|
||||
UNDOCUMENTED = -1, OBSOLETE = -2, OBSOLETELINK = -3
|
||||
};
|
||||
|
||||
bool LoadDir(const String& package);
|
||||
void SaveDir(const String& package) const;
|
||||
|
||||
void RebuildDir(const String& package);
|
||||
|
||||
void Refresh(const String& package);
|
||||
|
||||
int GetStatus(const DocKey& key);
|
||||
int GetStatus(const String& nameing, const String& nesting, const String& item, int lang);
|
||||
|
||||
String GetFilePath(const DocKey& key) const;
|
||||
String GetPackage(const DocKey& key) const;
|
||||
String GetText(const DocKey& key) const;
|
||||
String GetLink(const DocKey& key) const;
|
||||
|
||||
void Remove(const DocKey& key);
|
||||
void SaveText(const String& package, const DocKey& key, const String& text, bool external);
|
||||
void SaveLink(const String& package, const DocKey& key, const String& text);
|
||||
void Ignore(const String& package, const DocKey& key);
|
||||
|
||||
DocSet Select(const DocQuery& query);
|
||||
};
|
||||
|
||||
bool ParseLink(const String& link, DocKey& key, String& label);
|
||||
|
||||
extern DocDir doc_dir;
|
||||
|
||||
#define LAYOUTFILE "DocEdit.lay"
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
struct DocItemDisplay : public Display
|
||||
{
|
||||
virtual void Paint(Draw& w, const Rect& r, const Value& q,
|
||||
Color _ink, Color paper, dword style) const;
|
||||
};
|
||||
|
||||
struct DocNestDisplay : public Display
|
||||
{
|
||||
virtual void Paint(Draw& w, const Rect& r, const Value& q,
|
||||
Color _ink, Color paper, dword style) const;
|
||||
};
|
||||
|
||||
void InitItemArray(ArrayCtrl& item);
|
||||
void LoadItems(const DocSet& set, const String& nameing, const String& nesting, ArrayCtrl& item);
|
||||
int PosOf(const String& s, const String& subs);
|
||||
bool IsCppKeyword(const String& id);
|
||||
int CompareNests(const Value& v1, const Value& v2);
|
||||
int CompareItems(const Vector<Value>& row1, const Vector<Value>& row2);
|
||||
|
||||
struct DocLinkDlg : public WithLinkLayout<TopWindow> {
|
||||
const DocSet *set;
|
||||
bool sort;
|
||||
dword lang;
|
||||
|
||||
void Nameing();
|
||||
void Nesting();
|
||||
void Item();
|
||||
bool Perform(const DocSet& set, bool sort, String& link, int lang,
|
||||
const String& nameing = Null, const String& nesting = Null);
|
||||
void Label();
|
||||
String Get();
|
||||
|
||||
typedef DocLinkDlg CLASSNAME;
|
||||
|
||||
DocLinkDlg();
|
||||
};
|
||||
|
||||
class DocBrowser : public TopWindow {
|
||||
public:
|
||||
virtual bool Key(dword key, int count);
|
||||
virtual void Close();
|
||||
|
||||
private:
|
||||
struct FileInfo {
|
||||
Time time;
|
||||
RichEdit::UndoInfo info;
|
||||
};
|
||||
|
||||
ArrayMap<String, FileInfo> editstate;
|
||||
ArrayMap<DocKey, RichEdit::PosInfo> posinfo;
|
||||
|
||||
DropList nameing;
|
||||
StaticRect larea, rarea;
|
||||
ArrayCtrl nesting;
|
||||
ArrayCtrl item;
|
||||
Splitter ni_split;
|
||||
Splitter vi_split;
|
||||
|
||||
FrameTop<StaticRect> trect;
|
||||
Label title;
|
||||
DataPusher package;
|
||||
RichTextView view;
|
||||
RichEdit edit;
|
||||
|
||||
DropList lang;
|
||||
|
||||
MenuBar menu;
|
||||
ToolBar tool;
|
||||
|
||||
ToolBar editbar;
|
||||
|
||||
WithQueryLayout<TopWindow> query;
|
||||
DocSet set;
|
||||
DocKey current, target;
|
||||
|
||||
DocLinkDlg linkdlg;
|
||||
|
||||
bool sort;
|
||||
|
||||
WithExternalLayout<TopWindow> external;
|
||||
|
||||
void Nameing();
|
||||
void Nesting();
|
||||
void Item();
|
||||
void EnterItem();
|
||||
|
||||
void ReloadItems();
|
||||
|
||||
DocKey Key();
|
||||
void Flush();
|
||||
int GetCurrentStatus();
|
||||
void SetCurrentStatus(int status);
|
||||
String GetItemPackage() { return item.Get(7); }
|
||||
|
||||
void EditLink(String& s);
|
||||
|
||||
void Edit();
|
||||
void View();
|
||||
void Sort();
|
||||
void Select();
|
||||
void Link();
|
||||
void Ignore();
|
||||
void Delete();
|
||||
void New();
|
||||
|
||||
void FollowLink(const String& s);
|
||||
|
||||
void SetMainBar();
|
||||
|
||||
void MainMenu(Bar& bar);
|
||||
void ItemMenu(Bar& bar);
|
||||
void BrowseMenu(Bar& bar);
|
||||
|
||||
void EditBar(Bar& bar);
|
||||
void SetEditBar();
|
||||
|
||||
public:
|
||||
typedef DocBrowser CLASSNAME;
|
||||
|
||||
void Query();
|
||||
|
||||
DocBrowser();
|
||||
};
|
||||
#include <RichEdit/RichEdit.h>
|
||||
#include <docpp/docpp.h>
|
||||
|
||||
#define IMAGECLASS DppImg
|
||||
#define IMAGEFILE <Docedit/Docedit.iml>
|
||||
#include <Draw/iml_header.h>
|
||||
|
||||
// before placed to IDE...
|
||||
|
||||
String SourcePath(const String& package, const String& name);
|
||||
String PackageDirectory(const String& name);
|
||||
String CommonPath(const String& filename);
|
||||
|
||||
// ------
|
||||
|
||||
struct DocBase : public CppBase {
|
||||
Vector<String> DocBase::ignore;
|
||||
Vector<String> package;
|
||||
|
||||
void RemoveFile(const String& file);
|
||||
void ParseFile(const String& file, const String& package) throw(Parser::Error);
|
||||
void RefreshFile(const String& file, const String& package) throw(Parser::Error);
|
||||
Vector<String> GetHeaders();
|
||||
Vector<String> GetPackages();
|
||||
};
|
||||
|
||||
extern DocBase doc_base;
|
||||
|
||||
Time GetFileTime(const char *path);
|
||||
String DocFile(const String& package, const String& name);
|
||||
|
||||
struct DocKey {
|
||||
String nameing;
|
||||
String nesting;
|
||||
String item;
|
||||
dword lang;
|
||||
|
||||
bool operator==(const DocKey& b) const;
|
||||
dword GetHashValue(const DocKey& k);
|
||||
operator bool() const { return item.GetLength(); }
|
||||
void Clear() { item.Clear(); nesting.Clear(); nameing.Clear(); lang = 0; }
|
||||
|
||||
DocKey() {}
|
||||
DocKey(const String& m, const String& n, const String& s, dword l)
|
||||
: nameing(m), nesting(n), item(s), lang(l) {}
|
||||
};
|
||||
|
||||
dword GetHashValue(const DocKey& k);
|
||||
|
||||
struct DocQuery {
|
||||
String name, text, package, header;
|
||||
bool undocumented, normal, external, obsolete, ignored;
|
||||
dword lang;
|
||||
};
|
||||
|
||||
struct DocItem {
|
||||
CppItem *cppitem;
|
||||
String item;
|
||||
int status;
|
||||
String package;
|
||||
};
|
||||
|
||||
typedef VectorMap<String, VectorMap<String, ArrayMap<String, DocItem> > > DocSet;
|
||||
|
||||
class DocDir {
|
||||
struct Entry {
|
||||
int type;
|
||||
String text;
|
||||
};
|
||||
VectorMap<String, ArrayMap<DocKey, Entry> > dir;
|
||||
|
||||
int ReadDocHeader(const char *filename, DocKey& key);
|
||||
String GetAddFileName(const String& package, const DocKey& key, int type);
|
||||
bool GetFileName(const DocKey& key, String& fn, String& package);
|
||||
|
||||
bool LoadLinks(const String& package);
|
||||
void SaveLinks(const String& package) const;
|
||||
|
||||
void RemoveOtherKey(const DocKey& k, int t1, int t2 = UNDOCUMENTED);
|
||||
Entry *Find(const DocKey& key, String& package) const;
|
||||
Entry *Find(const DocKey& key) const;
|
||||
|
||||
public:
|
||||
enum {
|
||||
NORMAL, EXTERNAL, LINK, IGNORED,
|
||||
UNDOCUMENTED = -1, OBSOLETE = -2, OBSOLETELINK = -3
|
||||
};
|
||||
|
||||
bool LoadDir(const String& package);
|
||||
void SaveDir(const String& package) const;
|
||||
|
||||
void RebuildDir(const String& package);
|
||||
|
||||
void Refresh(const String& package);
|
||||
|
||||
int GetStatus(const DocKey& key);
|
||||
int GetStatus(const String& nameing, const String& nesting, const String& item, int lang);
|
||||
|
||||
String GetFilePath(const DocKey& key) const;
|
||||
String GetPackage(const DocKey& key) const;
|
||||
String GetText(const DocKey& key) const;
|
||||
String GetLink(const DocKey& key) const;
|
||||
|
||||
void Remove(const DocKey& key);
|
||||
void SaveText(const String& package, const DocKey& key, const String& text, bool external);
|
||||
void SaveLink(const String& package, const DocKey& key, const String& text);
|
||||
void Ignore(const String& package, const DocKey& key);
|
||||
|
||||
DocSet Select(const DocQuery& query);
|
||||
};
|
||||
|
||||
bool ParseLink(const String& link, DocKey& key, String& label);
|
||||
|
||||
extern DocDir doc_dir;
|
||||
|
||||
#define LAYOUTFILE "DocEdit.lay"
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
struct DocItemDisplay : public Display
|
||||
{
|
||||
virtual void Paint(Draw& w, const Rect& r, const Value& q,
|
||||
Color _ink, Color paper, dword style) const;
|
||||
};
|
||||
|
||||
struct DocNestDisplay : public Display
|
||||
{
|
||||
virtual void Paint(Draw& w, const Rect& r, const Value& q,
|
||||
Color _ink, Color paper, dword style) const;
|
||||
};
|
||||
|
||||
void InitItemArray(ArrayCtrl& item);
|
||||
void LoadItems(const DocSet& set, const String& nameing, const String& nesting, ArrayCtrl& item);
|
||||
int PosOf(const String& s, const String& subs);
|
||||
bool IsCppKeyword(const String& id);
|
||||
int CompareNests(const Value& v1, const Value& v2);
|
||||
int CompareItems(const Vector<Value>& row1, const Vector<Value>& row2);
|
||||
|
||||
struct DocLinkDlg : public WithLinkLayout<TopWindow> {
|
||||
const DocSet *set;
|
||||
bool sort;
|
||||
dword lang;
|
||||
|
||||
void Nameing();
|
||||
void Nesting();
|
||||
void Item();
|
||||
bool Perform(const DocSet& set, bool sort, String& link, int lang,
|
||||
const String& nameing = Null, const String& nesting = Null);
|
||||
void Label();
|
||||
String Get();
|
||||
|
||||
typedef DocLinkDlg CLASSNAME;
|
||||
|
||||
DocLinkDlg();
|
||||
};
|
||||
|
||||
class DocBrowser : public TopWindow {
|
||||
public:
|
||||
virtual bool Key(dword key, int count);
|
||||
virtual void Close();
|
||||
|
||||
private:
|
||||
struct FileInfo {
|
||||
Time time;
|
||||
RichEdit::UndoInfo info;
|
||||
};
|
||||
|
||||
ArrayMap<String, FileInfo> editstate;
|
||||
ArrayMap<DocKey, RichEdit::PosInfo> posinfo;
|
||||
|
||||
DropList nameing;
|
||||
StaticRect larea, rarea;
|
||||
ArrayCtrl nesting;
|
||||
ArrayCtrl item;
|
||||
Splitter ni_split;
|
||||
Splitter vi_split;
|
||||
|
||||
FrameTop<StaticRect> trect;
|
||||
Label title;
|
||||
DataPusher package;
|
||||
RichTextView view;
|
||||
RichEdit edit;
|
||||
|
||||
DropList lang;
|
||||
|
||||
MenuBar menu;
|
||||
ToolBar tool;
|
||||
|
||||
ToolBar editbar;
|
||||
|
||||
WithQueryLayout<TopWindow> query;
|
||||
DocSet set;
|
||||
DocKey current, target;
|
||||
|
||||
DocLinkDlg linkdlg;
|
||||
|
||||
bool sort;
|
||||
|
||||
WithExternalLayout<TopWindow> external;
|
||||
|
||||
void Nameing();
|
||||
void Nesting();
|
||||
void Item();
|
||||
void EnterItem();
|
||||
|
||||
void ReloadItems();
|
||||
|
||||
DocKey Key();
|
||||
void Flush();
|
||||
int GetCurrentStatus();
|
||||
void SetCurrentStatus(int status);
|
||||
String GetItemPackage() { return item.Get(7); }
|
||||
|
||||
void EditLink(String& s);
|
||||
|
||||
void Edit();
|
||||
void View();
|
||||
void Sort();
|
||||
void Select();
|
||||
void Link();
|
||||
void Ignore();
|
||||
void Delete();
|
||||
void New();
|
||||
|
||||
void FollowLink(const String& s);
|
||||
|
||||
void SetMainBar();
|
||||
|
||||
void MainMenu(Bar& bar);
|
||||
void ItemMenu(Bar& bar);
|
||||
void BrowseMenu(Bar& bar);
|
||||
|
||||
void EditBar(Bar& bar);
|
||||
void SetEditBar();
|
||||
|
||||
public:
|
||||
typedef DocBrowser CLASSNAME;
|
||||
|
||||
void Query();
|
||||
|
||||
DocBrowser();
|
||||
};
|
||||
|
|
@ -1,53 +1,53 @@
|
|||
PREMULTIPLIED
|
||||
IMAGE_ID(Variable)
|
||||
IMAGE_ID(SmallIcon)
|
||||
IMAGE_ID(InstanceVariable)
|
||||
IMAGE_ID(ClassVariable)
|
||||
IMAGE_ID(Function)
|
||||
IMAGE_ID(InstanceFunction)
|
||||
IMAGE_ID(InlineFriend)
|
||||
IMAGE_ID(ClassFunction)
|
||||
IMAGE_ID(FunctionTemplate)
|
||||
IMAGE_ID(InstanceFunctionTemplate)
|
||||
IMAGE_ID(ClassFunctionTemplate)
|
||||
IMAGE_ID(Enum)
|
||||
IMAGE_ID(Protected)
|
||||
IMAGE_ID(Struct)
|
||||
IMAGE_ID(StructTemplate)
|
||||
IMAGE_ID(Other)
|
||||
IMAGE_ID(Typedef)
|
||||
IMAGE_ID(Constructor)
|
||||
IMAGE_ID(Destructor)
|
||||
IMAGE_ID(Macro)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
IMAGE_DATA(120,156,237,152,11,146,131,32,12,134,115,132,30,185,71,243,102,217,105,187,190,32,228,137,21,107,226,48,221,110,249,18)
|
||||
IMAGE_DATA(192,248,19,129,7,60,0,0,17,86,67,69,147,236,211,175,117,89,252,112,215,119,124,212,227,246,142,225,181,208,136,30)
|
||||
IMAGE_DATA(31,103,242,209,249,71,214,223,203,70,242,175,71,254,95,211,8,49,104,153,117,17,202,254,210,119,142,71,152,147,88,199)
|
||||
IMAGE_DATA(151,201,82,242,136,80,249,235,197,215,137,135,184,182,127,118,110,132,143,8,223,78,126,157,143,40,127,246,252,123,220,191)
|
||||
IMAGE_DATA(30,60,144,243,226,191,247,230,237,118,64,101,64,239,32,58,101,174,110,60,123,145,137,84,240,54,31,60,175,219,25,169)
|
||||
IMAGE_DATA(249,45,125,179,50,112,198,182,177,89,25,120,44,95,19,12,201,236,123,24,86,31,223,121,152,35,98,132,65,49,228,121)
|
||||
IMAGE_DATA(121,253,107,222,126,239,34,155,81,185,126,183,23,3,141,69,22,36,178,160,33,22,245,15,111,119,214,201,111,31,13,107)
|
||||
IMAGE_DATA(114,238,88,170,113,108,171,5,230,178,140,233,4,22,224,188,188,155,249,241,173,33,6,26,245,108,25,181,59,80,190,61)
|
||||
IMAGE_DATA(188,114,23,37,121,75,50,149,243,79,49,72,49,184,173,24,72,118,187,202,96,154,166,16,235,21,131,153,221,196,87,139)
|
||||
IMAGE_DATA(193,150,165,62,57,182,213,12,115,169,229,199,42,200,126,182,246,225,207,157,8,187,245,49,190,165,24,124,135,205,202,96)
|
||||
IMAGE_DATA(29,211,134,181,60,104,53,203,87,160,21,95,244,177,240,212,239,86,158,243,59,134,88,12,46,6,229,98,181,18,73,149)
|
||||
IMAGE_DATA(76,198,221,125,23,171,96,45,177,223,172,179,178,88,88,111,101,192,53,142,109,181,192,92,150,49,41,88,106,126,220,61)
|
||||
IMAGE_DATA(80,197,86,246,37,99,7,226,206,204,248,118,128,24,136,73,202,254,70,157,70,235,197,128,61,111,80,36,98,243,188,193)
|
||||
IMAGE_DATA(32,6,100,18,167,24,172,99,82,176,41,6,103,88,86,6,170,113,102,101,160,23,3,110,92,50,75,111,6,20,75,197)
|
||||
IMAGE_DATA(57,236,240,89,136,187,247,65,141,235,10,230,20,131,163,141,75,124,233,97,144,94,149,171,86,248,40,255,159,241,239,21)
|
||||
IMAGE_DATA(31,12,113,61,2,63,174,213,98,240,124,125,193,167,123,146,31,254,253,151,203,71,198,207,248,87,142,127,97,99,42,131)
|
||||
IMAGE_DATA(136,42,234,133,153,82,101,155,176,215,37,89,242,119,230,163,249,183,250,184,83,85,240,178,163,196,64,122,95,101,222,61)
|
||||
IMAGE_DATA(165,190,187,70,248,96,251,42,198,144,241,175,29,159,245,209,227,220,164,104,191,99,131,158,25,80,102,175,78,54,173,101)
|
||||
IMAGE_DATA(28,175,49,137,111,37,97,198,63,63,62,195,138,241,5,22,224,130,34,242,7,126,154,4,137,0,0,0,0,0,0,0)
|
||||
IMAGE_END_DATA(608, 16)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
IMAGE_DATA(120,156,237,150,137,13,195,48,8,69,25,33,35,103,52,111,70,213,86,74,28,204,241,125,201,74,90,34,164,28,188,143)
|
||||
IMAGE_DATA(141,45,28,218,104,35,34,102,26,111,108,56,206,107,23,174,161,243,184,134,205,99,26,62,31,107,196,188,175,49,55,127)
|
||||
IMAGE_DATA(207,252,123,234,95,179,254,125,251,239,247,172,178,25,212,22,51,143,103,46,23,211,221,140,34,62,122,142,52,172,251,112)
|
||||
IMAGE_DATA(14,239,88,233,0,123,201,101,240,150,142,202,88,110,105,116,228,31,49,255,131,165,182,250,15,89,127,71,79,126,71,236)
|
||||
IMAGE_DATA(217,205,100,226,159,193,104,107,237,238,95,102,223,79,199,117,174,156,116,164,33,180,243,62,27,107,172,230,87,215,239,212)
|
||||
IMAGE_DATA(104,95,255,82,231,201,13,193,105,6,218,233,81,117,162,164,148,62,158,243,202,59,51,175,136,53,223,89,121,17,159,193)
|
||||
IMAGE_DATA(119,142,255,95,191,181,245,43,198,145,243,64,222,219,218,11,170,178,33,106,0,0,0,0,0,0,0,0,0,0,0,0)
|
||||
IMAGE_END_DATA(224, 4)
|
||||
PREMULTIPLIED
|
||||
IMAGE_ID(Variable)
|
||||
IMAGE_ID(SmallIcon)
|
||||
IMAGE_ID(InstanceVariable)
|
||||
IMAGE_ID(ClassVariable)
|
||||
IMAGE_ID(Function)
|
||||
IMAGE_ID(InstanceFunction)
|
||||
IMAGE_ID(InlineFriend)
|
||||
IMAGE_ID(ClassFunction)
|
||||
IMAGE_ID(FunctionTemplate)
|
||||
IMAGE_ID(InstanceFunctionTemplate)
|
||||
IMAGE_ID(ClassFunctionTemplate)
|
||||
IMAGE_ID(Enum)
|
||||
IMAGE_ID(Protected)
|
||||
IMAGE_ID(Struct)
|
||||
IMAGE_ID(StructTemplate)
|
||||
IMAGE_ID(Other)
|
||||
IMAGE_ID(Typedef)
|
||||
IMAGE_ID(Constructor)
|
||||
IMAGE_ID(Destructor)
|
||||
IMAGE_ID(Macro)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
IMAGE_DATA(120,156,237,152,11,146,131,32,12,134,115,132,30,185,71,243,102,217,105,187,190,32,228,137,21,107,226,48,221,110,249,18)
|
||||
IMAGE_DATA(192,248,19,129,7,60,0,0,17,86,67,69,147,236,211,175,117,89,252,112,215,119,124,212,227,246,142,225,181,208,136,30)
|
||||
IMAGE_DATA(31,103,242,209,249,71,214,223,203,70,242,175,71,254,95,211,8,49,104,153,117,17,202,254,210,119,142,71,152,147,88,199)
|
||||
IMAGE_DATA(151,201,82,242,136,80,249,235,197,215,137,135,184,182,127,118,110,132,143,8,223,78,126,157,143,40,127,246,252,123,220,191)
|
||||
IMAGE_DATA(30,60,144,243,226,191,247,230,237,118,64,101,64,239,32,58,101,174,110,60,123,145,137,84,240,54,31,60,175,219,25,169)
|
||||
IMAGE_DATA(249,45,125,179,50,112,198,182,177,89,25,120,44,95,19,12,201,236,123,24,86,31,223,121,152,35,98,132,65,49,228,121)
|
||||
IMAGE_DATA(121,253,107,222,126,239,34,155,81,185,126,183,23,3,141,69,22,36,178,160,33,22,245,15,111,119,214,201,111,31,13,107)
|
||||
IMAGE_DATA(114,238,88,170,113,108,171,5,230,178,140,233,4,22,224,188,188,155,249,241,173,33,6,26,245,108,25,181,59,80,190,61)
|
||||
IMAGE_DATA(188,114,23,37,121,75,50,149,243,79,49,72,49,184,173,24,72,118,187,202,96,154,166,16,235,21,131,153,221,196,87,139)
|
||||
IMAGE_DATA(193,150,165,62,57,182,213,12,115,169,229,199,42,200,126,182,246,225,207,157,8,187,245,49,190,165,24,124,135,205,202,96)
|
||||
IMAGE_DATA(29,211,134,181,60,104,53,203,87,160,21,95,244,177,240,212,239,86,158,243,59,134,88,12,46,6,229,98,181,18,73,149)
|
||||
IMAGE_DATA(76,198,221,125,23,171,96,45,177,223,172,179,178,88,88,111,101,192,53,142,109,181,192,92,150,49,41,88,106,126,220,61)
|
||||
IMAGE_DATA(80,197,86,246,37,99,7,226,206,204,248,118,128,24,136,73,202,254,70,157,70,235,197,128,61,111,80,36,98,243,188,193)
|
||||
IMAGE_DATA(32,6,100,18,167,24,172,99,82,176,41,6,103,88,86,6,170,113,102,101,160,23,3,110,92,50,75,111,6,20,75,197)
|
||||
IMAGE_DATA(57,236,240,89,136,187,247,65,141,235,10,230,20,131,163,141,75,124,233,97,144,94,149,171,86,248,40,255,159,241,239,21)
|
||||
IMAGE_DATA(31,12,113,61,2,63,174,213,98,240,124,125,193,167,123,146,31,254,253,151,203,71,198,207,248,87,142,127,97,99,42,131)
|
||||
IMAGE_DATA(136,42,234,133,153,82,101,155,176,215,37,89,242,119,230,163,249,183,250,184,83,85,240,178,163,196,64,122,95,101,222,61)
|
||||
IMAGE_DATA(165,190,187,70,248,96,251,42,198,144,241,175,29,159,245,209,227,220,164,104,191,99,131,158,25,80,102,175,78,54,173,101)
|
||||
IMAGE_DATA(28,175,49,137,111,37,97,198,63,63,62,195,138,241,5,22,224,130,34,242,7,126,154,4,137,0,0,0,0,0,0,0)
|
||||
IMAGE_END_DATA(608, 16)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
IMAGE_DATA(120,156,237,150,137,13,195,48,8,69,25,33,35,103,52,111,70,213,86,74,28,204,241,125,201,74,90,34,164,28,188,143)
|
||||
IMAGE_DATA(141,45,28,218,104,35,34,102,26,111,108,56,206,107,23,174,161,243,184,134,205,99,26,62,31,107,196,188,175,49,55,127)
|
||||
IMAGE_DATA(207,252,123,234,95,179,254,125,251,239,247,172,178,25,212,22,51,143,103,46,23,211,221,140,34,62,122,142,52,172,251,112)
|
||||
IMAGE_DATA(14,239,88,233,0,123,201,101,240,150,142,202,88,110,105,116,228,31,49,255,131,165,182,250,15,89,127,71,79,126,71,236)
|
||||
IMAGE_DATA(217,205,100,226,159,193,104,107,237,238,95,102,223,79,199,117,174,156,116,164,33,180,243,62,27,107,172,230,87,215,239,212)
|
||||
IMAGE_DATA(104,95,255,82,231,201,13,193,105,6,218,233,81,117,162,164,148,62,158,243,202,59,51,175,136,53,223,89,121,17,159,193)
|
||||
IMAGE_DATA(119,142,255,95,191,181,245,43,198,145,243,64,222,219,218,11,170,178,33,106,0,0,0,0,0,0,0,0,0,0,0,0)
|
||||
IMAGE_END_DATA(224, 4)
|
||||
|
|
@ -1,48 +1,48 @@
|
|||
#ifdef LAYOUTFILE
|
||||
|
||||
LAYOUT(QueryLayout, 372, 120)
|
||||
ITEM(LabelBox, dv___0, LeftPosZ(8, 132).TopPosZ(4, 108).SetLabel("Status"))
|
||||
ITEM(Switch, status, LeftPosZ(16, 117).TopPosZ(20, 85).SetLabel("Any except ignored\nUndocumented\nObsolete\nIgnored\nAny"))
|
||||
ITEM(Label, dv___2, LeftPosZ(152, 48).TopPosZ(12, 13).SetLabel("Name"))
|
||||
ITEM(WithDropChoice<EditString>, name, LeftPosZ(204, 160).TopPosZ(8, 19))
|
||||
ITEM(Label, dv___4, LeftPosZ(152, 48).TopPosZ(36, 13).SetLabel("Contains"))
|
||||
ITEM(WithDropChoice<EditString>, text, LeftPosZ(204, 160).TopPosZ(32, 19))
|
||||
ITEM(Label, dv___6, LeftPosZ(152, 44).TopPosZ(59, 13).SetLabel("Header"))
|
||||
ITEM(DropList, header, LeftPosZ(204, 160).TopPosZ(56, 19))
|
||||
ITEM(Button, ok, LeftPosZ(232, 64).TopPosZ(88, 24).SetLabel("OK"))
|
||||
ITEM(Button, cancel, LeftPosZ(300, 64).TopPosZ(88, 24).SetLabel("Cancel"))
|
||||
ITEM(Button, clear, LeftPosZ(152, 64).TopPosZ(88, 24).SetLabel("Clear"))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(LinkLayout, 632, 500)
|
||||
ITEM(Label, dv___0, LeftPosZ(8, 28).TopPosZ(12, 13).SetLabel("Link"))
|
||||
ITEM(WithDropChoice<EditString>, link, LeftPosZ(44, 580).TopPosZ(8, 19))
|
||||
ITEM(DropList, nameing, LeftPosZ(8, 224).TopPosZ(36, 19))
|
||||
ITEM(ArrayCtrl, nesting, LeftPosZ(8, 224).TopPosZ(60, 400))
|
||||
ITEM(ArrayCtrl, item, LeftPosZ(240, 384).TopPosZ(36, 300))
|
||||
ITEM(ArrayCtrl, label, LeftPosZ(240, 384).TopPosZ(340, 120))
|
||||
ITEM(Button, ok, LeftPosZ(492, 64).TopPosZ(468, 24).SetLabel("OK"))
|
||||
ITEM(Button, cancel, LeftPosZ(560, 64).TopPosZ(468, 24).SetLabel("Cancel"))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(ExternalLayout, 400, 108)
|
||||
ITEM(Label, dv___0, LeftPosZ(4, 68).TopPosZ(8, 13).SetLabel("Namespace"))
|
||||
ITEM(WithDropChoice<EditString>, nameing, LeftPosZ(80, 76).TopPosZ(4, 19))
|
||||
ITEM(Label, dv___2, LeftPosZ(176, 43).TopPosZ(8, 13).SetLabel("Nesting"))
|
||||
ITEM(WithDropChoice<EditString>, nesting, LeftPosZ(224, 168).TopPosZ(4, 19))
|
||||
ITEM(Label, dv___4, LeftPosZ(4, 28).TopPosZ(31, 13).SetLabel("Item"))
|
||||
ITEM(EditString, item, LeftPosZ(80, 312).TopPosZ(28, 19))
|
||||
ITEM(Label, dv___6, LeftPosZ(4, 72).TopPosZ(56, 13).SetLabel("Host package"))
|
||||
ITEM(DropList, package, LeftPosZ(80, 100).TopPosZ(52, 19))
|
||||
ITEM(Button, ok, LeftPosZ(260, 64).TopPosZ(76, 24).SetLabel("OK"))
|
||||
ITEM(Button, cancel, LeftPosZ(328, 64).TopPosZ(76, 24).SetLabel("Cancel"))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(TemplateLayout, 672, 568)
|
||||
ITEM(Button, ok, LeftPosZ(532, 64).TopPosZ(536, 24).SetLabel("OK"))
|
||||
ITEM(Button, cancel, LeftPosZ(600, 64).TopPosZ(536, 24).SetLabel("Cancel"))
|
||||
ITEM(DocEdit, code, LeftPosZ(164, 500).TopPosZ(8, 160))
|
||||
ITEM(RichTextView, view, LeftPosZ(164, 500).TopPosZ(172, 352))
|
||||
END_LAYOUT
|
||||
|
||||
#endif
|
||||
#ifdef LAYOUTFILE
|
||||
|
||||
LAYOUT(QueryLayout, 372, 120)
|
||||
ITEM(LabelBox, dv___0, LeftPosZ(8, 132).TopPosZ(4, 108).SetLabel("Status"))
|
||||
ITEM(Switch, status, LeftPosZ(16, 117).TopPosZ(20, 85).SetLabel("Any except ignored\nUndocumented\nObsolete\nIgnored\nAny"))
|
||||
ITEM(Label, dv___2, LeftPosZ(152, 48).TopPosZ(12, 13).SetLabel("Name"))
|
||||
ITEM(WithDropChoice<EditString>, name, LeftPosZ(204, 160).TopPosZ(8, 19))
|
||||
ITEM(Label, dv___4, LeftPosZ(152, 48).TopPosZ(36, 13).SetLabel("Contains"))
|
||||
ITEM(WithDropChoice<EditString>, text, LeftPosZ(204, 160).TopPosZ(32, 19))
|
||||
ITEM(Label, dv___6, LeftPosZ(152, 44).TopPosZ(59, 13).SetLabel("Header"))
|
||||
ITEM(DropList, header, LeftPosZ(204, 160).TopPosZ(56, 19))
|
||||
ITEM(Button, ok, LeftPosZ(232, 64).TopPosZ(88, 24).SetLabel("OK"))
|
||||
ITEM(Button, cancel, LeftPosZ(300, 64).TopPosZ(88, 24).SetLabel("Cancel"))
|
||||
ITEM(Button, clear, LeftPosZ(152, 64).TopPosZ(88, 24).SetLabel("Clear"))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(LinkLayout, 632, 500)
|
||||
ITEM(Label, dv___0, LeftPosZ(8, 28).TopPosZ(12, 13).SetLabel("Link"))
|
||||
ITEM(WithDropChoice<EditString>, link, LeftPosZ(44, 580).TopPosZ(8, 19))
|
||||
ITEM(DropList, nameing, LeftPosZ(8, 224).TopPosZ(36, 19))
|
||||
ITEM(ArrayCtrl, nesting, LeftPosZ(8, 224).TopPosZ(60, 400))
|
||||
ITEM(ArrayCtrl, item, LeftPosZ(240, 384).TopPosZ(36, 300))
|
||||
ITEM(ArrayCtrl, label, LeftPosZ(240, 384).TopPosZ(340, 120))
|
||||
ITEM(Button, ok, LeftPosZ(492, 64).TopPosZ(468, 24).SetLabel("OK"))
|
||||
ITEM(Button, cancel, LeftPosZ(560, 64).TopPosZ(468, 24).SetLabel("Cancel"))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(ExternalLayout, 400, 108)
|
||||
ITEM(Label, dv___0, LeftPosZ(4, 68).TopPosZ(8, 13).SetLabel("Namespace"))
|
||||
ITEM(WithDropChoice<EditString>, nameing, LeftPosZ(80, 76).TopPosZ(4, 19))
|
||||
ITEM(Label, dv___2, LeftPosZ(176, 43).TopPosZ(8, 13).SetLabel("Nesting"))
|
||||
ITEM(WithDropChoice<EditString>, nesting, LeftPosZ(224, 168).TopPosZ(4, 19))
|
||||
ITEM(Label, dv___4, LeftPosZ(4, 28).TopPosZ(31, 13).SetLabel("Item"))
|
||||
ITEM(EditString, item, LeftPosZ(80, 312).TopPosZ(28, 19))
|
||||
ITEM(Label, dv___6, LeftPosZ(4, 72).TopPosZ(56, 13).SetLabel("Host package"))
|
||||
ITEM(DropList, package, LeftPosZ(80, 100).TopPosZ(52, 19))
|
||||
ITEM(Button, ok, LeftPosZ(260, 64).TopPosZ(76, 24).SetLabel("OK"))
|
||||
ITEM(Button, cancel, LeftPosZ(328, 64).TopPosZ(76, 24).SetLabel("Cancel"))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(TemplateLayout, 672, 568)
|
||||
ITEM(Button, ok, LeftPosZ(532, 64).TopPosZ(536, 24).SetLabel("OK"))
|
||||
ITEM(Button, cancel, LeftPosZ(600, 64).TopPosZ(536, 24).SetLabel("Cancel"))
|
||||
ITEM(DocEdit, code, LeftPosZ(164, 500).TopPosZ(8, 160))
|
||||
ITEM(RichTextView, view, LeftPosZ(164, 500).TopPosZ(172, 352))
|
||||
END_LAYOUT
|
||||
|
||||
#endif
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
uses
|
||||
docpp,
|
||||
RichEdit;
|
||||
|
||||
file
|
||||
Docedit.h,
|
||||
Docbase.cpp,
|
||||
Docdir.cpp,
|
||||
DocItem.cpp,
|
||||
DocLink.cpp,
|
||||
Docedit.cpp,
|
||||
Docedit.iml,
|
||||
Info readonly separator,
|
||||
Copying;
|
||||
|
||||
uses
|
||||
docpp,
|
||||
RichEdit;
|
||||
|
||||
file
|
||||
Docedit.h,
|
||||
Docbase.cpp,
|
||||
Docdir.cpp,
|
||||
DocItem.cpp,
|
||||
DocLink.cpp,
|
||||
Docedit.cpp,
|
||||
Docedit.iml,
|
||||
Info readonly separator,
|
||||
Copying;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 1998, 2019, The U++ Project
|
||||
Copyright (c) 1998, 2020, The U++ Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 1998, 2019, The U++ Project
|
||||
Copyright (c) 1998, 2020, The U++ Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 1998, 2019, The U++ Project
|
||||
Copyright (c) 1998, 2020, The U++ Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 1998, 2019, The U++ Project
|
||||
Copyright (c) 1998, 2020, The U++ Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 1998, 2019, The U++ Project
|
||||
Copyright (c) 1998, 2020, The U++ Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 1998, 2019, The U++ Project
|
||||
Copyright (c) 1998, 2020, The U++ Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 1998, 2019, The U++ Project
|
||||
Copyright (c) 1998, 2020, The U++ Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 1998, 2019, The U++ Project
|
||||
Copyright (c) 1998, 2020, The U++ Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,95 +1,95 @@
|
|||
#include "docpp.h"
|
||||
|
||||
String SSpaces(const char *txt)
|
||||
{
|
||||
String r;
|
||||
while(*txt)
|
||||
if(*txt == ' ') {
|
||||
while((byte)*txt <= ' ' && *txt) txt++;
|
||||
r.Cat(' ');
|
||||
}
|
||||
else
|
||||
r.Cat(*txt++);
|
||||
return r;
|
||||
}
|
||||
|
||||
void SLPos(SrcFile& res)
|
||||
{
|
||||
res.linepos.Add(res.text.GetLength());
|
||||
}
|
||||
|
||||
SrcFile PreProcess(Stream& in)
|
||||
{
|
||||
SrcFile res;
|
||||
bool include = true;
|
||||
while(!in.IsEof()) {
|
||||
String ln = in.GetLine();
|
||||
SLPos(res);
|
||||
while(*ln.Last() == '\\') {
|
||||
ln.Trim(ln.GetLength() - 1);
|
||||
ln.Cat(in.GetLine());
|
||||
SLPos(res);
|
||||
}
|
||||
const char *rm = ln;
|
||||
while(*rm == ' ' || *rm == '\t') rm++;
|
||||
if(*rm == '#') {
|
||||
if(rm[1] == 'd' && rm[2] == 'e' && rm[3] == 'f' &&
|
||||
rm[4] == 'i' && rm[5] == 'n' && rm[6] == 'e' && !iscid(rm[7])) {
|
||||
const char *s = rm + 8;
|
||||
while(*s == ' ') s++;
|
||||
String macro;
|
||||
while(iscid(*s))
|
||||
macro.Cat(*s++);
|
||||
if(*s == '(') {
|
||||
while(*s != ')' && *s)
|
||||
macro.Cat(*s++);
|
||||
macro << ')';
|
||||
}
|
||||
res.text << '#' << AsCString(SSpaces(macro));
|
||||
}
|
||||
}
|
||||
else {
|
||||
String cmd;
|
||||
while(*rm) {
|
||||
if(rm[0] == '/' && rm[1] == '/') {
|
||||
cmd = rm + 2;
|
||||
break;
|
||||
}
|
||||
if(rm[0] == '/' && rm[1] == '*') {
|
||||
rm += 2;
|
||||
for(;;) {
|
||||
if(*rm == '\0') {
|
||||
if(in.IsEof()) break;
|
||||
SLPos(res);
|
||||
ln = in.GetLine();
|
||||
rm = ~ln;
|
||||
}
|
||||
if(rm[0] == '*' && rm[1] == '/') {
|
||||
rm += 2;
|
||||
break;
|
||||
}
|
||||
rm++;
|
||||
}
|
||||
if(include)
|
||||
res.text.Cat(' ');
|
||||
}
|
||||
else {
|
||||
if(include)
|
||||
res.text.Cat(*rm);
|
||||
rm++;
|
||||
}
|
||||
}
|
||||
if(include)
|
||||
res.text << ' ';
|
||||
if(cmd[0] == '$') {
|
||||
if(cmd[1] == '-') include = false;
|
||||
if(cmd[1] == '+') include = true;
|
||||
if(cmd[1]) {
|
||||
res.text.Cat(~cmd + 2);
|
||||
res.text.Cat(' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
#include "docpp.h"
|
||||
|
||||
String SSpaces(const char *txt)
|
||||
{
|
||||
String r;
|
||||
while(*txt)
|
||||
if(*txt == ' ') {
|
||||
while((byte)*txt <= ' ' && *txt) txt++;
|
||||
r.Cat(' ');
|
||||
}
|
||||
else
|
||||
r.Cat(*txt++);
|
||||
return r;
|
||||
}
|
||||
|
||||
void SLPos(SrcFile& res)
|
||||
{
|
||||
res.linepos.Add(res.text.GetLength());
|
||||
}
|
||||
|
||||
SrcFile PreProcess(Stream& in)
|
||||
{
|
||||
SrcFile res;
|
||||
bool include = true;
|
||||
while(!in.IsEof()) {
|
||||
String ln = in.GetLine();
|
||||
SLPos(res);
|
||||
while(*ln.Last() == '\\') {
|
||||
ln.Trim(ln.GetLength() - 1);
|
||||
ln.Cat(in.GetLine());
|
||||
SLPos(res);
|
||||
}
|
||||
const char *rm = ln;
|
||||
while(*rm == ' ' || *rm == '\t') rm++;
|
||||
if(*rm == '#') {
|
||||
if(rm[1] == 'd' && rm[2] == 'e' && rm[3] == 'f' &&
|
||||
rm[4] == 'i' && rm[5] == 'n' && rm[6] == 'e' && !iscid(rm[7])) {
|
||||
const char *s = rm + 8;
|
||||
while(*s == ' ') s++;
|
||||
String macro;
|
||||
while(iscid(*s))
|
||||
macro.Cat(*s++);
|
||||
if(*s == '(') {
|
||||
while(*s != ')' && *s)
|
||||
macro.Cat(*s++);
|
||||
macro << ')';
|
||||
}
|
||||
res.text << '#' << AsCString(SSpaces(macro));
|
||||
}
|
||||
}
|
||||
else {
|
||||
String cmd;
|
||||
while(*rm) {
|
||||
if(rm[0] == '/' && rm[1] == '/') {
|
||||
cmd = rm + 2;
|
||||
break;
|
||||
}
|
||||
if(rm[0] == '/' && rm[1] == '*') {
|
||||
rm += 2;
|
||||
for(;;) {
|
||||
if(*rm == '\0') {
|
||||
if(in.IsEof()) break;
|
||||
SLPos(res);
|
||||
ln = in.GetLine();
|
||||
rm = ~ln;
|
||||
}
|
||||
if(rm[0] == '*' && rm[1] == '/') {
|
||||
rm += 2;
|
||||
break;
|
||||
}
|
||||
rm++;
|
||||
}
|
||||
if(include)
|
||||
res.text.Cat(' ');
|
||||
}
|
||||
else {
|
||||
if(include)
|
||||
res.text.Cat(*rm);
|
||||
rm++;
|
||||
}
|
||||
}
|
||||
if(include)
|
||||
res.text << ' ';
|
||||
if(cmd[0] == '$') {
|
||||
if(cmd[1] == '-') include = false;
|
||||
if(cmd[1] == '+') include = true;
|
||||
if(cmd[1]) {
|
||||
res.text.Cat(~cmd + 2);
|
||||
res.text.Cat(' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
@ -1,324 +1,324 @@
|
|||
#include "docpp.h"
|
||||
|
||||
#define case_id \
|
||||
case '_':case 'a':case 'b':case 'c':case 'd':case 'e':case 'f':case 'g':case 'h': \
|
||||
case 'i':case 'j':case 'k':case 'l':case 'm':case 'n':case 'o':case 'p':case 'q': \
|
||||
case 'r':case 's':case 't':case 'u':case 'v':case 'w':case 'x':case 'y':case 'z': \
|
||||
case 'A':case 'B':case 'C':case 'D':case 'E':case 'F':case 'G':case 'H':case 'I': \
|
||||
case 'J':case 'K':case 'L':case 'M':case 'N':case 'O':case 'P':case 'Q':case 'R': \
|
||||
case 'S':case 'T':case 'U':case 'V':case 'W':case 'X':case 'Y':case 'Z'
|
||||
|
||||
#define case_nonzero_digit \
|
||||
case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9'
|
||||
|
||||
|
||||
const char *_CppKeyword[] = {
|
||||
#define CPPID(x) #x,
|
||||
#include "keyword.i"
|
||||
#undef CPPID
|
||||
NULL
|
||||
};
|
||||
|
||||
const char **CppKeyword() { return _CppKeyword; }
|
||||
|
||||
Lex::Lex()
|
||||
{
|
||||
const char **cppk = CppKeyword();
|
||||
for(int i = 0; cppk[i]; i++)
|
||||
id.Add(cppk[i]);
|
||||
endkey = id.GetCount();
|
||||
}
|
||||
|
||||
void Lex::Ignore(const Vector<String>& ig)
|
||||
{
|
||||
for(int i = 0; i < ig.GetCount(); i++)
|
||||
ignore.Add(id.FindAdd(ig[i]));
|
||||
}
|
||||
|
||||
int Lex::GetCharacter()
|
||||
{
|
||||
if(*ptr == '\0') return t_eof;
|
||||
int c = *ptr++;
|
||||
if(c == '\\') {
|
||||
c = *ptr++;
|
||||
switch(c) {
|
||||
case 'a': return '\a';
|
||||
case 'b': return '\b';
|
||||
case 't': return '\t';
|
||||
case 'v': return '\v';
|
||||
case 'n': return '\n';
|
||||
case 'r': return '\r';
|
||||
case 'f': return '\f';
|
||||
case 'x':
|
||||
c = 0;
|
||||
if(isxdigit(*ptr)) {
|
||||
c = (*ptr >= 'A' ? ToUpper(*ptr) - 'A' + 10 : *ptr - '0');
|
||||
ptr++;
|
||||
if(isxdigit(*ptr)) {
|
||||
c = 16 * c + (*ptr >= 'A' ? ToUpper(*ptr) - 'A' + 10 : *ptr - '0');
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if(c >= '0' && c <= '7') {
|
||||
c -= '0';
|
||||
if(*ptr >= '0' && *ptr <= '7')
|
||||
c = 8 * c + *ptr++ - '0';
|
||||
if(*ptr >= '0' && *ptr <= '7')
|
||||
c = 8 * c + *ptr++ - '0';
|
||||
}
|
||||
}
|
||||
}
|
||||
return (byte)c;
|
||||
}
|
||||
|
||||
#pragma optimize("t", on)
|
||||
|
||||
void Lex::Next()
|
||||
{
|
||||
while((byte)*ptr <= ' ') {
|
||||
if(*ptr == '\0') return;
|
||||
ptr++;
|
||||
}
|
||||
pos = ptr;
|
||||
int c = (byte)*ptr++;
|
||||
if(c == '\0') return;
|
||||
switch(c) {
|
||||
case_id: {
|
||||
String x;
|
||||
x.Reserve(12);
|
||||
x.Cat(c);
|
||||
while(iscid(*ptr))
|
||||
x.Cat(*ptr++);
|
||||
int q = id.FindAdd(x);
|
||||
if(ignore.Find(q) < 0)
|
||||
AddCode(q + 256);
|
||||
break;
|
||||
}
|
||||
case ':': AddCode(Char(':') ? t_dblcolon : ':'); break;
|
||||
case '*': AssOp('*', t_mulass); break;
|
||||
case '/': AssOp('/', t_divass); break;
|
||||
case '%': AssOp('%', t_modass); break;
|
||||
case '^': AssOp('^', t_xorass); break;
|
||||
case '!': AssOp('!', t_neq); break;
|
||||
case '.':
|
||||
if(Char('*')) AddCode(t_dot_asteriks);
|
||||
else
|
||||
if(*ptr == '.' && ptr[1] == '.') {
|
||||
AddCode(t_elipsis);
|
||||
ptr += 2;
|
||||
}
|
||||
else
|
||||
AddCode('.');
|
||||
break;
|
||||
case '+':
|
||||
if(Char('+')) AddCode(t_inc);
|
||||
else
|
||||
AssOp('+', t_addass);
|
||||
return;
|
||||
case '-':
|
||||
if(Char('-')) AddCode(t_dec);
|
||||
else
|
||||
if(Char('>'))
|
||||
AddCode(Char('*') ? t_arrow_asteriks : t_arrow);
|
||||
else
|
||||
AssOp('-', t_subass);
|
||||
break;
|
||||
case '&':
|
||||
if(Char('&'))
|
||||
AddCode(t_and);
|
||||
else
|
||||
AssOp('&', t_andass);
|
||||
break;
|
||||
case '|':
|
||||
if(Char('|'))
|
||||
AddCode(t_or);
|
||||
else
|
||||
AssOp('|', t_orass);
|
||||
break;
|
||||
case '=':
|
||||
AssOp('=', t_eq);
|
||||
break;
|
||||
case '<':
|
||||
if(Char('<'))
|
||||
AssOp(t_shl, t_shlass);
|
||||
else
|
||||
AssOp('<', t_le);
|
||||
break;
|
||||
case '>':
|
||||
if(Char('>'))
|
||||
AssOp(t_shr, t_shrass);
|
||||
else
|
||||
AssOp('>', t_ge);
|
||||
break;
|
||||
case '0': {
|
||||
dword w = 0;
|
||||
if(Char('x') || Char('X')) {
|
||||
for(;;) {
|
||||
int d;
|
||||
if(*ptr >= '0' && *ptr <= '9')
|
||||
d = *ptr - '0';
|
||||
else
|
||||
if(*ptr >= 'A' && *ptr <= 'F')
|
||||
d = *ptr - 'A' + 10;
|
||||
else
|
||||
if(*ptr >= 'a' && *ptr <= 'f')
|
||||
d = *ptr - 'a' + 10;
|
||||
else
|
||||
break;
|
||||
if(w >= 0x8000000u - d) {
|
||||
AddCode(te_integeroverflow);
|
||||
return;
|
||||
}
|
||||
w = w * 16 + d - '0';
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
else
|
||||
while(*ptr >= '0' && *ptr <= '7') {
|
||||
int d = *ptr++ - '0';
|
||||
if(w >= 0x1000000u - d) {
|
||||
AddCode(te_integeroverflow);
|
||||
return;
|
||||
}
|
||||
w = w * 8 + d - '0';
|
||||
}
|
||||
Term& tm = term.AddTail();
|
||||
tm.code = t_integer;
|
||||
tm.ptr = pos;
|
||||
tm.number = w;
|
||||
}
|
||||
break;
|
||||
case_nonzero_digit: {
|
||||
double w = c - '0';
|
||||
bool fp = false;
|
||||
while(*ptr >= '0' && *ptr <= '9')
|
||||
w = w * 10 + *ptr++ - '0';
|
||||
if(*ptr == '.') { // TO BE Completed !!!
|
||||
fp = true;
|
||||
ptr++;
|
||||
double x = 0.1;
|
||||
while(*ptr >= '0' && *ptr <= '9') {
|
||||
w += x * (*ptr++ - '0');
|
||||
x /= 10;
|
||||
}
|
||||
}
|
||||
Term& tm = term.AddTail();
|
||||
if(fp || w < INT_MIN || w > INT_MAX)
|
||||
tm.code = t_double;
|
||||
else
|
||||
tm.code = t_integer;
|
||||
tm.ptr = pos;
|
||||
tm.number = w;
|
||||
}
|
||||
break;
|
||||
case '\'': {
|
||||
Term& tm = term.AddTail();
|
||||
tm.code = t_character;
|
||||
tm.ptr = pos;
|
||||
tm.text = String(GetCharacter(), 1);
|
||||
if(*ptr == '\'')
|
||||
ptr++;
|
||||
else
|
||||
tm.code = te_badcharacter;
|
||||
}
|
||||
break;
|
||||
case '\"': {
|
||||
Term& tm = term.AddTail();
|
||||
tm.code = t_string;
|
||||
tm.ptr = pos;
|
||||
for(;;) {
|
||||
while(*ptr != '\"') {
|
||||
if((byte)*ptr < ' ') {
|
||||
tm.code = te_badstring;
|
||||
return;
|
||||
}
|
||||
tm.text.Cat(GetCharacter());
|
||||
}
|
||||
ptr++;
|
||||
while(*ptr && (byte)*ptr <= ' ') ptr++;
|
||||
if(*ptr != '\"') break;
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AddCode(c);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma optimize("t", off)
|
||||
|
||||
bool Lex::Prepare(int pos) {
|
||||
while(term.GetCount() <= pos) {
|
||||
if(*ptr == '\0') return false;
|
||||
Next();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
pp = term[0].ptr;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
int Lex::Code(int pos)
|
||||
{
|
||||
if(!Prepare(pos)) return t_eof;
|
||||
return term[pos].code;
|
||||
}
|
||||
|
||||
bool Lex::IsId(int pos)
|
||||
{
|
||||
return Code(pos) >= endkey + 256;
|
||||
}
|
||||
|
||||
String Lex::Id(int pos)
|
||||
{
|
||||
ASSERT(IsId(pos));
|
||||
return id[Code(pos) - 256];
|
||||
}
|
||||
|
||||
void Lex::Get(int n)
|
||||
{
|
||||
while(n--) {
|
||||
if(term.GetCount())
|
||||
term.DropHead();
|
||||
if(term.GetCount() == 0)
|
||||
Next();
|
||||
}
|
||||
}
|
||||
|
||||
int Lex::Int(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
ASSERT(term[pos].code == t_integer);
|
||||
return (int)term[pos].number;
|
||||
}
|
||||
|
||||
double Lex::Double(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
ASSERT(term[pos].code == t_double);
|
||||
return term[pos].number;
|
||||
}
|
||||
|
||||
String Lex::Text(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
ASSERT(term[pos].code == t_string);
|
||||
return term[pos].text;
|
||||
}
|
||||
|
||||
int Lex::Chr(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
ASSERT(term[pos].code == t_character);
|
||||
return (byte)*term[pos].text;
|
||||
}
|
||||
|
||||
const char *Lex::Pos(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
return pos < term.GetCount() ? term[pos].ptr : ptr;
|
||||
}
|
||||
#include "docpp.h"
|
||||
|
||||
#define case_id \
|
||||
case '_':case 'a':case 'b':case 'c':case 'd':case 'e':case 'f':case 'g':case 'h': \
|
||||
case 'i':case 'j':case 'k':case 'l':case 'm':case 'n':case 'o':case 'p':case 'q': \
|
||||
case 'r':case 's':case 't':case 'u':case 'v':case 'w':case 'x':case 'y':case 'z': \
|
||||
case 'A':case 'B':case 'C':case 'D':case 'E':case 'F':case 'G':case 'H':case 'I': \
|
||||
case 'J':case 'K':case 'L':case 'M':case 'N':case 'O':case 'P':case 'Q':case 'R': \
|
||||
case 'S':case 'T':case 'U':case 'V':case 'W':case 'X':case 'Y':case 'Z'
|
||||
|
||||
#define case_nonzero_digit \
|
||||
case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9'
|
||||
|
||||
|
||||
const char *_CppKeyword[] = {
|
||||
#define CPPID(x) #x,
|
||||
#include "keyword.i"
|
||||
#undef CPPID
|
||||
NULL
|
||||
};
|
||||
|
||||
const char **CppKeyword() { return _CppKeyword; }
|
||||
|
||||
Lex::Lex()
|
||||
{
|
||||
const char **cppk = CppKeyword();
|
||||
for(int i = 0; cppk[i]; i++)
|
||||
id.Add(cppk[i]);
|
||||
endkey = id.GetCount();
|
||||
}
|
||||
|
||||
void Lex::Ignore(const Vector<String>& ig)
|
||||
{
|
||||
for(int i = 0; i < ig.GetCount(); i++)
|
||||
ignore.Add(id.FindAdd(ig[i]));
|
||||
}
|
||||
|
||||
int Lex::GetCharacter()
|
||||
{
|
||||
if(*ptr == '\0') return t_eof;
|
||||
int c = *ptr++;
|
||||
if(c == '\\') {
|
||||
c = *ptr++;
|
||||
switch(c) {
|
||||
case 'a': return '\a';
|
||||
case 'b': return '\b';
|
||||
case 't': return '\t';
|
||||
case 'v': return '\v';
|
||||
case 'n': return '\n';
|
||||
case 'r': return '\r';
|
||||
case 'f': return '\f';
|
||||
case 'x':
|
||||
c = 0;
|
||||
if(isxdigit(*ptr)) {
|
||||
c = (*ptr >= 'A' ? ToUpper(*ptr) - 'A' + 10 : *ptr - '0');
|
||||
ptr++;
|
||||
if(isxdigit(*ptr)) {
|
||||
c = 16 * c + (*ptr >= 'A' ? ToUpper(*ptr) - 'A' + 10 : *ptr - '0');
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if(c >= '0' && c <= '7') {
|
||||
c -= '0';
|
||||
if(*ptr >= '0' && *ptr <= '7')
|
||||
c = 8 * c + *ptr++ - '0';
|
||||
if(*ptr >= '0' && *ptr <= '7')
|
||||
c = 8 * c + *ptr++ - '0';
|
||||
}
|
||||
}
|
||||
}
|
||||
return (byte)c;
|
||||
}
|
||||
|
||||
#pragma optimize("t", on)
|
||||
|
||||
void Lex::Next()
|
||||
{
|
||||
while((byte)*ptr <= ' ') {
|
||||
if(*ptr == '\0') return;
|
||||
ptr++;
|
||||
}
|
||||
pos = ptr;
|
||||
int c = (byte)*ptr++;
|
||||
if(c == '\0') return;
|
||||
switch(c) {
|
||||
case_id: {
|
||||
String x;
|
||||
x.Reserve(12);
|
||||
x.Cat(c);
|
||||
while(iscid(*ptr))
|
||||
x.Cat(*ptr++);
|
||||
int q = id.FindAdd(x);
|
||||
if(ignore.Find(q) < 0)
|
||||
AddCode(q + 256);
|
||||
break;
|
||||
}
|
||||
case ':': AddCode(Char(':') ? t_dblcolon : ':'); break;
|
||||
case '*': AssOp('*', t_mulass); break;
|
||||
case '/': AssOp('/', t_divass); break;
|
||||
case '%': AssOp('%', t_modass); break;
|
||||
case '^': AssOp('^', t_xorass); break;
|
||||
case '!': AssOp('!', t_neq); break;
|
||||
case '.':
|
||||
if(Char('*')) AddCode(t_dot_asteriks);
|
||||
else
|
||||
if(*ptr == '.' && ptr[1] == '.') {
|
||||
AddCode(t_elipsis);
|
||||
ptr += 2;
|
||||
}
|
||||
else
|
||||
AddCode('.');
|
||||
break;
|
||||
case '+':
|
||||
if(Char('+')) AddCode(t_inc);
|
||||
else
|
||||
AssOp('+', t_addass);
|
||||
return;
|
||||
case '-':
|
||||
if(Char('-')) AddCode(t_dec);
|
||||
else
|
||||
if(Char('>'))
|
||||
AddCode(Char('*') ? t_arrow_asteriks : t_arrow);
|
||||
else
|
||||
AssOp('-', t_subass);
|
||||
break;
|
||||
case '&':
|
||||
if(Char('&'))
|
||||
AddCode(t_and);
|
||||
else
|
||||
AssOp('&', t_andass);
|
||||
break;
|
||||
case '|':
|
||||
if(Char('|'))
|
||||
AddCode(t_or);
|
||||
else
|
||||
AssOp('|', t_orass);
|
||||
break;
|
||||
case '=':
|
||||
AssOp('=', t_eq);
|
||||
break;
|
||||
case '<':
|
||||
if(Char('<'))
|
||||
AssOp(t_shl, t_shlass);
|
||||
else
|
||||
AssOp('<', t_le);
|
||||
break;
|
||||
case '>':
|
||||
if(Char('>'))
|
||||
AssOp(t_shr, t_shrass);
|
||||
else
|
||||
AssOp('>', t_ge);
|
||||
break;
|
||||
case '0': {
|
||||
dword w = 0;
|
||||
if(Char('x') || Char('X')) {
|
||||
for(;;) {
|
||||
int d;
|
||||
if(*ptr >= '0' && *ptr <= '9')
|
||||
d = *ptr - '0';
|
||||
else
|
||||
if(*ptr >= 'A' && *ptr <= 'F')
|
||||
d = *ptr - 'A' + 10;
|
||||
else
|
||||
if(*ptr >= 'a' && *ptr <= 'f')
|
||||
d = *ptr - 'a' + 10;
|
||||
else
|
||||
break;
|
||||
if(w >= 0x8000000u - d) {
|
||||
AddCode(te_integeroverflow);
|
||||
return;
|
||||
}
|
||||
w = w * 16 + d - '0';
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
else
|
||||
while(*ptr >= '0' && *ptr <= '7') {
|
||||
int d = *ptr++ - '0';
|
||||
if(w >= 0x1000000u - d) {
|
||||
AddCode(te_integeroverflow);
|
||||
return;
|
||||
}
|
||||
w = w * 8 + d - '0';
|
||||
}
|
||||
Term& tm = term.AddTail();
|
||||
tm.code = t_integer;
|
||||
tm.ptr = pos;
|
||||
tm.number = w;
|
||||
}
|
||||
break;
|
||||
case_nonzero_digit: {
|
||||
double w = c - '0';
|
||||
bool fp = false;
|
||||
while(*ptr >= '0' && *ptr <= '9')
|
||||
w = w * 10 + *ptr++ - '0';
|
||||
if(*ptr == '.') { // TO BE Completed !!!
|
||||
fp = true;
|
||||
ptr++;
|
||||
double x = 0.1;
|
||||
while(*ptr >= '0' && *ptr <= '9') {
|
||||
w += x * (*ptr++ - '0');
|
||||
x /= 10;
|
||||
}
|
||||
}
|
||||
Term& tm = term.AddTail();
|
||||
if(fp || w < INT_MIN || w > INT_MAX)
|
||||
tm.code = t_double;
|
||||
else
|
||||
tm.code = t_integer;
|
||||
tm.ptr = pos;
|
||||
tm.number = w;
|
||||
}
|
||||
break;
|
||||
case '\'': {
|
||||
Term& tm = term.AddTail();
|
||||
tm.code = t_character;
|
||||
tm.ptr = pos;
|
||||
tm.text = String(GetCharacter(), 1);
|
||||
if(*ptr == '\'')
|
||||
ptr++;
|
||||
else
|
||||
tm.code = te_badcharacter;
|
||||
}
|
||||
break;
|
||||
case '\"': {
|
||||
Term& tm = term.AddTail();
|
||||
tm.code = t_string;
|
||||
tm.ptr = pos;
|
||||
for(;;) {
|
||||
while(*ptr != '\"') {
|
||||
if((byte)*ptr < ' ') {
|
||||
tm.code = te_badstring;
|
||||
return;
|
||||
}
|
||||
tm.text.Cat(GetCharacter());
|
||||
}
|
||||
ptr++;
|
||||
while(*ptr && (byte)*ptr <= ' ') ptr++;
|
||||
if(*ptr != '\"') break;
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AddCode(c);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma optimize("t", off)
|
||||
|
||||
bool Lex::Prepare(int pos) {
|
||||
while(term.GetCount() <= pos) {
|
||||
if(*ptr == '\0') return false;
|
||||
Next();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
pp = term[0].ptr;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
int Lex::Code(int pos)
|
||||
{
|
||||
if(!Prepare(pos)) return t_eof;
|
||||
return term[pos].code;
|
||||
}
|
||||
|
||||
bool Lex::IsId(int pos)
|
||||
{
|
||||
return Code(pos) >= endkey + 256;
|
||||
}
|
||||
|
||||
String Lex::Id(int pos)
|
||||
{
|
||||
ASSERT(IsId(pos));
|
||||
return id[Code(pos) - 256];
|
||||
}
|
||||
|
||||
void Lex::Get(int n)
|
||||
{
|
||||
while(n--) {
|
||||
if(term.GetCount())
|
||||
term.DropHead();
|
||||
if(term.GetCount() == 0)
|
||||
Next();
|
||||
}
|
||||
}
|
||||
|
||||
int Lex::Int(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
ASSERT(term[pos].code == t_integer);
|
||||
return (int)term[pos].number;
|
||||
}
|
||||
|
||||
double Lex::Double(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
ASSERT(term[pos].code == t_double);
|
||||
return term[pos].number;
|
||||
}
|
||||
|
||||
String Lex::Text(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
ASSERT(term[pos].code == t_string);
|
||||
return term[pos].text;
|
||||
}
|
||||
|
||||
int Lex::Chr(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
ASSERT(term[pos].code == t_character);
|
||||
return (byte)*term[pos].text;
|
||||
}
|
||||
|
||||
const char *Lex::Pos(int pos)
|
||||
{
|
||||
Prepare(pos);
|
||||
return pos < term.GetCount() ? term[pos].ptr : ptr;
|
||||
}
|
||||
|
|
@ -1,250 +1,250 @@
|
|||
#ifndef DOCPP_H
|
||||
#define DOCPP_H
|
||||
|
||||
#include <Core/Core.h>
|
||||
|
||||
enum {
|
||||
Tmarker_before_first = 255,
|
||||
#define CPPID(x) tk_##x,
|
||||
#include "keyword.i"
|
||||
#undef CPPID
|
||||
};
|
||||
|
||||
enum {
|
||||
t_eof,
|
||||
t_string = -200,
|
||||
t_integer,
|
||||
t_double,
|
||||
t_character,
|
||||
t_dblcolon,
|
||||
t_mulass,
|
||||
t_divass,
|
||||
t_modass,
|
||||
t_xorass,
|
||||
t_neq,
|
||||
t_dot_asteriks,
|
||||
t_elipsis,
|
||||
t_inc,
|
||||
t_addass,
|
||||
t_dec,
|
||||
t_arrow_asteriks,
|
||||
t_arrow,
|
||||
t_subass,
|
||||
t_and,
|
||||
t_andass,
|
||||
t_or,
|
||||
t_orass,
|
||||
t_eq,
|
||||
t_shl,
|
||||
t_shlass,
|
||||
t_le,
|
||||
t_shr,
|
||||
t_shrass,
|
||||
t_ge,
|
||||
te_integeroverflow,
|
||||
te_badcharacter,
|
||||
te_badstring,
|
||||
};
|
||||
|
||||
const char **CppKeyword();
|
||||
|
||||
class Lex {
|
||||
#ifdef _DEBUG
|
||||
const char *pp;
|
||||
#endif
|
||||
const char *ptr;
|
||||
const char *pos;
|
||||
|
||||
Index<String> id;
|
||||
Index<int> ignore;
|
||||
int endkey;
|
||||
|
||||
struct Term : Moveable<Term>{
|
||||
const char *ptr;
|
||||
int code;
|
||||
String text;
|
||||
double number;
|
||||
};
|
||||
|
||||
BiVector<Term> term;
|
||||
|
||||
bool Char(int c) { if(*ptr == c) { ptr++; return true; } else return false; }
|
||||
void AddCode(int code) { Term& tm = term.AddTail(); tm.code = code; tm.ptr = pos; }
|
||||
void AssOp(int noass, int ass) { AddCode(Char('=') ? ass : noass); }
|
||||
void Next();
|
||||
bool Prepare(int pos);
|
||||
int GetCharacter();
|
||||
|
||||
public:
|
||||
int Code(int pos = 0);
|
||||
bool IsId(int pos = 0);
|
||||
String Id(int pos = 0);
|
||||
int Int(int pos = 0);
|
||||
double Double(int pos = 0);
|
||||
int Chr(int pos = 0);
|
||||
String Text(int pos = 0);
|
||||
|
||||
void Get(int n = 1);
|
||||
int GetCode() { int q = Code(); Get(); return q; }
|
||||
String GetId() { String q = Id(); Get(); return q; }
|
||||
int GetInt() { int q = Int(); Get(); return q; }
|
||||
double GetDouble() { double q = Double(); Get(); return q; }
|
||||
int GetChr() { int q = Chr(); Get(); return q; }
|
||||
String GetText() { String q = Text(); Get(); return q; }
|
||||
|
||||
const char *Pos(int pos = 0);
|
||||
int operator[](int pos) { return Code(pos); }
|
||||
operator int() { return Code(0); }
|
||||
void operator++() { Get(); }
|
||||
|
||||
void operator=(const char *s) { ptr = s; term.Clear(); }
|
||||
void Ignore(const Vector<String>& ignore);
|
||||
|
||||
Lex();
|
||||
};
|
||||
|
||||
struct SrcFile {
|
||||
String text;
|
||||
Vector<int> linepos;
|
||||
};
|
||||
|
||||
SrcFile PreProcess(Stream& in);
|
||||
|
||||
|
||||
enum Kind {
|
||||
MACRO, ENUM, TYPEDEF, VARIABLE,
|
||||
STRUCT, FUNCTION,
|
||||
INSTANCEFUNCTION, INSTANCEVARIABLE,
|
||||
CLASSFUNCTION, CLASSVARIABLE,
|
||||
CONSTRUCTOR, DESTRUCTOR,
|
||||
STRUCTTEMPLATE, FUNCTIONTEMPLATE,
|
||||
INSTANCEFUNCTIONTEMPLATE, CLASSFUNCTIONTEMPLATE,
|
||||
INLINEFRIEND,
|
||||
OTHER
|
||||
};
|
||||
|
||||
enum {
|
||||
PRIVATE, PROTECTED, PUBLIC
|
||||
};
|
||||
|
||||
struct CppItem {
|
||||
String package;
|
||||
|
||||
int kind;
|
||||
String name;
|
||||
int access;
|
||||
String tparam;
|
||||
String header;
|
||||
String param;
|
||||
String ender;
|
||||
String pname;
|
||||
String tname;
|
||||
|
||||
String file;
|
||||
int line;
|
||||
|
||||
CppItem() { line = 0; }
|
||||
};
|
||||
|
||||
typedef ArrayMap<String, CppItem> CppNest;
|
||||
typedef ArrayMap<String, CppNest> CppNamespace;
|
||||
typedef ArrayMap<String, CppNamespace> CppBase;
|
||||
|
||||
class Parser {
|
||||
struct Context {
|
||||
String nameing;
|
||||
String nesting;
|
||||
Index<int> typenames;
|
||||
int access;
|
||||
|
||||
void operator<<=(const Context& t);
|
||||
|
||||
String Dump() const;
|
||||
};
|
||||
|
||||
struct Decla {
|
||||
bool s_static:1;
|
||||
bool s_extern:1;
|
||||
bool s_register:1;
|
||||
bool s_auto:1;
|
||||
bool s_mutable:1;
|
||||
bool s_explicit:1;
|
||||
bool s_virtual:1;
|
||||
String name;
|
||||
bool function:1;
|
||||
bool type_def:1;
|
||||
bool isfriend:1;
|
||||
bool istemplate:1;
|
||||
bool istructor:1;
|
||||
bool isdestructor:1;
|
||||
bool isptr:1;
|
||||
bool nofn:1;
|
||||
|
||||
String header;
|
||||
String ender;
|
||||
String template_params;
|
||||
String tnames;
|
||||
String natural;
|
||||
|
||||
Decla();
|
||||
};
|
||||
|
||||
struct Decl : Decla {
|
||||
Array<Decl> param;
|
||||
};
|
||||
|
||||
SrcFile file;
|
||||
Lex lex;
|
||||
String package, filename;
|
||||
Context context;
|
||||
|
||||
int lpos, line;
|
||||
|
||||
CppBase *base;
|
||||
|
||||
int RPtr();
|
||||
|
||||
bool Key(int code);
|
||||
bool EatBody();
|
||||
|
||||
void Cv();
|
||||
String SimpleType();
|
||||
void Qualifier();
|
||||
void ParamList(Decl& d);
|
||||
void Declarator(Decl& d, const char *p);
|
||||
void EatInitializers();
|
||||
Decl Type();
|
||||
Array<Decl> Declaration(bool l0 = false, bool more = false);
|
||||
void Do();
|
||||
void Elipsis(Decl& d);
|
||||
Decl& Finish(Decl& d, const char *p);
|
||||
bool Nest(const String& tp, const String& tn);
|
||||
|
||||
String TemplateParams(String& pnames);
|
||||
String TemplateParams();
|
||||
String TemplatePnames();
|
||||
String Name();
|
||||
String Constant();
|
||||
String ReadOper();
|
||||
|
||||
int GetLine(const char *pos);
|
||||
void Line();
|
||||
void Check(bool b, const char *err);
|
||||
void CheckKey(int c);
|
||||
|
||||
CppItem& Item(const String& nameing, const String& nesting, const String& item);
|
||||
|
||||
public:
|
||||
struct Error : public String { Error() {}; Error(const char *s) : String(s) {} };
|
||||
|
||||
void ThrowError(const String& e);
|
||||
|
||||
void Do(Stream& s, const Vector<String>& ignore, CppBase& base,
|
||||
const String& package, const String& file)
|
||||
throw(Parser::Error);
|
||||
};
|
||||
|
||||
void Parse(Stream& s, const Vector<String>& ignore, CppBase& base,
|
||||
const String& package, const String& file) throw(Parser::Error);
|
||||
|
||||
#endif
|
||||
#ifndef DOCPP_H
|
||||
#define DOCPP_H
|
||||
|
||||
#include <Core/Core.h>
|
||||
|
||||
enum {
|
||||
Tmarker_before_first = 255,
|
||||
#define CPPID(x) tk_##x,
|
||||
#include "keyword.i"
|
||||
#undef CPPID
|
||||
};
|
||||
|
||||
enum {
|
||||
t_eof,
|
||||
t_string = -200,
|
||||
t_integer,
|
||||
t_double,
|
||||
t_character,
|
||||
t_dblcolon,
|
||||
t_mulass,
|
||||
t_divass,
|
||||
t_modass,
|
||||
t_xorass,
|
||||
t_neq,
|
||||
t_dot_asteriks,
|
||||
t_elipsis,
|
||||
t_inc,
|
||||
t_addass,
|
||||
t_dec,
|
||||
t_arrow_asteriks,
|
||||
t_arrow,
|
||||
t_subass,
|
||||
t_and,
|
||||
t_andass,
|
||||
t_or,
|
||||
t_orass,
|
||||
t_eq,
|
||||
t_shl,
|
||||
t_shlass,
|
||||
t_le,
|
||||
t_shr,
|
||||
t_shrass,
|
||||
t_ge,
|
||||
te_integeroverflow,
|
||||
te_badcharacter,
|
||||
te_badstring,
|
||||
};
|
||||
|
||||
const char **CppKeyword();
|
||||
|
||||
class Lex {
|
||||
#ifdef _DEBUG
|
||||
const char *pp;
|
||||
#endif
|
||||
const char *ptr;
|
||||
const char *pos;
|
||||
|
||||
Index<String> id;
|
||||
Index<int> ignore;
|
||||
int endkey;
|
||||
|
||||
struct Term : Moveable<Term>{
|
||||
const char *ptr;
|
||||
int code;
|
||||
String text;
|
||||
double number;
|
||||
};
|
||||
|
||||
BiVector<Term> term;
|
||||
|
||||
bool Char(int c) { if(*ptr == c) { ptr++; return true; } else return false; }
|
||||
void AddCode(int code) { Term& tm = term.AddTail(); tm.code = code; tm.ptr = pos; }
|
||||
void AssOp(int noass, int ass) { AddCode(Char('=') ? ass : noass); }
|
||||
void Next();
|
||||
bool Prepare(int pos);
|
||||
int GetCharacter();
|
||||
|
||||
public:
|
||||
int Code(int pos = 0);
|
||||
bool IsId(int pos = 0);
|
||||
String Id(int pos = 0);
|
||||
int Int(int pos = 0);
|
||||
double Double(int pos = 0);
|
||||
int Chr(int pos = 0);
|
||||
String Text(int pos = 0);
|
||||
|
||||
void Get(int n = 1);
|
||||
int GetCode() { int q = Code(); Get(); return q; }
|
||||
String GetId() { String q = Id(); Get(); return q; }
|
||||
int GetInt() { int q = Int(); Get(); return q; }
|
||||
double GetDouble() { double q = Double(); Get(); return q; }
|
||||
int GetChr() { int q = Chr(); Get(); return q; }
|
||||
String GetText() { String q = Text(); Get(); return q; }
|
||||
|
||||
const char *Pos(int pos = 0);
|
||||
int operator[](int pos) { return Code(pos); }
|
||||
operator int() { return Code(0); }
|
||||
void operator++() { Get(); }
|
||||
|
||||
void operator=(const char *s) { ptr = s; term.Clear(); }
|
||||
void Ignore(const Vector<String>& ignore);
|
||||
|
||||
Lex();
|
||||
};
|
||||
|
||||
struct SrcFile {
|
||||
String text;
|
||||
Vector<int> linepos;
|
||||
};
|
||||
|
||||
SrcFile PreProcess(Stream& in);
|
||||
|
||||
|
||||
enum Kind {
|
||||
MACRO, ENUM, TYPEDEF, VARIABLE,
|
||||
STRUCT, FUNCTION,
|
||||
INSTANCEFUNCTION, INSTANCEVARIABLE,
|
||||
CLASSFUNCTION, CLASSVARIABLE,
|
||||
CONSTRUCTOR, DESTRUCTOR,
|
||||
STRUCTTEMPLATE, FUNCTIONTEMPLATE,
|
||||
INSTANCEFUNCTIONTEMPLATE, CLASSFUNCTIONTEMPLATE,
|
||||
INLINEFRIEND,
|
||||
OTHER
|
||||
};
|
||||
|
||||
enum {
|
||||
PRIVATE, PROTECTED, PUBLIC
|
||||
};
|
||||
|
||||
struct CppItem {
|
||||
String package;
|
||||
|
||||
int kind;
|
||||
String name;
|
||||
int access;
|
||||
String tparam;
|
||||
String header;
|
||||
String param;
|
||||
String ender;
|
||||
String pname;
|
||||
String tname;
|
||||
|
||||
String file;
|
||||
int line;
|
||||
|
||||
CppItem() { line = 0; }
|
||||
};
|
||||
|
||||
typedef ArrayMap<String, CppItem> CppNest;
|
||||
typedef ArrayMap<String, CppNest> CppNamespace;
|
||||
typedef ArrayMap<String, CppNamespace> CppBase;
|
||||
|
||||
class Parser {
|
||||
struct Context {
|
||||
String nameing;
|
||||
String nesting;
|
||||
Index<int> typenames;
|
||||
int access;
|
||||
|
||||
void operator<<=(const Context& t);
|
||||
|
||||
String Dump() const;
|
||||
};
|
||||
|
||||
struct Decla {
|
||||
bool s_static:1;
|
||||
bool s_extern:1;
|
||||
bool s_register:1;
|
||||
bool s_auto:1;
|
||||
bool s_mutable:1;
|
||||
bool s_explicit:1;
|
||||
bool s_virtual:1;
|
||||
String name;
|
||||
bool function:1;
|
||||
bool type_def:1;
|
||||
bool isfriend:1;
|
||||
bool istemplate:1;
|
||||
bool istructor:1;
|
||||
bool isdestructor:1;
|
||||
bool isptr:1;
|
||||
bool nofn:1;
|
||||
|
||||
String header;
|
||||
String ender;
|
||||
String template_params;
|
||||
String tnames;
|
||||
String natural;
|
||||
|
||||
Decla();
|
||||
};
|
||||
|
||||
struct Decl : Decla {
|
||||
Array<Decl> param;
|
||||
};
|
||||
|
||||
SrcFile file;
|
||||
Lex lex;
|
||||
String package, filename;
|
||||
Context context;
|
||||
|
||||
int lpos, line;
|
||||
|
||||
CppBase *base;
|
||||
|
||||
int RPtr();
|
||||
|
||||
bool Key(int code);
|
||||
bool EatBody();
|
||||
|
||||
void Cv();
|
||||
String SimpleType();
|
||||
void Qualifier();
|
||||
void ParamList(Decl& d);
|
||||
void Declarator(Decl& d, const char *p);
|
||||
void EatInitializers();
|
||||
Decl Type();
|
||||
Array<Decl> Declaration(bool l0 = false, bool more = false);
|
||||
void Do();
|
||||
void Elipsis(Decl& d);
|
||||
Decl& Finish(Decl& d, const char *p);
|
||||
bool Nest(const String& tp, const String& tn);
|
||||
|
||||
String TemplateParams(String& pnames);
|
||||
String TemplateParams();
|
||||
String TemplatePnames();
|
||||
String Name();
|
||||
String Constant();
|
||||
String ReadOper();
|
||||
|
||||
int GetLine(const char *pos);
|
||||
void Line();
|
||||
void Check(bool b, const char *err);
|
||||
void CheckKey(int c);
|
||||
|
||||
CppItem& Item(const String& nameing, const String& nesting, const String& item);
|
||||
|
||||
public:
|
||||
struct Error : public String { Error() {}; Error(const char *s) : String(s) {} };
|
||||
|
||||
void ThrowError(const String& e);
|
||||
|
||||
void Do(Stream& s, const Vector<String>& ignore, CppBase& base,
|
||||
const String& package, const String& file)
|
||||
throw(Parser::Error);
|
||||
};
|
||||
|
||||
void Parse(Stream& s, const Vector<String>& ignore, CppBase& base,
|
||||
const String& package, const String& file) throw(Parser::Error);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
uses
|
||||
RichEdit;
|
||||
|
||||
file
|
||||
docpp.h,
|
||||
keyword.i,
|
||||
Pre.cpp,
|
||||
cpplex.cpp,
|
||||
Parser.cpp,
|
||||
Info readonly separator,
|
||||
Copying;
|
||||
|
||||
uses
|
||||
RichEdit;
|
||||
|
||||
file
|
||||
docpp.h,
|
||||
keyword.i,
|
||||
Pre.cpp,
|
||||
cpplex.cpp,
|
||||
Parser.cpp,
|
||||
Info readonly separator,
|
||||
Copying;
|
||||
|
||||
|
|
@ -1,80 +1,80 @@
|
|||
#pragma BLITZ_APPROVE
|
||||
|
||||
CPPID(__asm)
|
||||
CPPID(else)
|
||||
CPPID(struct)
|
||||
CPPID(enum)
|
||||
CPPID(switch)
|
||||
CPPID(auto)
|
||||
CPPID(__except)
|
||||
CPPID(template)
|
||||
CPPID(explicit)
|
||||
CPPID(this)
|
||||
CPPID(bool)
|
||||
CPPID(extern)
|
||||
CPPID(mutable)
|
||||
CPPID(thread)
|
||||
CPPID(break)
|
||||
CPPID(false)
|
||||
CPPID(throw)
|
||||
CPPID(case)
|
||||
CPPID(__fastcall)
|
||||
CPPID(namespace)
|
||||
CPPID(true)
|
||||
CPPID(catch)
|
||||
CPPID(__finally)
|
||||
CPPID(new)
|
||||
CPPID(try)
|
||||
CPPID(__cdecl)
|
||||
CPPID(float)
|
||||
CPPID(__try)
|
||||
CPPID(char)
|
||||
CPPID(for)
|
||||
CPPID(operator)
|
||||
CPPID(typedef)
|
||||
CPPID(class)
|
||||
CPPID(friend)
|
||||
CPPID(private)
|
||||
CPPID(typeid)
|
||||
CPPID(const)
|
||||
CPPID(goto)
|
||||
CPPID(protected)
|
||||
CPPID(typename)
|
||||
CPPID(const_cast)
|
||||
CPPID(if)
|
||||
CPPID(public)
|
||||
CPPID(union)
|
||||
CPPID(continue)
|
||||
CPPID(inline)
|
||||
CPPID(register)
|
||||
CPPID(unsigned)
|
||||
CPPID(__declspec)
|
||||
CPPID(__inline)
|
||||
CPPID(reinterpret_cast)
|
||||
CPPID(using)
|
||||
CPPID(default)
|
||||
CPPID(int)
|
||||
CPPID(return)
|
||||
CPPID(delete)
|
||||
CPPID(__int8)
|
||||
CPPID(short)
|
||||
CPPID(__uuidof)
|
||||
CPPID(dllexport)
|
||||
CPPID(__int16)
|
||||
CPPID(signed)
|
||||
CPPID(virtual)
|
||||
CPPID(dllimport)
|
||||
CPPID(__int32)
|
||||
CPPID(sizeof)
|
||||
CPPID(void)
|
||||
CPPID(do)
|
||||
CPPID(__int64)
|
||||
CPPID(static)
|
||||
CPPID(volatile)
|
||||
CPPID(double)
|
||||
CPPID(__leave)
|
||||
CPPID(static_cast)
|
||||
CPPID(dynamic_cast)
|
||||
CPPID(long)
|
||||
CPPID(__stdcall)
|
||||
CPPID(while)
|
||||
#pragma BLITZ_APPROVE
|
||||
|
||||
CPPID(__asm)
|
||||
CPPID(else)
|
||||
CPPID(struct)
|
||||
CPPID(enum)
|
||||
CPPID(switch)
|
||||
CPPID(auto)
|
||||
CPPID(__except)
|
||||
CPPID(template)
|
||||
CPPID(explicit)
|
||||
CPPID(this)
|
||||
CPPID(bool)
|
||||
CPPID(extern)
|
||||
CPPID(mutable)
|
||||
CPPID(thread)
|
||||
CPPID(break)
|
||||
CPPID(false)
|
||||
CPPID(throw)
|
||||
CPPID(case)
|
||||
CPPID(__fastcall)
|
||||
CPPID(namespace)
|
||||
CPPID(true)
|
||||
CPPID(catch)
|
||||
CPPID(__finally)
|
||||
CPPID(new)
|
||||
CPPID(try)
|
||||
CPPID(__cdecl)
|
||||
CPPID(float)
|
||||
CPPID(__try)
|
||||
CPPID(char)
|
||||
CPPID(for)
|
||||
CPPID(operator)
|
||||
CPPID(typedef)
|
||||
CPPID(class)
|
||||
CPPID(friend)
|
||||
CPPID(private)
|
||||
CPPID(typeid)
|
||||
CPPID(const)
|
||||
CPPID(goto)
|
||||
CPPID(protected)
|
||||
CPPID(typename)
|
||||
CPPID(const_cast)
|
||||
CPPID(if)
|
||||
CPPID(public)
|
||||
CPPID(union)
|
||||
CPPID(continue)
|
||||
CPPID(inline)
|
||||
CPPID(register)
|
||||
CPPID(unsigned)
|
||||
CPPID(__declspec)
|
||||
CPPID(__inline)
|
||||
CPPID(reinterpret_cast)
|
||||
CPPID(using)
|
||||
CPPID(default)
|
||||
CPPID(int)
|
||||
CPPID(return)
|
||||
CPPID(delete)
|
||||
CPPID(__int8)
|
||||
CPPID(short)
|
||||
CPPID(__uuidof)
|
||||
CPPID(dllexport)
|
||||
CPPID(__int16)
|
||||
CPPID(signed)
|
||||
CPPID(virtual)
|
||||
CPPID(dllimport)
|
||||
CPPID(__int32)
|
||||
CPPID(sizeof)
|
||||
CPPID(void)
|
||||
CPPID(do)
|
||||
CPPID(__int64)
|
||||
CPPID(static)
|
||||
CPPID(volatile)
|
||||
CPPID(double)
|
||||
CPPID(__leave)
|
||||
CPPID(static_cast)
|
||||
CPPID(dynamic_cast)
|
||||
CPPID(long)
|
||||
CPPID(__stdcall)
|
||||
CPPID(while)
|
||||
|
|
@ -8,9 +8,10 @@ using namespace Upp;
|
|||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
// StdLogSetup(LOG_COUT|LOG_FILE);
|
||||
for(int i = 0; i < 1000; i++) {
|
||||
Vector<String> w = AliceWords();
|
||||
StdLogSetup(LOG_COUT|LOG_FILE);
|
||||
RDUMP(AliceWords().GetCount());
|
||||
for(int i = 0; i < 300; i++) {
|
||||
Vector<String> w = AliceWords();
|
||||
{
|
||||
std::vector<std::string> x;
|
||||
for(auto s : w)
|
||||
|
|
@ -22,8 +23,30 @@ CONSOLE_APP_MAIN
|
|||
RTIMING("Sort Vector<String>");
|
||||
Sort(w);
|
||||
}
|
||||
#if 0
|
||||
ONCELOCK {
|
||||
RDUMPC(w);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
for(int i = 0; i < 300; i++) {
|
||||
Vector<int> w;
|
||||
for(int i = 0; i < 40000; i++)
|
||||
w.Add(Random());
|
||||
{
|
||||
std::vector<int> x(w.begin(), w.end());
|
||||
RTIMING("std::sort std::vector<int>");
|
||||
std::sort(x.begin(), x.end());
|
||||
}
|
||||
{
|
||||
RTIMING("Sort Vector<int>");
|
||||
Sort(w);
|
||||
}
|
||||
#if 0
|
||||
ONCELOCK {
|
||||
RDUMPC(w);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,23 @@ fi
|
|||
|
||||
if [[ "$uname" == 'OpenBSD' ]]; then
|
||||
echo Configuring $1 for OpenBSD
|
||||
sed -i.bak 's/-DflagPOSIX -DflagLINUX/-DflagPOSIX -DflagBSD -DflagFREEBSD/' $1
|
||||
sed -i.bak 's/-DflagPOSIX -DflagLINUX/-DflagPOSIX -DflagBSD -DflagOPENBSD/' $1
|
||||
sed -i.bak 's/-Wl,--gc-sections $(LINKOPTIONS)/$(LINKOPTIONS)/' $1
|
||||
sed -i.bak 's#LIBPATH =#LIBPATH = -L"/usr/local/lib"#' $1
|
||||
sed -i.bak 's#-I./ -I$(UPPOUT)#-I/usr/local/include -I./ -I$(UPPOUT)#' $1
|
||||
sed -i.bak 's/GCC-Gcc-Gui-Linux-Main-Posix-Shared/GCC-Bsd-Gcc-Gui-Main-Openbsd-Posix-Shared/' $1
|
||||
sed -i.bak 's/GCC-Gcc-Gui-Linux-Posix-Shared/GCC-Bsd-Gcc-Gui-Openbsd-Posix-Shared/' $1
|
||||
sed -i.bak 's/GCC-Gcc-Linux-Main-Posix-Shared/GCC-Bsd-Gcc-Main-Openbsd-Posix-Shared/' $1
|
||||
sed -i.bak 's/GCC-Gcc-Linux-Posix-Shared/GCC-Bsd-Gcc-Openbsd-Posix-Shared/' $1
|
||||
sed -i.bak 's/$(LIBPATH) -Wl,-O,2 $(LDFLAGS)/$(LIBPATH) $(LDFLAGS)/' $1
|
||||
sed -i.bak 's/-ldl /-lexecinfo /' $1
|
||||
sed -i.bak 's/-lrt / /' $1
|
||||
rm $1.bak
|
||||
fi
|
||||
|
||||
if [[ "$uname" == 'NetBSD' ]]; then
|
||||
echo Configuring $1 for OpenBSD
|
||||
sed -i.bak 's/-DflagPOSIX -DflagLINUX/-DflagPOSIX -DflagBSD -DflagNETBSD/' $1
|
||||
sed -i.bak 's/-Wl,--gc-sections $(LINKOPTIONS)/$(LINKOPTIONS)/' $1
|
||||
sed -i.bak 's#LIBPATH =#LIBPATH = -L"/usr/local/lib"#' $1
|
||||
sed -i.bak 's#-I./ -I$(UPPOUT)#-I/usr/local/include -I./ -I$(UPPOUT)#' $1
|
||||
|
|
|
|||
BIN
uppbox/uppweb/Resources/Images/TheIDE.png
Normal file
BIN
uppbox/uppweb/Resources/Images/TheIDE.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 174 KiB |
|
|
@ -1,3 +1,5 @@
|
|||
description "Legacy reports. Do not use in the new code.\377";
|
||||
|
||||
uses
|
||||
Draw,
|
||||
RichText,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "OpenGL widget base class\377";
|
||||
|
||||
uses
|
||||
CtrlCore,
|
||||
plugin/glew;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "OpenGL Draw implementation\377";
|
||||
|
||||
uses
|
||||
Draw,
|
||||
Painter,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "Geographical coordinates. Somewhat obsolete.\377";
|
||||
|
||||
uses
|
||||
Geom;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "Geometry related GUI code. Do not use in the new code.\377";
|
||||
|
||||
uses
|
||||
Geom\Draw,
|
||||
TCtrlLib;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "Geometry related GUI code. Do not use in the new code.\377";
|
||||
|
||||
acceptflags
|
||||
NOHRRPNG;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "2D and 3D geometry mathematics. Somewhat obsolete\377";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "Windows GUI OLE encapsulation\377";
|
||||
|
||||
uses
|
||||
Ole,
|
||||
CtrlCore;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "Windows OLE encapsulation\377";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "PostgreSQL SQl database support\377";
|
||||
|
||||
acceptflags
|
||||
NOPOSTGRESQL;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
description "\377128,0,0";
|
||||
description "Using .iml files in Skylark\377128,0,0";
|
||||
|
||||
uses
|
||||
Draw,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "Widgets to show differences between two texts\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "VirtualGui implementation for SDL2/OpenGL\377";
|
||||
|
||||
uses
|
||||
VirtualGui,
|
||||
GLDraw;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
description "SlaveGui backend\377";
|
||||
description "Abstract GUI implementation, with window manager, with minimal implemenation requirements\377";
|
||||
|
||||
uses
|
||||
Painter,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
description "\3770,128,128";
|
||||
description "astyle C++ formatting utility\3770,128,128";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
description "\3770,128,128";
|
||||
description "LZ4 compressor (lower compression but very fast)\3770,128,128";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
description "\3770,128,128";
|
||||
description "LZMA compressor (slow, but very good ratio)\3770,128,128";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
description "\3770,128,128";
|
||||
description "zstd compressor (good ratio, very good speed)\3770,128,128";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
description "\3770,128,128";
|
||||
description "Support for older zstd format. Do not use with new applications.\3770,128,128";
|
||||
|
||||
file
|
||||
zstd.h,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue