Added SetPicture and Picture() to ViewLayer

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15809 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2006-01-03 10:30:08 +00:00
parent 7324b0ceb8
commit 69706266c5
2 changed files with 24 additions and 1 deletions

View File

@ -16,6 +16,7 @@
#include "DrawingEngine.h"
#include "ServerApp.h"
#include "ServerBitmap.h"
#include "ServerPicture.h"
#include "ServerWindow.h"
#include "WindowLayer.h"
@ -59,6 +60,8 @@ ViewLayer::ViewLayer(BRect frame, const char* name,
fPreviousSibling(NULL),
fNextSibling(NULL),
fLastChild(NULL),
fPicture(NULL),
fLocalClipping(Bounds()),
fScreenClipping(),
@ -81,6 +84,8 @@ ViewLayer::~ViewLayer()
delete fDrawState;
// TODO: Don't know yet if we should also delete fPicture
// iterate over children and delete each one
ViewLayer* layer = fFirstChild;
while (layer) {
@ -867,6 +872,20 @@ ViewLayer::SetEventMask(uint32 eventMask, uint32 options)
}
void
ViewLayer::SetPicture(ServerPicture *picture)
{
fPicture = picture;
}
ServerPicture *
ViewLayer::Picture() const
{
return fPicture;
}
void
ViewLayer::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping,
BRegion* windowContentClipping, bool deep)

View File

@ -23,7 +23,7 @@ class DrawState;
class DrawingEngine;
class WindowLayer;
class ServerBitmap;
class ServerPicture;
class ViewLayer {
public:
@ -147,6 +147,9 @@ class ViewLayer {
uint32 EventOptions() const
{ return fEventOptions; }
void SetPicture(ServerPicture *picture);
ServerPicture *Picture() const;
// for background clearing
virtual void Draw(DrawingEngine* drawingEngine,
BRegion* effectiveClipping,
@ -214,6 +217,7 @@ class ViewLayer {
ViewLayer* fNextSibling;
ViewLayer* fLastChild;
ServerPicture *fPicture;
// clipping
BRegion fLocalClipping;