diff --git a/examples/Color/main.cpp b/examples/Color/main.cpp index ce053b94c..39ed40a48 100644 --- a/examples/Color/main.cpp +++ b/examples/Color/main.cpp @@ -3,12 +3,11 @@ ColorWindow::ColorWindow() { Sizeable().Zoomable(); - SetRect(100, 100, 100, 100); } void ColorWindow::Paint(Draw& draw) { - draw.DrawRect(draw.GetClip(), White()); + draw.DrawRect(GetSize(), White()); for(int i = 0; i < 16; i++) { Color c(i & 1 ? 255 : 0, i & 2 ? 255 : 0, i & 4 ? 255 : 0); draw.DrawText(0, i * 30, AsString(c), Arial(30).Underline(), c); diff --git a/examples/imgsrv/imgsrv.cpp b/examples/imgsrv/imgsrv.cpp index d89a552f9..5e2435dee 100644 --- a/examples/imgsrv/imgsrv.cpp +++ b/examples/imgsrv/imgsrv.cpp @@ -1,5 +1,5 @@ #include -#include +#include //#include #include #ifdef PLATFORM_WIN32 @@ -29,9 +29,10 @@ static void SignalHandler(int signal) } #endif -CONSOLE_APP_MAIN +GUI_APP_MAIN { #ifdef PLATFORM_WIN32 + AllocConsole(); SetConsoleCtrlHandler(&ControlBreak, TRUE); #endif #ifdef PLATFORM_POSIX diff --git a/examples/imgsrv/imgsrv.upp b/examples/imgsrv/imgsrv.upp index 4fad0cdbe..01226a008 100644 --- a/examples/imgsrv/imgsrv.upp +++ b/examples/imgsrv/imgsrv.upp @@ -1,10 +1,11 @@ -description "Simple http image server"; +description "Simple http image server\377"; uses Web, Draw, plugin\png, - plugin\gif; + plugin\gif, + CtrlCore; file imgsrv.cpp; diff --git a/examples/imgsrv/init b/examples/imgsrv/init index 65cf08b68..1bcebc946 100644 --- a/examples/imgsrv/init +++ b/examples/imgsrv/init @@ -4,4 +4,5 @@ #include "Draw/init" #include "plugin\png/init" #include "plugin\gif/init" +#include "CtrlCore/init" #endif diff --git a/reference/PrinterJob/main.cpp b/reference/PrinterJob/main.cpp index 68df10d7a..2ec8840dd 100644 --- a/reference/PrinterJob/main.cpp +++ b/reference/PrinterJob/main.cpp @@ -14,7 +14,7 @@ GUI_APP_MAIN w.StartPage(); const char *text = "Hello world!"; Font font = Roman(300); - Point p = Rect(w.GetPagePixels()).CenterPos(GetTextSize(text, font)); + Point p = Rect(w.GetPageSize()).CenterPos(GetTextSize(text, font)); w.DrawText(p.x, p.y, "Hello world!", font); w.EndPage(); } diff --git a/reference/RichImlImage/RichImlImage.upp b/reference/RichImlImage/RichImlImage.upp new file mode 100644 index 000000000..c56e02b7b --- /dev/null +++ b/reference/RichImlImage/RichImlImage.upp @@ -0,0 +1,11 @@ +description "Demonstrates usage of internal (iml) images in QTF\377"; + +uses + CtrlLib; + +file + main.cpp; + +mainconfig + "" = "GUI"; + diff --git a/reference/RichImlImage/main.cpp b/reference/RichImlImage/main.cpp new file mode 100644 index 000000000..d90be9bc5 --- /dev/null +++ b/reference/RichImlImage/main.cpp @@ -0,0 +1,8 @@ +#include + +using namespace Upp; + +GUI_APP_MAIN +{ + PromptOK("@@iml:400*400`CtrlImg:exclamation`"); +} diff --git a/reference/UscCtrl/main.lay b/reference/UscCtrl/main.lay index aa9d2fc5c..fc6efafba 100644 --- a/reference/UscCtrl/main.lay +++ b/reference/UscCtrl/main.lay @@ -1,5 +1,5 @@ LAYOUT(MainLayout, 404, 204) - ITEM(CounterCtrl, counter, SetFont(Roman(34)).Ink(Color(153, 0, 51)).Paper(Color(102, 204, 204)).LeftPosZ(128, 120).TopPosZ(56, 52)) + ITEM(CounterCtrl, counter, SetFont(RomanZ(34)).Ink(Color(153, 0, 51)).Paper(Color(102, 204, 204)).LeftPosZ(128, 120).TopPosZ(56, 52)) ITEM(LabelBox, dv___1, SetLabel(t_("This is the CounterCtrl")).LeftPosZ(98, 184).TopPosZ(36, 80)) END_LAYOUT diff --git a/uppdev/SmartButton/main.cpp b/uppdev/SmartButton/main.cpp index 39e983fdc..501ecbf73 100644 --- a/uppdev/SmartButton/main.cpp +++ b/uppdev/SmartButton/main.cpp @@ -1,23 +1,23 @@ #include +using namespace Upp; + class MyApp : public TopWindow { Button button; - void Click(String s) { - button.SetLabel("I was clicked, YOHOO!"); - PromptOK(s); - button <<= THISBACK1(Click, "Button was clicked once again!"); + void Click() { + if(PromptYesNo("Button was clicked. Do you want to quit?")) + Break(); } public: typedef MyApp CLASSNAME; MyApp() { - Title("Testing of Ultimate++"); - button.SetRect(100, 100, 200, 50); - button.SetLabel("Click me!"); - button <<= THISBACK1(Click, "Button was clicked for the first time."); - Add(button); + Title("Hello world"); + button.SetLabel("Hello world!"); + button <<= THISBACK(Click); + Add(button.HSizePos(100, 100).VSizePos(100, 100)); } }; diff --git a/uppsrc/BuildAll/BuildAll.cpp b/uppsrc/BuildAll/BuildAll.cpp index 8446bd8f0..f1f7b9f5a 100644 --- a/uppsrc/BuildAll/BuildAll.cpp +++ b/uppsrc/BuildAll/BuildAll.cpp @@ -6,9 +6,9 @@ using namespace Upp; // It compiles all U++ examples using MSC8 and MINGW build methods // or methods listed on commandline -String input = "d:\\"; -String output = "e:\\all"; -String umk = "d:\\theide\\umk.exe "; +String input = "u:\\upp.src"; +String output = "u:\\all"; +String umk = "u:\\theide\\umk.exe "; Vector bm; Vector failed; @@ -25,7 +25,7 @@ void Build(const char *nest, const char *bm, bool release) FindFile ff(AppendFileName(AppendFileName(input, nest), "*.*")); bool first = true; while(ff) { - if(ff.IsFolder()) { + if(ff.IsFolder() && !ff.IsHidden()) { String txt; txt << ff.GetName() << ' ' << bm << ' ' << mn; Cout() << " Building " << txt; @@ -64,14 +64,14 @@ void Build(const char *nest) CONSOLE_APP_MAIN { const Vector& arg = CommandLine(); - input = GetDataFile("BuildAll.cpp")[0] + String(":\\"); + input = GetFileFolder(GetFileFolder(GetFileFolder(GetDataFile("BuildAll.cpp")))); output = "C:\\out"; for(int i = 0; i < arg.GetCount(); i++) bm.Add(arg[i]); if(bm.GetCount() == 0) { - bm.Add("MSC71cdb"); - bm.Add("MSC8"); - bm.Add("MINGWI2"); +// bm.Add("MSC71cdb"); + bm.Add("MSC9"); +// bm.Add("MINGWI2"); } Build("examples"); Build("reference");