#ifdef PLATFORM_POSIX inline bool MoveFile(const char *oldpath, const char *newpath) { return !rename(oldpath, newpath); } #endif struct FileTemplate { String filename; String condition; String text; }; enum { TEMPLATEITEM_ID, TEMPLATEITEM_FILENAME, TEMPLATEITEM_OPTION, TEMPLATEITEM_SELECT, TEMPLATEITEM_TEXT }; struct TemplateItem { String label; int type; String id; Vector value; String init; }; struct PackageTemplate { String name; bool main, sub; Array item; Array file; }; struct AppPreview : Ctrl { virtual void Paint(Draw& w); virtual void Layout(); virtual void MouseWheel(Point p, int zdelta, dword keyflags); ScrollBar sb; struct Line : Moveable { String text; bool header; }; Vector line; void Scroll() { Refresh(); } void Clear() { line.Clear(); Refresh(); sb.Set(0); } void Add(const String& data, bool header = false); typedef AppPreview CLASSNAME; AppPreview(); virtual ~AppPreview(); }; struct TemplateDlg : public WithNewPackageLayout { AppPreview preview; Array pt; Array