示例#1
0
bool Curses::writeText(const std::u32string &text, int r, int c,
		       const Curses::CursesAttr &attr) const
{
	CursesContainer *p=parent;

	if (!isDialog() && p && p->getDialogChild())
		return false; // Parent has a dialog and it ain't us

	if (p)
		return p->writeText(text, r+getRowAligned(),
				    c+getColAligned(), attr);
	return false;
}
示例#2
0
void Curses::erase()
{
	const CursesContainer *p=getParent();

	if (!isDialog() && p && p->getDialogChild())
		return; // Parent has a dialog and it ain't us

	size_t w=getWidth();
	size_t h=getHeight();

	std::u32string spaces;

	spaces.insert(spaces.end(), w, ' ');

	size_t i;

	CursesAttr attr;

	for (i=0; i<h; i++)
		writeText(spaces, i, 0, attr);
}
示例#3
0
QString Telegram::title(int id) const
{
    return isDialog(id)? dialogTitle(id) : contactTitle(id);
}
示例#4
0
bool AbstractClient::wantsTabFocus() const
{
    return (isNormalWindow() || isDialog()) && wantsInput();
}