git-svn-id: svn://ultimatepp.org/upp/trunk@5000 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-05-23 13:26:14 +00:00
parent 206eaf9f65
commit 86e4709d53
4 changed files with 27 additions and 47 deletions

View file

@ -1,2 +1,2 @@
#include "AccessKey.h"
;akslkjasdfj
"#include \"AccessKey.h\"\r\n;akslkjasdfj"
"\t\tfor(int i = 0; i < p.GetCount() && n < 12; i++) {\r\n\t\t\tString fn = p[i];\r\n\t\t\tString ext = ToLower(GetFileExt(fn));\r\n\t\t\tString pp = pn + '/' + fn;\r\n\t\t\tif(ext == \".lay\") {\r\n\t\t\t\tbar.Add(fn + \" include\", THISBACK1(InsertLay, pp));\r\n\t\t\t\tn++;\r\n\t\t\t}\r\n\t\t\tif(ext == \".iml\") {\r\n\t\t\t\tString c = GetFileTitle(fn);\r\n\t\t\t\tc.Set(0, ToUpper(c[0]));\r\n\t\t\t\tbar.Add(fn + \" include\", THISBACK2(InsertIml, pp, c.EndsWith(\"Img\") ? c : c + \"Img\"));\r\n\t\t\t\tn++;\r\n\t\t\t}\r\n\t\t\tif(ext == \".tpp\") {\r\n\t\t\t\tString s;\r\n\t\t\t\ts << \"#define TOPICFILE <\" << pp << \"/all.i>\\n\"\r\n\t\t\t\t << \"#include <Core/topic_group.h>\\n\";\r\n\t\t\t\tbar.Add(fn + \" include\", THISBACK1(InsertText, s));\r\n\t\t\t\tn++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n"

View file

@ -1,11 +1,11 @@
description "click the titlebar";
uses
CtrlLib;
file
main.cpp;
mainconfig
"" = "GUI";
description "click the titlebar\377";
uses
CtrlLib;
file
main.cpp;
mainconfig
"" = "GUI";

View file

@ -0,0 +1,4 @@
#ifndef _Testcase_Maximize_icpp_init_stub
#define _Testcase_Maximize_icpp_init_stub
#include "CtrlLib/init"
#endif

View file

@ -2,42 +2,18 @@
using namespace Upp;
class MainWindow : public TopWindow
{
public:
MainWindow();
void LeftUp(Point p, dword keyflags);
void Paint(Draw &w);
protected:
bool m_clicked;
Point m_point;
};
MainWindow::MainWindow()
: m_clicked(false), m_point(0, 0)
{}
void MainWindow::LeftUp(Point p, dword keyflags)
{
m_clicked = true;
m_point = p;
Refresh();
PromptOK("!!!");
}
void MainWindow::Paint(Draw &w)
{
w.DrawRect(GetWorkArea(), Color(255, 255, 255));
struct MyApp : public TopWindow {
void Serialize(Stream& s) {
SerializePlacement(s);
}
if(m_clicked)
w.DrawImage(m_point.x, m_point.y, CtrlImg::arrow);
}
MyApp() { Sizeable().Zoomable(); }
};
GUI_APP_MAIN
{
MainWindow mw;
mw.Title("Doubleclick Titlebar").Sizeable().MaximizeBox().MinimizeBox()
.SetRect(0, 0, 800, 600);
mw.Run();
MyApp app;
LoadFromFile(app);
app.Execute();
StoreToFile(app);
}