Implemented Archive() and unarchiving constructor. Removed bad linefeeds.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11234 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
static property_info // TODO: Finish this
|
static property_info // TODO: Finish this
|
||||||
sPropertyInfo[] = {
|
sPropertyInfo[] = {
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ BChannelControl::SetChannelCount(int32 channel_count)
|
|||||||
{
|
{
|
||||||
if (channel_count < 0 || channel_count >= MaxChannelCount())
|
if (channel_count < 0 || channel_count >= MaxChannelCount())
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
// TODO: Currently we only grow the buffer. Test what BeOS does
|
// TODO: Currently we only grow the buffer. Test what BeOS does
|
||||||
if (channel_count > fChannelCount) {
|
if (channel_count > fChannelCount) {
|
||||||
int32 *newMin = new int32[channel_count];
|
int32 *newMin = new int32[channel_count];
|
||||||
@@ -316,7 +316,6 @@ status_t
|
|||||||
BChannelControl::SetLimitsFor(int32 fromChannel, int32 channelCount,
|
BChannelControl::SetLimitsFor(int32 fromChannel, int32 channelCount,
|
||||||
const int32 *minimum, const int32 *maximum)
|
const int32 *minimum, const int32 *maximum)
|
||||||
{
|
{
|
||||||
|
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,7 +347,7 @@ BChannelControl::SetLimitLabels(const char *minLabel, const char *maxLabel)
|
|||||||
{
|
{
|
||||||
if (minLabel != fMinLabel)
|
if (minLabel != fMinLabel)
|
||||||
fMinLabel = minLabel;
|
fMinLabel = minLabel;
|
||||||
|
|
||||||
if (maxLabel != fMaxLabel)
|
if (maxLabel != fMaxLabel)
|
||||||
fMaxLabel = maxLabel;
|
fMaxLabel = maxLabel;
|
||||||
|
|
||||||
@@ -411,8 +410,8 @@ BChannelControl::StuffValues(int32 fromChannel, int32 channelCount,
|
|||||||
|| fromChannel + channelCount >= fChannelCount)
|
|| fromChannel + channelCount >= fChannelCount)
|
||||||
return B_BAD_INDEX;
|
return B_BAD_INDEX;
|
||||||
|
|
||||||
for (int32 i = 0; i < channelCount; i++) {
|
for (int32 i = 0; i < channelCount; i++) {
|
||||||
if (inValues[i] <= fChannelMax[fromChannel + i]
|
if (inValues[i] <= fChannelMax[fromChannel + i]
|
||||||
&& inValues[i] >= fChannelMin[fromChannel + i])
|
&& inValues[i] >= fChannelMin[fromChannel + i])
|
||||||
fChannelValues[fromChannel + i] = inValues[i];
|
fChannelValues[fromChannel + i] = inValues[i];
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,11 @@ BChannelSlider::BChannelSlider(BRect area, const char *name, const char *label,
|
|||||||
BChannelSlider::BChannelSlider(BMessage *archive)
|
BChannelSlider::BChannelSlider(BMessage *archive)
|
||||||
: BChannelControl(archive)
|
: BChannelControl(archive)
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
InitData();
|
||||||
|
|
||||||
|
orientation orient;
|
||||||
|
if (archive->FindInt32("_orient", (int32 *)&orient) == B_OK)
|
||||||
|
SetOrientation(orient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -71,8 +75,11 @@ BChannelSlider::Instantiate(BMessage *archive)
|
|||||||
status_t
|
status_t
|
||||||
BChannelSlider::Archive(BMessage *into, bool deep) const
|
BChannelSlider::Archive(BMessage *into, bool deep) const
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
status_t status = BChannelControl::Archive(into, deep);
|
||||||
return B_ERROR;
|
if (status == B_OK)
|
||||||
|
status = into->AddInt32("_orient", (int32)Orientation());
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -166,7 +173,6 @@ BChannelSlider::Draw(BRect updateRect)
|
|||||||
void
|
void
|
||||||
BChannelSlider::MouseDown(BPoint where)
|
BChannelSlider::MouseDown(BPoint where)
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -281,7 +287,9 @@ BChannelSlider::DrawChannel(BView *into, int32 channel, BRect area, bool pressed
|
|||||||
void
|
void
|
||||||
BChannelSlider::DrawGroove(BView *into, int32 channel, BPoint topLeft, BPoint bottomRight)
|
BChannelSlider::DrawGroove(BView *into, int32 channel, BPoint topLeft, BPoint bottomRight)
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
// TODO: Draw the real thing
|
||||||
|
ASSERT(into != NULL);
|
||||||
|
into->StrokeRect(BRect(topLeft, bottomRight), B_SOLID_HIGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -289,7 +297,7 @@ void
|
|||||||
BChannelSlider::DrawThumb(BView *into, int32 channel, BPoint where, bool pressed)
|
BChannelSlider::DrawThumb(BView *into, int32 channel, BPoint where, bool pressed)
|
||||||
{
|
{
|
||||||
ASSERT(into != NULL);
|
ASSERT(into != NULL);
|
||||||
|
|
||||||
const BBitmap *thumb = ThumbFor(channel, pressed);
|
const BBitmap *thumb = ThumbFor(channel, pressed);
|
||||||
if (thumb == NULL)
|
if (thumb == NULL)
|
||||||
return;
|
return;
|
||||||
@@ -318,7 +326,6 @@ BChannelSlider::DrawThumb(BView *into, int32 channel, BPoint where, bool pressed
|
|||||||
const BBitmap *
|
const BBitmap *
|
||||||
BChannelSlider::ThumbFor(int32 channel, bool pressed)
|
BChannelSlider::ThumbFor(int32 channel, bool pressed)
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,7 +445,8 @@ BChannelSlider::UpdateFontDimens()
|
|||||||
|
|
||||||
void
|
void
|
||||||
BChannelSlider::DrawThumbs()
|
BChannelSlider::DrawThumbs()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -464,7 +472,7 @@ BChannelSlider::Redraw()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BChannelSlider::MouseMovedCommon(BPoint , BPoint )
|
BChannelSlider::MouseMovedCommon(BPoint point, BPoint point2)
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
// TODO: Implement
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user