xref: /haiku/docs/user/interface/View.dox (revision 5b189b0e1e2f51f367bfcb126b2f00a3702f352d)
1/*
2 * Copyright 2011-2015 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		John Scipione, jscipione@gmail.com
7 *		Joseph Groover, looncraz@looncraz.net
8 *
9 * Corresponds to:
10 *		headers/os/interface/View.h	 hrev497**
11 *		src/kits/interface/View.cpp	 hrev497**
12 */
13
14
15/*!
16	\file View.h
17	\ingroup interface
18	\ingroup libbe
19	\brief BView class definition and support data structures.
20
21	\since BeOS R5
22*/
23
24
25// mouse buttons
26
27
28/*!
29	\var B_PRIMARY_MOUSE_BUTTON
30	\brief Primary mouse button mask parameter.
31
32	\since BeOS R3
33*/
34
35
36/*!
37	\var B_SECONDARY_MOUSE_BUTTON
38	\brief Secondary mouse button mask parameter.
39
40	\since BeOS R3
41*/
42
43
44/*!
45	\var B_TERTIARY_MOUSE_BUTTON
46	\brief Tertiary mouse button mask parameter.
47
48	\since BeOS R3
49*/
50
51
52// mouse transit
53
54
55/*!
56	\var B_ENTERED_VIEW
57	\brief Mouse transit entered view.
58
59	\since BeOS R3
60*/
61
62
63/*!
64	\var B_INSIDE_VIEW
65	\brief Mouse transit inside view.
66
67	\since BeOS R3
68*/
69
70
71/*!
72	\var B_EXITED_VIEW
73	\brief Mouse transit exited view.
74
75	\since BeOS R3
76*/
77
78
79/*!
80	\var B_OUTSIDE_VIEW
81	\brief Mouse transit outside view.
82
83	\since BeOS R5
84*/
85
86
87// event mask
88
89
90/*!
91	\var B_POINTER_EVENTS
92	\brief Mouse pointer events mask parameter.
93
94	\since BeOS R5
95*/
96
97
98/*!
99	\var B_KEYBOARD_EVENTS
100	\brief Keyboard events mask parameter.
101
102	\since BeOS R5
103*/
104
105
106// event mask options
107
108
109/*!
110	\var B_LOCK_WINDOW_FOCUS
111	\brief Prevents the attached window from losing its focused state while
112	       the mouse is held down.
113
114	\since BeOS R5
115*/
116
117
118/*!
119	\var B_SUSPEND_VIEW_FOCUS
120	\brief Events normally sent to the focus view are suppressed.
121
122	\since BeOS R5
123*/
124
125
126/*!
127	\var B_NO_POINTER_HISTORY
128	\brief Send only the most recent MouseMoved() event to the view.
129
130	\note New in Haiku: unless this flag is specified, both BWindow and
131	      BView::GetMouse() will filter out older mouse moved messages.
132
133	\since BeOS R5
134*/
135
136
137/*!
138	\var B_FULL_POINTER_HISTORY
139	\brief Send all MouseMoved() events to the view.
140
141	\since Haiku R1
142*/
143
144
145// event tracking
146
147
148/*!
149	\var B_TRACK_WHOLE_RECT
150	\brief The whole rectangle moves with the cursor.
151
152	\since BeOS R3
153*/
154
155
156/*!
157	\var B_TRACK_RECT_CORNER
158	\brief The left top corner is fixed while the right and bottom edges
159	       move with the cursor.
160
161	\since BeOS R3
162*/
163
164
165// set font mask
166
167
168/*!
169	\var B_FONT_FAMILY_AND_STYLE
170	\brief Font family and style mask parameter.
171
172	\since BeOS R3
173*/
174
175
176/*!
177	\var B_FONT_SIZE
178	\brief Font size mask parameter.
179
180	\since BeOS R3
181*/
182
183
184/*!
185	\var B_FONT_SHEAR
186	\brief Font shear mask parameter.
187
188	\since BeOS R3
189*/
190
191
192/*!
193	\var B_FONT_ROTATION
194	\brief Font rotation mask parameter.
195
196	\since BeOS R3
197*/
198
199
200/*!
201	\var B_FONT_SPACING
202	\brief Font spacing mask parameter.
203
204	\since BeOS R3
205*/
206
207
208/*!
209	\var B_FONT_ENCODING
210	\brief Font encoding mask parameter.
211
212	\since BeOS R3
213*/
214
215
216/*!
217	\var B_FONT_FACE
218	\brief Font face mask parameter.
219
220	\since BeOS R3
221*/
222
223
224/*!
225	\var B_FONT_FLAGS
226	\brief Font flags mask parameter.
227
228	\since BeOS R3
229*/
230
231
232/*!
233	\var B_FONT_FALSE_BOLD_WIDTH
234	\brief Font false bold width mask parameter.
235
236	\since Haiku R1
237*/
238
239
240/*!
241	\var B_FONT_ALL
242	\brief Font all properties mask parameter.
243
244	\since BeOS R3
245*/
246
247
248// view flags
249
250
251/*!
252	\var B_FULL_UPDATE_ON_RESIZE
253	\brief Redraw the entire view on resize.
254
255	\since BeOS R3
256*/
257
258
259/*!
260	\var _B_RESERVED1_
261	\brief Reserved for future use.
262
263	\since Haiku R1
264*/
265
266
267/*!
268	\var B_WILL_DRAW
269	\brief Indicates that the view will do its own drawing.
270
271	\since BeOS R3
272*/
273
274
275/*!
276	\var B_PULSE_NEEDED
277	\brief Indicates that the view accepts Pulse() messages.
278
279	\since BeOS R3
280*/
281
282
283/*!
284	\var B_NAVIGABLE_JUMP
285	\brief Indicates this is the default keyboard navigation view.
286
287	\since BeOS R3
288*/
289
290/*!
291	\var B_FRAME_EVENTS
292	\brief View responds to frame move and resize events.
293
294	\since BeOS R3
295*/
296
297
298/*!
299	\var B_NAVIGABLE
300	\brief The view is able to receive focus for keyboard navigation.
301	Typically focus is indicated by drawing a blue rectangle around the view.
302
303	\since BeOS R3
304*/
305
306
307/*!
308	\var B_SUBPIXEL_PRECISE
309	\brief The view draws with sub-pixel precision.
310
311	If this flag is not specified, drawing coordinates will be rounded
312	to the nearest integer.
313
314	\since BeOS R5
315*/
316
317
318/*!
319	\var B_DRAW_ON_CHILDREN
320	\brief Indicates that the view responds to the DrawAfterChildren() hook
321		method.
322
323	\since BeOS R5
324*/
325
326
327/*!
328	\var B_INPUT_METHOD_AWARE
329	\brief Indicates the view understands input method add-ons, as used
330		for complex text input in CJK and other languages.
331
332	\since BeOS R5
333*/
334
335
336/*!
337	\var B_SCROLL_VIEW_AWARE
338	\brief Indicates the view will properly manage scrollbars that
339		have been targeted to it, i.e. update their ranges and proportions.
340
341	\since Haiku R1
342*/
343
344
345/*!
346	\var B_SUPPORTS_LAYOUT
347	\brief The view supports the layout APIs, i.e. it doesn't require an
348	       frame rectangle to be specified.
349
350	\since Haiku R1
351*/
352
353
354/*!
355	\var B_INVALIDATE_AFTER_LAYOUT
356	\brief Indicates that the view should be redraw after being added to
357	       a layout.
358
359	\since Haiku R1
360*/
361
362
363// resize mask variables, internal variables but are in a public header.
364
365
366/*!
367	\var _RESIZE_MASK_
368	\brief Resize mask. Do not use.
369
370	\since Haiku R1
371*/
372
373
374/*!
375	\var _VIEW_TOP_
376	\brief View top mask variable. Do not use.
377
378	\since Haiku R1
379*/
380
381
382/*!
383	\var _VIEW_LEFT_
384	\brief View left mask variable. Do not use.
385
386	\since Haiku R1
387*/
388
389
390/*!
391	\var _VIEW_BOTTOM_
392	\brief View bottom mask variable. Do not use.
393
394	\since Haiku R1
395*/
396
397
398/*!
399	\var _VIEW_RIGHT_
400	\brief View right mask variable. Do not use.
401
402	\since Haiku R1
403*/
404
405
406/*!
407	\var _VIEW_CENTER_
408	\brief View center mask variable. Do not use.
409
410	\since Haiku R1
411*/
412
413
414/*!
415	\fn inline uint32 _rule_(uint32 r1, uint32 r2, uint32 r3, uint32 r4)
416	\brief Internal function, do not use.
417
418	\since Haiku R1
419*/
420
421
422// resize mask
423
424
425/*!
426	\var B_FOLLOW_NONE
427	\brief Follow none resize mask parameter. Equivalent to
428	       \c B_FOLLOW_LEFT | \c B_FOLLOW_TOP. The view maintains its position
429	       in its parent's coordinate system but not in the screen coordinate
430	       system.
431
432	\since BeOS R3
433*/
434
435
436/*!
437	\var B_FOLLOW_ALL_SIDES
438	\brief Follow all sides resize mask parameter. Equivalent to
439	\c B_FOLLOW_LEFT_RIGHT | \c B_FOLLOW_TOP_BOTTOM. The view will be resized
440	with its parent view both horizontally and vertically.
441
442	\since BeOS R3
443*/
444
445
446/*!
447	\var B_FOLLOW_ALL
448	\brief Equivalent to \c B_FOLLOW_ALL_SIDES.
449
450	\since BeOS R3
451*/
452
453
454// horizontal resize mask
455
456
457/*!
458	\var B_FOLLOW_LEFT
459	\brief The margin between the left side of the view and the left side
460	       of its parent remains constant.
461
462	\since BeOS R3
463*/
464
465
466/*!
467	\var B_FOLLOW_RIGHT
468	\brief The margin between the right side of the view and the right side
469	of its parent remains constant.
470
471	\since BeOS R3
472*/
473
474
475/*!
476	\var B_FOLLOW_LEFT_RIGHT
477	\brief The margin between the left and right sides of the view and the left
478	       and right sides of its parent both remain constant.
479
480	\since BeOS R3
481*/
482
483
484/*!
485	\var B_FOLLOW_H_CENTER
486	\brief The view maintains a constant relationship to the horizontal center
487	       of its parent view.
488
489	\since BeOS R3
490*/
491
492
493// vertical resize mask
494
495
496/*!
497	\var B_FOLLOW_TOP
498	\brief The margin between the top of the view and the top of its parent
499	       remains constant.
500
501	\since BeOS R3
502*/
503
504
505/*!
506	\var B_FOLLOW_BOTTOM
507	\brief The margin between the bottom of the view and the bottom of its
508	       parent remains constant.
509
510	\since BeOS R3
511*/
512
513
514/*!
515	\var B_FOLLOW_TOP_BOTTOM
516	\brief The margin between the top and bottom sides of the view and the
517	       top and bottom sides of its parent both remain constant.
518
519	\since BeOS R3
520*/
521
522
523/*!
524	\var B_FOLLOW_V_CENTER
525	\brief The view maintains a constant relationship to the vertical center
526	       of its parent view.
527
528	\since BeOS R3
529*/
530
531
532/*!
533	\var B_FOLLOW_LEFT_TOP
534	\brief The margins between the left and top sides of the view and the left
535	       and top sides of its parent remain constant.
536
537	\since Haiku R1
538*/
539
540
541/*!
542	\class BView
543	\ingroup interface
544	\ingroup libbe
545	\brief View base class.
546
547	A BView is a rectangular area within a window that responds to mouse clicks
548	and key presses, and acts as a surface for you to draw on.
549
550	Most Interface Kit classes, with the notable exception of BWindow inherit from
551	BView. Some of the time you might use a BView object as is, but most of the
552	time you subclass BView to do something unique.
553
554	To create a subclass of BView you generally override one or more of BView's
555	hook methods to respond to user events such as MouseDown() or FrameMoved().
556	By default a BView does nothing in its hook methods unless otherwise stated,
557	it's up to you to define what happens. To override the look of a BView you
558	should override the Draw() or DrawAfterChildren() methods. See the section on
559	Hook Methods below for more details.
560
561	When a BView object is first created it has no parent or child views. How you
562	add a view to the view hierarchy depends on if you want to use a standard
563	view with a defined frame rectangle or to use the Layout APIs to position and
564	size your view instead.
565
566	If you create a standard view you need to add it to a window or another view
567	using the AddChild() method, if you create a layout view you need to add your
568	view to a layout using BLayout::AddView() or by adding it to a layout builder.
569
570	Views are not very interesting until they, or one of their parents, are
571	attached to a window as many of BView's methods depend on a connection to the
572	App Server to do their work. In order to prevent multiple views from altering
573	the window simultaneously though locking is required. To perform an action
574	while the window is locked you issue the following code:
575
576\code
577if (Window()->LockLooper()) {
578	...
579	Window()->UnlockLooper()
580}
581\endcode
582
583	Whenever App Server calls a hook method it automatically locks the BWindow for
584	you.
585
586	Only one view attached to a window is able to receive keyboard events at a
587	time. The view that is able to receive keyboard events such as KeyDown() is
588	called the "focus view". MakeFocus() gives or removes focus from a view.
589	Call IsFocus() to determine whether or not the view is the window's current
590	focus view.
591
592	When a view has focus an indicator should be drawn to inform the user. Typically
593	the view is surrounded by a blue rectangle to indicate that it is the window's
594	focus view. The color can be queried using the keyboard_navigation_color()
595	function in InterfaceDefs.h
596
597	Each view has its own coordinate system with the origin point (0.0, 0.0)
598	located at the top left corner. You can convert a BPoint or BRect to or from
599	the view's coordinate system to the coordinate system of its parent, or
600	of the screen's coordinate system. See the section on Coordinate Conversion
601	Methods for more details.
602
603	The Application Server clips a BView to the region where it's permitted to
604	draw which is never larger than the view's bound rectangle. A view can never
605	draw outside its bounds nor can it draw outside of the bounds rectangle of any
606	parent view.
607
608	You may limit the clipping region further by passing a BRegion object to
609	ConstrainClippingRegion(). You can obtain the current clipping region by
610	calling GetClippingRegion().
611
612	Each view has a ViewColor() that fills the frame rectangle before the
613	view does any drawing of its own. The default view color is white, you may
614	change the view color by calling SetViewColor() or, as of Haiku R1,
615	SetViewUIColor(). A commonly used view color is \c B_PANEL_BACKGROUND_COLOR
616	which is a user-defined color used as the view color of most applications.
617	If you set the view color to \c B_TRANSPARENT_COLOR then the Application Server
618	won't erase the clipping region of the view before updating, this should only
619	be used if the view erases itself by drawing on every pixel in the clipping
620	region.
621
622	If you want to set the view color of a view to be the same as its parent you
623	need to set it within the AttachedToWindow() method of the view like so:
624
625\code
626SetViewColor(Parent()->ViewColor());
627\endcode
628
629	\since BeOS R3
630*/
631
632
633
634/*!
635	\fn BView::BView(const char* name, uint32 flags, BLayout* layout)
636	\brief Layout constructor.
637
638	To be used as part of a BLayout. You may use the Layout Methods found below
639	to set the size and alignment constraints of the view.
640
641	\c B_SUPPORTS_LAYOUT is automatically set to the view. The view flags can be
642	set after the view has been constructed by calling the SetFlags() methods.
643
644	\param name The name of the view, can be \c NULL.
645	\param flags The view flags, a mask of one or more of the following:
646	       - \c B_FULL_UPDATE_ON_RESIZE Redraw the entire view on resize.
647	       - \c B_WILL_DRAW Indicates that the view will do its own drawing.
648	       - \c B_PULSE_NEEDED The view accepts Pulse() messages.
649	       - \c B_NAVIGABLE_JUMP Default for keyboard navigation.
650	       - \c B_FRAME_EVENTS Responds to move and resize events.
651	       - \c B_NAVIGABLE Able to receive keyboard navigation focus.
652	       - \c B_SUBPIXEL_PRECISE Draws with sub-pixel precision.
653	       - \c B_DRAW_ON_CHILDREN Responds to DrawAfterChildren().
654	       - \c B_INPUT_METHOD_AWARE Allows access input method add-ons.
655	       - \c B_SUPPORTS_LAYOUT Supports the layout APIs, i.e. it doesn't
656	            use a frame rectangle.
657	       - \c B_INVALIDATE_AFTER_LAYOUT Is redraw after added to a layout.
658	\param layout A \a layout to set the view to.
659
660	\since Haiku R1
661*/
662
663
664/*!
665	\fn BView::BView(BRect frame, const char* name, uint32 resizingMode,
666		uint32 flags)
667	\brief Standard constructor.
668
669	A newly constructed BView object has no parent, you must assign it one by
670	passing it into the AddChild() method of another view or window. Once the
671	view or a parent view has been attached to a window the view becomes part of
672	that window's view hierarchy.
673
674	When the BView object is added as a child the \a frame values are interpreted
675	in the parent's coordinate system. The frame rectangle should be specified in
676	integral values to align on pixel boundaries, decimal values will be rounded.
677
678	The resizing mode flags and view flags can be set after the view has been
679	constructed by calling the SetResizingMode() and SetFlags() methods.
680
681	\param frame The \a frame rectangle of the view.
682	\param name The name of the view, can be \c NULL.
683	\param resizingMode Defines the view's behavior when its parent is resized.
684	       \n\n It combines one of the following horizontal resizing constants:
685	       \li \c B_FOLLOW_TOP The margin between the top of the view and the top
686	           of its parent remains constant.
687	       \li \c B_FOLLOW_BOTTOM The margin between the bottom of the view and
688	           the bottom of its parent remains constant.
689	       \li \c B_FOLLOW_TOP_BOTTOM The margin between the top and bottom sides
690	           of the view and the top and bottom sides of the parent both remain
691	           constant.
692	       \li \c B_FOLLOW_V_CENTER Maintains a constant relationship to the
693	           vertical center of the parent view.
694
695	       with one of the following vertical resizing constants:
696	       \li \c B_FOLLOW_LEFT The margin between the left side of the view and
697	           the left side of its parent remains constant.
698	       \li \c B_FOLLOW_RIGHT The margin between the right side of the view and
699	            the right side of the parent remains constant.
700	       \li \c B_FOLLOW_LEFT_RIGHT The margin between the left and right sides
701	           of the view and the left and right sides of its parent both remain
702	           constant.
703	       \li \c B_FOLLOW_H_CENTER The view maintains a constant relationship to
704	            the horizontal center of the parent view.
705
706	       or use one of the following combined horizontal/vertical constants:
707	       \li \c B_FOLLOW_NONE Equivalent to \c B_FOLLOW_LEFT | \c B_FOLLOW_TOP.
708	       \li \c B_FOLLOW_ALL_SIDES Equivalent to
709	            \c B_FOLLOW_LEFT_RIGHT | \c B_FOLLOW_TOP_BOTTOM.
710	\param flags The view flags, a mask of one or more of the following:
711	       - \c B_FULL_UPDATE_ON_RESIZE Redraw the entire view on resize.
712	       - \c B_WILL_DRAW Indicates that the view will do its own drawing.
713	       - \c B_PULSE_NEEDED The view accepts Pulse() messages.
714	       - \c B_NAVIGABLE_JUMP Default for keyboard navigation.
715	       - \c B_FRAME_EVENTS Responds to move and resize events.
716	       - \c B_NAVIGABLE Able to receive keyboard navigation focus.
717	       - \c B_SUBPIXEL_PRECISE Draws with sub-pixel precision.
718	       - \c B_DRAW_ON_CHILDREN Responds to DrawAfterChildren().
719	       - \c B_INPUT_METHOD_AWARE Allows access input method add-ons.
720	       - \c B_SUPPORTS_LAYOUT Supports the layout APIs, i.e. it doesn't
721	            use a frame rectangle.
722	       - \c B_INVALIDATE_AFTER_LAYOUT Is redraw after added to a layout.
723
724	\since BeOS R3
725*/
726
727
728/*!
729	\fn BView::BView(BMessage* archive)
730	\brief Archive constructor.
731
732	\param archive The message data to construct the view from.
733
734	\since BeOS R3
735*/
736
737
738/*!
739	\fn BView::~BView()
740	\brief Destructor method.
741
742	Deletes the view and all children freeing any memory used.
743
744	\since BeOS R3
745*/
746
747
748/*!
749	\name Archiving
750*/
751
752
753//! @{
754
755
756/*!
757	\fn BArchivable* BView::Instantiate(BMessage* data)
758	\brief Creates a new BView object from the \a data message.
759
760	\returns A newly created BView object or \c NULL if the message doesn't
761	         contain an archived BView.
762
763	\since BeOS R3
764*/
765
766
767/*!
768	\fn status_t BView::Archive(BMessage* data, bool deep) const
769	\brief Archives the object into the \a data message.
770
771	\param data A pointer to the BMessage object to archive the object into.
772	\param deep Whether or not to archive child views as well.
773
774	\return A status code, \c B_OK if everything went well or an error code
775	        otherwise.
776	\retval B_OK The object was archived successfully.
777	\retval B_NO_MEMORY Ran out of memory while archiving the object.
778
779	\since BeOS R3
780*/
781
782
783//! @}
784
785
786/*!
787	\name Hook Methods
788*/
789
790
791//! @{
792
793
794/*!
795	\fn status_t BView::AllUnarchived(const BMessage* from)
796	\brief Hook method called when all views have been unarchived.
797
798	\since BeOS R3
799*/
800
801
802/*!
803	\fn status_t BView::AllArchived(BMessage* into) const
804	\brief Hook method called when all views have been archived.
805
806	\since BeOS R3
807*/
808
809
810/*!
811	\fn void BView::AllAttached()
812	\brief Similar to AttachedToWindow() but this method is triggered after
813	       all child views have already been attached to a window.
814
815	\since BeOS R3
816*/
817
818
819/*!
820	\fn void BView::DetachedFromWindow()
821	\brief Hook method called when the object is detached from a window.
822
823	\since BeOS R3
824*/
825
826
827/*!
828	\fn void BView::AttachedToWindow()
829	\brief Hook method called when the object is attached to a window.
830
831	\since BeOS R3
832*/
833
834
835/*!
836	\fn void BView::AllDetached()
837	\brief Similar to AttachedToWindow() but this method is triggered after
838	       all child views have already been detached from a window.
839
840	\since BeOS R3
841*/
842
843
844/*!
845	\fn void BView::Draw(BRect updateRect)
846	\brief Draws the area of the view that intersects \a updateRect.
847
848	Derived classes should override this method to draw their view.
849
850	\remark This is an hook method called by the Interface Kit, you don't have to
851	        call it yourself. If you need to forcefully redraw the view consider
852	        calling Invalidate() instead.
853
854	\param updateRect The rectangular area to be drawn.
855
856	\since BeOS R3
857*/
858
859
860/*!
861	\fn void BView::DrawAfterChildren(BRect updateRect)
862	\brief Perform any drawing that needs to be done after child view have
863	       already been drawn.
864
865	\param updateRect The rectangular area to drawn in.
866
867	\since BeOS R5
868*/
869
870
871/*!
872	\fn void BView::FrameMoved(BPoint newPosition)
873	\brief Hook method called when the view is moved.
874
875	\param newPosition The point of the top left corner of the frame
876	       that the view has been moved to.
877
878	\since BeOS R3
879*/
880
881
882/*!
883	\fn void BView::FrameResized(float newWidth, float newHeight)
884	\brief Hook method called when the view is resized.
885
886	\param newWidth The new width of the view.
887	\param newHeight The new height of the view.
888
889	\since BeOS R3
890*/
891
892
893/*!
894	\fn void BView::KeyDown(const char* bytes, int32 numBytes)
895	\brief Hook method called when a keyboard key is pressed.
896
897	\param bytes The bytes of the key combination pressed.
898	\param numBytes The number of bytes in \a bytes.
899
900	\since BeOS R3
901*/
902
903
904/*!
905	\fn void BView::KeyUp(const char* bytes, int32 numBytes)
906	\brief Hook method called when a keyboard key is released.
907
908	\param bytes The bytes of the key combination pressed.
909	\param numBytes The number of bytes in \a bytes.
910
911	\since BeOS R3
912*/
913
914
915/*!
916	\fn void BView::LayoutInvalidated(bool descendants)
917	\brief Hook method called when the layout is invalidated.
918
919	\param descendants Whether or not child views have also been invalidated.
920
921	\since Haiku R1
922*/
923
924
925/*!
926	\fn void BView::MessageReceived(BMessage* message)
927	\brief Handle \a message received by the associated looper.
928
929	\param message The \a message received by the associated looper.
930
931	\see BHandler::MessageReceived()
932
933	\since BeOS R3
934*/
935
936
937/*!
938	\fn void BView::MouseDown(BPoint where)
939	\brief Hook method called when a mouse button is pressed.
940
941	\param where The point on the screen where to mouse pointer is when
942	       the mouse button is pressed.
943
944	\since BeOS R3
945*/
946
947
948/*!
949	\fn void BView::MouseUp(BPoint where)
950	\brief Hook method called when a mouse button is released.
951
952	\param where The point on the screen where to mouse pointer is when
953	       the mouse button is released.
954
955	\since BeOS R3
956*/
957
958
959/*!
960	\fn void BView::MouseMoved(BPoint where, uint32 code,
961		const BMessage* dragMessage)
962	\brief Hook method called when the mouse is moved.
963
964	\param where The new location of the mouse in the view's coordinate system.
965	\param code One of the following:
966	- \c B_ENTERED_VIEW The cursor has just entered the view.
967	- \c B_INSIDE_VIEW The cursor is inside the view.
968	- \c B_EXITED_VIEW The cursor has left the view's bounds. This only gets sent
969	     if the scope of the mouse events that the view can receive has been
970	     expanded by SetEventMask() or SetMouseEventMask().
971	- \c B_OUTSIDE_VIEW The cursor is outside the view. This only gets sent if the
972	     scope of the mouse events that the view can receive has been expanded by
973	     SetEventMask() or SetMouseEventMask().
974	\param dragMessage If a drag-and-drop operation is taking place this is a
975	       pointer to a BMessage that holds the drag information, otherwise the
976	       pointer is \c NULL.
977
978	\sa SetEventMask(), SetMouseEventMask()
979	\sa DragMessage()
980
981	\since BeOS R3
982*/
983
984
985/*!
986	\fn void BView::Pulse()
987	\brief Hook method called when the view receives a \c B_PULSE
988	       message.
989
990	An action is performed each time the App Server calls the Pulse() method.
991	The pulse rate is set by SetPulseRate(). You can implement Pulse() to do
992	anything you want. The default version does nothing. The pulse granularity
993	is no better than once per 100,000 microseconds.
994
995	\sa SetPulseRate()
996
997	\since BeOS R3
998*/
999
1000
1001/*!
1002	\fn void BView::TargetedByScrollView(BScrollView* scrollView)
1003	\brief Hook method called when the view becomes the target of
1004	       \a scrollView.
1005
1006	\param scrollView The BScrollView object that has targeted the view.
1007
1008	\since Haiku R1
1009*/
1010
1011
1012/*!
1013	\fn void BView::WindowActivated(bool active)
1014	\brief Hook method called when the attached window is activated or
1015	       deactivated.
1016
1017	\param active \c true when the window becomes activated, \c false when the
1018	       window becomes deactivated.
1019
1020	\since BeOS R3
1021*/
1022
1023
1024//! @}
1025
1026
1027/*!
1028	\fn BRect BView::Bounds() const
1029	\brief Returns the view's frame rectangle in the view's coordinate system.
1030
1031	\return The view's bounding rectangle in the view's coordinate system.
1032
1033	\since BeOS R3
1034*/
1035
1036
1037/*!
1038	\fn BRect BView::Frame() const
1039	\brief Returns the view's frame rectangle in the parent's coordinate system.
1040
1041	\returns The view's frame rectangle in the parent's coordinate system.
1042
1043	\since BeOS R3
1044*/
1045
1046
1047/*!
1048	\name Coordinate Conversions
1049*/
1050
1051
1052//! @{
1053
1054
1055/*!
1056	\fn void BView::ConvertToParent(BPoint* point) const
1057	\brief Convert \a point to the parent's coordinate system in place.
1058
1059	\param point A pointer to a BPoint object to convert.
1060
1061	\since BeOS R3
1062*/
1063
1064
1065/*!
1066	\fn BPoint BView::ConvertToParent(BPoint point) const
1067	\brief Returns \a point converted to the parent's coordinate system.
1068
1069	\param point A BPoint object to convert.
1070
1071	\return A new BPoint object in the parent's coordinate system.
1072
1073	\since BeOS R3
1074*/
1075
1076
1077/*!
1078	\fn void BView::ConvertFromParent(BPoint* point) const
1079	\brief Convert \a point from the parent's coordinate system to the
1080		   view's coordinate system in place.
1081
1082	\param point A pointer to a BPoint object to convert.
1083
1084	\since BeOS R3
1085*/
1086
1087
1088/*!
1089	\fn BPoint BView::ConvertFromParent(BPoint point) const
1090	\brief Returns \a point converted from the parent's coordinate system to
1091	       the view's coordinate system.
1092
1093	\param point A BPoint object to convert.
1094
1095	\return A new BPoint object in the view's coordinate system.
1096
1097	\since BeOS R3
1098*/
1099
1100
1101/*!
1102	\fn void BView::ConvertToParent(BRect* rect) const
1103	\brief Convert \a rect to the parent's coordinate system in place.
1104
1105	\param rect A pointer to a BRect object to convert.
1106
1107	\since BeOS R3
1108*/
1109
1110
1111/*!
1112	\fn BRect BView::ConvertToParent(BRect rect) const
1113	\brief Returns \a rect converted to the parent's coordinate system.
1114
1115	\param rect A BRect object to convert.
1116
1117	\return A new BRect object in the parent's coordinate system.
1118
1119	\since BeOS R3
1120*/
1121
1122
1123/*!
1124	\fn void BView::ConvertFromParent(BRect* rect) const
1125	\brief Convert \a rect from the parent's coordinate system to the
1126		   view's coordinate system in place.
1127
1128	\param rect A pointer to a BRect object to convert.
1129
1130	\since BeOS R3
1131*/
1132
1133
1134/*!
1135	\fn BRect BView::ConvertFromParent(BRect rect) const
1136	\brief Returns \a rect converted from the parent's coordinate system to the
1137		   view's coordinate system.
1138
1139	\param rect A BRect object to convert.
1140
1141	\return A new BRect object in the view's coordinate system.
1142
1143	\since BeOS R3
1144*/
1145
1146
1147/*!
1148	\fn void BView::ConvertToScreen(BPoint* point) const
1149	\brief Convert \a point to the screen's coordinate system in place.
1150
1151	\param point A pointer to a BPoint object to convert.
1152
1153	\since BeOS R3
1154*/
1155
1156
1157/*!
1158	\fn BPoint BView::ConvertToScreen(BPoint point) const
1159	\brief Returns \a point converted to the screen's coordinate system.
1160
1161	\param point A BPoint object to convert.
1162
1163	\return A new BPoint object in the screen's coordinate system.
1164
1165	\since BeOS R3
1166*/
1167
1168
1169/*!
1170	\fn void BView::ConvertFromScreen(BPoint* point) const
1171	\brief Convert \a point from the screen's coordinate system to the
1172		   view's coordinate system in place.
1173
1174	\param point A pointer to a BPoint object to convert.
1175
1176	\since BeOS R3
1177*/
1178
1179
1180/*!
1181	\fn BPoint BView::ConvertFromScreen(BPoint point) const
1182	\brief Returns \a point converted from the screen's coordinate system to
1183	       the view's coordinate system.
1184
1185	\param point A BPoint object to convert.
1186
1187	\return A new BPoint object in the view's coordinate system.
1188
1189	\since BeOS R3
1190*/
1191
1192
1193/*!
1194	\fn void BView::ConvertToScreen(BRect* rect) const
1195	\brief Convert \a rect to the screen's coordinate system in place.
1196
1197	\param rect A pointer to a BRect object to convert.
1198
1199	\since BeOS R3
1200*/
1201
1202
1203/*!
1204	\fn BRect BView::ConvertToScreen(BRect rect) const
1205	\brief Returns \a rect converted to the screen's coordinate system.
1206
1207	\param rect A BRect object to convert.
1208
1209	\return A new BRect object in the screen's coordinate system.
1210
1211	\since BeOS R3
1212*/
1213
1214
1215/*!
1216	\fn void BView::ConvertFromScreen(BRect* rect) const
1217	\brief Convert \a rect from the screen's coordinate system to the
1218		   view's coordinate system in place.
1219
1220	\param rect A pointer to a BRect object to convert.
1221
1222	\since BeOS R3
1223*/
1224
1225
1226/*!
1227	\fn BRect BView::ConvertFromScreen(BRect rect) const
1228	\brief Returns \a rect converted from the screen's coordinate system to the
1229		   view's coordinate system.
1230
1231	\param rect A BRect object to convert.
1232
1233	\return A new BRect object in the view's coordinate system.
1234
1235	\since BeOS R3
1236*/
1237
1238
1239//! @}
1240
1241
1242/*!
1243	\fn uint32 BView::Flags() const
1244	\brief Return the view flags set in the constructor or by SetFlags().
1245
1246	\return The view flags as a uint32 mask.
1247
1248	\sa SetFlags()
1249
1250	\since BeOS R3
1251*/
1252
1253
1254/*!
1255	\fn void BView::SetFlags(uint32 flags)
1256	\brief Sets the view flags to the \a flags mask.
1257
1258	\param flags The view flags to set as a uint32 mask.
1259
1260	\sa Flags()
1261
1262	\since BeOS R3
1263*/
1264
1265
1266//! @}
1267
1268
1269/*!
1270	\fn void BView::Hide()
1271	\brief Hides the view without removing it from the view hierarchy.
1272
1273	Calls to Hide() and Show() are cumulative. A visible view becomes hidden
1274	once the number of Hide() calls exceeds the number of Show() calls.
1275
1276	\sa Show()
1277	\sa BWindow::Hide()
1278	\sa IsHidden()
1279
1280	\since BeOS R3
1281*/
1282
1283
1284/*!
1285	\fn void BView::Show()
1286	\brief Shows the view making it visible.
1287
1288	Calls to Hide() and Show() are cumulative. A hidden view becomes visible
1289	again once the number of Show() calls matches the number of Hide() calls.
1290
1291	\sa Hide()
1292	\sa BWindow::Show()
1293	\sa IsHidden()
1294
1295	\since BeOS R3
1296*/
1297
1298
1299/*!
1300	\fn bool BView::IsFocus() const
1301	\brief Returns whether or not the view is the window's current focus view.
1302
1303	The focus view changes as the user moves from one view to another either
1304	by pushing the tab key or by clicking a new view with the mouse. The change
1305	can be made programmatically via the MakeFocus() method.
1306
1307	\returns \c true if the view is the current focus view, \c false otherwise.
1308
1309	\sa MakeFocus()
1310	\sa BWindow::CurrentFocus()
1311
1312	\since BeOS R3
1313*/
1314
1315
1316/*!
1317	\fn bool BView::IsHidden(const BView* lookingFrom) const
1318	\brief Returns whether or not the view is hidden from the perspective of
1319	       \a lookingFrom.
1320
1321	A view is considered hidden if it, any of its parent views, or the window
1322	it's attached to has had the Hide() method called on it. This method
1323	allows you to determine the hidden status of a view from a different point
1324	on the view hierarchy.
1325
1326	\param lookingFrom The view used as a base when determining the hidden
1327	       status of the BView object.
1328
1329	\return \c true if the view was hidden via the Hide() method, \c false
1330	        otherwise.
1331
1332	\since Haiku R1
1333*/
1334
1335
1336/*!
1337	\fn bool BView::IsHidden() const
1338	\brief Returns whether or not the view is hidden.
1339
1340	A view can be hidden either by calling Hide() on the view, calling Hide()
1341	on a parent view or calling Hide() on the window that the view is attached
1342	to. When a BWindow or BView is hidden, all its descendants are also hidden.
1343
1344	This method only returns whether the view or an ancestor view has had the
1345	Hide() method called on it, it doesn't consider if the view is obscured
1346	by another view or is off-screen. A BView is not hidden by default.
1347
1348	\return \c true if the view was hidden via the Hide() method, \c false
1349	        otherwise.
1350
1351	\since BeOS R3
1352*/
1353
1354
1355/*!
1356	\fn bool BView::IsPrinting() const
1357	\brief Returns whether or not the view is drawing to a printer.
1358
1359	This method should only be called from the Draw() or DrawAfterChildren()
1360	methods. If called from any other method this method returns \c false.
1361
1362	The view may choose different fonts, images, or colors when drawing to a
1363	printer vs. when drawing to the screen.
1364
1365	\return Returns \c true if drawing to a printer, \c false otherwise.
1366
1367	\since BeOS R3
1368*/
1369
1370
1371/*!
1372	\fn BPoint BView::LeftTop() const
1373	\brief Returns the left top corner point.
1374
1375	\return The left top corner of the view as a BPoint object.
1376
1377	\since BeOS R3
1378*/
1379
1380
1381/*!
1382	\fn void BView::SetResizingMode(uint32 mode)
1383	\brief Sets the resizing mode of the view according to the \a mode mask.
1384
1385	The resizing mode is first set in the BView constructor.
1386
1387	\sa ResizingMode()
1388
1389	\since BeOS R3
1390*/
1391
1392
1393/*!
1394	\fn uint32 BView::ResizingMode() const
1395	\brief Returns the resizing mode flags mask set in the constructor or by
1396	       SetResizingMode().
1397
1398	\returns the current resizing mode flags as a uint32 mask.
1399
1400	\sa SetResizingMode()
1401
1402	\since BeOS R3
1403*/
1404
1405
1406/*!
1407	\fn void BView::SetViewCursor(const BCursor* cursor, bool sync)
1408	\brief Assigns \a cursor to the view.
1409
1410	This cursor will be displayed when the mouse is positioned inside the view.
1411
1412	\param cursor The BCursor object to assign to the view.
1413	\param sync If \c true App Server is synchronized immediately forcing the
1414	       change to occur. If \c false, the change will be put in the queue and
1415	       will take effect when the pending requests are processed.
1416
1417	\since BeOS R5
1418*/
1419
1420
1421/*!
1422	\fn void BView::Flush() const
1423	\brief Flushes the attached window's connection to App Server.
1424
1425	\note If the view isn't attached to a window, Flush() does nothing.
1426
1427	\since BeOS R3
1428*/
1429
1430
1431/*!
1432	\fn void BView::Sync() const
1433	\brief Synchronizes the attached window's connection to App Server.
1434
1435	\warning If the view isn't attached to a window, Sync() might crash the
1436	         application.
1437
1438	\since BeOS R3
1439*/
1440
1441
1442/*!
1443	\fn BWindow* BView::Window() const
1444	\brief Returns the window the view is attached to.
1445
1446	\return The window the view is attached to or \c NULL if the view isn't
1447	        attached to a window.
1448
1449	\since BeOS R3
1450*/
1451
1452
1453/*!
1454	\fn void BView::GetPreferredSize(float* _width, float* _height)
1455	\brief Fill out the preferred width and height of the view
1456		into the \a _width and \a _height parameters.
1457
1458	Derived classes should override this method to set the preferred
1459	size of object.
1460
1461	\remark Either the \a _width or \a _height parameter may be set to \c NULL
1462		    if you only want to get the other one.
1463
1464	\param[out] _width Pointer to a float to store the width of the view.
1465	\param[out] _height Pointer to a float to store the height of the view.
1466
1467	\since BeOS R3
1468*/
1469
1470
1471/*!
1472	\fn void BView::ResizeToPreferred()
1473	\brief Resizes the view to its preferred size keeping the position of the
1474	       left top corner constant.
1475
1476	\warning It is not recommended to use this method for views that are part
1477	         of a BLayout.
1478
1479	\since BeOS R3
1480*/
1481
1482
1483/*!
1484	\name Input Related
1485*/
1486
1487
1488//! @{
1489
1490
1491/*!
1492	\fn void BView::BeginRectTracking(BRect startRect, uint32 style)
1493	\brief Displays an outline rectangle on the view and initiates tracking.
1494
1495	This method is typically called from the MouseDown() while EndRectTracking()
1496	is typically called from the MouseUp method().
1497
1498	\param startRect The initial frame in the view's coordinate system.
1499	\param style This parameter is set to one of the following:
1500	- \c B_TRACK_WHOLE_RECT The position of the rect changes with the cursor
1501	     while its size remains the same.
1502	- \c B_TRACK_RECT_CORNER The left top corner is fixed while the right and
1503	     bottom edges move with the cursor.
1504
1505	\since BeOS R3
1506*/
1507
1508
1509/*!
1510	\fn void BView::EndRectTracking()
1511	\brief Ends tracking removing the outline rectangle from the view.
1512
1513	BeginRectTracking() is typically called from the MouseDown() while this
1514	method is typically called from the MouseUp() method.
1515
1516	\since BeOS R3
1517*/
1518
1519
1520/*!
1521	\fn void BView::DragMessage(BMessage* message, BRect dragRect,
1522		BHandler* replyTo)
1523	\brief Initiates a drag-and-drop session.
1524
1525	\warning This method only works if the BView objects are attached to a
1526	         window.
1527
1528	\param message Contains data to be dragged and dropped on the destination
1529	       view. The caller retains responsibility for this object.
1530	\param dragRect An outline rectangle used in place of a bitmap image set in
1531	       the view's coordinate system.
1532	\param replyTo The target set to handle the message sent in reply to the
1533	       dragged message. If \c NULL the reply is instead directed to the
1534	       BView object that initiated the drag-and-drop session.
1535
1536	\since BeOS R3
1537*/
1538
1539
1540/*!
1541	\fn void BView::DragMessage(BMessage* message, BBitmap* image,
1542		BPoint offset, BHandler* replyTo)
1543	\brief Initiates a drag-and-drop session of an \a image.
1544
1545	\warning This method only works if the BView objects are attached to a
1546	         window.
1547
1548	\param message Contains data to be dragged and dropped on the destination
1549	       view. The caller retains responsibility for this object.
1550	\param image Bitmap image dragged by the user. The memory used by the bitmap
1551	       is freed automatically when the message is dropped.
1552	\param offset The offset to the hotspot within the image in the bitmap's
1553	       coordinate system.
1554	\param replyTo The target set to handle the message sent in reply to the
1555	       dragged message. If \c NULL the reply is instead directed to the
1556	       BView object that initiated the drag-and-drop session.
1557
1558	\since BeOS R3
1559*/
1560
1561
1562/*!
1563	\fn void BView::DragMessage(BMessage* message, BBitmap* image,
1564		drawing_mode dragMode, BPoint offset, BHandler* replyTo)
1565	\brief Initiates a drag-and-drop session of an \a image with drawing_mode
1566	       set by \a dragMode.
1567
1568	\warning This method only works if the BView objects are attached to a
1569	         window.
1570
1571	\param message Contains data to be dragged and dropped on the destination
1572	       view. The caller retains responsibility for this object.
1573	\param image Bitmap image dragged by the user. The memory used by the bitmap
1574	       is freed automatically when the message is dropped.
1575	\param dragMode Sets the drawing_mode used to draw the dragged image. Set to
1576	       \c B_OP_ALPHA to drag-and-drop partially transparent images.
1577	\param offset The offset to the hotspot within the image in the bitmap's
1578	       coordinate system.
1579	\param replyTo The target set to handle the message sent in reply to the
1580	       dragged message. If \c NULL the reply is instead directed to the
1581	       BView object that initiated the drag-and-drop session.
1582
1583	\since BeOS R5
1584*/
1585
1586
1587/*!
1588	\fn void BView::GetMouse(BPoint* _location, uint32* _buttons,
1589		bool checkMessageQueue)
1590	\brief Fills out the cursor location and the current state of the mouse
1591	       buttons.
1592
1593	The cursor doesn't have to be located within the view for this method to work,
1594	however, the view must be attached to a window. Don't use this method to track
1595	the mouse in your derived view, implement MouseMoved() instead.
1596
1597	\param[out] _location Filled out with the cursor location in the view's
1598	            coordinate system.
1599	\param[out] _buttons Filled out with a mask of the following values:
1600	            - \c B_PRIMARY_MOUSE_BUTTON
1601	            - \c B_SECONDARY_MOUSE_BUTTON
1602	            - \c B_TERTIARY_MOUSE_BUTTON
1603	\param checkMessageQueue If \c true pull from any pending MouseMoved() or
1604	       MouseUp() events in the message queue top down before filling out
1605	       the current mouse cursor state.
1606
1607	\since BeOS R3
1608*/
1609
1610
1611/*!
1612	\fn void BView::MakeFocus(bool focus)
1613	\brief Makes the view the current focus view of the window or gives up
1614	       being the window's focus view.
1615
1616	The focus view handles selections and KeyDown events when the the attached
1617	window is active. There can be only one focus view at a time per window.
1618
1619	When called with \a focus set to \c true this method first calls
1620	MakeFocus() on the previously focused view with \a focus set to
1621	\c false.
1622
1623	The focus doesn't automatically change when MouseDown() is called so calling
1624	MakeFocus() is the only way to make a view the focus view of a window.
1625	Classes derived from BView that can display the current selection, or that
1626	can accept pasted data should call MakeFocus() in their MouseDown() method
1627	to update the focus view of the window on click.
1628
1629	If the view isn't attached to a window this method has no effect.
1630
1631	\param focus \a true to set focus, \a false to remove it.
1632
1633	\since BeOS R3
1634*/
1635
1636
1637/*!
1638	\fn BScrollBar* BView::ScrollBar(orientation posture) const
1639	\brief Returns the BScrollBar object that has the BView set as its target.
1640
1641	\param posture Either \c B_VERTICAL to get the vertical scroll bar or
1642	       \c B_HORIZONTAL to get the horizontal scroll bar.
1643
1644	\returns the Scrollbar object requested or \c NULL if none found.
1645
1646	\see BScrollBar::SetTarget()
1647
1648	\since BeOS R3
1649*/
1650
1651
1652/*!
1653	\fn void BView::ScrollBy(float deltaX, float deltaY)
1654	\brief Scroll the view by \a deltaX horizontally and \a deltaY vertically.
1655
1656	\param deltaX The amount to scroll horizontally.
1657	\param deltaY The amount to scroll vertically.
1658
1659	\since BeOS R3
1660*/
1661
1662
1663/*!
1664	\fn void BView::ScrollTo(BPoint where)
1665	\brief Scroll the view to the point specified by \a where.
1666
1667	\param where The location to scroll the view to.
1668
1669	\since BeOS R3
1670*/
1671
1672
1673/*!
1674	\fn void BView::ScrollWithMouseWheelDelta(BScrollBar* scrollBar,
1675		float delta)
1676	\brief Handle the scroll wheel changing over scrollbars.
1677
1678	- Extract the scrollbar change based on the mouse wheel \a delta into a
1679	  protected method of BView.
1680	- The method is called from the MessageReceived() method of BScrollBar.
1681
1682	With this change it is now a bit easier to scroll horizontally around the
1683	system by putting the mouse cursor over a horizontal scrollbar and using
1684	the wheel.
1685
1686	\since Haiku R1
1687*/
1688
1689
1690/*!
1691	\fn status_t BView::SetEventMask(uint32 mask, uint32 options)
1692	\brief Sets whether or not the view can accept mouse and keyboard
1693	       events when not in focus.
1694
1695	If \a mask includes \c B_POINTER_EVENTS then the view will receive mouse
1696	events even when the mouse isn't over the view and if it includes
1697	\c B_KEYBOARD_EVENTS the view will receive keyboard events even if it
1698	isn't in focus.
1699
1700	The \a options mask options are as follows:
1701	- \c B_NO_POINTER_HISTORY Tells App Server to only send the most recent
1702	     MouseMoved() event to the view sacrificing some granularity.
1703    - \c B_FULL_POINTER_HISTORY Tells App Server to send all MouseMoved()
1704	     events to the view.
1705
1706	\param mask The \a mask of \c B_POINTER_EVENTS and \c B_KEYBOARD_EVENTS
1707	       to set.
1708	\param options Sets other event-handling options.
1709
1710	\return \c B_OK if everything went fine or an error code, usually
1711	        \c B_ERROR if something went wrong.
1712
1713	\sa EventMask()
1714
1715	\since BeOS R5
1716*/
1717
1718
1719/*!
1720	\fn uint32 BView::EventMask()
1721	\brief Returns the current event mask.
1722
1723	\return The current event mask as a uint32.
1724
1725	\sa SetEventMask()
1726
1727	\since BeOS R5
1728*/
1729
1730
1731/*!
1732	\fn status_t BView::SetMouseEventMask(uint32 mask, uint32 options)
1733	\brief Sets whether or not the view can accept mouse and keyboard
1734	       events when not in focus from within MouseDown() until the
1735	       following MouseUp() event.
1736
1737	The \a options mask options are as follows:
1738	- \c B_NO_POINTER_HISTORY Tells App Server to send only the most recent
1739	     MouseMoved() event to the view sacrificing mouse movement granularity.
1740    - \c B_FULL_POINTER_HISTORY Tells App Server to send all MouseMoved()
1741	     events to the view.
1742	- \c B_SUSPEND_VIEW_FOCUS Events normally sent to the focus view are
1743	     suppressed. While the mouse is held down, the keyboard is ignored.
1744	     The view receiving the MouseDown() messages doesn't have to be the
1745	     focus view to suppress focused messages.
1746	- \c B_LOCK_WINDOW_FOCUS Prevents the attached window from losing its
1747	     focused state while the mouse is held down, even if the mouse leaves
1748	     the bounds of the window.
1749
1750	\param mask The \a mask of \c B_POINTER_EVENTS and \c B_KEYBOARD_EVENTS
1751	       to set.
1752	\param options Sets other event-handling options.
1753
1754	\return \c B_OK if everything went fine or an error code, usually
1755	        \c B_ERROR if something went wrong.
1756
1757	\since BeOS R5
1758*/
1759
1760
1761//! @}
1762
1763
1764/*!
1765	\name Graphics State
1766*/
1767
1768
1769//! @{
1770
1771
1772/*!
1773	\fn void BView::PushState()
1774	\brief Saves the drawing state to the stack.
1775
1776	The drawing state contains the following elements:
1777	- local and global origins
1778	- local and global scales
1779	- local and global clipping regions
1780	- the current drawing mode
1781	- pen size and location
1782	- the font context
1783	- foreground and background color
1784	- line cap and join modes
1785	- miter limit
1786	- stipple pattern
1787
1788	A new state context is created after PushState() is called with a local scale
1789	at 0, a local origin at (0, 0), and no clipping region.
1790
1791	\since BeOS R3
1792*/
1793
1794
1795/*!
1796	\fn void BView::PopState()
1797	\brief Restores the drawing state from the stack.
1798
1799	\since BeOS R3
1800*/
1801
1802
1803/*!
1804	\fn void BView::SetOrigin(BPoint where)
1805	\brief Sets the origin in the view's coordinate system.
1806
1807	\param where The point to set the origin to.
1808
1809	\sa Origin()
1810
1811	\since BeOS R3
1812*/
1813
1814
1815/*!
1816	\fn void BView::SetOrigin(float x, float y)
1817	\brief Sets the origin in the view's coordinate system.
1818
1819	\param x The x-coordinate to set the origin to.
1820	\param y The y-coordinate to set the origin to.
1821
1822	\sa Origin()
1823
1824	\since BeOS R3
1825*/
1826
1827
1828/*!
1829	\fn BPoint BView::Origin() const
1830	\brief Returns the origin point in the view's coordinate system.
1831
1832	\return The local origin point in the view's coordinate system.
1833
1834	\sa SetOrigin()
1835
1836	\since BeOS R3
1837*/
1838
1839
1840/*!
1841	\fn void BView::SetScale(float scale) const
1842	\brief Sets the scale of the coordinate system the view uses for drawing.
1843
1844	The default scale is 1.0. A \a scale value lower than 1.0 reduces the size of
1845	the drawing coordinate system, a \a scale value greater than 1.0 magnifies
1846	the coordinate system; for example, a \a scale value of 0.5 cuts the drawing
1847	drawing area in half moving the drawing closer to the origin while a \a scale
1848	value of 2.0 doubles the drawing area and moving it away from the origin.
1849
1850	Updating the \a scale of view won't update previously drawn elements.
1851
1852	SetScale() calls are not commutative unless you call them across different
1853	drawing states as the following:
1854
1855\code
1856	view->SetScale(2);
1857	view->SetScale(2);
1858	// view's scale is 2
1859
1860	view2->SetScale(2);
1861	view2->PushState();
1862	view2->SetScale(2);
1863	// view2's scale is 4
1864\endcode
1865
1866	\param scale The scale factor to set.
1867
1868	\since BeOS R3
1869*/
1870
1871
1872/*!
1873	\fn float BView::Scale() const
1874	\brief Return the current drawing scale.
1875
1876	\return The current drawing scale.
1877
1878	\since BeOS R3
1879*/
1880
1881
1882/*!
1883	\fn void BView::SetLineMode(cap_mode lineCap, join_mode lineJoin,
1884		float miterLimit)
1885	\brief Set line mode to use PostScript-style line cap and join modes.
1886
1887	\a lineCap determines the shape of the endpoints of stroked paths while
1888	\a lineJoin determines the shape of the corners where two lines meet.
1889
1890	The default miter limit is 10.0 which gives an angle of 11.478341°.
1891
1892	\param lineCap One of the following:
1893	- \c B_ROUND_CAP A semicircle with diameter of line width is drawn at the
1894	     endpoint.
1895	- \c B_BUTT_CAP A straight edge is drawn without extending beyond the endpoint.
1896	- \c B_SQUARE_CAP A straight edge is drawn extending past the endpoint by half
1897	     the line width.
1898	\param lineJoin One of the following:
1899	- \c B_ROUND_JOIN Same as \c B_ROUND_CAP but for a join.
1900	- \c B_MITER_JOIN The lines are extended until they meet. If angle that they
1901	     meet at is greater than the 2*arcsin(1/\a miterLimit) than a bevel join
1902		 is used instead.
1903	- \c B_BEVEL_JOIN The area between the caps is filled with a triangle.
1904	- \c B_BUTT_JOIN Same as \c B_BUTT_CAP but for a join.
1905	- \c B_SQUARE_JOIN Same as \c B_SQUARE_CAP but for a join.
1906	\param miterLimit Sets the cut off angle before a miter join becomes a bevel
1907	       join calculated by 2*arcsin(1/\a miterLimit).
1908
1909	\since BeOS R3
1910*/
1911
1912
1913/*!
1914	\fn join_mode BView::LineJoinMode() const
1915	\brief Returns the current line join mode.
1916
1917	\return The current line join mode set to the view.
1918
1919	\since BeOS R3
1920*/
1921
1922
1923/*!
1924	\fn cap_mode BView::LineCapMode() const
1925	\brief Returns the current line cap mode.
1926
1927	\return The current line cap mode set to the view.
1928
1929	\since BeOS R3
1930*/
1931
1932
1933/*!
1934	\fn float BView::LineMiterLimit() const
1935	\brief Returns the miter limit used for \c B_MITER_JOIN join mode.
1936
1937	\return The current miter limit set to the view.
1938
1939	\since BeOS R3
1940*/
1941
1942
1943/*!
1944	\fn void BView::SetDrawingMode(drawing_mode mode)
1945	\brief Sets the drawing mode of the view.
1946
1947	The default drawing mode is \c B_OP_COPY.
1948
1949	\param mode Set to one of the following:
1950	- \c B_OP_COPY
1951	- \c B_OP_OVER
1952	- \c B_OP_ERASE
1953	- \c B_OP_INVERT
1954	- \c B_OP_SELECT
1955	- \c B_OP_ALPHA
1956	- \c B_OP_MIN
1957	- \c B_OP_MAX
1958	- \c B_OP_ADD
1959	- \c B_OP_SUBTRACT
1960	- \c B_OP_BLEND
1961
1962	\since BeOS R3
1963*/
1964
1965
1966/*!
1967	\fn drawing_mode BView::DrawingMode() const
1968	\brief Return the current drawing_mode.
1969
1970	\return The current drawing_mode.
1971
1972	\since BeOS R3
1973*/
1974
1975
1976/*!
1977	\fn void BView::SetBlendingMode(source_alpha srcAlpha,
1978		alpha_function alphaFunc)
1979	\brief Set the blending mode which controls how transparency is used.
1980
1981	\param srcAlpha Set to one of the following:
1982	- \c B_CONSTANT_ALPHA Use the high color's alpha channel.
1983	- \c B_PIXEL_ALPHA Use the alpha value of each pixel when drawing a bitmap.
1984	\param alphaFunc Set to one of the following:
1985	- \c B_ALPHA_OVERLAY Used for drawing a image with transparency over an opaque
1986	     background.
1987	- \c B_ALPHA_COMPOSITE Used to composite two or more transparent images
1988	     together offscreen to produce a new image drawn using
1989		 \c B_ALPHA_OVERLAY mode.
1990
1991	\since BeOS R5
1992*/
1993
1994
1995/*!
1996	\fn void BView::GetBlendingMode(source_alpha* srcAlpha,
1997		alpha_function* alphaFunc) const
1998	\brief Fill out \a srcAlpha and \a alphaFunc with the alpha mode and
1999	       alpha function of the view.
2000
2001	\param[out] srcAlpha The alpha mode to fill out.
2002	\param[out] alphaFunc The alpha function to fill out.
2003
2004	\since BeOS R5
2005*/
2006
2007
2008/*!
2009	\fn void BView::MovePenTo(BPoint point)
2010	\brief Move the pen to \a point in the view's coordinate system.
2011
2012	\param point the location to move the pen to.
2013
2014	\since BeOS R3
2015*/
2016
2017
2018/*!
2019	\fn void BView::MovePenTo(float x, float y)
2020	\brief Move the pen to the point specified by \a x and \a y in the view's
2021	       coordinate system.
2022
2023	\param x The horizontal coordinate to move the pen to.
2024	\param y The vertical coordinate to move the pen to.
2025
2026	\since BeOS R3
2027*/
2028
2029
2030/*!
2031	\fn void BView::MovePenBy(float x, float y)
2032	\brief Move the pen by \a x pixels horizontally and \a y pixels vertically.
2033
2034	\param x The number of pixels to move the pen horizontally.
2035	\param y The number of pixels to move the pen vertically.
2036
2037	\since BeOS R3
2038*/
2039
2040
2041/*!
2042	\fn BPoint BView::PenLocation() const
2043	\brief Return the current pen location as a BPoint object.
2044
2045	\return The current pen location in the view's coordinate system.
2046
2047	\sa MovePenTo(BPoint)
2048	\sa MovePenTo(float, float)
2049	\sa MovePenBy(float, float)
2050
2051	\since BeOS R3
2052*/
2053
2054
2055/*!
2056	\fn void BView::SetPenSize(float size)
2057	\brief Set the pen size to \a size.
2058
2059	\param size The pen size to set.
2060
2061	\since BeOS R3
2062*/
2063
2064
2065/*!
2066	\fn float BView::PenSize() const
2067	\brief Return the current pen size.
2068
2069	\return The current pen size as a float.
2070
2071	\sa SetPenSize()
2072
2073	\since BeOS R3
2074*/
2075
2076
2077/*!
2078	\fn bool BView::HasDefaultColors() const
2079	\brief Tests if the view has any colors set.
2080
2081	\return Boolean value, true if colors are not set.
2082
2083	\since Haiku R1
2084*/
2085
2086
2087/*!
2088	\fn bool BView::HasSystemColors() const
2089	\brief Tests if the view is using system "panel" colors.
2090		   B_PANEL_BACKGROUND_COLOR for ViewUIColor()
2091		   B_PANEL_BACKGROUND_COLOR for LowUIColor()
2092		   B_PANEL_TEXT_COLOR for HighUIColor()
2093
2094	\return Boolean value, true if colors are as described.
2095
2096	\since Haiku R1
2097*/
2098
2099
2100/*!
2101	\fn void BView::AdoptParentColors()
2102	\brief Attempts to use the colors of any parent view.
2103		   Will adopt view, low, and high colors.
2104		   Should be called in AttachedToWindow() or AllAttached().
2105
2106	\since Haiku R1
2107*/
2108
2109
2110/*!
2111	\fn void BView::AdoptSystemColors()
2112	\brief Instructs view to use standard system "panel" colors.
2113		   B_PANEL_BACKGROUND_COLOR for ViewUIColor()
2114		   B_PANEL_BACKGROUND_COLOR for LowUIColor()
2115		   B_PANEL_TEXT_COLOR for HighUIColor()
2116
2117	\since Haiku R1
2118*/
2119
2120
2121/*!
2122	\fn void BView::AdoptViewColors(BView* view)
2123	\brief Attempts to use the colors of a given view.
2124		   Will adopt view, low, and high colors.
2125
2126	\since Haiku R1
2127*/
2128
2129
2130/*!
2131	\fn void BView::SetHighColor(rgb_color color)
2132	\brief Set the high color of the view.
2133
2134	\param color The color to set.
2135
2136	\since BeOS R3
2137*/
2138
2139
2140/*!
2141	\fn void BView::SetHighColor(uchar red, uchar green, uchar blue,
2142		uchar alpha)
2143	\brief Set the high color of the view.
2144
2145	\param red The \a red component of the high color.
2146	\param green The \a green component of the high color.
2147	\param blue The \a blue component of the high color.
2148	\param alpha The \a alpha component of the high color.
2149
2150	\since BeOS R3
2151*/
2152
2153
2154/*!
2155	\fn void BView::SetHighUIColor(color_which which, float tint)
2156	\brief Set the high color of the view to a system constant.
2157	       The color will update live with user changes.
2158
2159	\param which The color_which constant to set.
2160	\param tint Optional tint value to use.
2161
2162	\since Haiku R1
2163*/
2164
2165
2166/*!
2167	\fn rgb_color BView::HighColor() const
2168	\brief Return the current high color.
2169
2170	\return The current high color as an rgb_color struct.
2171
2172	\sa SetHighColor(rgb_color)
2173	\sa SetHighColor(uchar, uchar, uchar, uchar)
2174
2175	\since BeOS R3
2176*/
2177
2178
2179/*!
2180	\fn color_which BView::HighUIColor(float* tint) const
2181	\brief Return the current high color constant being used.
2182
2183	\param tint Optional float pointer in which to store the tint
2184				value used to modify the system color constant.
2185	\return The current high color constant.
2186
2187	\sa SetHighUIColor(color_which, float)
2188
2189	\since Haiku R1
2190*/
2191
2192
2193/*!
2194	\fn void BView::SetLowColor(rgb_color color)
2195	\brief Set the low color of the view.
2196
2197	\param color The color to set.
2198
2199	\since BeOS R3
2200*/
2201
2202
2203/*!
2204	\fn void BView::SetLowColor(uchar red, uchar green, uchar blue, uchar alpha)
2205	\brief Set the low color of the view.
2206
2207	\param red The \a red component of the low color.
2208	\param green The \a green component of the low color.
2209	\param blue The \a blue component of the low color.
2210	\param alpha The \a alpha component of the low color.
2211
2212	\since BeOS R3
2213*/
2214
2215
2216/*!
2217	\fn void BView::SetLowUIColor(color_which which, float tint)
2218	\brief Set the low color of the view to a system constant.
2219	       The color will update live with user changes.
2220
2221	\param which The color_which constant to set.
2222	\param tint Optional tint value to use.
2223
2224	\since Haiku R1
2225*/
2226
2227
2228/*!
2229	\fn rgb_color BView::LowColor() const
2230	\brief Return the current low color.
2231
2232	\return The current low color as an rgb_color struct.
2233
2234	\sa SetLowColor(rgb_color)
2235	\sa SetLowColor(uchar, uchar, uchar, uchar)
2236
2237	\since BeOS R3
2238*/
2239
2240
2241/*!
2242	\fn color_which BView::LowUIColor(float* tint) const
2243	\brief Return the current low color constant being used.
2244
2245	\param tint Optional float pointer in which to store the tint
2246				value used to modify the system color constant.
2247	\return The current low color constant.
2248
2249	\sa SetLowUIColor(color_which, float)
2250
2251	\since Haiku R1
2252*/
2253
2254
2255/*!
2256	\fn void BView::SetViewColor(rgb_color color)
2257	\brief Set the view color of the view.
2258
2259	\param color The color to set.
2260
2261	\since BeOS R3
2262*/
2263
2264
2265/*!
2266	\fn void BView::SetViewColor(uchar red, uchar green, uchar blue,
2267		uchar alpha)
2268	\brief Set the view color of the view.
2269
2270	\param red The \a red component of the view color.
2271	\param green The \a green component of the view color.
2272	\param blue The \a blue component of the view color.
2273	\param alpha The \a alpha component of the view color.
2274
2275	\since BeOS R3
2276*/
2277
2278
2279/*!
2280	\fn void BView::SetViewUIColor(color_which which, float tint)
2281	\brief Set the view color of the view to a system constant.
2282	       The color will update live with user changes.
2283
2284	\param which The color_which constant to set.
2285	\param tint Optional tint value to use.
2286
2287	\since Haiku R1
2288*/
2289
2290
2291/*!
2292	\fn rgb_color BView::ViewColor() const
2293	\brief Return the current view color.
2294
2295	\return The current view color as an rgb_color struct.
2296
2297	\sa SetViewColor(rgb_color)
2298	\sa SetViewColor(uchar, uchar, uchar, uchar)
2299
2300	\since BeOS R3
2301*/
2302
2303
2304/*!
2305	\fn color_which BView::ViewUIColor(float* tint) const
2306	\brief Return the current view color constant being used.
2307
2308	\param tint Optional float pointer in which to store the tint
2309				value used to modify the system color constant.
2310	\return The current view color constant.
2311
2312	\sa SetViewUIColor(color_which, float)
2313
2314	\since Haiku R1
2315*/
2316
2317
2318/*!
2319	\fn void BView::ForceFontAliasing(bool enable)
2320	\brief Turn anti-aliasing on and off when printing.
2321
2322	Typically want to turn font anti-aliasing off when printing by passing
2323	\c true to this method and then turn it on again by passing in \c false.
2324
2325	This method does not affect characters drawn to the screen.
2326
2327	\param enable If \c true turn off anti-aliasing, if \c false turn on
2328	       anti-aliasing.
2329
2330	\since BeOS R5
2331*/
2332
2333
2334/*!
2335	\fn void BView::SetFont(const BFont* font, uint32 mask)
2336	\brief Set the font of the view.
2337
2338	By passing \c B_FONT_ALL to the \a mask parameter as is the default all
2339	font properties from \a font are set on the view.
2340
2341	\param font A pointer to a const BFont object to set on the view.
2342	\param mask A mask to determine what font properties to set, either pass
2343	       in \c B_FONT_ALL to set all font properties or create a mask
2344	       containing one or more of the following values to set:
2345	  - \c B_FONT_FAMILY_AND_STYLE
2346	  - \c B_FONT_SPACING
2347	  - \c B_FONT_SIZE
2348	  - \c B_FONT_ENCODING
2349	  - \c B_FONT_SHEAR
2350	  - \c B_FONT_FACE
2351	  - \c B_FONT_ROTATION
2352	  - \c B_FONT_FLAGS
2353
2354	\see BFont for more details.
2355
2356	\since BeOS R3
2357*/
2358
2359
2360/*!
2361	\fn void BView::GetFont(BFont* font) const
2362	\brief Fill out \a font with the font set to the view.
2363
2364	\param[out] font The BFont object to fill out.
2365
2366	\since BeOS R3
2367*/
2368
2369
2370/*!
2371	\fn void BView::GetFontHeight(font_height* height) const
2372	\brief Fill out the font_height struct with the view font.
2373
2374	\param[out] height The font_height struct to fill out.
2375
2376	\since BeOS R3
2377*/
2378
2379
2380/*!
2381	\fn void BView::SetFontSize(float size)
2382	\brief Set the size of the view's font to \a size.
2383
2384	\param size The font size to set to the view in points.
2385
2386	\since BeOS R3
2387*/
2388
2389
2390/*!
2391	\fn float BView::StringWidth(const char* string) const
2392	\brief Return the width of \a string set in the font of the view.
2393
2394	\param string The \a string to get the width of.
2395
2396	\return The width of the string in the view's font as a float.
2397
2398	\since BeOS R3
2399*/
2400
2401
2402/*!
2403	\fn float BView::StringWidth(const char* string, int32 length) const
2404	\brief Return the width of \a string set in the font of the view up to
2405	       \a length characters.
2406
2407	\param string The \a string to get the width of.
2408	\param length The maximum number of characters in \a string to consider.
2409
2410	\return The width of the string in the view's font as a float.
2411
2412	\since BeOS R3
2413*/
2414
2415
2416/*!
2417	\fn void BView::GetStringWidths(char* stringArray[], int32 lengthArray[],
2418		int32 numStrings, float widthArray[]) const
2419	\brief Fill out widths of the strings in \a stringArray set in the font
2420	       of the view into \a widthArray.
2421
2422	\param stringArray The array of strings to get the lengths of.
2423	\param lengthArray The number of characters of the strings in \a stringArray
2424	       to consider.
2425	\param numStrings The number of strings in \a stringArray.
2426	\param widthArray The array to store the widths of the strings in
2427	       \a stringArray.
2428
2429	\since BeOS R3
2430*/
2431
2432
2433/*!
2434	\fn void BView::TruncateString(BString* string, uint32 mode, float width) const
2435	\brief Truncate \a string with truncation mode \a mode so that it is no wider
2436	       than \a width set in the view's font.
2437
2438	When the string is truncated the missing characters are replaced by a
2439	horizontal ellipses.
2440
2441	\param string The string to truncate in place.
2442	\param mode The truncation mode to use, one of the following:
2443	- \c B_TRUNCATE_BEGINNING Truncate from the beginning of the string.
2444	- \c B_TRUNCATE_MIDDLE Truncate from the middle of the string.
2445	- \c B_TRUNCATE_END Truncate from the end of the string.
2446	- \c B_TRUNCATE_SMART Truncate from anywhere based on the string content.
2447	     Not currently implemented.
2448	\param width The maximum width to truncate the string to.
2449
2450	\since BeOS R5
2451*/
2452
2453
2454/*!
2455	\fn void BView::ClipToPicture(BPicture* picture, BPoint where, bool sync)
2456	\brief Intersects the current clipping region of the view with the pixels
2457	       of \a picture.
2458
2459	BPicture instances are resolution independent, \a picture is effectively
2460	drawn at the view's resolution and the bitmap produced is used to modify the
2461	clipping region.
2462
2463	The pixels that are at least partially opaque are the ones drawn by
2464	\a picture.
2465
2466	\param picture The BPicture object to intersect with.
2467	\param where Offset in the view's coordinate system.
2468	\param sync If \c false, this method will execute asynchronously.
2469
2470	\since BeOS R5
2471*/
2472
2473
2474/*!
2475	\fn void BView::ClipToInversePicture(BPicture* picture, BPoint where,
2476		bool sync)
2477	\brief Intersects the current clipping region of the view with the pixels
2478	       outside of \a picture.
2479
2480	\param picture The BPicture object to intersect with.
2481	\param where Offset in the view's coordinate system.
2482	\param sync If \c false, this method will execute asynchronously.
2483
2484	\see ClipToPicture()
2485
2486	\since BeOS R5
2487*/
2488
2489
2490/*!
2491	\fn void BView::GetClippingRegion(BRegion* region) const
2492	\brief Fill out \a region with the view's clipping region.
2493
2494	\param[out] region The BRegion object to fill out.
2495
2496	Get the current clipping region, which is an intersection of the view
2497	visible region on screen (which depends on the view bounds, any child view
2498	hiding parts of it, and overlapping windows) and the constrained clipping
2499	regions set by calls to ConstrainClippingRegion() in the current stack of
2500	drawing states.
2501
2502	\since BeOS R3
2503*/
2504
2505
2506/*!
2507	\fn void BView::ConstrainClippingRegion(BRegion* region)
2508	\brief Set the clipping region the \a region restricting the area that the
2509	       view can draw in.
2510
2511	The Application Server keeps track of the clipping region for each view
2512	attached to a window so that the view can't draw outside of it,
2513	consequently this method works only for views that are attached to a window.
2514
2515	The default clipping region contains the visible area of the view. By
2516	passing a region to this method the clipping area is further restricted.
2517	Passing in \c NULL resets the clipping region back to the default.
2518
2519	Calls to ConstrainClippingRegion() are not cumulative, each time this
2520	method is called it replaces the old clipping region. However, clipping
2521	regions from previous states are intersected to compute the effective
2522	clipping.
2523
2524	Region-based clipping is not affected by the view transform. If you need to
2525	constrain drawing to a transformed region, use ClipToPicture() and
2526	FillRegion() instead.
2527
2528	\param region The region to set the clipping region to or \c NULL
2529	       to reset to default.
2530
2531	\since BeOS R3
2532*/
2533
2534
2535//! @}
2536
2537
2538/*!
2539	\name Drawing Related
2540
2541	The view must be attached to the window for these methods to work unless
2542	otherwise stated. Notes on specific methods are provided below:
2543
2544	DrawBitmap()
2545
2546	If the the image is bigger than the destination rectangle, it is scaled to fit.
2547
2548	The asynchronous versions pass the image to Application Server and return
2549	immediately.
2550
2551	This can be more efficient in some cases for example to draw several bitmaps
2552	at once and then call Sync() to tell Application Server to wait for them all
2553	to finish drawing rather than waiting for each one to draw.
2554
2555	DrawPicture()
2556
2557	The asynchronous versions pass the picture to Application Server and return
2558	immediately.
2559
2560	This can be more efficient in some cases for example to draw several pictures
2561	at once and then call Sync() to tell Application Server to wait for them all
2562	to finish drawing rather than waiting for each one to draw.
2563
2564	DrawPicture() doesn't alter the graphics state of the view nor do changes to
2565	the graphics state of the view alter the BPicture object. What the picture
2566	will look like depends on the graphics parameters that were in effect when the
2567	picture was recorded.
2568
2569	DrawString()
2570
2571	The \a string is drawn in the view's current font and is modified by
2572	the other parameters of the font such as its direction (left-to-right or
2573	right-to-left), rotation, spacing, shear, etc. The \a string is always drawn
2574	left to right even if its text direction is set to right-to-left mode.
2575
2576	Drawing a string is fastest in \c B_OP_COPY mode and anti-aliasing can
2577	produce undesirable effects when a string is draw in other modes, especially
2578	if the string is drawn in the same location repeatedly.
2579
2580	DrawString() doesn't erase before drawing.
2581*/
2582
2583
2584//! @{
2585
2586
2587/*!
2588	\fn void BView::DrawBitmapAsync(const BBitmap* bitmap, BRect bitmapRect,
2589		BRect viewRect, uint32 options)
2590	\brief Draws \a bitmap on the view within \a viewRect asynchronously.
2591
2592	\param bitmap The bitmap to draw onto the view.
2593	\param bitmapRect The portion of the bitmap to draw in the bitmap's
2594	       coordinate system.
2595	\param viewRect The area in the view's coordinate system to draw the
2596	       bitmap in.
2597	\param options ??
2598
2599	\since Haiku R1
2600*/
2601
2602
2603/*!
2604	\fn void BView::DrawBitmapAsync(const BBitmap* bitmap, BRect bitmapRect,
2605		BRect viewRect)
2606	\brief Draws \a bitmap on the view within \a viewRect asynchronously.
2607
2608	\param bitmap The bitmap to draw onto the view.
2609	\param bitmapRect The portion of the bitmap to draw in the bitmap's
2610	       coordinate system.
2611	\param viewRect The area in the view's coordinate system to draw the
2612	       bitmap in.
2613
2614	\since BeOS R3
2615*/
2616
2617
2618/*!
2619	\fn void BView::DrawBitmapAsync(const BBitmap* bitmap, BRect viewRect)
2620	\brief Draws \a bitmap on the view within \a viewRect asynchronously.
2621
2622	\param bitmap The bitmap to draw onto the view.
2623	\param viewRect The area in the view's coordinate system to draw the
2624	       bitmap in.
2625
2626	\since BeOS R3
2627*/
2628
2629
2630/*!
2631	\fn void BView::DrawBitmapAsync(const BBitmap* bitmap, BPoint where)
2632	\brief Draws \a bitmap on the view offset by \a where asynchronously.
2633
2634	\param bitmap The bitmap to draw onto the view.
2635	\param where The location to draw the bitmap in the view's coordinate system.
2636
2637	\since BeOS R3
2638*/
2639
2640
2641/*!
2642	\fn void BView::DrawBitmapAsync(const BBitmap* bitmap)
2643	\brief Draws \a bitmap on the view asynchronously.
2644
2645	\param bitmap The bitmap to draw onto the view.
2646
2647	\since BeOS R3
2648*/
2649
2650
2651/*!
2652	\fn void BView::DrawBitmap(const BBitmap* bitmap, BRect bitmapRect,
2653		BRect viewRect, uint32 options)
2654	\brief brief Draws \a bitmap on the view within \a viewRect.
2655
2656	\param bitmap The bitmap to draw onto the view.
2657	\param bitmapRect The portion of the bitmap to draw in the bitmap's
2658	       coordinate system.
2659	\param viewRect The area in the view's coordinate system to draw the
2660	       bitmap in.
2661	\param options ??
2662
2663	\since Haiku R1
2664*/
2665
2666
2667/*!
2668	\fn void BView::DrawBitmap(const BBitmap* bitmap, BRect bitmapRect,
2669		BRect viewRect)
2670	\brief Draws \a bitmap on the view within \a viewRect.
2671
2672	\param bitmap The bitmap to draw onto the view.
2673	\param bitmapRect The portion of the bitmap to draw in the bitmap's
2674	       coordinate system.
2675	\param viewRect The area in the view's coordinate system to draw the
2676	       bitmap in.
2677
2678	\since BeOS R3
2679*/
2680
2681
2682/*!
2683	\fn void BView::DrawBitmap(const BBitmap* bitmap, BRect viewRect)
2684	\brief Draws \a bitmap on the view within \a viewRect.
2685
2686	\param bitmap The bitmap to draw onto the view.
2687	\param viewRect The area in the view's coordinate system to draw the
2688	       bitmap in.
2689
2690	\since BeOS R3
2691*/
2692
2693
2694/*!
2695	\fn void BView::DrawBitmap(const BBitmap* bitmap, BPoint where)
2696	\brief Draws \a bitmap on the view offset by \a where.
2697
2698	\param bitmap The bitmap to draw onto the view.
2699	\param where The location to draw the bitmap in the view's coordinate system.
2700
2701	\since BeOS R3
2702*/
2703
2704
2705/*!
2706	\fn void BView::DrawBitmap(const BBitmap* bitmap)
2707	\brief Draws \a bitmap on the view.
2708
2709	\param bitmap The bitmap to draw onto the view.
2710
2711	\since BeOS R3
2712*/
2713
2714
2715/*!
2716	\fn void BView::DrawChar(char c)
2717	\brief Draws character \a c onto to the view at the current pen position.
2718
2719	The character is drawn in the view's current font.
2720
2721	\param c The character to draw.
2722
2723	\since BeOS R3
2724*/
2725
2726
2727/*!
2728	\fn void BView::DrawChar(char c, BPoint location)
2729	\brief Draws character \a c at the specified \a location in the view.
2730
2731	The character is drawn in the view's current font.
2732
2733	\param c The character to draw.
2734	\param location The location in the view to draw the character.
2735
2736	\since BeOS R3
2737*/
2738
2739
2740/*!
2741	\fn void BView::DrawString(const char* string, escapement_delta* delta)
2742	\brief Draw \a string onto the view at the current pen position.
2743
2744	\param string The string to draw.
2745	\param delta Adds additional width to each character according to the
2746	       following fields:
2747	- nonspace(float) The amount of width to add to characters with visible
2748	  glyphs.
2749	- space(float) The amount of width to add to characters with escapements
2750	  but don't have visible glyphs.
2751
2752	\since BeOS R3
2753*/
2754
2755
2756/*!
2757	\fn void BView::DrawString(const char* string, BPoint location,
2758		escapement_delta* delta)
2759	\brief Draw \a string onto the view at the specified \a location in the view.
2760
2761	\param string The string to draw.
2762	\param location The location in the view to draw the string.
2763	\param delta Adds additional width to each character according to the
2764	       following fields:
2765	- nonspace(float) The amount of width to add to characters with visible
2766	  glyphs.
2767	- space(float) The amount of width to add to characters with escapements
2768	  but don't have visible glyphs.
2769
2770	\since BeOS R3
2771*/
2772
2773
2774/*!
2775	\fn void BView::DrawString(const char* string, int32 length,
2776		escapement_delta* delta)
2777	\brief Draw \a string up to \a length characters onto the view at the current
2778	       pen position.
2779
2780	\param string The string to draw.
2781	\param length The maximum number of characters in \a string to draw.
2782	\param delta Adds additional width to each character according to the
2783	       following fields:
2784	- nonspace(float) The amount of width to add to characters with visible
2785	  glyphs.
2786	- space(float) The amount of width to add to characters with escapements
2787	  but don't have visible glyphs.
2788
2789	\since BeOS R3
2790*/
2791
2792
2793/*!
2794	\fn void BView::DrawString(const char* string, int32 length, BPoint location,
2795		escapement_delta* delta)
2796	\brief Draw \a string up to \a length characters onto the view at the
2797	       specified \a location in the view.
2798
2799	\param string The string to draw.
2800	\param length The maximum number of characters in \a string to draw.
2801	\param location The location in the view to draw the string.
2802	\param delta Adds additional width to each character according to the
2803	       following fields:
2804	- nonspace(float) The amount of width to add to characters with visible
2805	  glyphs.
2806	- space(float) The amount of width to add to characters with escapements
2807	  but don't have visible glyphs.
2808
2809	\since BeOS R3
2810*/
2811
2812
2813/*!
2814	\fn void BView::DrawString(const char* string, const BPoint* locations,
2815		int32 locationCount)
2816	\brief Draw \a string \a locationCount times at the specified \a locations.
2817
2818	\param string The string to draw.
2819	\param locations A pointer to an array of BPoint objects to draw the string.
2820	\param locationCount The number of elements in \a locations.
2821
2822	\since Haiku R1
2823*/
2824
2825
2826/*!
2827	\fn void BView::DrawString(const char* string, int32 length,
2828		const BPoint* locations, int32 locationCount)
2829	\brief Draw \a string up to \a length characters \a locationCount times at the
2830	       specified \a locations.
2831
2832	\param string The string to draw.
2833	\param length The maximum number of characters in \a string to draw.
2834	\param locations A pointer to an array of BPoint objects to draw the string.
2835	\param locationCount The number of elements in \a locations.
2836
2837	\since Haiku R1
2838*/
2839
2840
2841/*!
2842	\fn void BView::StrokeEllipse(BPoint center, float xRadius, float yRadius,
2843		::pattern pattern)
2844	\brief Stroke the outline of an ellipse starting at \a center with a
2845	       horizontal radius of \a xRadius and a vertical radius of \a yRadius.
2846
2847	\param center The center point.
2848	\param xRadius The horizontal radius.
2849	\param yRadius The vertical radius.
2850	\param pattern One of the following:
2851	- \c B_SOLID_HIGH
2852	- \c B_SOLID_LOW
2853	- \c B_MIXED_COLORS
2854
2855	\since BeOS R3
2856*/
2857
2858
2859/*!
2860	\fn void BView::StrokeEllipse(BRect rect, ::pattern pattern)
2861	\brief Stroke the outline of an ellipse inscribed within \a rect.
2862
2863	\param rect The area within which to inscribe the shape.
2864	\param pattern One of the following:
2865	- \c B_SOLID_HIGH
2866	- \c B_SOLID_LOW
2867	- \c B_MIXED_COLORS
2868
2869	\since BeOS R3
2870*/
2871
2872
2873/*!
2874	\fn void BView::FillEllipse(BPoint center, float xRadius, float yRadius,
2875		::pattern pattern)
2876	\brief Fill an ellipse starting at \a center with a horizontal radius
2877	       of \a xRadius and a vertical radius of \a yRadius.
2878
2879	\param center The center point.
2880	\param xRadius The horizontal radius.
2881	\param yRadius The vertical radius.
2882	\param pattern One of the following:
2883	- \c B_SOLID_HIGH
2884	- \c B_SOLID_LOW
2885	- \c B_MIXED_COLORS
2886
2887	\since BeOS R3
2888*/
2889
2890
2891/*!
2892	\fn void BView::FillEllipse(BRect rect, ::pattern pattern)
2893	\brief Fill an ellipse inscribed within \a rect.
2894
2895	\param rect The area within which to inscribe the shape.
2896	\param pattern One of the following:
2897	- \c B_SOLID_HIGH
2898	- \c B_SOLID_LOW
2899	- \c B_MIXED_COLORS
2900
2901	\since BeOS R3
2902*/
2903
2904
2905/*!
2906	\fn void BView::FillEllipse(BPoint center, float xRadius, float yRadius,
2907		const BGradient& gradient)
2908	\brief Fill an ellipse with the specified \a gradient pattern starting at
2909	       \a center with a horizontal radius of \a xRadius and a vertical radius
2910		   of \a yRadius.
2911
2912	\param center The center point.
2913	\param xRadius The horizontal radius.
2914	\param yRadius The vertical radius.
2915	\param gradient The gradient pattern to fill the ellipse with.
2916
2917	\since Haiku R1
2918*/
2919
2920
2921/*!
2922	\fn void BView::FillEllipse(BRect rect, const BGradient& gradient)
2923	\brief Fill an ellipse with the specified \a gradient pattern inscribed within
2924	       \a rect.
2925
2926	\param rect The area within which to inscribe the shape.
2927	\param gradient The gradient pattern to fill the ellipse with.
2928
2929	\since Haiku R1
2930*/
2931
2932
2933/*!
2934	\fn void BView::StrokeArc(BPoint center, float xRadius, float yRadius,
2935		float startAngle, float arcAngle, ::pattern pattern)
2936	\brief Stroke the outline of an arc starting at \a center with a
2937	       horizontal radius of \a xRadius and a vertical radius of \a yRadius
2938	       starting at \a startAngle and drawing \a arcAngle degrees.
2939
2940	\param center The center point.
2941	\param xRadius The horizontal radius.
2942	\param yRadius The vertical radius.
2943	\param startAngle The angle to begin drawing at.
2944	\param arcAngle The number of degrees of the arc to draw.
2945	\param pattern One of the following:
2946	- \c B_SOLID_HIGH
2947	- \c B_SOLID_LOW
2948	- \c B_MIXED_COLORS
2949
2950	\since BeOS R3
2951*/
2952
2953
2954/*!
2955	\fn void BView::StrokeArc(BRect rect, float startAngle, float arcAngle,
2956		::pattern pattern)
2957	\brief Stroke the outline of an arc inscribed within \a rect starting at
2958	       \a startAngle and drawing \a arcAngle degrees.
2959
2960	\param rect The area within which to inscribe the shape.
2961	\param startAngle The angle to begin drawing at.
2962	\param arcAngle The number of degrees of the arc to draw.
2963	\param pattern One of the following:
2964	- \c B_SOLID_HIGH
2965	- \c B_SOLID_LOW
2966	- \c B_MIXED_COLORS
2967
2968	\since BeOS R3
2969*/
2970
2971
2972/*!
2973	\fn void BView::FillArc(BPoint center, float xRadius, float yRadius,
2974		float startAngle, float arcAngle, ::pattern pattern)
2975	\brief Fill an arc starting at \a center with a horizontal radius of
2976	       \a xRadius and a vertical radius of \a yRadius starting at
2977	       \a startAngle and drawing \a arcAngle degrees.
2978
2979	\param center The center point.
2980	\param xRadius The horizontal radius.
2981	\param yRadius The vertical radius.
2982	\param startAngle The angle to begin drawing at.
2983	\param arcAngle The number of degrees of the arc to draw.
2984	\param pattern One of the following:
2985	- \c B_SOLID_HIGH
2986	- \c B_SOLID_LOW
2987	- \c B_MIXED_COLORS
2988
2989	\since BeOS R3
2990*/
2991
2992
2993/*!
2994	\fn void BView::FillArc(BPoint center, float xRadius, float yRadius,
2995		float startAngle, float arcAngle, const BGradient& gradient)
2996	\brief Fill an arc with the specified \a gradient pattern starting at
2997	       \a center with a horizontal radius of \a xRadius and a vertical
2998		   radius of \a yRadius starting at \a startAngle and drawing
2999		   \a arcAngle degrees.
3000
3001	\param center The center point.
3002	\param xRadius The horizontal radius.
3003	\param yRadius The vertical radius.
3004	\param startAngle The angle to begin drawing at.
3005	\param arcAngle The number of degrees of the arc to draw.
3006	\param gradient The gradient pattern to fill the arc with.
3007
3008	\since Haiku R1
3009*/
3010
3011
3012/*!
3013	\fn void BView::FillArc(BRect rect, float startAngle, float arcAngle,
3014		::pattern pattern)
3015	\brief Fill an arc inscribed within \a rect starting at startAngle and
3016	       drawing \a arcAngle degrees.
3017
3018	\param rect The area within which to inscribe the shape.
3019	\param startAngle The angle to begin drawing at.
3020	\param arcAngle The number of degrees of the arc to draw.
3021	\param pattern One of the following:
3022	- \c B_SOLID_HIGH
3023	- \c B_SOLID_LOW
3024	- \c B_MIXED_COLORS
3025
3026	\since BeOS R3
3027*/
3028
3029
3030/*!
3031	\fn void BView::FillArc(BRect rect, float startAngle, float arcAngle,
3032		const BGradient& gradient)
3033	\brief Fill an arc with the specified \a gradient pattern inscribed within
3034	       \a rect starting at startAngle and drawing \a arcAngle degrees.
3035
3036	\param rect The area within which to inscribe the shape.
3037	\param startAngle The angle to begin drawing at.
3038	\param arcAngle The number of degrees of the arc to draw.
3039	\param gradient The gradient pattern to fill the arc with.
3040
3041	\since Haiku R1
3042*/
3043
3044
3045/*!
3046	\fn void BView::StrokeBezier(BPoint* controlPoints, ::pattern pattern)
3047	\brief Stroke a bezier curve.
3048
3049	\param controlPoints The list of points that form the bezier curve.
3050	\param pattern One of the following:
3051	- \c B_SOLID_HIGH
3052	- \c B_SOLID_LOW
3053	- \c B_MIXED_COLORS
3054
3055	\since BeOS R3
3056*/
3057
3058
3059/*!
3060	\fn void BView::FillBezier(BPoint* controlPoints, ::pattern pattern)
3061	\brief Fill a bezier curve.
3062
3063	\param controlPoints The list of points that form the bezier curve.
3064	\param pattern One of the following:
3065	- \c B_SOLID_HIGH
3066	- \c B_SOLID_LOW
3067	- \c B_MIXED_COLORS
3068
3069	\since BeOS R3
3070*/
3071
3072
3073/*!
3074	\fn void BView::FillBezier(BPoint* controlPoints, const BGradient& gradient)
3075
3076	\brief Fill a bezier curve.
3077
3078	\param controlPoints The list of points that form the bezier curve.
3079	\param gradient The gradient pattern to fill the bezier curve with.
3080
3081	\since Haiku R1
3082*/
3083
3084
3085/*!
3086	\fn void BView::StrokePolygon(const BPolygon* polygon, bool closed,
3087		::pattern pattern)
3088	\brief Stroke a polygon shape.
3089
3090	\param polygon The polygon shape to stroke.
3091	\param closed Whether or not the last line of the polygon should intersect
3092	       with the initial point.
3093	\param pattern One of the following:
3094	- \c B_SOLID_HIGH
3095	- \c B_SOLID_LOW
3096	- \c B_MIXED_COLORS
3097
3098	\since BeOS R3
3099*/
3100
3101
3102/*!
3103	\fn void BView::StrokePolygon(const BPoint* pointArray, int32 numPoints,
3104		bool closed, ::pattern pattern)
3105	\brief Stroke a polygon shape made up of points specified by \a pointArray.
3106
3107	\param pointArray An array of points that specify the vertices of the
3108	       polygon.
3109	\param numPoints The number of points in \a pointArray.
3110	\param closed Whether or not the last line of the polygon should intersect
3111	       with the initial point.
3112	\param pattern One of the following:
3113	- \c B_SOLID_HIGH
3114	- \c B_SOLID_LOW
3115	- \c B_MIXED_COLORS
3116
3117	\since BeOS R3
3118*/
3119
3120
3121/*!
3122	\fn void BView::StrokePolygon(const BPoint* pointArray, int32 numPoints,
3123		BRect bounds, bool closed, ::pattern pattern)
3124	\brief Stroke a polygon shape made up of points specified by \a pointArray
3125	       inscribed by \a bounds.
3126
3127	\param pointArray An array of points that specify the vertices of the
3128	       polygon.
3129	\param numPoints The number of points in \a pointArray.
3130	\param bounds The smallest rectangle that encloses the points in
3131	       \a pointArray.
3132	\param closed Whether or not the last line of the polygon should intersect
3133	       with the initial point.
3134	\param pattern One of the following:
3135	- \c B_SOLID_HIGH
3136	- \c B_SOLID_LOW
3137	- \c B_MIXED_COLORS
3138
3139	\since BeOS R3
3140*/
3141
3142
3143/*!
3144	\fn void BView::FillPolygon(const BPolygon* polygon, ::pattern pattern)
3145	\brief Fill a polygon shape.
3146
3147	\param polygon The polygon shape to fill.
3148	\param pattern One of the following:
3149	- \c B_SOLID_HIGH
3150	- \c B_SOLID_LOW
3151	- \c B_MIXED_COLORS
3152
3153	\since BeOS R3
3154*/
3155
3156
3157/*!
3158	\fn void BView::FillPolygon(const BPolygon* polygon,
3159		const BGradient& gradient)
3160	\brief Fill a polygon shape with the specified \a gradient pattern.
3161
3162	\param polygon The polygon shape to fill.
3163	\param gradient The gradient pattern to fill the polygon with.
3164
3165	\since Haiku R1
3166*/
3167
3168
3169/*!
3170	\fn void BView::FillPolygon(const BPoint* pointArray, int32 numPoints,
3171		::pattern pattern)
3172	\brief Fill a polygon shape made up of points specified by \a pointArray.
3173
3174	\param pointArray An array of points that specify the vertices of the polygon.
3175	\param numPoints The number of points in \a pointArray.
3176	\param pattern One of the following:
3177	- \c B_SOLID_HIGH
3178	- \c B_SOLID_LOW
3179	- \c B_MIXED_COLORS
3180
3181	\since BeOS R3
3182*/
3183
3184
3185/*!
3186	\fn void BView::FillPolygon(const BPoint* pointArray, int32 numPoints,
3187		const BGradient& gradient)
3188	\brief Fill a polygon shape made up of points specified by \a pointArray
3189	       with the specified \a gradient pattern.
3190
3191	\param pointArray An array of points that specify the vertices of the
3192	       polygon.
3193	\param numPoints The number of points in \a pointArray.
3194	\param gradient The gradient pattern to fill the polygon with.
3195
3196	\since Haiku R1
3197*/
3198
3199
3200/*!
3201	\fn void BView::FillPolygon(const BPoint* pointArray, int32 numPoints,
3202		BRect bounds, ::pattern pattern)
3203	\brief Fill a polygon shape made up of points specified by \a pointArray
3204	       inscribed by \a bounds.
3205
3206	\param pointArray An array of points that specify the vertices of the
3207	       polygon.
3208	\param numPoints The number of points in \a pointArray.
3209	\param bounds The smallest rectangle that encloses the points in
3210	       \a pointArray.
3211	\param pattern One of the following:
3212	- \c B_SOLID_HIGH
3213	- \c B_SOLID_LOW
3214	- \c B_MIXED_COLORS
3215
3216	\since BeOS R3
3217*/
3218
3219
3220/*!
3221	\fn void BView::FillPolygon(const BPoint* pointArray, int32 numPoints,
3222		BRect bounds, const BGradient& gradient)
3223	\brief Fill a polygon shape made up of points specified by \a pointArray
3224	       inscribed by \a bounds with the specified \a gradient pattern.
3225
3226	\param pointArray An array of points that specify the vertices of the
3227	       polygon.
3228	\param numPoints The number of points in \a pointArray.
3229	\param bounds The smallest rectangle that encloses the points in
3230	       \a pointArray.
3231	\param gradient The gradient pattern to fill the polygon with.
3232
3233	\since Haiku R1
3234*/
3235
3236
3237/*!
3238	\fn void BView::StrokeRect(BRect rect, ::pattern pattern)
3239	\brief Stroke the rectangle specified by \a rect.
3240
3241	\param rect The rectangular area to stroke.
3242	\param pattern One of the following:
3243	- \c B_SOLID_HIGH
3244	- \c B_SOLID_LOW
3245	- \c B_MIXED_COLORS
3246
3247	\since BeOS R3
3248*/
3249
3250
3251/*!
3252	\fn void BView::FillRect(BRect rect, ::pattern pattern)
3253	\brief Fill the rectangle specified by \a rect.
3254
3255	\param rect The rectangular area to fill.
3256	\param pattern One of the following:
3257	- \c B_SOLID_HIGH
3258	- \c B_SOLID_LOW
3259	- \c B_MIXED_COLORS
3260
3261	\since BeOS R3
3262*/
3263
3264
3265/*!
3266	\fn void BView::FillRect(BRect rect, const BGradient& gradient)
3267	\brief Fill the rectangle specified by \a rect with the specified
3268	       \a gradient pattern.
3269
3270	\param rect The rectangular area to fill.
3271	\param gradient The gradient pattern to fill the rectangle with.
3272
3273	\since Haiku R1
3274*/
3275
3276
3277/*!
3278	\fn void BView::StrokeRoundRect(BRect rect, float xRadius, float yRadius,
3279		::pattern pattern)
3280	\brief Stroke the rounded rectangle with horizontal radius \a xRadius and
3281	       vertical radius \a yRadius.
3282
3283	\param rect The rectangular area to stroke the round rect within.
3284	\param xRadius The horizontal radius.
3285	\param yRadius The vertical radius.
3286	\param pattern One of the following:
3287	- \c B_SOLID_HIGH
3288	- \c B_SOLID_LOW
3289	- \c B_MIXED_COLORS
3290
3291	\since BeOS R3
3292*/
3293
3294
3295/*!
3296	\fn void BView::FillRoundRect(BRect rect, float xRadius, float yRadius,
3297		::pattern pattern)
3298	\brief Fill the rounded rectangle with horizontal radius \a xRadius and
3299	       vertical radius \a yRadius.
3300
3301	\param rect The rectangular area to fill the round rect within.
3302	\param xRadius The horizontal radius.
3303	\param yRadius The vertical radius.
3304	\param pattern One of the following:
3305	- \c B_SOLID_HIGH
3306	- \c B_SOLID_LOW
3307	- \c B_MIXED_COLORS
3308
3309	\since BeOS R3
3310*/
3311
3312
3313/*!
3314	\fn void BView::FillRoundRect(BRect rect, float xRadius, float yRadius,
3315		const BGradient& gradient)
3316	\brief Fill the rounded rectangle with horizontal radius \a xRadius and
3317	       vertical radius \a yRadius with the specified \a gradient pattern.
3318
3319	\param rect The rectangular area to fill the round rect within.
3320	\param xRadius The horizontal radius.
3321	\param yRadius The vertical radius.
3322	\param gradient The gradient pattern to fill the round rect with.
3323
3324	\since Haiku R1
3325*/
3326
3327
3328/*!
3329	\fn void BView::FillRegion(BRegion* region, ::pattern pattern)
3330	\brief Fill \a region.
3331
3332	\param region The \a region to fill.
3333	\param pattern One of the following:
3334	- \c B_SOLID_HIGH
3335	- \c B_SOLID_LOW
3336	- \c B_MIXED_COLORS
3337
3338	\since BeOS R3
3339*/
3340
3341
3342/*!
3343	\fn void BView::FillRegion(BRegion* region, const BGradient& gradient)
3344	\brief Fill \a region with the specified \a gradient pattern.
3345
3346	\param region The \a region to fill.
3347	\param gradient The gradient pattern to fill the \a region with.
3348
3349	\since Haiku R1
3350*/
3351
3352
3353/*!
3354	\fn void BView::StrokeTriangle(BPoint point1, BPoint point2, BPoint point3,
3355		BRect bounds, ::pattern pattern)
3356	\brief Stroke the triangle specified by points \a point1, \a point2, and
3357	       \a point3 and enclosed by \a bounds.
3358
3359	\param point1 The first point of the triangle.
3360	\param point2 The second point of the triangle.
3361	\param point3 The third point of the triangle.
3362	\param bounds The rectangular area that encloses the triangle.
3363	\param pattern One of the following:
3364	- \c B_SOLID_HIGH
3365	- \c B_SOLID_LOW
3366	- \c B_MIXED_COLORS
3367
3368	\since BeOS R3
3369*/
3370
3371
3372/*!
3373	\fn void BView::StrokeTriangle(BPoint point1, BPoint point2, BPoint point3,
3374		::pattern pattern)
3375	\brief Stroke the triangle specified by points \a point1, \a point2,
3376	       and \a point3.
3377
3378	\param point1 The first point of the triangle.
3379	\param point2 The second point of the triangle.
3380	\param point3 The third point of the triangle.
3381	\param pattern One of the following:
3382	- \c B_SOLID_HIGH
3383	- \c B_SOLID_LOW
3384	- \c B_MIXED_COLORS
3385
3386	\since BeOS R3
3387*/
3388
3389
3390/*!
3391	\fn void BView::FillTriangle(BPoint point1, BPoint point2, BPoint point3,
3392		::pattern pattern)
3393	\brief Fill the triangle specified by points \a point1, \a point2,
3394	       and \a point3.
3395
3396	\param point1 The first point of the triangle.
3397	\param point2 The second point of the triangle.
3398	\param point3 The third point of the triangle.
3399	\param pattern One of the following:
3400	- \c B_SOLID_HIGH
3401	- \c B_SOLID_LOW
3402	- \c B_MIXED_COLORS
3403
3404	\since BeOS R3
3405*/
3406
3407
3408/*!
3409	\fn void BView::FillTriangle(BPoint point1, BPoint point2, BPoint point3,
3410		const BGradient& gradient)
3411	\brief Fill the triangle specified by points \a point1, \a point2,
3412	       and \a point3 with the specified \a gradient pattern.
3413
3414	\param point1 The first point of the triangle.
3415	\param point2 The second point of the triangle.
3416	\param point3 The third point of the triangle.
3417	\param gradient The gradient pattern to fill the triangle with.
3418
3419	\since Haiku R1
3420*/
3421
3422
3423/*!
3424	\fn void BView::FillTriangle(BPoint point1, BPoint point2, BPoint point3,
3425		BRect bounds, ::pattern pattern)
3426	\brief Fill the triangle specified by points \a point1, \a point2,
3427	       and \a point3 and enclosed by \a bounds.
3428
3429	\param point1 The first point of the triangle.
3430	\param point2 The second point of the triangle.
3431	\param point3 The third point of the triangle.
3432	\param bounds The rectangular area that encloses the triangle.
3433	\param pattern One of the following:
3434	- \c B_SOLID_HIGH
3435	- \c B_SOLID_LOW
3436	- \c B_MIXED_COLORS
3437
3438	\since BeOS R3
3439*/
3440
3441
3442/*!
3443	\fn void BView::FillTriangle(BPoint point1, BPoint point2, BPoint point3,
3444		BRect bounds, const BGradient& gradient)
3445	\brief Fill the triangle specified by points \a point1, \a point2,
3446	       and \a point3 and enclosed by \a bounds with the specified
3447	       \a gradient pattern.
3448
3449	\param point1 The first point of the triangle.
3450	\param point2 The second point of the triangle.
3451	\param point3 The third point of the triangle.
3452	\param bounds The rectangular area that encloses the triangle.
3453	\param gradient The gradient pattern to fill the triangle with.
3454
3455	\since Haiku R1
3456*/
3457
3458
3459/*!
3460	\fn void BView::StrokeLine(BPoint toPoint, ::pattern pattern)
3461	\brief Stroke a line from the current pen location to the point \a toPoint.
3462
3463	\param toPoint The end point of the line.
3464	\param pattern One of the following:
3465	- \c B_SOLID_HIGH
3466	- \c B_SOLID_LOW
3467	- \c B_MIXED_COLORS
3468
3469	\since BeOS R3
3470*/
3471
3472
3473/*!
3474	\fn void BView::StrokeLine(BPoint start, BPoint end, ::pattern pattern)
3475	\brief Stroke a line from point \a start to point \a end.
3476
3477	\param start The start point of the line.
3478	\param end The end point of the line.
3479	\param pattern One of the following:
3480	- \c B_SOLID_HIGH
3481	- \c B_SOLID_LOW
3482	- \c B_MIXED_COLORS
3483
3484	\since BeOS R3
3485*/
3486
3487
3488/*!
3489	\fn void BView::StrokeShape(BShape* shape, ::pattern pattern)
3490	\brief Stroke \a shape.
3491
3492	\param shape The \a shape to stroke.
3493	\param pattern One of the following:
3494	- \c B_SOLID_HIGH
3495	- \c B_SOLID_LOW
3496	- \c B_MIXED_COLORS
3497
3498	\since BeOS R5
3499*/
3500
3501
3502/*!
3503	\fn void BView::FillShape(BShape* shape, ::pattern pattern)
3504	\brief Fill \a shape.
3505
3506	\param shape The \a shape to fill.
3507	\param pattern One of the following:
3508	- \c B_SOLID_HIGH
3509	- \c B_SOLID_LOW
3510	- \c B_MIXED_COLORS
3511
3512	\since BeOS R5
3513*/
3514
3515
3516/*!
3517	\fn void BView::FillShape(BShape* shape, const BGradient& gradient)
3518	\brief Fill \a shape with the specified \a gradient pattern.
3519
3520	\param shape The \a shape to fill.
3521	\param gradient The gradient pattern to fill the \a shape with.
3522
3523	\since Haiku R1
3524*/
3525
3526
3527/*!
3528	\fn void BView::BeginLineArray(int32 count)
3529	\brief Begin a line array of up to \a count lines.
3530
3531	This is a more efficient way of drawing a large number of lines than calling
3532	StrokeLine() repeatedly. First call BeginLineArray() to begin drawing lines,
3533	then call AddLine() for each line you wish to draw, and finally call
3534	EndLineArray() to finish the line array and draw the lines.
3535
3536	These methods don't move the current pen location or change the high or low
3537	colors of the view. \a count should be close to the number of lines you wish
3538	to draw and should be below 256 to draw efficiently.
3539
3540	\param count The maximum number of lines in the line array to draw.
3541
3542	\see StrokeLine()
3543
3544	\since BeOS R3
3545*/
3546
3547
3548/*!
3549	\fn void BView::AddLine(BPoint start, BPoint end, rgb_color color);
3550	\brief Add a line to the line array drawn from \a start to \a end.
3551
3552	\param start The \a start point of the line.
3553	\param end The \a end point of the line.
3554	\param color The \a color to draw the line.
3555
3556	\since BeOS R3
3557*/
3558
3559
3560/*!
3561	\fn void BView::EndLineArray()
3562	\brief End the line array drawing the lines.
3563
3564	\since BeOS R3
3565*/
3566
3567
3568/*!
3569	\fn void BView::SetDiskMode(char* filename, long offset)
3570	\brief Unimplemented.
3571
3572	\since Haiku R1
3573*/
3574
3575
3576/*!
3577	\fn void BView::BeginPicture(BPicture* picture)
3578	\brief Begins sending drawing instructions to \a picture.
3579
3580	The \a BPicture object is cleared and any successive drawing instructions sent
3581	to the view are redirected to \a picture until EndPicture() is called. To
3582	append drawing instructions to a BPicture object without clearing it first
3583	call AppendToPicture() instead.
3584
3585	The view doesn't display anything to the screen while it's recording to \a
3586	picture. Use the DrawPicture() method to render the \a picture.
3587
3588	Only drawing instructions performed directly on the view, not its child views
3589	are send to the BPicture object and BPicture captures only primitive graphics
3590	operations. The view must be attached to a window for the drawing instruction
3591	to be recorded. Drawing instructions are recorded even if the view is hidden or
3592	resides outside the clipping region or the window is off-screen.
3593
3594	\param picture The BPicture object to record drawing instructions to.
3595
3596	\since BeOS R3
3597*/
3598
3599
3600/*!
3601	\fn void BView::AppendToPicture(BPicture* picture)
3602	\brief Appends drawing instructions to \a picture without clearing it first.
3603
3604	\param picture The BPicture object to record drawing instructions to.
3605
3606	\since BeOS R3
3607*/
3608
3609
3610/*!
3611	\fn BPicture* BView::EndPicture()
3612	\brief Ends the drawing instruction recording session and returns the
3613	       BPicture object passed to BeginPicture() or AppendToPicture().
3614
3615	\return The BPicture object passed to BeginPicture() or AppendToPicture().
3616
3617	\since BeOS R3
3618*/
3619
3620
3621/*!
3622	\fn void BView::SetViewBitmap(const BBitmap* bitmap, BRect srcRect,
3623		BRect dstRect, uint32 followFlags, uint32 options)
3624	\brief Sets the background \a bitmap of the view.
3625
3626	All drawing to the view occurs over \a bitmap. Any visible regions not
3627	covered by \a bitmap are filled with the current background color.
3628
3629	Once \a bitmap has been passed in and this method returns the caller may
3630	safely delete the object.
3631
3632	\param bitmap The background bitmap to set to the view.
3633	\param srcRect Specifies the area of \a bitmap to use.
3634	\param dstRect Specifies the area of the view to set \a bitmap to.
3635	\param followFlags Specifies the as the view is resized. See the BView
3636	       constructor for more details.
3637	\param options Specifies additional view options. The only option currently
3638	       available is \c B_TILE_BITMAP which tiles the bitmap across the view.
3639
3640	\since BeOS R4
3641*/
3642
3643
3644/*!
3645	\fn void BView::SetViewBitmap(const BBitmap* bitmap, uint32 followFlags,
3646		uint32 options)
3647	\brief Sets the background \a bitmap of the view.
3648
3649	All drawing to the view occurs over \a bitmap. Any visible regions not
3650	covered by \a bitmap are filled with the current background color.
3651
3652	Once \a bitmap has been passed in and this method returns the caller may
3653	safely delete the object.
3654
3655	\param bitmap The background bitmap to set to the view.
3656	\param followFlags Specifies the as the view is resized. See the BView
3657	       constructor for more details.
3658	\param options Specifies additional view options. The only option currently
3659	       available is \c B_TILE_BITMAP which tiles the bitmap across the view.
3660
3661	\since BeOS R4
3662*/
3663
3664
3665/*!
3666	\fn void BView::ClearViewBitmap()
3667	\brief Clears the background bitmap of the view if it has one.
3668
3669	\since BeOS R4
3670*/
3671
3672
3673/*!
3674	\fn status_t BView::SetViewOverlay(const BBitmap* overlay, BRect srcRect,
3675		BRect dstRect, rgb_color* colorKey, uint32 followFlags, uint32 options)
3676	\brief Sets the \a overlay bitmap of the view.
3677
3678	\a colorKey specifies which color pixels in \a overlay are treated as transparent
3679	allowing the pixels of the view to show through.
3680
3681	Once \a overlay has been passed in and this method returns the caller may
3682	safely delete the object.
3683
3684	\param overlay The overlay bitmap to set to the view.
3685	\param srcRect Specifies the area of \a overlay to use.
3686	\param dstRect Specifies the area of the view to set \a overlay to.
3687	\param colorKey The color in \a overlay to treat as transparent.
3688	\param followFlags Specifies the as the view is resized. See the BView
3689	       constructor for more details.
3690	\param options Specifies additional view options. The only option currently
3691	       available is \c B_TILE_BITMAP which tiles the bitmap across the view.
3692
3693	\since BeOS R5
3694*/
3695
3696
3697/*!
3698	\fn status_t BView::SetViewOverlay(const BBitmap* overlay,
3699		rgb_color* colorKey, uint32 followFlags, uint32 options)
3700	\brief Sets the \a overlay bitmap of the view.
3701
3702	\a colorKey specifies which color pixels in \a overlay are treated as transparent
3703	allowing the pixels of the view to show through.
3704
3705	Once \a overlay has been passed in and this method returns the caller may
3706	safely delete the object.
3707
3708	\param overlay The overlay bitmap to set to the view.
3709	\param colorKey The color in \a overlay to treat as transparent.
3710	\param followFlags Specifies the as the view is resized. See the BView
3711	       constructor for more details.
3712	\param options Specifies additional view options. The only option currently
3713	       available is \c B_TILE_BITMAP which tiles the bitmap across the view.
3714
3715	\since BeOS R5
3716*/
3717
3718
3719/*!
3720	\fn void BView::ClearViewOverlay()
3721	\brief Clears the overlay bitmap of the view if it has one.
3722
3723	\since BeOS R5
3724*/
3725
3726
3727/*!
3728	\fn void BView::CopyBits(BRect src, BRect dst)
3729	\brief Copy the bits from the \a src rectangle to the \a dst rectangle in the
3730	       view's coordinate system.
3731
3732	If the rectangles are of different sizes than \a src is scaled to fit. \a src
3733	is clipped if a part of \a dst lies outside of the visible region of the view.
3734	Only the visible portions of \a src are copied.
3735
3736	The view must be attached to a window for this method to work.
3737
3738	\param src The source rectangle to copy bits from.
3739	\param dst The destination rectangle to copy bits to.
3740
3741	\since BeOS R3
3742*/
3743
3744
3745/*!
3746	\fn void BView::DrawPicture(const BPicture* picture)
3747	\brief Draws the \a picture at the view's current pen position.
3748
3749	\param picture The BPicture object to draw.
3750
3751	\since BeOS R3
3752*/
3753
3754
3755/*!
3756	\fn void BView::DrawPicture(const BPicture* picture, BPoint where)
3757	\brief Draws the \a picture at the location in the view specified by \a where.
3758
3759	\param picture The BPicture object to draw.
3760	\param where The point on the view to draw \a picture.
3761
3762	\since BeOS R3
3763*/
3764
3765
3766/*!
3767	\fn void BView::DrawPicture(const char* filename, long offset, BPoint where)
3768	\brief Draws the \a picture from the file specified by \a filename offset by
3769	       \a offset bytes at the location in the view specified by \a where.
3770
3771	\param filename The filename of the file containing the picture to draw.
3772	\param where The point on the view to draw the picture.
3773	\param offset The number of bytes to offset in the file to find the picture.
3774
3775	\since BeOS R4
3776*/
3777
3778
3779/*!
3780	\fn void BView::DrawPictureAsync(const BPicture* picture)
3781	\brief Draws the \a picture at the view's current pen position.
3782
3783	\param picture The BPicture object to draw.
3784
3785	\since BeOS R5
3786*/
3787
3788
3789/*!
3790	\fn void BView::DrawPictureAsync(const BPicture* picture, BPoint where)
3791	\brief Draws the \a picture at the location in the view specified by
3792	       \a where.
3793
3794	\param picture The BPicture object to draw.
3795	\param where The point on the view to draw \a picture.
3796
3797	\since BeOS R5
3798*/
3799
3800
3801/*!
3802	\fn void BView::DrawPictureAsync(const char* filename, long offset,
3803		BPoint where)
3804	\brief Draws the \a picture from the file specified by \a filename offset
3805	       by \a offset bytes at the location in the view specified by
3806	       \a where.
3807
3808	\param filename The filename of the file containing the picture to draw.
3809	\param where The point on the view to draw the picture.
3810	\param offset The number of bytes to offset in the file to find the
3811	       picture.
3812
3813	\since BeOS R5
3814*/
3815
3816
3817/*!
3818	\fn void BView::Invalidate(BRect invalRect)
3819	\brief Sends a message to App Server to redraw the portion of the view
3820	       specified by \a invalRect.
3821
3822	\param invalRect The rectangular area of the view to redraw.
3823
3824	\since BeOS R3
3825*/
3826
3827
3828/*!
3829	\fn void BView::Invalidate(const BRegion* region)
3830	\brief Sends a message to App Server to redraw the portion of the view
3831	       specified by \a region.
3832
3833	\param region The region of the view to redraw.
3834
3835	\since Haiku R1
3836*/
3837
3838
3839/*!
3840	\fn void BView::Invalidate()
3841	\brief Sends a message to App Server to redraw the view.
3842
3843	\since BeOS R3
3844*/
3845
3846
3847/*!
3848	\fn void BView::DelayedInvalidate(bigtime_t delay)
3849	\brief Sends a message to App Server to redraw the entire view after
3850	       a certain, minimum, delay. Repeated calls to this method may be
3851	       merged, but the view is guaranteed to be redrawn after the delay
3852	       given in the first call of this method.
3853
3854	\param delay The time, in microseconds, to wait until redrawing the view.
3855
3856	\since Haiku R1
3857*/
3858
3859
3860/*!
3861	\fn void BView::DelayedInvalidate(bigtime_t delay, BRect invalRect)
3862	\brief Sends a message to App Server to redraw the portion of the view
3863	       specified by \a invalRect after a certain, minimum, delay.
3864	       Repeated calls to this method may be merged, but the invalidated
3865	       rect is guaranteed to be redrawn after the minimum delay given
3866	       by the first call of this method.
3867
3868	\param delay The time, in microseconds, to wait until redrawing the view.
3869	\param invalRect The rectangular area of the view to redraw.
3870
3871	\since Haiku R1
3872*/
3873
3874
3875/*!
3876	\fn void BView::InvertRect(BRect rect)
3877	\brief Inverts the colors within \a rect.
3878
3879	This method is often used to draw a highlighted selection in a view.
3880
3881	\param rect The rectangular area in the view to invert the colors of.
3882
3883	\since BeOS R3
3884*/
3885
3886
3887//! @}
3888
3889
3890/*!
3891	\name View Hierarchy
3892*/
3893
3894
3895//! @{
3896
3897
3898/*!
3899	\fn void BView::AddChild(BView* child, BView* before)
3900	\brief Adds \a child to the view hierarchy immediately before \a before.
3901
3902	A view may only have one parent at a time so \a child must not have already
3903	been added to the view hierarchy. If \a before is \c NULL then \a child is added
3904	to the end of the tree. If the view is attached to a window \a child and all
3905	of its descendent views also become attached to the window invoking an
3906	AttachedToWindow() method on each view.
3907
3908	\param child The child view to add.
3909	\param before The sibling view to add \a child before.
3910
3911	\since BeOS R3
3912*/
3913
3914
3915/*!
3916	\fn bool BView::AddChild(BLayoutItem* child)
3917	\brief Add the \a child layout item to the view hierarchy.
3918
3919	\param child The child layout item to add.
3920	\return Whether or not \a child was added to the view layout hierarchy.
3921
3922	\since Haiku R1
3923*/
3924
3925
3926/*!
3927	\fn bool BView::RemoveChild(BView* child)
3928	\brief Removes \a child from the view hierarchy.
3929
3930	\param child The child view to remove.
3931	\return Whether or not \a child was removed from the view hierarchy.
3932
3933	\since BeOS R3
3934*/
3935
3936
3937/*!
3938	\fn int32 BView::CountChildren() const
3939	\brief Returns the number of child views that this view has.
3940
3941	\return The number of child views.
3942
3943	\since BeOS R3
3944*/
3945
3946
3947/*!
3948	\fn BView* BView::ChildAt(int32 index) const
3949	\brief Returns a pointer to the child view found at \a index.
3950
3951	\param index The index of the child view to return a pointer of.
3952
3953	\return A pointer to the child view at \a index or \c NULL if not found.
3954
3955	\since BeOS R3
3956*/
3957
3958
3959/*!
3960	\fn BView* BView::NextSibling() const
3961	\brief Returns a pointer to the next sibling view.
3962
3963	\return A pointer to the next sibling view or \a NULL if not found.
3964
3965	\since BeOS R3
3966*/
3967
3968
3969/*!
3970	\fn BView* BView::PreviousSibling() const
3971	\brief Returns a pointer to the previous sibling view.
3972
3973	\return A pointer to the previous sibling view or \a NULL if not found.
3974
3975	\since BeOS R3
3976*/
3977
3978
3979/*!
3980	\fn bool BView::RemoveSelf()
3981	\brief Removes the view and all child views from the view hierarchy.
3982
3983	\returns Whether or not the view was removed from the view hierarchy.
3984
3985	\since BeOS R3
3986*/
3987
3988
3989/*!
3990	\fn BView* BView::Parent() const
3991	\brief Returns a pointer to the view's parent.
3992
3993	\return A pointer to the parent view or \c NULL if not attached.
3994
3995	\since BeOS R3
3996*/
3997
3998
3999/*!
4000	\fn BView* BView::FindView(const char* name) const
4001	\brief Returns the view in the view hierarchy with the specified \a name.
4002
4003	\return The view in the view hierarchy with the specified \a name or \c NULL
4004	        if not found.
4005
4006	\since BeOS R3
4007*/
4008
4009
4010//! @}
4011
4012
4013/*!
4014	\name View Frame Alteration
4015
4016	As a view's frame rectangle must be aligned to pixel values all parameters are
4017	rounded to the nearest integer. If the view isn't attached these methods alter the
4018	frame rectangle without triggering FrameMoved(), FrameResized() or Invalidate().
4019*/
4020
4021
4022//! @{
4023
4024
4025/*!
4026	\fn void BView::MoveBy(float deltaX, float deltaY)
4027	\brief Moves the view \a deltaX pixels horizontally and \a deltaY pixels
4028	       vertically in the parent view's coordinate system.
4029
4030	\param deltaX The number of pixels to move the view horizontally.
4031	\param deltaY The number of pixels to move the view vertically.
4032
4033	\since BeOS R3
4034*/
4035
4036
4037/*!
4038	\fn void BView::MoveTo(BPoint where)
4039	\brief Move the view to the location specified by \a where in the parent
4040	       view's coordinate system.
4041
4042	\param where The location to move the view to.
4043
4044	\since BeOS R3
4045*/
4046
4047
4048/*!
4049	\fn void BView::MoveTo(float x, float y)
4050	\brief Move the view to the coordinates specified by \a x in the horizontal
4051	       dimension and \a y in the vertical dimension in the parent view's
4052	       coordinate system.
4053
4054	\param x The horizontal coordinate to move the view to.
4055	\param y The vertical coordinate to move the view to.
4056
4057	\since BeOS R3
4058*/
4059
4060
4061/*!
4062	\fn void BView::ResizeBy(float deltaWidth, float deltaHeight)
4063	\brief Resize the view by \a deltaWidth horizontally and \a deltaHeight
4064	       vertically without moving the top left corner of the view.
4065
4066	\param deltaWidth The number of pixels to resize the view by horizontally.
4067	\param deltaHeight The number of pixels to resize the view by vertically.
4068
4069	\since BeOS R3
4070*/
4071
4072
4073/*!
4074	\fn void BView::ResizeTo(float width, float height)
4075	\brief Resize the view to the specified \a width and \a height.
4076
4077	\param width The width to resize the view to.
4078	\param height The height to resize the view to.
4079
4080	\since BeOS R3
4081*/
4082
4083
4084/*!
4085	\fn void BView::ResizeTo(BSize size)
4086	\brief Resize the view to the dimension specified by \a size.
4087
4088	\param size The \a size to resize the view to.
4089
4090	\since Haiku R1
4091*/
4092
4093
4094//! @}
4095
4096
4097/*!
4098	\fn status_t BView::GetSupportedSuites(BMessage* data)
4099	\copydoc BHandler::GetSupportedSuites()
4100*/
4101
4102
4103/*!
4104	\fn BHandler* BView::ResolveSpecifier(BMessage* message, int32 index,
4105		BMessage* specifier, int32 what, const char* property)
4106	\copydoc BHandler::ResolveSpecifier()
4107*/
4108
4109
4110/*!
4111	\fn status_t BView::Perform(perform_code code, void* _data)
4112	\brief Perform some action. (Internal Method)
4113
4114	The following perform codes are recognized:
4115		- \c PERFORM_CODE_MIN_SIZE:
4116		- \c PERFORM_CODE_MAX_SIZE:
4117		- \c PERFORM_CODE_PREFERRED_SIZE:
4118		- \c PERFORM_CODE_LAYOUT_ALIGNMENT:
4119		- \c PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
4120		- \c PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
4121		- \c PERFORM_CODE_SET_LAYOUT:
4122		- \c PERFORM_CODE_INVALIDATE_LAYOUT:
4123		- \c PERFORM_CODE_DO_LAYOUT:
4124		- \c PERFORM_CODE_GET_TOOL_TIP_AT:
4125		- \c PERFORM_CODE_ALL_UNARCHIVED:
4126		- \c PERFORM_CODE_ALL_ARCHIVED:
4127
4128	\param code The perform code.
4129	\param _data A pointer to store some data.
4130
4131	\returns A status code.
4132
4133	\since Haiku R1
4134*/
4135
4136
4137/*!
4138	\name Layouting
4139
4140	\note These methods were not available in BeOS R5.
4141*/
4142
4143
4144//! @{
4145
4146
4147/*!
4148	\fn BSize BView::MinSize()
4149	\brief Return the minimum size of the view.
4150
4151	\remark This is only meaningful if the view is part of a BLayout.
4152
4153	\return The minimum size of the view as a BSize.
4154
4155	\sa BAbstractLayout::MinSize()
4156
4157	\since Haiku R1
4158*/
4159
4160
4161/*!
4162	\fn BSize BView::MaxSize()
4163	\brief Return the maximum size of the view.
4164
4165	\remark This is only meaningful if the view is part of a BLayout.
4166
4167	\return The maximum size of the view as a BSize.
4168
4169	\sa BAbstractLayout::MaxSize()
4170
4171	\since Haiku R1
4172*/
4173
4174
4175/*!
4176	\fn BSize BView::PreferredSize()
4177	\brief Return the preferred size of the view.
4178
4179	\remark This is only meaningful if the view is part of a BLayout.
4180
4181	\return The preferred size of the view as a BSize.
4182
4183	\sa BAbstractLayout::PreferredSize()
4184
4185	\since Haiku R1
4186*/
4187
4188
4189/*!
4190	\fn void BView::SetExplicitMinSize(BSize size)
4191	\brief Set this view's min size, to be used by MinSize().
4192
4193	\remark This is only meaningful if the view is part of a BLayout.
4194
4195	\sa BAbstractLayout::SetExplicitMinSize()
4196
4197	\since Haiku R1
4198*/
4199
4200
4201/*!
4202	\fn void BView::SetExplicitMaxSize(BSize size)
4203	\brief Set this view's max size, to be used by MaxSize().
4204
4205	\remark This is only meaningful if the view is part of a BLayout.
4206
4207	\sa BAbstractLayout::SetExplicitMaxSize()
4208
4209	\since Haiku R1
4210*/
4211
4212
4213/*!
4214	\fn void BView::SetExplicitPreferredSize(BSize size)
4215	\brief Set this view's preferred size, to be used by PreferredSize().
4216
4217	\remark This is only meaningful if the view is part of a BLayout.
4218
4219	\sa BAbstractLayout::SetExplicitPreferredSize()
4220
4221	\since Haiku R1
4222*/
4223
4224
4225/*!
4226	\fn void BView::SetExplicitAlignment(BAlignment alignment)
4227	\brief Set this view's alignment, to be used by Alignment().
4228
4229	\remark This is only meaningful if the view is part of a BLayout.
4230
4231	\sa BAbstractLayout::SetExplicitAlignment()
4232
4233	\since Haiku R1
4234*/
4235
4236
4237/*!
4238	\fn void BView::SetLayout(BLayout* layout)
4239	\brief Sets the \a layout of the view.
4240
4241	\param layout The \a layout to set.
4242
4243	\since Haiku R1
4244*/
4245
4246
4247/*!
4248	\fn BLayout* BView::GetLayout() const
4249	\brief Get the layout of the view.
4250
4251	\remark This is only meaningful if the view is part of a BLayout.
4252
4253	\returns The layout of the view.
4254
4255	\since Haiku R1
4256*/
4257
4258
4259/*!
4260	\fn void BView::InvalidateLayout(bool descendants)
4261	\brief Invalidate layout.
4262
4263	\remark This is only meaningful if the view is part of a BLayout.
4264
4265	\param descendants Also invalidate its children views.
4266
4267	\since Haiku R1
4268*/
4269
4270
4271/*!
4272	\fn void BView::EnableLayoutInvalidation()
4273	\brief Enable layout invalidation.
4274
4275	\remark This is only meaningful if the view is part of a BLayout.
4276
4277	\since Haiku R1
4278*/
4279
4280
4281/*!
4282	\fn void BView::DisableLayoutInvalidation()
4283	\brief Disable layout invalidation.
4284
4285	\remark This is only meaningful if the view is part of a BLayout.
4286
4287	\since Haiku R1
4288*/
4289
4290
4291/*!
4292	\fn bool BView::IsLayoutInvalidationDisabled()
4293	\brief Returns whether or not layout invalidation is disabled.
4294
4295	\remark This is only meaningful if the view is part of a BLayout.
4296
4297	\return \c true of layout invalidation is disabled, \c false otherwise.
4298
4299	\since Haiku R1
4300*/
4301
4302
4303/*!
4304	\fn bool BView::IsLayoutValid() const
4305	\brief Returns whether or not the layout is valid.
4306
4307	\remark This is only meaningful if the view is part of a BLayout.
4308
4309	\brief Returns \c true if the layout is valid, \c false otherwise.
4310
4311	\since Haiku R1
4312*/
4313
4314
4315/*!
4316	\fn void BView::ResetLayoutInvalidation()
4317	\brief Service call for BView derived classes re-enabling
4318	       InvalidateLayout() notifications.
4319
4320	BLayout and BView will avoid calling InvalidateLayout on views that have
4321	already been invalidated, but if the view caches internal layout information
4322	which it updates in methods other than DoLayout(), it has to invoke this
4323	method, when it has done so, since otherwise the information might become
4324	obsolete without the layout noticing.
4325
4326	This is only meaningful if the view is part of a BLayout.
4327
4328	\since Haiku R1
4329*/
4330
4331
4332/*!
4333	\fn void BView::Layout(bool force)
4334	\brief Layout the view.
4335
4336	\remark This is only meaningful if the view is part of a BLayout.
4337
4338	\param force If \c true layout even if valid.
4339
4340	\since Haiku R1
4341*/
4342
4343
4344/*!
4345	\fn void BView::Relayout()
4346	\brief Relayout the view.
4347
4348	\remark This is only meaningful if the view is part of a BLayout.
4349
4350	\since Haiku R1
4351*/
4352
4353
4354/*!
4355	\fn void BView::DoLayout()
4356	\brief Layout view within the layout context.
4357
4358	\remark This is only meaningful if the view is part of a BLayout.
4359
4360	\since Haiku R1
4361*/
4362
4363
4364//! @}
4365
4366
4367/*!
4368	\name Tool Tips
4369
4370	\note These methods were not available in BeOS R5.
4371*/
4372
4373
4374//! @{
4375
4376
4377/*!
4378	\fn void BView::SetToolTip(const char* text)
4379	\brief Set the tool tip of the view to \a text.
4380
4381	\param text The \a text to set the view to or \c NULL or blank to unset.
4382
4383	\since Haiku R1
4384*/
4385
4386
4387/*!
4388	\fn void BView::SetToolTip(BToolTip* tip)
4389	\brief Set the tool tip of the view to the \a tip object.
4390
4391	\param tip The tool tip object to set the view to or \c NULL to unset.
4392
4393	\since Haiku R1
4394*/
4395
4396
4397/*!
4398	\fn BToolTip* BView::ToolTip() const
4399	\brief Return the tool tip set to the view or \c NULL if not set.
4400
4401	\return The BToolTip object set to the view.
4402
4403	\since Haiku R1
4404*/
4405
4406
4407/*!
4408	\fn void BView::ShowToolTip(BToolTip* tip)
4409	\brief Show the tool tip at the current mouse position.
4410
4411	\param tip The BToolTip object to show.
4412
4413	\since Haiku R1
4414*/
4415
4416
4417/*!
4418	\fn void BView::HideToolTip()
4419	\brief Hide the view's tool tip.
4420
4421	\since Haiku R1
4422*/
4423
4424
4425/*!
4426	\fn bool BView::GetToolTipAt(BPoint point, BToolTip** _tip)
4427	\brief Point \a _tip with the view's tool tip.
4428
4429	\param point Currently unused.
4430	\param _tip A pointer to a pointer to a BToolTip object to set.
4431
4432	\since Haiku R1
4433*/
4434
4435
4436//! @}
4437