2 * Copyright 2006-2009, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
20 class ShelfContainerViewFilter
;
24 class BDragger
: public BView
{
26 BDragger(BRect frame
, BView
* target
,
27 uint32 resizingMode
= B_FOLLOW_NONE
,
28 uint32 flags
= B_WILL_DRAW
);
29 BDragger(BView
* target
,
30 uint32 flags
= B_WILL_DRAW
);
31 BDragger(BMessage
* data
);
34 static BArchivable
* Instantiate(BMessage
* data
);
35 virtual status_t
Archive(BMessage
* data
,
36 bool deep
= true) const;
38 virtual void AttachedToWindow();
39 virtual void DetachedFromWindow();
41 virtual void Draw(BRect updateRect
);
42 virtual void MouseDown(BPoint where
);
43 virtual void MouseUp(BPoint where
);
44 virtual void MouseMoved(BPoint where
, uint32 transit
,
45 const BMessage
* dragMessage
);
46 virtual void MessageReceived(BMessage
* message
);
47 virtual void FrameMoved(BPoint newPosition
);
48 virtual void FrameResized(float newWidth
, float newHeight
);
50 static status_t
ShowAllDraggers();
51 static status_t
HideAllDraggers();
52 static bool AreDraggersDrawn();
54 virtual BHandler
* ResolveSpecifier(BMessage
* message
,
55 int32 index
, BMessage
* specifier
,
56 int32 form
, const char* property
);
57 virtual status_t
GetSupportedSuites(BMessage
* data
);
58 virtual status_t
Perform(perform_code code
, void* data
);
60 virtual void ResizeToPreferred();
61 virtual void GetPreferredSize(float* _width
,
63 virtual void MakeFocus(bool focus
= true);
64 virtual void AllAttached();
65 virtual void AllDetached();
67 status_t
SetPopUp(BPopUpMenu
* contextMenu
);
68 BPopUpMenu
* PopUp() const;
71 BView
* Target() const;
73 virtual BBitmap
* DragBitmap(BPoint
* offset
, drawing_mode
* mode
);
78 bool IsVisibilityChanging() const;
81 friend class BPrivate::ShelfContainerViewFilter
;
82 friend class BPrivate::replicant_data
;
86 virtual void _ReservedDragger2();
87 virtual void _ReservedDragger3();
88 virtual void _ReservedDragger4();
90 static void _UpdateShowAllDraggers(bool visible
);
92 BDragger
& operator=(const BDragger
& other
);
96 void _RemoveFromList();
97 status_t
_DetermineRelationship();
98 status_t
_SetViewToDrag(BView
* target
);
99 void _SetShelf(BShelf
* shelf
);
100 void _SetZombied(bool state
);
101 void _BuildDefaultPopUp();
102 void _ShowPopUp(BView
* target
, BPoint where
);
123 #endif /* _DRAGGER_H */