Ejemplo n.º 1
0
void QueueView::UpdateQueue()
{
    BRect b = Bounds(), r;

    if( fScrollView )
    {
        RemoveChild( fScrollView );
        delete fScrollView;
    }

    r = BRect( b.left+10,b.top+10,b.right-B_V_SCROLL_BAR_WIDTH-10,b.bottom-45 );
    fQueueView  = new BView( r, NULL, B_FOLLOW_NONE, B_WILL_DRAW );
    fScrollView = new BScrollView( NULL, fQueueView, B_FOLLOW_NONE, 0,
                                   false, true, B_FANCY_BORDER );
    AddChild( fScrollView );

    hb_job_t * j;
    hb_title_t * t;
    int i;
    char * s;

    b = fQueueView->Bounds();
    r = BRect( b.left+10,b.top+10,b.right-10,b.top+25 );

    for( i = 0; i < hb_count( fHandle ); i++ )
    {
        j = hb_job( fHandle, i );
        t = j->title;

		// TODO: find dvd
        //asprintf( &s, "DVD: %s", t->dvd );
        //AddStringView( s, &r );

        asprintf( &s, "Title: %d", t->index );
        AddStringView( s, &r );

        asprintf( &s, "Chapters: %d to %d", j->chapter_start, j->chapter_end );
        AddStringView( s, &r );

        asprintf( &s, "Pass: %d of %d", MAX( 1, j->pass ), MIN( 2, j->pass + 1 ) );
        AddStringView( s, &r );

        asprintf( &s, "Destination: %s", j->file );
        AddStringView( s, &r );
    }
}
Ejemplo n.º 2
0
CapabilitiesView::CapabilitiesView()
	: BView(TR("Capabilities"), 0, NULL)
{
	SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
	SetLayout(new BGroupLayout(B_VERTICAL));

	BRect dummyRect(0, 0, 0, 0);

	const float kInset = 10;

	int lights = 0;
	int clippingPlanes = 0;
	int modelStack = 0;
	int projectionStack = 0;
	int textureStack = 0;
	int maxTex3d = 0;
	int maxTex2d = 0;
	int nameStack = 0;
	int listStack = 0;
	int maxPoly = 0;
	int attribStack = 0;
	int buffers = 0;
	int convolutionWidth = 0;
	int convolutionHeight = 0;
	int maxIndex = 0;
	int maxVertex = 0;
	int textureUnits = 0;

	glGetIntegerv(GL_MAX_LIGHTS, &lights);
	glGetIntegerv(GL_MAX_CLIP_PLANES, &clippingPlanes);
	glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &modelStack);
	glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, &projectionStack);
	glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, &textureStack);
	glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &maxTex3d);
	glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTex2d);
	glGetIntegerv(GL_MAX_NAME_STACK_DEPTH, &nameStack);
	glGetIntegerv(GL_MAX_LIST_NESTING, &listStack);
	glGetIntegerv(GL_MAX_EVAL_ORDER, &maxPoly);
	glGetIntegerv(GL_MAX_ATTRIB_STACK_DEPTH, &attribStack);
	glGetIntegerv(GL_AUX_BUFFERS, &buffers);
	glGetIntegerv(GL_MAX_CONVOLUTION_WIDTH, &convolutionWidth);
	glGetIntegerv(GL_MAX_CONVOLUTION_HEIGHT, &convolutionHeight);
	glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &maxIndex);
	glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &maxVertex);
	glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &textureUnits);

	BString tempString;
	BView *rootView = new BView("root view", 0, NULL);
	rootView->SetLayout(new BGroupLayout(B_VERTICAL));

	tempString << (int32) buffers;
	AddStringView(rootView, "Buffers", TR("Auxiliary buffer(s):"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) modelStack;
	AddStringView(rootView, "ModelStack", TR("Model stack size:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) projectionStack;
	AddStringView(rootView, "ProjectionStack", TR("Projection stack size:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) textureStack;
	AddStringView(rootView, "TextureStack", TR("Texture stack size:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) nameStack;
	AddStringView(rootView, "NameStack", TR("Name stack size:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) listStack;
	AddStringView(rootView, "ListStack", TR("List stack size:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) attribStack;
	AddStringView(rootView, "AttribStack", TR("Attributes stack size:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) maxTex3d;
	AddStringView(rootView, "MaxTex3D", TR("Max. 3D texture size:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) maxTex2d;
	AddStringView(rootView, "MaxTex2D", TR("Max. 2D texture size:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) textureUnits;
	AddStringView(rootView, "MaxTexUnits", TR("Max. texture units:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) lights;
	AddStringView(rootView, "MaxLights", TR("Max. lights:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) clippingPlanes;
	AddStringView(rootView, "MaxClippingPlanes", TR("Max. clipping planes:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) maxPoly;
	AddStringView(rootView, "MaxPoly", TR("Max. evaluators equation order:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) convolutionWidth << "x" << convolutionHeight;
	AddStringView(rootView, "MaxConvultion", TR("Max. convolution:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) maxIndex;
	AddStringView(rootView, "MaxIndex", TR("Max. recommended index elements:"),
		tempString.String(), true);

	tempString.SetTo("");
	tempString << (int32) maxVertex;
	AddStringView(rootView, "MaxVertex", TR("Max. recommended vertex elements:"),
		tempString.String(), true);

	AddChild(BGroupLayoutBuilder(B_VERTICAL)
		.Add(rootView)
		.SetInsets(kInset, kInset, kInset, kInset)
	);
}