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