Style fixes to BBox, update copyright header
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2006, Haiku, Inc. All Rights Reserved.
|
* Copyright 2005-2013 Haiku, Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _BOX_H
|
#ifndef _BOX_H
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
class BBox : public BView {
|
class BBox : public BView {
|
||||||
public:
|
public:
|
||||||
BBox(BRect frame, const char *name = NULL,
|
BBox(BRect frame, const char* name = NULL,
|
||||||
uint32 resizingMode = B_FOLLOW_LEFT
|
uint32 resizingMode = B_FOLLOW_LEFT
|
||||||
| B_FOLLOW_TOP,
|
| B_FOLLOW_TOP,
|
||||||
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
|
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
|
||||||
|
|||||||
+31
-27
@@ -1,12 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2009, Haiku, Inc.
|
* Copyright 2001-2013 Haiku, Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Marc Flerackers ([email protected])
|
* Stephan Aßmus, [email protected]
|
||||||
* Stephan Aßmus <[email protected]>
|
* DarkWyrm, [email protected]
|
||||||
* DarkWyrm <[email protected]>
|
|
||||||
* Axel Dörfler, [email protected]
|
* Axel Dörfler, [email protected]
|
||||||
|
* Marc Flerackers, [email protected]
|
||||||
|
* John Scipione, [email protected]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -41,9 +42,10 @@ struct BBox::LayoutData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
BBox::BBox(BRect frame, const char *name, uint32 resizingMode, uint32 flags,
|
BBox::BBox(BRect frame, const char* name, uint32 resizingMode, uint32 flags,
|
||||||
border_style border)
|
border_style border)
|
||||||
: BView(frame, name, resizingMode, flags | B_WILL_DRAW | B_FRAME_EVENTS),
|
:
|
||||||
|
BView(frame, name, resizingMode, flags | B_WILL_DRAW | B_FRAME_EVENTS),
|
||||||
fStyle(border)
|
fStyle(border)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
@@ -54,7 +56,8 @@ BBox::BBox(BRect frame, const char *name, uint32 resizingMode, uint32 flags,
|
|||||||
|
|
||||||
|
|
||||||
BBox::BBox(const char* name, uint32 flags, border_style border, BView* child)
|
BBox::BBox(const char* name, uint32 flags, border_style border, BView* child)
|
||||||
: BView(name, flags | B_WILL_DRAW | B_FRAME_EVENTS),
|
:
|
||||||
|
BView(name, flags | B_WILL_DRAW | B_FRAME_EVENTS),
|
||||||
fStyle(border)
|
fStyle(border)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
@@ -68,7 +71,8 @@ BBox::BBox(const char* name, uint32 flags, border_style border, BView* child)
|
|||||||
|
|
||||||
|
|
||||||
BBox::BBox(border_style border, BView* child)
|
BBox::BBox(border_style border, BView* child)
|
||||||
: BView(NULL, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP),
|
:
|
||||||
|
BView(NULL, B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP),
|
||||||
fStyle(border)
|
fStyle(border)
|
||||||
{
|
{
|
||||||
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
@@ -81,8 +85,9 @@ BBox::BBox(border_style border, BView* child)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BBox::BBox(BMessage *archive)
|
BBox::BBox(BMessage* archive)
|
||||||
: BView(archive),
|
:
|
||||||
|
BView(archive),
|
||||||
fStyle(B_FANCY_BORDER)
|
fStyle(B_FANCY_BORDER)
|
||||||
{
|
{
|
||||||
_InitObject(archive);
|
_InitObject(archive);
|
||||||
@@ -97,8 +102,8 @@ BBox::~BBox()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BArchivable *
|
BArchivable*
|
||||||
BBox::Instantiate(BMessage *archive)
|
BBox::Instantiate(BMessage* archive)
|
||||||
{
|
{
|
||||||
if (validate_instantiation(archive, "BBox"))
|
if (validate_instantiation(archive, "BBox"))
|
||||||
return new BBox(archive);
|
return new BBox(archive);
|
||||||
@@ -108,7 +113,7 @@ BBox::Instantiate(BMessage *archive)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BBox::Archive(BMessage *archive, bool deep) const
|
BBox::Archive(BMessage* archive, bool deep) const
|
||||||
{
|
{
|
||||||
status_t ret = BView::Archive(archive, deep);
|
status_t ret = BView::Archive(archive, deep);
|
||||||
|
|
||||||
@@ -179,7 +184,7 @@ BBox::InnerFrame()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BBox::SetLabel(const char *string)
|
BBox::SetLabel(const char* string)
|
||||||
{
|
{
|
||||||
_ClearLabel();
|
_ClearLabel();
|
||||||
|
|
||||||
@@ -194,7 +199,7 @@ BBox::SetLabel(const char *string)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BBox::SetLabel(BView *viewLabel)
|
BBox::SetLabel(BView* viewLabel)
|
||||||
{
|
{
|
||||||
_ClearLabel();
|
_ClearLabel();
|
||||||
|
|
||||||
@@ -213,14 +218,14 @@ BBox::SetLabel(BView *viewLabel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char *
|
const char*
|
||||||
BBox::Label() const
|
BBox::Label() const
|
||||||
{
|
{
|
||||||
return fLabel;
|
return fLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BView *
|
BView*
|
||||||
BBox::LabelView() const
|
BBox::LabelView() const
|
||||||
{
|
{
|
||||||
return fLabelView;
|
return fLabelView;
|
||||||
@@ -357,7 +362,7 @@ BBox::FrameResized(float width, float height)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BBox::MessageReceived(BMessage *message)
|
BBox::MessageReceived(BMessage* message)
|
||||||
{
|
{
|
||||||
BView::MessageReceived(message);
|
BView::MessageReceived(message);
|
||||||
}
|
}
|
||||||
@@ -385,7 +390,7 @@ BBox::WindowActivated(bool active)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BBox::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
|
BBox::MouseMoved(BPoint point, uint32 transit, const BMessage* message)
|
||||||
{
|
{
|
||||||
BView::MouseMoved(point, transit, message);
|
BView::MouseMoved(point, transit, message);
|
||||||
}
|
}
|
||||||
@@ -398,10 +403,9 @@ BBox::FrameMoved(BPoint newLocation)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BHandler *
|
BHandler*
|
||||||
BBox::ResolveSpecifier(BMessage *message, int32 index,
|
BBox::ResolveSpecifier(BMessage* message, int32 index, BMessage* specifier,
|
||||||
BMessage *specifier, int32 what,
|
int32 what, const char* property)
|
||||||
const char *property)
|
|
||||||
{
|
{
|
||||||
return BView::ResolveSpecifier(message, index, specifier, what, property);
|
return BView::ResolveSpecifier(message, index, specifier, what, property);
|
||||||
}
|
}
|
||||||
@@ -424,7 +428,7 @@ BBox::ResizeToPreferred()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BBox::GetPreferredSize(float *_width, float *_height)
|
BBox::GetPreferredSize(float* _width, float* _height)
|
||||||
{
|
{
|
||||||
_ValidateLayoutData();
|
_ValidateLayoutData();
|
||||||
|
|
||||||
@@ -443,7 +447,7 @@ BBox::MakeFocus(bool focused)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BBox::GetSupportedSuites(BMessage *message)
|
BBox::GetSupportedSuites(BMessage* message)
|
||||||
{
|
{
|
||||||
return BView::GetSupportedSuites(message);
|
return BView::GetSupportedSuites(message);
|
||||||
}
|
}
|
||||||
@@ -480,7 +484,7 @@ BBox::Perform(perform_code code, void* _data)
|
|||||||
BBox::GetHeightForWidth(data->width, &data->min, &data->max,
|
BBox::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||||
&data->preferred);
|
&data->preferred);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
case PERFORM_CODE_SET_LAYOUT:
|
case PERFORM_CODE_SET_LAYOUT:
|
||||||
{
|
{
|
||||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||||
@@ -633,7 +637,7 @@ BBox::_InitObject(BMessage* archive)
|
|||||||
SetFont(&font, flags);
|
SetFont(&font, flags);
|
||||||
|
|
||||||
if (archive != NULL) {
|
if (archive != NULL) {
|
||||||
const char *string;
|
const char* string;
|
||||||
if (archive->FindString("_label", &string) == B_OK)
|
if (archive->FindString("_label", &string) == B_OK)
|
||||||
SetLabel(string);
|
SetLabel(string);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user