mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-31 07:12:39 -06:00
changed svn layout
git-svn-id: svn://ultimatepp.org/upp/trunk@281 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
commit
263ff5f895
2665 changed files with 642923 additions and 0 deletions
32
tutorial/Image02a/main.cpp
Normal file
32
tutorial/Image02a/main.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#define IMAGECLASS MyImages
|
||||
#define IMAGEFILE <Image02a/images.iml>
|
||||
#include <Draw/iml.h>
|
||||
|
||||
class MyApp : public TopWindow {
|
||||
public:
|
||||
virtual void Paint(Draw& draw);
|
||||
};
|
||||
|
||||
void MyApp::Paint(Draw& w)
|
||||
{
|
||||
w.DrawRect(GetSize(), SColorPaper());
|
||||
for(int i = 0; i < MyImages::GetCount(); i++) {
|
||||
w.DrawImage(50, 80 + 20 * i, MyImages::Get(i));
|
||||
w.DrawText(80, 80 + 20 * i, MyImages::GetId(i));
|
||||
}
|
||||
w.DrawImage(20, 0, 50, 50, MyImages::Get(MyImages::I_Circle));
|
||||
w.DrawText(80, 0, AsString(MyImages::Find("Circle")));
|
||||
}
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Sizeable().Run();
|
||||
Image m = MyImages::Circle();
|
||||
MyImages::Set(MyImages::I_Circle, MyImages::Triangle());
|
||||
MyImages::Set(MyImages::I_Triangle, m);
|
||||
MyApp().Sizeable().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue