vfs: check userland buffers before reading them.
[haiku.git] / src / kits / interface / ViewLayoutItem.h
blobb16eaab61c4a8c5fd16a9aa5e46ade61021e6c71
1 /*
2 * Copyright 2006-2010, Haiku Inc.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _VIEW_LAYOUT_ITEM_H
6 #define _VIEW_LAYOUT_ITEM_H
8 #include <LayoutItem.h>
11 class BViewLayoutItem : public BLayoutItem {
12 public:
13 BViewLayoutItem(BView* view);
14 BViewLayoutItem(BMessage* from);
15 virtual ~BViewLayoutItem();
17 virtual BSize MinSize();
18 virtual BSize MaxSize();
19 virtual BSize PreferredSize();
20 virtual BAlignment Alignment();
22 virtual void SetExplicitMinSize(BSize size);
23 virtual void SetExplicitMaxSize(BSize size);
24 virtual void SetExplicitPreferredSize(BSize size);
25 virtual void SetExplicitAlignment(BAlignment alignment);
27 virtual bool IsVisible();
28 virtual void SetVisible(bool visible);
30 virtual BRect Frame();
31 virtual void SetFrame(BRect frame);
33 virtual bool HasHeightForWidth();
34 virtual void GetHeightForWidth(float width, float* min,
35 float* max, float* preferred);
37 virtual BView* View();
39 virtual void Relayout(bool immediate = false);
41 virtual status_t Archive(BMessage* into, bool deep = true) const;
42 virtual status_t AllArchived(BMessage* into) const;
43 virtual status_t AllUnarchived(const BMessage* from);
44 static BArchivable* Instantiate(BMessage* from);
46 protected:
47 virtual void LayoutInvalidated(bool children);
48 virtual void AncestorVisibilityChanged(bool shown);
50 private:
51 BView* fView;
52 int32 fAncestorsVisible;
55 #endif // _VIEW_LAYOUT_ITEM_H