Example #1
0
void ProcessorList::drawItem(ProcessorListItem* item)
{

	Colour c = findColour(item->colorId);

	glColor4f(c.getFloatRed(),
		      c.getFloatGreen(),
		      c.getFloatBlue(),
		      1.0f);

	// see if this helps drawing issues on Windows:
	glRectf(0.0, 0.0, 1.0, 1.0);

	// glBegin(GL_POLYGON);
	// glVertex2f(0,0);
	// glVertex2f(1,0);
	// glVertex2f(1,1);
	// glVertex2f(0,1);
	// glEnd();

	drawItemName(item);

	if (item->hasSubItems())
	{
		drawButton(item->isOpen());
	}

}
Example #2
0
void ProcessorList::drawItem(Graphics& g, ProcessorListItem* item)
{

    Colour c = findColour(item->colorId);

    g.setColour(c);

    if (item->hasSubItems())
        g.fillRect(1.0, 0.0, getWidth()-2, itemHeight);
    else
        g.fillRect(1.0, 10.0, getWidth()-2, subItemHeight);

    drawItemName(g,item);

    if (item->hasSubItems())
    {
        drawButton(g, item->isOpen());
    }
}
Example #3
0
void ProcessorList::drawItem(ProcessorListItem* item)
{
	
	glColor4f(item->color.getFloatRed(),
		      item->color.getFloatGreen(),
		      item->color.getFloatBlue(),
		      1.0f);

	glBegin(GL_POLYGON);
	glVertex2f(0,0);
	glVertex2f(1,0);
	glVertex2f(1,1);
	glVertex2f(0,1);
	glEnd();

	drawItemName(item);

	if (item->hasSubItems())
	{
		drawButton(item->isOpen());
	}

}