1/* PoorManView.cpp
2 *
3 *	Philip Harrison
4 *	Started: 5/14/2004
5 *	Version: 0.1
6 */
7
8
9#include "StatusSlider.h"
10
11#include <StringFormat.h>
12
13
14StatusSlider::StatusSlider(const char* name, const char* label,
15	const char* statusPrefix, BMessage* message, int32 minValue, int32 maxValue)
16	:
17	BSlider(name, label, message, minValue, maxValue, B_HORIZONTAL),
18	fFormat(statusPrefix)
19{
20}
21
22
23const char*
24StatusSlider::UpdateText() const
25{
26	fStr.Truncate(0);
27	fFormat.Format(fStr, Value());
28	strlcpy(fPattern, fStr.String(), sizeof(fPattern));
29	return fPattern;
30}
31