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