예제 #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
파일: main.cpp 프로젝트: ultimatepp/mirror
	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());
}