8 #include <GraphicsDefs.h>
15 Layer(BRect frame
, const char* name
, uint32 rm
, uint32 flags
, rgb_color c
);
18 void AddLayer(Layer
* layer
);
19 bool RemLayer(Layer
* layer
);
21 void MoveBy(float dx
, float dy
);
22 void ResizeBy(float dx
, float dy
);
23 void ScrollBy(float dx
, float dy
);
25 bool IsHidden() const;
29 void Invalidate( const BRegion
&invalid
,
30 const Layer
*startFrom
= NULL
);
32 virtual void MovedByHook(float dx
, float dy
) { }
33 virtual void ResizedByHook(float dx
, float dy
, bool automatic
) { }
34 virtual void ScrolledByHook(float dx
, float dy
) { }
36 Layer
* BottomChild() const;
37 Layer
* TopChild() const;
38 Layer
* UpperSibling() const;
39 Layer
* LowerSibling() const;
41 void RebuildVisibleRegions( const BRegion
&invalid
,
42 const Layer
*startFrom
);
43 void ConvertToScreen2(BRect
* rect
) const;
44 void ConvertToScreen2(BRegion
* reg
) const;
45 MyView
* GetRootLayer() const;
46 void SetRootLayer(MyView
* view
) { fView
= view
; }
48 BRegion
* Visible() { return &fVisible
; }
49 BRegion
* FullVisible() { return &fFullVisible
; }
50 void GetWantedRegion(BRegion
®
);
52 BRect
Frame() const { return fFrame
; }
53 BRect
Bounds() const { BRect
r(fFrame
);
56 const char* Name() const { return fName
; }
57 Layer
* Parent() const { return fParent
; }
58 void PrintToStream() const;
59 bool IsTopLayer() const { return fView
? true: false; }
61 rgb_color
HighColor() const { return fColor
; }
63 void rebuild_visible_regions(const BRegion
&invalid
,
64 const BRegion
&parentLocalVisible
,
65 const Layer
*startFrom
);
70 virtual bool alter_visible_for_children(BRegion
®ion
);
71 virtual void get_user_regions(BRegion
®
);
73 void clear_visible_regions();
74 void resize_layer_frame_by(float x
, float y
);
75 void rezize_layer_redraw_more(BRegion
®
, float dx
, float dy
);
76 void resize_layer_full_update_on_resize(BRegion
®
, float dx
, float dy
);
91 mutable Layer
* fCurrent
;