mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
.upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@12207 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d7423f981e
commit
b385eb56be
1 changed files with 17 additions and 18 deletions
|
|
@ -2,26 +2,25 @@
|
|||
|
||||
using namespace Upp;
|
||||
|
||||
struct MyApp : TopWindow {
|
||||
virtual void Paint(Draw& w);
|
||||
};
|
||||
|
||||
void MyApp::Paint(Draw& w)
|
||||
{
|
||||
w.DrawRect(GetSize(), White());
|
||||
String text = "αβγδ АБГД 吗嗎 弒";
|
||||
for(int i = 0; i < 30; i++) {
|
||||
Font fnt(i, 16);
|
||||
w.DrawText(0, i * 20, fnt.GetFaceName() + " " + text, fnt);
|
||||
}
|
||||
}
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
ArrayCtrl list;
|
||||
list.SetLineCy(30);
|
||||
list.AddColumn("Font").Sorting();
|
||||
list.AddColumn("Monospace").Sorting();
|
||||
list.AddColumn("Serif").Sorting();
|
||||
list.AddColumn("Script").Sorting();
|
||||
list.AddColumn("Sample").Sorting();
|
||||
list.ColumnWidths("122 79 62 66 1084");
|
||||
for(int i = 0; i < Font::GetFaceCount(); i++) {
|
||||
Font fnt(i, 10);
|
||||
LOG(fnt.GetFaceName() << " " << (fnt.IsSerif() ? "[serif] " : "")
|
||||
<< (fnt.IsScript() ? "[script] " : ""));
|
||||
Font fnt(i, 20);
|
||||
list.Add(fnt.GetFaceName(),
|
||||
fnt.IsFixedPitch() ? "Yes" : "",
|
||||
fnt.IsSerif() ? "Yes" : "",
|
||||
fnt.IsScript() ? "Yes" : "",
|
||||
AttrText("Hello αβγδ АБГД 吗嗎 弒").SetFont(fnt));
|
||||
}
|
||||
MyApp().Run();
|
||||
TopWindow win;
|
||||
win.Add(list.SizePos());
|
||||
win.Run();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue