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:
parent
7324b0ceb8
commit
69706266c5
@ -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)
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user