Exemple #1
0
MainView::MainView( BRect frame ) : BView (frame, "mainView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW) {

	SetViewColor(216, 216, 216);

	// nutzbare Größe
	frame.OffsetTo( 0.0, 0.0 );
	frame.InsetBy( 5.0, 5.0 );
	
	// Erstellen der beiden inneren Frames
	TopView* topView = new TopView( BRect( frame.left, frame.top, frame.right, frame.bottom - 72.0 - be_plain_font->Size() - be_bold_font->Size() ) );
	AddChild( topView );

	BottomView* bottomView = new BottomView( BRect( frame.left, frame.bottom - 67.0 - be_plain_font->Size() - be_bold_font->Size(), frame.right, frame.bottom - 43.0 ) );
	AddChild( bottomView );

	// StatusBar
	BStatusBar*	statusBar	= new BStatusBar( BRect(frame.left + 5.0, frame.bottom - be_plain_font->Size() - 23.0, frame.left + 400.0, frame.bottom), "statusBar", STATUS_STATUS, NULL);
	statusBar->SetText(STATUS_SELECT_FILES);
	statusBar->SetResizingMode(B_FOLLOW_BOTTOM);
	rgb_color color = { 70, 100, 180, 255};
	statusBar->SetBarColor(color);
	statusBar->SetBarHeight(14.0);
	AddChild(statusBar);
	
	// Do it! - Button
	BButton* DoItButton = new BButton( BRect ( frame.right - be_plain_font->StringWidth(STR_DO_IT) - 25.0, frame.bottom - 30.0, frame.right - 5.0 , frame.bottom - 5.0 ), "DoIt", STR_DO_IT, new BMessage(MSG_DO_IT), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM );
	DoItButton->SetEnabled(false);
	AddChild(DoItButton);
};
Exemple #2
0
void
Window::MessageReceived(BMessage* message)
{
	switch (message->what) {
		case kMsgUpdate:
		{
			char buffer[100];
			snprintf(buffer, sizeof(buffer), "%ld ", (int32)fStatusBar->CurrentValue());
			fStatusBar->Update(1, fStatusBar->CurrentValue() > 25 ? " updated!" : NULL, buffer);

			if (fStatusBar->CurrentValue() >= fStatusBar->MaxValue()) {
#if 1
				fStatusBar->Reset("-", "????");
#else
				fStatusBar->Reset();
				fStatusBar->SetText("-");
				fStatusBar->SetTrailingText("????");
#endif
				fStatusBar->SetMaxValue(50.0);
			}
		}

		default:
			BWindow::MessageReceived(message);
	}
}
static void haikuProgressLayoutUpdateMethod(Ihandle *ih)
{
  iupdrvBaseLayoutUpdateMethod(ih);

  BStatusBar* bar = (BStatusBar*)ih->handle;
  bar->SetBarHeight(ih->currentheight - 1);
}
Exemple #4
0
void
NSDownloadWindow::Failure(const char* error)
{
	bar->LockLooper();
	bar->Update(0, NULL, error);
	bar->SetBarColor(ui_color(B_FAILURE_COLOR));
	bar->UnlockLooper();
}
Exemple #5
0
void
NSDownloadWindow::Success()
{
	bar->LockLooper();
	bar->SetBarColor(ui_color(B_SUCCESS_COLOR));
	bar->UnlockLooper();

	success = true;
}
Exemple #6
0
void
NSDownloadWindow::Progress(int size)
{
	progress += size;

	char* buffer = human_friendly_bytesize(progress);
	strcat(buffer, "/");

	bar->LockLooper();
	bar->Update(size, NULL, buffer);
	bar->Invalidate();
	bar->UnlockLooper();
}
NotificationView::NotificationView(NotificationWindow* win,
	BNotification* notification, bigtime_t timeout)
	:
	BView("NotificationView", B_WILL_DRAW),
	fParent(win),
	fNotification(notification),
	fTimeout(timeout),
	fRunner(NULL),
	fBitmap(NULL),
	fCloseClicked(false)
{
	if (fNotification->Icon() != NULL)
		fBitmap = new BBitmap(fNotification->Icon());

	if (fTimeout <= 0)
		fTimeout = fParent->Timeout() * 1000000;

	BGroupLayout* layout = new BGroupLayout(B_VERTICAL);
	SetLayout(layout);

	SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
	SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));

	switch (fNotification->Type()) {
		case B_IMPORTANT_NOTIFICATION:
			fStripeColor = ui_color(B_CONTROL_HIGHLIGHT_COLOR);
			break;
		case B_ERROR_NOTIFICATION:
			fStripeColor = ui_color(B_FAILURE_COLOR);
			break;
		case B_PROGRESS_NOTIFICATION:
		{
			BStatusBar* progress = new BStatusBar("progress");
			progress->SetBarHeight(12.0f);
			progress->SetMaxValue(1.0f);
			progress->Update(fNotification->Progress());

			BString label = "";
			label << (int)(fNotification->Progress() * 100) << " %";
			progress->SetTrailingText(label);

			layout->AddView(progress);
		}
		// fall through.
		case B_INFORMATION_NOTIFICATION:
			fStripeColor = tint_color(ui_color(B_PANEL_BACKGROUND_COLOR),
				B_DARKEN_1_TINT);
			break;
	}
}
static int haikuProgressBarSetMaxAttrib(Ihandle* ih, const char* value)
{
  if (ih->data->marquee)
    return 0;

  if (!value)
    ih->data->vmax = 1;
  else
    ih->data->vmax = atof(value);
  iProgressBarCropValue(ih);

  BStatusBar* bar = (BStatusBar*)ih->handle;
  bar->SetMaxValue(ih->data->vmax);

  return 1;
}
static int haikuProgressBarSetValueAttrib(Ihandle* ih, const char* value)
{
  if (ih->data->marquee)
    return 0;

  if (!value)
    ih->data->value = 0;
  else
    ih->data->value = atof(value);
  iProgressBarCropValue(ih);

  BStatusBar* bar = (BStatusBar*)ih->handle;
  float val = bar->CurrentValue();
  bar->Update(ih->data->value - val);

  return 1;
}
static int haikuProgressBarMapMethod(Ihandle* ih)
{
  BStatusBar* bar = new BStatusBar(BRect(0,0,200,30), "progress");
  bar->SetFlags(bar->Flags() | B_SUPPORTS_LAYOUT);
  	// We need this to allow the bar to have no labels

  bar->SetMaxValue(1.0f);

  ih->handle = (InativeHandle*)bar;
  
  if (iupStrEqualNoCase(iupAttribGetStr(ih, "ORIENTATION"), "VERTICAL"))
	UNIMPLEMENTED

  if (iupAttribGetBoolean(ih, "MARQUEE"))
	UNIMPLEMENTED

  iuphaikuBaseAddToParent(ih);
  return IUP_NOERROR;
}
void
ProgressWindow::MessageReceived(BMessage* message)
{
	switch (message->what) {
		case B_UPDATE_STATUS_BAR:
			char count[100];
			snprintf(count, sizeof(count), "%" B_PRId32,
				(int32)fStatusBar->CurrentValue() + 1);

			fStatusBar->Update(1, NULL, count);
			break;

		case B_CANCEL:
			fAbortButton->SetEnabled(false);
			if (fQuitListener != NULL)
				*fQuitListener = true;
			break;

		default:
			BWindow::MessageReceived(message);
			break;
	}
}
Exemple #12
0
void
add_status_bars(BGridLayout* layout, int32& row)
{
	BBox* box = new BBox(B_FANCY_BORDER, NULL);
	box->SetLabel("Info");

	BGroupLayout* boxLayout = new BGroupLayout(B_VERTICAL, kInset);
	boxLayout->SetInsets(kInset, kInset + box->TopBorderOffset(), kInset,
		kInset);
	box->SetLayout(boxLayout);

	BStatusBar* statusBar = new BStatusBar("status bar", "Status",
		"Completed");
	statusBar->SetMaxValue(100);
	statusBar->SetTo(0);
	statusBar->SetBarHeight(12);
	boxLayout->AddView(statusBar);

	statusBar = new BStatusBar("status bar", "Progress",
		"Completed");
	statusBar->SetMaxValue(100);
	statusBar->SetTo(40);
	statusBar->SetBarHeight(12);
	boxLayout->AddView(statusBar);

	statusBar = new BStatusBar("status bar", "Lifespan of capitalism",
		"Completed");
	statusBar->SetMaxValue(100);
	statusBar->SetTo(100);
	statusBar->SetBarHeight(12);
	boxLayout->AddView(statusBar);

	layout->AddView(box, 0, row, 4);

	row++;
}
Exemple #13
0
	ViewsWindow(BRect frame) 
		:
		BWindow(frame, "ALM Views", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE)
	{
		BButton* button1 = new BButton("BButton");
		BRadioButton* radioButton = new BRadioButton("BRadioButton", NULL);
		BButton* button3 = new BButton("3");
		BButton* button4 = new BButton("4");
		button4->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
			B_ALIGN_VERTICAL_CENTER));
		BButton* button5 = new BButton("5");
		BButton* button6 = new BButton("6");
		BTextView* textView1 = new BTextView("textView1");
		textView1->SetText("BTextView");
		BStatusBar* statusBar = new BStatusBar("BStatusBar", "label",
			"trailing label");
		statusBar->Update(50);

		BMenu* menu = new BMenu("Menu 1");
		BMenuField* menu1 = new BMenuField("MenuField 1", menu);
		menu->AddItem(new BPopUpMenu("Menu 1"));
		BStringView* stringView1 = new BStringView("string 1", "string 1");

		menu = new BMenu("Menu 2  + long text");
		BMenuField* menu2 = new BMenuField("MenuField 2", menu);
		menu->AddItem(new BPopUpMenu("Menu 2"));
		BStringView* stringView2 = new BStringView("string 2", "string 2");

		BALM::BALMLayout* layout = new BALMLayout(10, 10);
		BALM::BALMLayoutBuilder(this, layout)
			.SetInsets(10)
			.Add(button1, layout->Left(), layout->Top())
			.StartingAt(button1)
				.AddToRight(radioButton)
				.AddToRight(BSpaceLayoutItem::CreateGlue())
				.AddToRight(button3)
			.StartingAt(radioButton)
				.AddBelow(textView1, NULL, NULL, layout->RightOf(button3))
				.AddBelow(button4)
				.AddToRight(button5, layout->Right())
				.AddBelow(button6)
				.AddBelow(menu1, layout->AddYTab(), layout->Left(),
					layout->AddXTab())
				.AddToRight(stringView1)
				.AddToRight(BSpaceLayoutItem::CreateGlue(), layout->Right())
				.AddBelow(statusBar, NULL, layout->Left(), layout->Right());

		// start over so that layout->RightOf() can return accurate results
		BALM::BALMLayoutBuilder(layout)
			.StartingAt(statusBar)
				.AddBelow(menu2, layout->Bottom(), layout->Left(),
					layout->RightOf(menu1))
				.AddToRight(stringView2)
				.AddToRight(BSpaceLayoutItem::CreateGlue(), layout->Right());

		layout->Solver()->AddConstraint(2, layout->TopOf(menu1), -1,
			layout->Bottom(), OperatorType(kEQ), 0);

		// test size limits
		BSize min = layout->MinSize();
		BSize max = layout->MaxSize();
		SetSizeLimits(min.Width(), max.Width(), min.Height(), max.Height());
	}
Exemple #14
0
//calculate the view positions of all the MatrixLayoutItems
//on the items list with offsets based upon matrixLeft
//and matrixTop
void 
LayoutMatrix	::	Calc(	const float paramMatrixLeft,  
							const float paramMatrixTop,
							sem_id paramSemID) 
{
	int32 numItems = mpItemsList->CountItems();
	if (!numItems) return;
	if (acquire_sem(paramSemID) != B_NO_ERROR)
	{
		warning(myPrefs->FailAqSem);
		return;
	}
	bool hasPopUpMenu = false;
	TextItem *	scratchTextItem;
	for (	int i = 0;
			i < numItems;
			i++)
	{
		((LayoutMatrixItem *)(mpItemsList->ItemAt(i)))->Calc();
	}
	float widest = 0;
	float tallest = 0;
	int32 index = 0;
	for (	int i = 0;
			i < numItems;
			i++)
	{
		LayoutMatrixItem * lmi = (LayoutMatrixItem *)mpItemsList->ItemAt(index++);
		if (lmi->mfWidthPref > widest) 
		{
			widest = lmi->mfWidthPref;
		}
		if (lmi->mfHeightPref > tallest) 
		{
			tallest = lmi->mfHeightPref;
		}
	}
	if (mui32Flags & SAMESIZE) 
	{//SAMESIZE makes all items the same size as the largest
		index = 0;
		//Resize all items to match largest:
		for (	uint32 i = 0;
				i < mui32Rows;
				i++) 
		{
			for (	uint32 j = 0;
					j < mui32Columns;
					j++) 
			{
				LayoutMatrixItem * lmi = (LayoutMatrixItem *)mpItemsList->ItemAt(index++);
				switch (lmi->mui32Kind)
				{
					case KIND_MYSPACER:
					{
						MySpacer * scratchMySpacer = (MySpacer *)lmi->mpItem;
						if (scratchMySpacer->mbSAMEFromWidest)
						{
							scratchMySpacer->ResizeTo(widest, tallest);
						}
					}
					break;
					case KIND_MYBUTTON:
					{
						BButton * scratchMyButton = (BButton *)lmi->mpItem;
						scratchMyButton->ResizeTo(widest, tallest);
					}
					break;
					case KIND_MYSLIDER:
					{
						BSlider * scratchMySlider = (BSlider *)lmi->mpItem;
						scratchMySlider->ResizeTo(widest, tallest);
					}
					break;
					case KIND_STRINGDRAWER:
					{
						BStringView * scratchMyStringView = (BStringView *)lmi->mpItem;
						scratchMyStringView->ResizeTo(widest, tallest);
					}
					break;
					case KIND_MYCHECKBOX:
					{
						BCheckBox * scratchMyCheckBox = (BCheckBox *)lmi->mpItem;
						scratchMyCheckBox->ResizeTo(widest, tallest);
					}
					break;
					case KIND_MYPICTUREBUTTON:
					{
						BPictureButton * scratchMyPictureButton = (BPictureButton *)lmi->mpItem;
						scratchMyPictureButton->ResizeTo(widest, tallest);
					}
					break;
					case KIND_MYCOLORCONTROL:
					{
						BColorControl * scratchMyColorControl = (BColorControl *)lmi->mpItem;
						scratchMyColorControl->ResizeTo(widest, tallest);
					}
					break;
					case KIND_MYSTATUSBAR:
					{
						BStatusBar * scratchMyStatusBar = (BStatusBar *)lmi->mpItem;
						scratchMyStatusBar->ResizeTo(widest, tallest);
					}
					break;
					case KIND_UINT32CONTROL:
					{
						UInt32Control * scratchUInt32Control = (UInt32Control *)lmi->mpItem;
						scratchUInt32Control->ResizeTo(widest, tallest);
					}
					break;
					case KIND_FLOATCONTROL:
					{
						FloatControl * scratchFloatControl = (FloatControl *)lmi->mpItem;
						scratchFloatControl->ResizeTo(widest, tallest);
					}
					break;
					case KIND_STRINGCONTROL:
					{
						StringControl * scratchStringControl = (StringControl *)lmi->mpItem;
						scratchStringControl->ResizeTo(widest, tallest);
					}
					break;
				}
			}
		}
	}
	index = 0;
	//move every item based upon size and padding:
	const float hpad = 2;//horizontal spacing between items
	const float vpad = 2;//vertical spacing between items
	float localLeft;
	float localTop = vpad + paramMatrixTop;
	float excessRight = 0, excessRightHold = 0;
	float excessBottom = 0, excessBottomHold = 0;
	for (	uint32 ii = 0;
			ii < mui32Rows;
			ii++) 
	{
		localLeft = paramMatrixLeft + hpad;
		float columnRight = 0;
		excessBottom = 0;
		for (	uint32 jj = 0;
				jj < mui32Columns;
				jj++) 
		{
			excessRight = 0;
			LayoutMatrixItem * lmi = (LayoutMatrixItem *)mpItemsList->ItemAt(index++);
			switch (lmi->mui32Kind) 
			{
				case KIND_MYPOPUPMENU:
				{
					hasPopUpMenu = true;
					MyPopUpMenu * scratchPopUpMenu = (MyPopUpMenu *)lmi->mpItem;
					scratchPopUpMenu->mfLabelLeft = localLeft;
					excessRightHold = lmi->mfWidthPref + scratchPopUpMenu->mfLabelWidth;
					scratchPopUpMenu->SetLeft(localLeft);
					scratchPopUpMenu->mfLabelTop = localTop;
					if ((scratchPopUpMenu->mfHeight + 9) > scratchPopUpMenu->mfLabelHeight)
					{
						excessBottomHold = scratchPopUpMenu->mfHeight + 10;
					}
					else
					{
						excessBottomHold = scratchPopUpMenu->mfLabelHeight + 1;
					}
				}
				break;
				case KIND_MYTEXTVIEW:
				{
					BTextView * scratchTextView = (BTextView *)lmi->mpItem;
					scratchTextView->MoveTo(localLeft, localTop);
					excessRightHold = ((MyTextView *)scratchTextView)->mfWidth;
					excessBottomHold = ((MyTextView *)scratchTextView)->mfHeight;
				}
				break;
				case KIND_MYLISTVIEW:
				{
					BListView * scratchListView = (BListView *)lmi->mpItem;
					scratchListView->MoveTo(localLeft, localTop);
					((BListView *)(lmi->mpItem))->GetPreferredSize(&excessRightHold, &excessBottomHold);
				}
				break;
				case KIND_MYBUTTON:
				{
					BButton * scratchMyButton = (BButton *)lmi->mpItem;
					scratchMyButton->MoveTo(localLeft, localTop);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
				}
				break;
				case KIND_MYSLIDER:
				{
					BSlider * scratchMySlider = (BSlider *)lmi->mpItem;
					scratchMySlider->MoveTo(localLeft, localTop);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
				}
				break;
				case KIND_MYSPACER:
				{
					MySpacer * scratchMySpacer = (MySpacer *)lmi->mpItem;
					if (	(mui32Flags & SAMESIZE) 
							&& 
							scratchMySpacer->mbSAMEFromWidest)
					{
						excessRightHold = widest;
						excessBottomHold = tallest;
					}
					else
					{
						excessRightHold = scratchMySpacer->mfPreferredWidth;
						excessBottomHold = scratchMySpacer->mfPreferredHeight;
					}
				}
				break;
				case KIND_MYRADIOVIEW:
				{
					MyRadioView * scratchRadioView = (MyRadioView *)lmi->mpItem;
					scratchRadioView->MoveTo(localLeft, localTop);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
				}
				break;
				case KIND_STRINGDRAWER:
				{
					BStringView * scratchMyStringView = (BStringView *)lmi->mpItem;
					TextItem * scratchTextItem = ((MyStringDrawer *)lmi->mpItem)->GetTextItem();
					scratchTextItem->mfLeft = localLeft;
					scratchTextItem->mfTop = localTop + lmi->mfHeightPref - ((MyStringDrawer *)lmi->mpItem)->mfDescender - vpad;
					scratchMyStringView->MoveTo(localLeft, localTop);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
				}
				break;
				case KIND_MYCHECKBOX:
				{
					BCheckBox * scratchMyCheckBox = (BCheckBox *)lmi->mpItem;
					scratchMyCheckBox->MoveTo(localLeft, localTop + 1);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref + 1;
				}
				break;
				case KIND_MYPICTUREBUTTON:
				{
					BPictureButton * scratchMyPictureButton = (BPictureButton *)lmi->mpItem;
					scratchMyPictureButton->MoveTo(localLeft, localTop);
					excessRightHold = scratchMyPictureButton->Bounds().Width() + 1;
					excessBottomHold = scratchMyPictureButton->Bounds().Height() + 1;
				}
				break;
				case KIND_MYCOLORCONTROL:
				{
					BColorControl * scratchMyColorControl = (BColorControl *)lmi->mpItem;
					scratchMyColorControl->MoveTo(localLeft, localTop);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
					;
				}
				break;
				case KIND_MYSTATUSBAR:
				{
					MyStatusBar * scratchMyStatusBar = (MyStatusBar *)lmi->mpItem;
					scratchMyStatusBar->MoveTo(localLeft, localTop);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
				}
				break;
				case KIND_UINT32CONTROL:
				{
					UInt32Control * scratchUInt32Control = (UInt32Control *)lmi->mpItem;
					scratchUInt32Control->MoveTo(localLeft, localTop);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
				}
				break;
				case KIND_FLOATCONTROL:
				{
					FloatControl * scratchFloatControl = (FloatControl *)lmi->mpItem;
					scratchFloatControl->MoveTo(localLeft, localTop);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
				}
				break;
				case KIND_STRINGCONTROL:
				{
					StringControl * scratchStringControl = (StringControl *)lmi->mpItem;
					scratchStringControl->MoveTo(localLeft, localTop);
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
				}
				break;
				case KIND_TEXT:
					scratchTextItem = (TextItem *)lmi->mpItem;
					scratchTextItem->mfLeft = localLeft;
					scratchTextItem->mfTop = localTop + lmi->mfHeightPref;
					excessRightHold = lmi->mfWidthPref;
					excessBottomHold = lmi->mfHeightPref;
				break;
				case KIND_COLORWELL:
					((ColorWell *)lmi->mpItem)->mfLabelLeft = localLeft;
					((ColorWell *)lmi->mpItem)->SetLeft(((ColorWell *)lmi->mpItem)->GetLeft() + localLeft);
					excessRightHold = lmi->mfWidthPref;
					((ColorWell *)lmi->mpItem)->mfLabelTop = localTop;
					((ColorWell *)lmi->mpItem)->SetTop(((ColorWell *)lmi->mpItem)->GetTop() + localTop);
					excessBottomHold = lmi->mfHeightPref;
				break;
				case KIND_INT8GADGET:
				case KIND_UINT8GADGET:
				case KIND_INT16GADGET:
				case KIND_UINT16GADGET:
				case KIND_INT32GADGET:
				case KIND_UINT32GADGET:
				case KIND_INT64GADGET:
				case KIND_UINT64GADGET:
				case KIND_FLOATGADGET:
				case KIND_HEXGADGET:
				case KIND_STRINGGADGET:
					((GadgetBase *)lmi->mpItem)->mfLabelLeft = localLeft;
					((GadgetBase *)lmi->mpItem)->SetLeft(((GadgetBase *)lmi->mpItem)->GetLeft() + localLeft);
					excessRightHold = lmi->mfWidthPref;
					((GadgetBase *)lmi->mpItem)->mfLabelTop = localTop;
					((GadgetBase *)lmi->mpItem)->SetTop(((GadgetBase *)lmi->mpItem)->GetTop() + localTop);
					excessBottomHold = lmi->mfHeightPref + 1;
				break;
			}
			if (mui32Flags & SAMESIZE)
			{
				excessRightHold = widest;
				excessBottomHold = tallest;
			}
			excessRightHold += hpad;
			if (excessRightHold > excessRight)
			{
				excessRight = excessRightHold;
			}
			localLeft += excessRight;
			if (mui32Columns - 1) 
			{
				if (jj != (mui32Columns - 1)) 
				{
					if (localLeft > columnRight) 
					{
						columnRight = localLeft;
					}
				}
				else 
				{
					columnRight = localLeft;
				}
			}
			else 
			{
				if (localLeft > columnRight) 
				{
					columnRight = localLeft;
				}
			}
			//mfRight is stored so that another MatrixLayout
			//can know where a previous one ended up
			if (excessBottomHold > excessBottom)
			{
				excessBottom = excessBottomHold;
			}
		}
		if (columnRight > mfRight)
		{
			mfRight = columnRight;
		}
		excessBottomHold += vpad;
		localTop += excessBottom;
		if (mui32Rows - 1) 
		{
			if (ii != (mui32Rows - 1)) 
			{
				if (localTop > mfBottom) 
				{
					mfBottom = localTop;
				}
			}
			else 
			{
				mfBottom = localTop;
			}
		}
		else 
		{
			if (localTop > mfBottom) 
			{
				mfBottom = localTop;
			}
		}
		//mfBottom is stored so that another MatrixLayout
		//can know where a previous one ended up
	}
	if (hasPopUpMenu)
	{
		mfRight += 30;
	}
	release_sem(paramSemID);
}//end
status_t
PProgressBar::SetProperty(const char *name, PValue *value, const int32 &index)
{
	if (!name || !value)
		return B_ERROR;
	
	BString str(name);
	PProperty *prop = FindProperty(name,index);
	if (!prop)
		return B_NAME_NOT_FOUND;
	
	if (FlagsForProperty(prop) & PROPERTY_READ_ONLY)
		return B_READ_ONLY;
	
	BStatusBar *backend = (BStatusBar*)fView;
	
	BoolValue boolval;
	ColorValue colorval;
	FloatValue floatval;
	IntValue intval;
	PointValue pointval;
	RectValue rectval;
	StringValue stringval;
	
	status_t status = prop->SetValue(value);
	if (status != B_OK)
		return status;

	if (backend->Window())
		backend->Window()->Lock();

	if (str.ICompare("BarColor") == 0)
	{
		prop->GetValue(&colorval);
		backend->SetBarColor(*colorval.value);
	}
	else if (str.ICompare("BarHeight") == 0)
	{
		prop->GetValue(&floatval);
		backend->SetBarHeight(*floatval.value);
	}
	else if (str.ICompare("CurrentValue") == 0)
	{
		prop->GetValue(&floatval);
		float current = backend->CurrentValue();
		backend->Update((*floatval.value) - current);
	}
	else if (str.ICompare("MaxValue") == 0)
	{
		prop->GetValue(&floatval);
		backend->SetMaxValue(*floatval.value);
	}
	else if (str.ICompare("Text") == 0)
	{
		prop->GetValue(&stringval);
		backend->SetText(*stringval.value);
	}
	else if (str.ICompare("TrailingText") == 0)
	{
		prop->GetValue(&stringval);
		backend->SetTrailingText(*stringval.value);
	}
	else
	{
		if (backend->Window())
			backend->Window()->Unlock();

		return PView::SetProperty(name, value, index);
	}

	if (backend->Window())
		backend->Window()->Unlock();

	return prop->GetValue(value);
}
status_t
PProgressBar::GetProperty(const char *name, PValue *value, const int32 &index) const
{
	if (!name || !value)
		return B_ERROR;
	
	BString str(name);
	PProperty *prop = FindProperty(name,index);
	if (!prop)
		return B_NAME_NOT_FOUND;
	
	BStatusBar *backend = (BStatusBar*)fView;

	if (backend->Window())
		backend->Window()->Lock();

	if (str.ICompare("BarColor") == 0)
		((ColorProperty*)prop)->SetValue(backend->BarColor());
	else if (str.ICompare("BarHeight") == 0)
		((FloatProperty*)prop)->SetValue(backend->BarHeight());
	else if (str.ICompare("Label") == 0)
		((StringProperty*)prop)->SetValue(backend->Label());
	else if (str.ICompare("CurrentValue") == 0)
	{
		((FloatProperty*)prop)->SetValue(backend->CurrentValue());
	}
	else if (str.ICompare("MaxValue") == 0)
		((FloatProperty*)prop)->SetValue(backend->MaxValue());
	else if (str.ICompare("Text") == 0)
		((StringProperty*)prop)->SetValue(backend->Text());
	else if (str.ICompare("TrailingLabel") == 0)
		((StringProperty*)prop)->SetValue(backend->TrailingLabel());
	else if (str.ICompare("TrailingText") == 0)
		((StringProperty*)prop)->SetValue(backend->TrailingText());
	else
	{
		if (backend->Window())
			backend->Window()->Unlock();

		return PView::GetProperty(name, value, index);
	}

	if (backend->Window())
		backend->Window()->Unlock();

	return prop->GetValue(value);
}