ultimatepp/uppsrc/ide/Browser/TopicI.icpp
cxl 2320ef4da1 ide: Option for not closing find/replace automatically #461
git-svn-id: svn://ultimatepp.org/upp/trunk@6032 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2013-05-05 10:47:18 +00:00

28 lines
658 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->PersistentFindReplace(TheIde()->IsPersistentFindReplace());
d->Open(path);
return d;
}
return NULL;
}
virtual void Serialize(Stream& s) {
TopicEditor::SerializeEditPos(s);
}
};
INITBLOCK {
RegisterIdeModule(Single<TopicModule>());
}