Exemple #1
0
void Pdb::ToForeground()
{
	TopWindow *w = GetTopWindow();
	if(w && !w->IsForeground()) {
		LLOG("Setting theide as foreground");
		w->SetForeground();
	}
}
Exemple #2
0
void WindowsMenu(Bar& bar)
{
	Vector<Ctrl *> w = Ctrl::GetTopWindows();
	int p = 1;
	for(int i = 0; i < w.GetCount() && p < 10; i++) {
		TopWindow *q = dynamic_cast<TopWindow *>(w[i]);
		if(q && !q->GetOwner() && p < 10) {
			bar.Add(Format("&%d ", p++) + FromUnicode(q->GetTitle(), CHARSET_DEFAULT),
			        callback1(PutForeground, Ptr<Ctrl>(q)))
			   .Check(q->IsForeground())
			   .Help(t_("Activate this window"));
		}
	}
	if(p >= 10)
		bar.Add(t_("More windows.."), callback(WindowsList));
}