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:
@@ -16,6 +16,7 @@
|
|||||||
#include "DrawingEngine.h"
|
#include "DrawingEngine.h"
|
||||||
#include "ServerApp.h"
|
#include "ServerApp.h"
|
||||||
#include "ServerBitmap.h"
|
#include "ServerBitmap.h"
|
||||||
|
#include "ServerPicture.h"
|
||||||
#include "ServerWindow.h"
|
#include "ServerWindow.h"
|
||||||
#include "WindowLayer.h"
|
#include "WindowLayer.h"
|
||||||
|
|
||||||
@@ -59,6 +60,8 @@ ViewLayer::ViewLayer(BRect frame, const char* name,
|
|||||||
fPreviousSibling(NULL),
|
fPreviousSibling(NULL),
|
||||||
fNextSibling(NULL),
|
fNextSibling(NULL),
|
||||||
fLastChild(NULL),
|
fLastChild(NULL),
|
||||||
|
|
||||||
|
fPicture(NULL),
|
||||||
|
|
||||||
fLocalClipping(Bounds()),
|
fLocalClipping(Bounds()),
|
||||||
fScreenClipping(),
|
fScreenClipping(),
|
||||||
@@ -81,6 +84,8 @@ ViewLayer::~ViewLayer()
|
|||||||
|
|
||||||
delete fDrawState;
|
delete fDrawState;
|
||||||
|
|
||||||
|
// TODO: Don't know yet if we should also delete fPicture
|
||||||
|
|
||||||
// iterate over children and delete each one
|
// iterate over children and delete each one
|
||||||
ViewLayer* layer = fFirstChild;
|
ViewLayer* layer = fFirstChild;
|
||||||
while (layer) {
|
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
|
void
|
||||||
ViewLayer::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping,
|
ViewLayer::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping,
|
||||||
BRegion* windowContentClipping, bool deep)
|
BRegion* windowContentClipping, bool deep)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class DrawState;
|
|||||||
class DrawingEngine;
|
class DrawingEngine;
|
||||||
class WindowLayer;
|
class WindowLayer;
|
||||||
class ServerBitmap;
|
class ServerBitmap;
|
||||||
|
class ServerPicture;
|
||||||
|
|
||||||
class ViewLayer {
|
class ViewLayer {
|
||||||
public:
|
public:
|
||||||
@@ -147,6 +147,9 @@ class ViewLayer {
|
|||||||
uint32 EventOptions() const
|
uint32 EventOptions() const
|
||||||
{ return fEventOptions; }
|
{ return fEventOptions; }
|
||||||
|
|
||||||
|
void SetPicture(ServerPicture *picture);
|
||||||
|
ServerPicture *Picture() const;
|
||||||
|
|
||||||
// for background clearing
|
// for background clearing
|
||||||
virtual void Draw(DrawingEngine* drawingEngine,
|
virtual void Draw(DrawingEngine* drawingEngine,
|
||||||
BRegion* effectiveClipping,
|
BRegion* effectiveClipping,
|
||||||
@@ -214,6 +217,7 @@ class ViewLayer {
|
|||||||
ViewLayer* fNextSibling;
|
ViewLayer* fNextSibling;
|
||||||
ViewLayer* fLastChild;
|
ViewLayer* fLastChild;
|
||||||
|
|
||||||
|
ServerPicture *fPicture;
|
||||||
// clipping
|
// clipping
|
||||||
BRegion fLocalClipping;
|
BRegion fLocalClipping;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user