Exemplo n.º 1
0
void eWidget::invalidate(eRect area, int force)
{
	if ( (!(state & stateVisible)) && (!force))
		return;

	if (area.isNull())
		area=eRect(0, 0, size.width(), size.height());

	eWidget *w=this;

	// problem: überlappende, nicht transparente fenster

	while (force || (((int)w->getBackgroundColor())==-1))
	//	while (1)
	{
		force=0;
		if (!w->parent)	// spaetestens fuers TLW sollte backgroundcolor aber non-transparent sein
			break;
		area.moveBy(w->position.x(), w->position.y());
		w=w->parent;
		area.moveBy(w->clientrect.x(), w->clientrect.y());
		area&=w->clientrect;
	}
	w->redraw(area);
}
Exemplo n.º 2
0
void eListboxPythonMultiContent::setSelectionClip(eRect &rect, bool update)
{
	m_selection_clip = rect;
	if (m_listbox)
		rect.moveBy(ePoint(0, m_listbox->getEntryTop()));
	if (m_clip.valid())
		m_clip |= rect;
	else
		m_clip = rect;
	if (update && m_listbox)
		m_listbox->entryChanged(m_cursor);
}
Exemplo n.º 3
0
void gPainter::clip(eRect clip)
{
	if ( dc.islocked() )
		return;
	gOpcode o;
	o.dc=&dc;
	o.opcode=gOpcode::clip;
	clip.moveBy(logicalZero.x(), logicalZero.y());
	cliparea.push(cliparea.top()&clip);
	o.parm.clip=new gOpcode::para::pclip(cliparea.top());

	rc.submit(o);
}
Exemplo n.º 4
0
void eWidget::redraw(eRect area)		// area bezieht sich nicht auf die clientarea
{
	if (getTLW()->just_showing)
		return;

	if (state & stateVisible )
	{
		if (area.isNull())
			area=eRect(0, 0, size.width(), size.height());
		if (area.width()>0)
		{
			gPainter *p=getPainter(area);
			if (p)
			{
				eraseBackground(p, area);
				redrawWidget(p, area);
				delete p;
			}
		}
		if(!childlist.empty())
		{
			area.moveBy(-clientrect.x(), -clientrect.y());		// ab hier jetzt schon.

			ePtrList<eWidget>::iterator It(childlist);
			while (It != childlist.end())
			{
				eRect cr=area&eRect((*It)->position, (*It)->size);
				if (!cr.isEmpty())
				{
					cr.moveBy(-It->position.x(), -It->position.y());
					It->redraw(cr);
				}
				++It;
			}
		}
	}
}