mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
27 lines
593 B
Text
27 lines
593 B
Text
#include "Browser.h"
|
|
|
|
bool IsTopicGroup(const char *path)
|
|
{
|
|
return ToLower(GetFileExt(path)) == ".tpp" && !FileExists(path);
|
|
}
|
|
|
|
struct TopicModule : public IdeModule {
|
|
virtual Image FileIcon(const char *path) {
|
|
return IsTopicGroup(path) ? TopicImg::Group() : Null;
|
|
}
|
|
virtual IdeDesigner *CreateDesigner(const char *path, byte cs) {
|
|
if(IsTopicGroup(path)) {
|
|
TopicEditor *d = new TopicEditor;
|
|
d->Open(path);
|
|
return d;
|
|
}
|
|
return false;
|
|
}
|
|
virtual void Serialize(Stream& s) {
|
|
TopicEditor::SerializeEditPos(s);
|
|
}
|
|
};
|
|
|
|
INITBLOCK {
|
|
RegisterIdeModule(Single<TopicModule>());
|
|
}
|