diff --git a/headers/os/interface/ChannelControl.h b/headers/os/interface/ChannelControl.h index aef5d731cf..d310bbbe80 100644 --- a/headers/os/interface/ChannelControl.h +++ b/headers/os/interface/ChannelControl.h @@ -180,14 +180,17 @@ protected: private: - int32 _m_channel_count; - int32 _m_value_channel; - int32 * _m_channel_min; - int32 * _m_channel_max; - int32 * _m_channel_val; - BString _m_min_label; - BString _m_max_label; - void * _m_multi_labels; + int32 fChannelCount; + int32 fCurrentChannel; + int32 * fChannelMin; + int32 * fChannelMax; + int32 * fChannelValues; + + BString fMinLabel; + BString fMaxLabel; + + void * fMultiLabels; + BMessage * fModificationMsg; uint32 _reserved_[15]; @@ -200,17 +203,17 @@ private: inline int32 * const & BChannelControl::MinLimitList() const { - return _m_channel_min; + return fChannelMin; } inline int32 * const & BChannelControl::MaxLimitList() const { - return _m_channel_max; + return fChannelMax; } inline int32 * const & BChannelControl::ValueList() const { - return _m_channel_val; + return fChannelValues; } diff --git a/headers/os/interface/ChannelSlider.h b/headers/os/interface/ChannelSlider.h index 8cc3a6c5fc..8560b362da 100644 --- a/headers/os/interface/ChannelSlider.h +++ b/headers/os/interface/ChannelSlider.h @@ -122,16 +122,16 @@ virtual void _Reserved_BChannelSlider_5(void *, ...); virtual void _Reserved_BChannelSlider_6(void *, ...); virtual void _Reserved_BChannelSlider_7(void *, ...); - float _m_baseline; - float _m_linefeed; - BBitmap * _m_left_knob; - BBitmap * _m_mid_knob; - BBitmap * _m_right_knob; - BBitmap * _m_backing; - BView * _m_backing_view; - bool _m_vertical; - bool _m_padding_[3]; - BPoint _m_click_delta; + float fBaseLine; + float fLineFeed; + BBitmap * fLeftKnob; + BBitmap * fMidKnob; + BBitmap * fRightKnob; + BBitmap * fBacking; + BView * fBackingView; + bool fVertical; + bool fPadding[3]; + BPoint fClickDelta; int32 fCurrentChannel; bool fAllChannels; diff --git a/src/kits/interface/ChannelControl.cpp b/src/kits/interface/ChannelControl.cpp index 3b5796d192..d811d77d77 100644 --- a/src/kits/interface/ChannelControl.cpp +++ b/src/kits/interface/ChannelControl.cpp @@ -17,22 +17,22 @@ sPropertyInfo[] = { BChannelControl::BChannelControl(BRect frame, const char *name, const char *label, BMessage *model, int32 channel_count, uint32 resizeMode, uint32 flags) : BControl(frame, name, label, model, resizeMode, flags), - _m_channel_count(channel_count), - _m_value_channel(0), - _m_channel_min(NULL), - _m_channel_max(NULL), - _m_channel_val(NULL), - _m_multi_labels(NULL), + fChannelCount(channel_count), + fCurrentChannel(0), + fChannelMin(NULL), + fChannelMax(NULL), + fChannelValues(NULL), + fMultiLabels(NULL), fModificationMsg(NULL) { - _m_channel_min = new int32[channel_count]; - memset(_m_channel_min, 0, sizeof(int32) * channel_count); + fChannelMin = new int32[channel_count]; + memset(fChannelMin, 0, sizeof(int32) * channel_count); - _m_channel_max = new int32[channel_count]; - memset(_m_channel_max, 100, sizeof(int32) * channel_count); + fChannelMax = new int32[channel_count]; + memset(fChannelMax, 100, sizeof(int32) * channel_count); - _m_channel_val = new int32[channel_count]; - memset(_m_channel_val, 0, sizeof(int32) * channel_count); + fChannelValues = new int32[channel_count]; + memset(fChannelValues, 0, sizeof(int32) * channel_count); } @@ -44,9 +44,9 @@ BChannelControl::BChannelControl(BMessage *archive) BChannelControl::~BChannelControl() { - delete[] _m_channel_min; - delete[] _m_channel_max; - delete[] _m_channel_val; + delete[] fChannelMin; + delete[] fChannelMax; + delete[] fChannelValues; } @@ -170,14 +170,14 @@ void BChannelControl::SetValue(int32 value) { // Get real - if (value > _m_channel_max[_m_value_channel]) - value = _m_channel_max[_m_value_channel]; + if (value > fChannelMax[fCurrentChannel]) + value = fChannelMax[fCurrentChannel]; - if (value < _m_channel_min[_m_value_channel]); - value = _m_channel_min[_m_value_channel]; + if (value < fChannelMin[fCurrentChannel]); + value = fChannelMin[fCurrentChannel]; - if (value != _m_channel_val[_m_value_channel]) { - StuffValues(_m_value_channel, 1, &value); + if (value != fChannelValues[fCurrentChannel]) { + StuffValues(fCurrentChannel, 1, &value); BControl::SetValue(value); } } @@ -186,12 +186,12 @@ BChannelControl::SetValue(int32 value) status_t BChannelControl::SetCurrentChannel(int32 channel) { - if (channel < 0 || channel >= _m_channel_count) + if (channel < 0 || channel >= fChannelCount) return B_BAD_INDEX; - if (channel != _m_value_channel) { - _m_value_channel = channel; - BControl::SetValue(_m_channel_val[_m_value_channel]); + if (channel != fCurrentChannel) { + fCurrentChannel = channel; + BControl::SetValue(fChannelValues[fCurrentChannel]); } return B_OK; @@ -201,14 +201,14 @@ BChannelControl::SetCurrentChannel(int32 channel) int32 BChannelControl::CurrentChannel() const { - return _m_value_channel; + return fCurrentChannel; } int32 BChannelControl::CountChannels() const { - return _m_channel_count; + return fChannelCount; } @@ -219,25 +219,25 @@ BChannelControl::SetChannelCount(int32 channel_count) return B_BAD_VALUE; // TODO: Currently we only grow the buffer. Test what BeOS does - if (channel_count > _m_channel_count) { + if (channel_count > fChannelCount) { int32 *newMin = new int32[channel_count]; int32 *newMax = new int32[channel_count]; int32 *newVal = new int32[channel_count]; - memcpy(newMin, _m_channel_min, _m_channel_count); - memcpy(newMax, _m_channel_max, _m_channel_count); - memcpy(newVal, _m_channel_val, _m_channel_count); + memcpy(newMin, fChannelMin, fChannelCount); + memcpy(newMax, fChannelMax, fChannelCount); + memcpy(newVal, fChannelValues, fChannelCount); - delete[] _m_channel_min; - delete[] _m_channel_max; - delete[] _m_channel_val; + delete[] fChannelMin; + delete[] fChannelMax; + delete[] fChannelValues; - _m_channel_min = newMin; - _m_channel_max = newMax; - _m_channel_val = newVal; + fChannelMin = newMin; + fChannelMax = newMax; + fChannelValues = newVal; } - _m_channel_count = channel_count; + fChannelCount = channel_count; return B_OK; } @@ -260,7 +260,7 @@ BChannelControl::GetValue(int32 *outValues, int32 fromChannel, { int32 i = 0; for (i = 0; i < channelCount; i++) - outValues[i] = _m_channel_val[fromChannel + i]; + outValues[i] = fChannelValues[fromChannel + i]; return i; } diff --git a/src/kits/interface/ChannelSlider.cpp b/src/kits/interface/ChannelSlider.cpp index dad859b2a4..83473ae741 100644 --- a/src/kits/interface/ChannelSlider.cpp +++ b/src/kits/interface/ChannelSlider.cpp @@ -79,7 +79,7 @@ BChannelSlider::Archive(BMessage *into, bool deep) const orientation BChannelSlider::Orientation() const { - return _m_vertical ? B_VERTICAL : B_HORIZONTAL; + return fVertical ? B_VERTICAL : B_HORIZONTAL; } @@ -88,7 +88,7 @@ BChannelSlider::SetOrientation(orientation _orientation) { bool isVertical = _orientation == B_VERTICAL; if (isVertical != Vertical()) { - _m_vertical = isVertical; + fVertical = isVertical; Invalidate(Bounds()); } } @@ -331,9 +331,9 @@ BChannelSlider::ThumbFrameFor(int32 channel) if (thumb != NULL) { frame = thumb->Bounds(); if (Vertical()) - frame.OffsetBy(0, _m_linefeed * 2); + frame.OffsetBy(0, fLineFeed * 2); else - frame.OffsetBy(_m_linefeed, _m_linefeed); + frame.OffsetBy(fLineFeed, fLineFeed); } return frame; @@ -367,9 +367,9 @@ BChannelSlider::ThumbRangeFor(int32 channel) BRect bounds = Bounds(); BRect frame = ThumbFrameFor(channel); if (Vertical()) - range = bounds.Height() - frame.Height() - _m_linefeed * 4; + range = bounds.Height() - frame.Height() - fLineFeed * 4; else - range = bounds.Width() - frame.Width() - _m_linefeed * 2; + range = bounds.Width() - frame.Width() - fLineFeed * 2; return range; } @@ -380,13 +380,13 @@ BChannelSlider::InitData() { UpdateFontDimens(); - _m_left_knob = NULL; - _m_mid_knob = NULL; - _m_right_knob = NULL; - _m_backing = NULL; - _m_backing_view = NULL; - _m_vertical = Bounds().Width() / Bounds().Height() < 1; - _m_click_delta = B_ORIGIN; + fLeftKnob = NULL; + fMidKnob = NULL; + fRightKnob = NULL; + fBacking = NULL; + fBackingView = NULL; + fVertical = Bounds().Width() / Bounds().Height() < 1; + fClickDelta = B_ORIGIN; fCurrentChannel = -1; fAllChannels = false; @@ -428,8 +428,8 @@ BChannelSlider::UpdateFontDimens() { font_height height; GetFontHeight(&height); - _m_baseline = height.ascent + height.leading; - _m_linefeed = _m_baseline + height.descent; + fBaseLine = height.ascent + height.leading; + fLineFeed = fBaseLine + height.descent; } @@ -448,7 +448,7 @@ BChannelSlider::DrawThumbFrame(BView *where, const BRect &area) bool BChannelSlider::Vertical() { - return _m_vertical; + return fVertical; }