示例#1
0
	void RightDown(Point, dword) {
		CallbackArgTarget<int> result;
		MenuBar menu;
		for(int i = 0; i < 10; i++)
			menu.Add(AsString(i), result[i]);
		menu.Separator();
		menu.Add("Exit", THISBACK(Exit));
		menu.Execute();
		if(!IsNull(result))
			PromptOK("You have selected " + AsString((int)result));
	}
示例#2
0
void Ide::FindStdDir()
{
	String n = GetFileFolder(editfile);
	MenuBar menu;
	if(!IsNull(n))
		menu.Add(n, THISBACK1(FindSetStdDir, n));
	Vector<String> d = GetUppDirs();
	for(int i = 0; i < d.GetCount(); i++)
		menu.Add(d[i], THISBACK1(FindSetStdDir, d[i]));
	menu.Execute(&ff.folder, ff.folder.GetPushScreenRect().BottomLeft());
}
示例#3
0
	virtual void RightDown(Point p, dword keyflags) {
		int result = Null;
		MenuBar menu;
		for(int i = 0; i < 10; i++)
			menu.Add(AsString(i), [=, &result] { result = i; });
		menu.Execute();
		if(IsNull(result))
			PromptOK("Menu was cancelled");
		else
			PromptOK("You have selected " + AsString((int)result));
	}
示例#4
0
void RichTextView::RightDown(Point p, dword keyflags)
{
	MenuBar b;
	b.Add(CtrlImg::copy(), t_("Copy"), THISBACK(Copy)).Key(K_CTRL_C);
	b.Execute();
}
示例#5
0
文件: main.cpp 项目: kolyden/mirror
void MenuBug::RightDown(Point pt, dword keyflags)
{
    MenuBar menu;
    menu.Add("Pokus", Callback());
    menu.Execute(pt + GetScreenView().TopLeft());
}