Added some reserved fields to BControlLook.

* This makes future changes less troublesome, although we should also add
  some virtual slots there (probably just dozens of it, though, that's why
  I was being lazy).
* Don't pass messages by value; they are copied twice this way.
* Minor coding style corrections, automatic whitespace cleanup.
This commit is contained in:
Axel Dörfler
2012-02-26 14:58:52 +01:00
parent 8adaa6c544
commit d452ff664c
2 changed files with 12 additions and 8 deletions
+3 -1
View File
@@ -272,7 +272,8 @@ public:
const rgb_color& base, uint32 flags, const rgb_color& base, uint32 flags,
const BPoint& where); const BPoint& where);
void SetBackgroundInfo(BMessage msg); void SetBackgroundInfo(
const BMessage& backgroundInfo);
protected: protected:
void _DrawButtonFrame(BView* view, BRect& rect, void _DrawButtonFrame(BView* view, BRect& rect,
@@ -370,6 +371,7 @@ private:
int32 fCachedWorkspace; int32 fCachedWorkspace;
BMessage fBackgroundInfo; BMessage fBackgroundInfo;
uint32 _reserved[20];
}; };
extern BControlLook* be_control_look; extern BControlLook* be_control_look;
+4 -2
View File
@@ -2,6 +2,8 @@
* Copyright 2009, Stephan Aßmus <[email protected]> * Copyright 2009, Stephan Aßmus <[email protected]>
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#include <ControlLook.h> #include <ControlLook.h>
#include "ContainerWindow.h" #include "ContainerWindow.h"
@@ -1949,9 +1951,9 @@ BControlLook::DrawLabel(BView* view, const char* label, const rgb_color& base,
void void
BControlLook::SetBackgroundInfo(BMessage msg) BControlLook::SetBackgroundInfo(const BMessage& backgroundInfo)
{ {
fBackgroundInfo = msg; fBackgroundInfo = backgroundInfo;
fCachedWorkspace = -1; fCachedWorkspace = -1;
} }