ultimatepp/uppdev/RichEditTest/main.cpp
cxl 1ced2d7ec3 uppdev sync
git-svn-id: svn://ultimatepp.org/upp/trunk@575 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-10-31 08:40:42 +00:00

45 lines
879 B
C++

#include <RichEdit/RichEdit.h>
using namespace Upp;
String FileName()
{
// return "d:/test.qtf";
return GetExeDirFile("test.qtf");
}
GUI_APP_MAIN
{
// ChClassicSkin();
// ChStdSkin();
// SetLanguage(LNG_('P','L','P','L'));
// InstallCrashDump();
DUMP(GUI_PopUpEffect());
RichEditWithToolBar e;
DUMP(ScrollBarSize());
e.Pick(ParseQTF(LoadFile(FileName())));
RichEdit::PosInfo f;
LoadFromFile(f, ConfigFile("pos"));
e.SetPosInfo(f);
// e.Pick(ParseQTF(AsQTF(CreateImageObject(CtrlImg::exclamation)) + " hahahaha"));
TopWindow w;
w.SetRect(0, 0, 700, 500);
w.Sizeable().Zoomable();
w.Add(e.SizePos());
w.Run();
/*
String strQTF = e.GetQTF(CHARSET_ISO8859_1);
e.SetQTF(strQTF);
w.Run();
*/
String x = e.GetQTF();
SaveFile(FileName(), x);
f = e.GetPosInfo();
StoreToFile(f, ConfigFile("pos"));
LOG("Exit");
}