Exemple #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));
	}
Exemple #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());
}
Exemple #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));
	}
Exemple #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();
}
Exemple #5
0
void MenuBug::RightDown(Point pt, dword keyflags)
{
    MenuBar menu;
    menu.Add("Pokus", Callback());
    menu.Execute(pt + GetScreenView().TopLeft());
}