Ejemplo n.º 1
0
MethodReplicant::MethodReplicant(const char* signature)
	:
	BView(BRect(0, 0, 15, 15), REPLICANT_CTL_NAME, B_FOLLOW_ALL, B_WILL_DRAW),
	fMenu("", false, false)
{
	// Background Bitmap
	fSegments = new BBitmap(BRect(0, 0, kRemoteWidth - 1, kRemoteHeight - 1),
		kRemoteColorSpace);
	fSegments->SetBits(kRemoteBits, kRemoteWidth * kRemoteHeight, 0,
		kRemoteColorSpace);
	// Background Color

	// add dragger
	BRect rect(Bounds());
	rect.left = rect.right - 7.0;
	rect.top = rect.bottom - 7.0;
	BDragger* dragger = new BDragger(rect, this,
		B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
	dragger->SetViewColor(B_TRANSPARENT_32_BIT);
	AddChild(dragger);

	ASSERT(signature != NULL);
	fSignature = strdup(signature);

	fMenu.SetFont(be_plain_font);
	fMenu.SetRadioMode(true);
}
Ejemplo n.º 2
0
Window::Window(BRect rect)
	: BWindow( rect, "QueryWatcher", B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS)
{
	fBackground = new ReplicantView( Bounds() );
	fBackground->SetViewColor(B_TRANSPARENT_COLOR);

	BRect draggerFrame = Bounds();
	draggerFrame.top = draggerFrame.bottom - 7;
	draggerFrame.left = draggerFrame.right - 7;

	BDragger* dragger = new BDragger(draggerFrame, fBackground);
	dragger->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
	AddChild(fBackground);
	fBackground->AddChild(dragger);
	
	
}