Sudoku: minor cleanup.
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007, Michael Pfeiffer, [email protected]. All rights reserved.
|
* Copyright 2007, Michael Pfeiffer, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "CenteredViewContainer.h"
|
#include "CenteredViewContainer.h"
|
||||||
|
|
||||||
CenteredViewContainer::CenteredViewContainer(BView *target, BRect frame, const char* name, uint32 resizingMode)
|
|
||||||
: BView(frame, name, resizingMode, B_WILL_DRAW | B_FRAME_EVENTS)
|
CenteredViewContainer::CenteredViewContainer(BView* target, const char* name)
|
||||||
, fTarget(target)
|
:
|
||||||
|
BView(name, B_WILL_DRAW | B_FRAME_EVENTS),
|
||||||
|
fTarget(target)
|
||||||
{
|
{
|
||||||
SetViewColor(B_TRANSPARENT_COLOR);
|
SetViewColor(B_TRANSPARENT_COLOR);
|
||||||
// to avoid flickering
|
// to avoid flickering
|
||||||
@@ -18,13 +22,13 @@ CenteredViewContainer::~CenteredViewContainer()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CenteredViewContainer::Draw(BRect updateRect)
|
CenteredViewContainer::Draw(BRect updateRect)
|
||||||
{
|
{
|
||||||
FillRect(updateRect);
|
FillRect(updateRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CenteredViewContainer::FrameResized(float width, float height)
|
CenteredViewContainer::FrameResized(float width, float height)
|
||||||
{
|
{
|
||||||
BView::FrameResized(width, height);
|
BView::FrameResized(width, height);
|
||||||
@@ -40,5 +44,5 @@ void CenteredViewContainer::_CenterTarget(float width, float height)
|
|||||||
fTarget->ResizeTo(size, size);
|
fTarget->ResizeTo(size, size);
|
||||||
fTarget->FrameResized(size, size);
|
fTarget->FrameResized(size, size);
|
||||||
// in BeOS R5 BView::FrameResized is not (always) called automatically
|
// in BeOS R5 BView::FrameResized is not (always) called automatically
|
||||||
// after ResizeTo()
|
// after ResizeTo()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user