BMenu: Some style fixes related to docs

Mostly just making the variable names match between the
header and source.

No functional change intended.
This commit is contained in:
John Scipione 2013-11-05 19:19:11 -05:00
parent 45b87db2b7
commit 9a9ebda459
2 changed files with 37 additions and 37 deletions

View File

@ -47,9 +47,9 @@ typedef bool (*menu_tracking_hook)(BMenu* menu, void* state);
class BMenu : public BView {
public:
BMenu(const char* title,
BMenu(const char* name,
menu_layout layout = B_ITEMS_IN_COLUMN);
BMenu(const char* title, float width,
BMenu(const char* name, float width,
float height);
BMenu(BMessage* archive);
@ -109,12 +109,12 @@ public:
virtual status_t SetTargetForItems(BHandler* target);
virtual status_t SetTargetForItems(BMessenger messenger);
virtual void SetEnabled(bool state);
virtual void SetRadioMode(bool state);
virtual void SetTriggersEnabled(bool state);
virtual void SetEnabled(bool enable);
virtual void SetRadioMode(bool on);
virtual void SetTriggersEnabled(bool enable);
virtual void SetMaxContentWidth(float maxWidth);
void SetLabelFromMarked(bool state);
void SetLabelFromMarked(bool on);
bool IsLabelFromMarked();
bool IsEnabled() const;
bool IsRadioMode() const;
@ -165,7 +165,7 @@ public:
B_ABORT
};
virtual bool AddDynamicItem(add_state state);
virtual void DrawBackground(BRect update);
virtual void DrawBackground(BRect updateRect);
void SetTrackingHook(menu_tracking_hook hook,
void* state);

View File

@ -439,13 +439,13 @@ BMenu::Draw(BRect updateRect)
void
BMenu::MessageReceived(BMessage* msg)
BMenu::MessageReceived(BMessage* message)
{
switch (msg->what) {
switch (message->what) {
case B_MOUSE_WHEEL_CHANGED:
{
float deltaY = 0;
msg->FindFloat("be:wheel_delta_y", &deltaY);
message->FindFloat("be:wheel_delta_y", &deltaY);
if (deltaY == 0)
return;
@ -468,7 +468,7 @@ BMenu::MessageReceived(BMessage* msg)
}
default:
BView::MessageReceived(msg);
BView::MessageReceived(message);
break;
}
}
@ -1017,34 +1017,34 @@ BMenu::SetTargetForItems(BMessenger messenger)
void
BMenu::SetEnabled(bool enabled)
BMenu::SetEnabled(bool enable)
{
if (fEnabled == enabled)
if (fEnabled == enable)
return;
fEnabled = enabled;
fEnabled = enable;
if (dynamic_cast<_BMCMenuBar_*>(Supermenu()) != NULL)
Supermenu()->SetEnabled(enabled);
Supermenu()->SetEnabled(enable);
if (fSuperitem)
fSuperitem->SetEnabled(enabled);
fSuperitem->SetEnabled(enable);
}
void
BMenu::SetRadioMode(bool flag)
BMenu::SetRadioMode(bool on)
{
fRadioMode = flag;
if (!flag)
fRadioMode = on;
if (!on)
SetLabelFromMarked(false);
}
void
BMenu::SetTriggersEnabled(bool flag)
BMenu::SetTriggersEnabled(bool enable)
{
fTriggerEnabled = flag;
fTriggerEnabled = enable;
}
@ -1056,10 +1056,10 @@ BMenu::SetMaxContentWidth(float width)
void
BMenu::SetLabelFromMarked(bool flag)
BMenu::SetLabelFromMarked(bool on)
{
fDynamicName = flag;
if (flag)
fDynamicName = on;
if (on)
SetRadioMode(true);
}
@ -1319,17 +1319,17 @@ BMenu::SetItemMargins(float left, float top, float right, float bottom)
void
BMenu::GetItemMargins(float* left, float* top, float* right,
float* bottom) const
BMenu::GetItemMargins(float* _left, float* _top, float* _right,
float* _bottom) const
{
if (left != NULL)
*left = fPad.left;
if (top != NULL)
*top = fPad.top;
if (right != NULL)
*right = fPad.right;
if (bottom != NULL)
*bottom = fPad.bottom;
if (_left != NULL)
*_left = fPad.left;
if (_top != NULL)
*_top = fPad.top;
if (_right != NULL)
*_right = fPad.right;
if (_bottom != NULL)
*_bottom = fPad.bottom;
}
@ -1398,7 +1398,7 @@ BMenu::AddDynamicItem(add_state state)
void
BMenu::DrawBackground(BRect update)
BMenu::DrawBackground(BRect updateRect)
{
if (be_control_look != NULL) {
rgb_color base = sMenuInfo.background_color;
@ -1419,7 +1419,7 @@ BMenu::DrawBackground(BRect update)
borders |= BControlLook::B_TOP_BORDER
| BControlLook::B_BOTTOM_BORDER;
}
be_control_look->DrawMenuBackground(this, rect, update, base, 0,
be_control_look->DrawMenuBackground(this, rect, updateRect, base, 0,
borders);
return;
@ -1427,7 +1427,7 @@ BMenu::DrawBackground(BRect update)
rgb_color oldColor = HighColor();
SetHighColor(sMenuInfo.background_color);
FillRect(Bounds() & update, B_SOLID_HIGH);
FillRect(Bounds() & updateRect, B_SOLID_HIGH);
SetHighColor(oldColor);
}