xref: /haiku/docs/user/interface/Window.dox (revision 991dadd6324f7b7a68e94743a39ebae789823228)
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/Window.h	 hrev45799
10 *		src/kits/interface/Window.cpp	 hrev45799
11 */
12
13
14/*!
15	\file Window.h
16	\ingroup interface
17	\ingroup libbe
18	\brief BWindow class definition and support data structures.
19*/
20
21
22// window_type
23
24
25/*!
26	\enum window_type
27	\ingroup interface
28
29	Combined window look and feel constants. Define both the appearance and
30	behavior of a window.
31
32	\since BeOS R3
33*/
34
35
36/*!
37	\var window_type B_UNTYPED_WINDOW
38
39	A window of unknown or undefined type.
40
41	\since BeOS R3
42*/
43
44
45/*!
46	\var window_type B_TITLED_WINDOW
47
48	\c B_TITLED_WINDOW_LOOK and \c B_NORMAL_WINDOW_FEEL.
49
50	\since BeOS R3
51*/
52
53
54/*!
55	\var window_type B_MODAL_WINDOW
56
57	\c B_MODAL_WINDOW_LOOK and \c B_MODAL_APP_WINDOW_FEEL.
58
59	\since BeOS R3
60*/
61
62
63/*!
64	\var window_type B_DOCUMENT_WINDOW
65
66	\c B_DOCUMENT_WINDOW_LOOK and \c B_NORMAL_WINDOW_FEEL.
67
68	\since BeOS R3
69*/
70
71
72/*!
73	\var window_type B_BORDERED_WINDOW
74
75	\c B_BORDERED_WINDOW_LOOK and \c B_NORMAL_WINDOW_FEEL.
76
77	\since BeOS R3
78*/
79
80
81/*!
82	\var window_type B_FLOATING_WINDOW
83
84	\c B_FLOATING_WINDOW_LOOK and \c B_FLOATING_APP_WINDOW_FEEL.
85
86	\since BeOS R3
87*/
88
89
90// window_look
91
92
93/*!
94	\enum window_look
95	\ingroup interface
96
97	Window look constants, define window appearance.
98
99	\since BeOS R3
100*/
101
102
103/*!
104	\var window_look B_BORDERED_WINDOW_LOOK
105
106	No title bar, thin border, no resize control.
107
108	\since BeOS R3
109*/
110
111
112/*!
113	\var window_look B_NO_BORDER_WINDOW_LOOK
114
115	A borderless rectangle with no provisions to move or close the window.
116
117	\since BeOS R5
118*/
119
120
121/*!
122	\var window_look B_TITLED_WINDOW_LOOK
123
124	Like \c B_DOCUMENT_WINDOW_LOOK, but with a resize corner instead of a resize
125	thumb.
126
127	\since BeOS R3
128*/
129
130
131/*!
132	\var window_look B_DOCUMENT_WINDOW_LOOK
133
134	Large title bar, thick border, draggable resize corner thumb.
135
136	\since BeOS R3
137*/
138
139
140/*!
141	\var window_look B_MODAL_WINDOW_LOOK
142
143	For modal dialogs: no title bar, thick border, resize corner depending on the
144	\c B_NOT_RESIZABLE flag.
145
146	\since BeOS R3
147*/
148
149
150/*!
151	\var window_look B_FLOATING_WINDOW_LOOK
152
153	For floating sub windows: small title bar, thin border, resize corner.
154
155	\since BeOS R3
156*/
157
158
159// window_feel
160
161
162/*!
163	\enum window_feel
164	\ingroup interface
165
166	Window feel constants, define window behavior.
167
168	\since BeOS R3
169*/
170
171
172/*!
173	\var window_feel B_NORMAL_WINDOW_FEEL
174
175	Behaves like a normal, non-modal, non-floating window.
176
177	\since BeOS R3
178*/
179
180
181/*!
182	\var window_feel B_MODAL_SUBSET_WINDOW_FEEL
183
184	Blocks all windows in its subset when displayed. Visible only if a window in
185	its subset is visible.
186
187	\since BeOS R3
188*/
189
190
191/*!
192	\var window_feel B_MODAL_APP_WINDOW_FEEL
193
194	Blocks all windows in its app when displayed. Visible only if a window in its
195	app is visible.
196
197	\since BeOS R3
198*/
199
200
201/*!
202	\var window_feel B_MODAL_ALL_WINDOW_FEEL
203
204	Blocks all windows across the entire system when displayed. Always visible
205	in all workspaces.
206
207	\since BeOS R3
208*/
209
210
211/*!
212	\var window_feel B_FLOATING_SUBSET_WINDOW_FEEL
213
214	Floats above all windows in its subset when displayed. Visible only if a
215	window in its subset is the frontmost window.
216
217	\since BeOS R3
218*/
219
220
221/*!
222	\var window_feel B_FLOATING_APP_WINDOW_FEEL
223
224	Floats above all windows in its app when displayed. Visible only if a
225	window in its app is the frontmost window.
226
227	\since BeOS R3
228*/
229
230
231/*!
232	\var window_feel B_FLOATING_ALL_WINDOW_FEEL
233
234	Floats above all windows across the entire system when displayed. Always
235	visible in all workspaces.
236
237	\since BeOS R3
238*/
239
240
241// window_alignment
242
243
244/*!
245	\enum window_alignment
246	\ingroup interface
247
248	Define window alignment.
249
250	\since BeOS R3
251*/
252
253
254/*!
255	\var window_alignment B_BYTE_ALIGNMENT
256
257	Aligns window in terms of frame buffer offsets. Affects only horizontal
258	origin and width, can't align right and bottom edges in this mode.
259
260	\since BeOS R3
261*/
262
263
264/*!
265	\var window_alignment B_PIXEL_ALIGNMENT
266
267	Aligns window in pixel coordinates.
268
269	\since BeOS R3
270*/
271
272
273// window flags
274
275
276/*!
277	\var B_NOT_MOVABLE
278
279	Window cannot be moved by the user.
280
281	\since BeOS R3
282*/
283
284
285/*!
286	\var B_NOT_CLOSABLE
287
288	Window cannot be closed by the user, no close button is displayed.
289
290	\since BeOS R3
291*/
292
293
294/*!
295	\var B_NOT_ZOOMABLE
296
297	Window cannot be zoomed by the user, no zoom button is displayed.
298
299	\since BeOS R3
300*/
301
302
303/*!
304	\var B_NOT_MINIMIZABLE
305
306	Window cannot be minimized by the user.
307
308	\since BeOS R3
309*/
310
311
312/*!
313	\var B_NOT_RESIZABLE
314
315	Window cannot be resized by the user.
316
317	\since BeOS R3
318*/
319
320
321/*!
322	\var B_NOT_H_RESIZABLE
323
324	Window cannot be resized horizontally by the user.
325
326	\since BeOS R3
327*/
328
329
330/*!
331	\var B_NOT_V_RESIZABLE
332
333	Window cannot be resized vertically by the user.
334
335	\since BeOS R3
336*/
337
338
339/*!
340	\var B_AVOID_FRONT
341
342	Window cannot be brought to front.
343
344	\since BeOS R3
345*/
346
347
348/*!
349	\var B_AVOID_FOCUS
350
351	Window cannot receive keyboard focus.
352
353	\since BeOS R3
354*/
355
356
357/*!
358	\var B_WILL_ACCEPT_FIRST_CLICK
359
360	The first click will not just bring the window to front, it will also be
361	processed by the window.
362
363	\since BeOS R3
364*/
365
366
367/*!
368	\var B_OUTLINE_RESIZE
369
370	Window draws only it's outline as it's resized and doesn't draw its
371	contents.
372
373	\since BeOS R3
374*/
375
376
377/*!
378	\var B_NO_WORKSPACE_ACTIVATION
379
380	Causes the current workspace to stay active even if the window is activated
381	on another workspace.
382
383	\since BeOS R3
384*/
385
386
387/*!
388	\var B_NOT_ANCHORED_ON_ACTIVATE
389
390	Causes the window to move to the current workspace when activated if it already
391	exists on another workspace.
392
393	\since BeOS R3
394*/
395
396
397/*!
398	\var B_QUIT_ON_WINDOW_CLOSE
399
400	Quit the application when the window closes.
401
402	\note This flag existed but didn't function in BeOS R5.
403
404	\since BeOS R5
405*/
406
407
408/*!
409	\var B_SAME_POSITION_IN_ALL_WORKSPACES
410
411	Window maintains its position across workspaces.
412
413	\note This flag did not exist in BeOS R5.
414
415	\since Haiku R1
416*/
417
418
419/*!
420	\var B_AUTO_UPDATE_SIZE_LIMITS
421
422	Automatically adjust the window size according to the layout constraints.
423
424	\note This flag did not exist in BeOS R5.
425
426	\since Haiku R1
427*/
428
429
430/*!
431	\var B_CLOSE_ON_ESCAPE
432
433	Close the window when the user pushes the Escape key.
434
435	\note This flag did not exist in BeOS R5.
436
437	\since Haiku R1
438*/
439
440
441/*!
442	\var B_NO_SERVER_SIDE_WINDOW_MODIFIERS
443
444	\since Haiku R1
445*/
446
447
448// workspace constants
449
450
451/*!
452	\def B_CURRENT_WORKSPACE
453
454	Applies to current workspace only.
455
456	\since BeOS R3
457*/
458
459
460/*!
461	\def B_ALL_WORKSPACES
462
463	Applies to all workspaces.
464
465	\since BeOS R3
466*/
467
468
469/*!
470	\class BWindow
471	\ingroup interface
472	\ingroup libbe
473	\brief Window base class.
474
475	A BWindow is an on-screen window which contains views and is the target of
476	keyboard and mouse events. A BWindow instance is nearly always subclassed.
477
478	BWindow draws by talking to App Server. If you want draw directly into the
479	graphics card by-passing App Server, you need to use a BDirectWindow or
480	BWindowScreen.
481
482	Despite the fact that BWindow inherits from BLooper, you should not invoke
483	Run() on a BWindow, instead, call Show() to get the message loop started and
484	show the window on screen. Once you've called Show() you may remove a window
485	from the screen without interrupting the message loop by calling Hide(). Other
486	message loop details such as locking and quitting are detailed in the BLooper
487	class.
488
489	BWindow has the following built-in shortcuts:
490
491	<table>
492		<tr>
493			<th>Shortcut</th>
494			<th>Action</th>
495			<th>Handler</th>
496		</tr>
497		<tr>
498			<td>\key{Command}+\key{X}</td>
499			<td>Cut</td>
500			<td>Focus view</td>
501		</tr>
502		<tr>
503			<td>\key{Command}+\key{C}</td>
504			<td>Copy</td>
505			<td>Focus view</td>
506		</tr>
507		<tr>
508			<td>\key{Command}+\key{V}</td>
509			<td>Paste</td>
510			<td>Focus view</td>
511		</tr>
512		<tr>
513			<td>\key{Command}+\key{A}</td>
514			<td>Select All</td>
515			<td>Focus view</td>
516		</tr>
517		<tr>
518			<td>\key{Command}+\key{W}</td>
519			<td>Close</td>
520			<td>Window (if closable)</td>
521		</tr>
522		<tr>
523			<td>\key{Command}+\key{Q}</td>
524			<td>Quit</td>
525			<td>Application (non-modal windows only)</td>
526		</tr>
527		<tr>
528			<td>\key{Command}+\key{Control}+\key{M}</td>
529			<td>Minimize</td>
530			<td>Window (if minimizable)</td>
531		</tr>
532		<tr>
533			<td>\key{Command}+\key{Control}+\key{Z}</td>
534			<td>Zoom</td>
535			<td>Window (if zoomable)</td>
536		</tr>
537		<tr>
538			<td>\key{Command}+\key{Control}+\key{H}</td>
539			<td>Hide</td>
540			<td>Window</td>
541		</tr>
542		<tr>
543			<td>\key{Command}+\key{Control}+\key{F}</td>
544			<td>Send to front</td>
545			<td>Window</td>
546		</tr>
547		<tr>
548			<td>\key{Command}+\key{Control}+\key{B}</td>
549			<td>Send behind</td>
550			<td>Window</td>
551		</tr>
552		<tr>
553			<td>\key{Command}+\key{Control}+\key{←}</td>
554			<td>Go to left workspace</td>
555			<td>Desktop window</td>
556		</tr>
557		<tr>
558			<td>\key{Command}+\key{Control}+\key{→}</td>
559			<td>Go to right workspace</td>
560			<td>Desktop window</td>
561		</tr>
562		<tr>
563			<td>\key{Command}+\key{Control}+\key{↑}</td>
564			<td>Go to above workspace</td>
565			<td>Desktop window</td>
566		</tr>
567		<tr>
568			<td>\key{Command}+\key{Control}+\key{↓}</td>
569			<td>Go to below workspace</td>
570			<td>Desktop window</td>
571		</tr>
572		<tr>
573			<td>\key{Command}+\key{Control}+\key{Shift}+\key{←}</td>
574			<td>Send window and go to left workspace</td>
575			<td>Desktop window</td>
576		</tr>
577		<tr>
578			<td>\key{Command}+\key{Control}+\key{Shift}+\key{→}</td>
579			<td>Send window and go to right workspace</td>
580			<td>Desktop window</td>
581		</tr>
582		<tr>
583			<td>\key{Command}+\key{Control}+\key{Shift}+\key{↑}</td>
584			<td>Send window and go to above workspace</td>
585			<td>Desktop window</td>
586		</tr>
587		<tr>
588			<td>\key{Command}+\key{Control}+\key{Shift}+\key{↓}</td>
589			<td>Send window and go to below workspace</td>
590			<td>Desktop window</td>
591		</tr>
592	</table>
593
594	\since BeOS R3
595*/
596
597
598/*!
599	\fn BWindow::BWindow(BRect frame, const char* title, window_type type,
600		uint32 flags, uint32 workspace)
601	\brief Creates a new BWindow object.
602
603	\param frame The inner \a frame rectangle in the screen coordinate system.
604	\param title The window \a title and thread title as "w>title".
605	\param type window_type flag, one of the following:
606	       - \c B_UNTYPED_WINDOW
607	       - \c B_TITLED_WINDOW
608	       - \c B_MODAL_WINDOW
609	       - \c B_DOCUMENT_WINDOW
610	       - \c B_BORDERED_WINDOW
611	       - \c B_FLOATING_WINDOW
612	\param flags Mask that defines window attributes:
613	       - \c B_NOT_MOVABLE cannot be moved by the user
614	       - \c B_NOT_CLOSABLE cannot be closed by the user, no close button
615	            displayed
616	       - \c B_NOT_ZOOMABLE cannot be zoomed by the user, no zoom button
617	            displayed
618	       - \c B_NOT_MINIMIZABLE cannot be minimized by the user
619	       - \c B_NOT_RESIZABLE cannot be resized by the user
620	       - \c B_NOT_H_RESIZABLE cannot be resized horizontally by the user
621	       - \c B_NOT_V_RESIZABLE  cannot be resized vertically by the user
622	       - \c B_AVOID_FRONT cannot be brought to front by the user
623	       - \c B_AVOID_FOCUS cannot receive keyboard focus
624	       - \c B_WILL_ACCEPT_FIRST_CLICK The first click is processed by the
625	            window.
626	       - \c B_OUTLINE_RESIZE draws only it's outline as it's resized and
627	            doesn't draw its contents.
628	       - \c B_NO_WORKSPACE_ACTIVATION Causes the current workspace to stay
629	            active when activated on another workspace.
630	       - \c B_NOT_ANCHORED_ON_ACTIVATE Causes the window to move to the current
631	            workspace when activated if it already exists on another workspace.
632	       - \c B_QUIT_ON_WINDOW_CLOSE Quit the application when the window closes.
633	       - \c B_SAME_POSITION_IN_ALL_WORKSPACES Window maintains its position
634	            across workspaces.
635	       - \c B_AUTO_UPDATE_SIZE_LIMITS Automatically adjust the size according
636	            to layout constraints.
637	       - \c B_CLOSE_ON_ESCAPE Close when the user pushes the Escape key.
638	       - \c B_NO_SERVER_SIDE_WINDOW_MODIFIERS ??
639	\param workspace Mask that indicates which of the 32 potential workspace(s)
640	       the window should be displayed in or \c B_CURRENT_WORKSPACE or
641	       \c B_ALL_WORKSPACES constants.
642
643	\since BeOS R3
644*/
645
646
647/*!
648	\fn BWindow::BWindow(BRect frame, const char* title, window_look look,
649		window_feel feel, uint32 flags, uint32 workspace)
650	\brief Creates a new BWindow object with the specified \a look and \a feel.
651
652	\param frame The inner \a frame rectangle in the screen coordinate system.
653	\param title The window \a title and thread title as "w>title".
654	\param look The window_look flags, one of the following:
655	       - \c B_BORDERED_WINDOW_LOOK No title bar, thin border, no resize
656	         control.
657	       - \c B_NO_BORDER_WINDOW_LOOK A borderless rectangle with no provisions
658	         to move or close the window.
659	       - \c B_TITLED_WINDOW_LOOK Like \c B_DOCUMENT_WINDOW_LOOK, but with a
660	         resize corner instead of a resize thumb.
661	       - \c B_DOCUMENT_WINDOW_LOOK Large title bar, thick border, draggable
662	         resize corner thumb.
663	       - \c B_MODAL_WINDOW_LOOK For modal dialogs: no title bar, thick border,
664	         resize corner depending on the \c B_NOT_RESIZABLE flag.
665	       - \c B_FLOATING_WINDOW_LOOK For floating sub windows: small title bar,
666	         thin border, resize corner.
667	\param feel The window_feel flags, one of the following:
668	       - \c B_NORMAL_WINDOW_FEEL Behaves like a normal, non-modal,
669	         non-floating window.
670	       - \c B_MODAL_SUBSET_WINDOW_FEEL Blocks all windows in its subset when
671	         displayed. Visible only if a window in its subset is visible.
672	       - \c B_MODAL_APP_WINDOW_FEEL Blocks all windows in its app when
673	         displayed. Visible only if a window in its app is visible.
674	       - \c B_MODAL_ALL_WINDOW_FEEL Blocks all windows across the entire
675	         system when displayed. Always visible in all workspaces.
676	       - \c B_FLOATING_SUBSET_WINDOW_FEEL Floats above all windows in its
677	         subset when displayed. Visible only if a window in its subset is the
678	         frontmost window.
679	       - \c  B_FLOATING_APP_WINDOW_FEEL Floats above all windows in its app
680	         when displayed. Visible only if a window in its app is the frontmost
681	         window.
682	       - \c  B_FLOATING_ALL_WINDOW_FEEL Floats above all windows across the
683	         entire system when displayed. Always visible in all workspaces.
684	\param flags Mask that defines window attributes:
685	       - \c B_NOT_MOVABLE cannot be moved by the user
686	       - \c B_NOT_CLOSABLE cannot be closed by the user, no close button
687	            displayed
688	       - \c B_NOT_ZOOMABLE cannot be zoomed by the user, no zoom button
689	            displayed
690	       - \c B_NOT_MINIMIZABLE cannot be minimized by the user
691	       - \c B_NOT_RESIZABLE cannot be resized by the user
692	       - \c B_NOT_H_RESIZABLE cannot be resized horizontally by the user
693	       - \c B_NOT_V_RESIZABLE  cannot be resized vertically by the user
694	       - \c B_AVOID_FRONT cannot be brought to front by the user
695	       - \c B_AVOID_FOCUS cannot receive keyboard focus
696	       - \c B_WILL_ACCEPT_FIRST_CLICK The first click is processed by the
697	            window.
698	       - \c B_OUTLINE_RESIZE draws only it's outline as it's resized and
699	            doesn't draw its contents.
700	       - \c B_NO_WORKSPACE_ACTIVATION Causes the current workspace to stay
701	            active when activated on another workspace.
702	       - \c B_NOT_ANCHORED_ON_ACTIVATE Causes the window to move to the current
703	            workspace when activated if it already exists on another workspace.
704	       - \c B_QUIT_ON_WINDOW_CLOSE Quit the application when the window closes.
705	       - \c B_SAME_POSITION_IN_ALL_WORKSPACES Window maintains its position
706	            across workspaces.
707	       - \c B_AUTO_UPDATE_SIZE_LIMITS Automatically adjust the size according
708	            to layout constraints.
709	       - \c B_CLOSE_ON_ESCAPE Close when the user pushes the Escape key.
710	       - \c B_NO_SERVER_SIDE_WINDOW_MODIFIERS ??
711	\param workspace Mask that indicates which of the 32 potential workspace(s)
712	       the window should be displayed in or \c B_CURRENT_WORKSPACE or
713	       \c B_ALL_WORKSPACES constants.
714
715	\since BeOS R3
716*/
717
718
719/*!
720	\fn BWindow::BWindow(BMessage* data)
721	\brief Archive constructor.
722
723	\param data A pointer to the BMessage object to build the object from.
724
725	\since BeOS R3
726*/
727
728
729/*!
730	\fn BWindow::BWindow(BRect frame, int32 bitmapToken)
731	\brief Offscreen bitmap constructor.
732
733	\param frame The inner \a frame rectangle in the screen coordinate system.
734	\param bitmapToken Token to pass into App Server for offscreen window bitmap.
735
736	\since Haiku R1
737*/
738
739
740/*!
741	\fn BWindow::~BWindow()
742	\brief Destroys the BWindow object and all attached views.
743
744	\since BeOS R3
745*/
746
747
748/*!
749	\fn BArchivable* BWindow::Instantiate(BMessage* data)
750	\brief Creates a new BWindow object from the \a data message.
751
752	\param data A pointer to the BMessage object to build the object from.
753
754	\returns A newly created BWindow object or \c NULL if the message doesn't
755		contain an archived BWindow.
756
757	\since BeOS R3
758*/
759
760
761/*!
762	\fn status_t BWindow::Archive(BMessage* data, bool deep) const
763	\brief Archives the object into the \a data message.
764
765	\param data A pointer to the BMessage object to archive the object into.
766	\param deep Whether or not to archive child views as well.
767
768	\return A status code, \c B_OK if the object was archived or an error code
769	        otherwise.
770
771	\since BeOS R3
772*/
773
774
775/*!
776	\fn void BWindow::Quit()
777	\brief Deletes the window and all child views, destroys the window thread,
778	       removes the window's connection to the Application Server, and deletes
779	       the object.
780
781	Use this method to destroy a window rather than using the delete operator.
782
783	This method works much like the BLooper::Quit(), it doesn't return when
784	called from the BWindow's thread and it returns after all messages have been
785	processed when called from another thread and the BWindow and its thread has
786	been destroyed.
787
788	\warning The window must first be locked before calling Quit().
789
790	\see BLooper::Quit()
791
792	\since BeOS R3
793*/
794
795
796/*!
797	\fn void BWindow::AddChild(BView* child, BView* before)
798	\brief Adds \a child to the view hierarchy immediately before \a before.
799
800	A view may only have one parent at a time so \a child must not have already
801	been added to the view hierarchy. If \a before is \c NULL then \a child is
802	added to the end of the view hierarchy.
803
804	The AttachedToWindow() method is invoked on \a child and all of its
805	descendent views.
806
807	\param child The child view to add.
808	\param before The sibling view to add \a child before.
809
810	\since BeOS R3
811*/
812
813
814/*!
815	\fn void BWindow::AddChild(BLayoutItem* child)
816	\brief Add the \a child layout item to the view hierarchy.
817
818	\param child The child layout item to add.
819
820	\since Haiku R1
821*/
822
823
824/*!
825	\fn bool BWindow::RemoveChild(BView* child)
826	\brief Removes \a child from the view hierarchy.
827
828	\param child The child view to remove.
829
830	\return Whether or not \a child was removed from the view hierarchy.
831
832	\since BeOS R3
833*/
834
835
836/*!
837	\fn int32 BWindow::CountChildren() const
838	\brief Returns the number of child views that the window has.
839
840	\return The number of child views as an int32.
841
842	\since BeOS R3
843*/
844
845
846/*!
847	\fn BView* BWindow::ChildAt(int32 index) const
848	\brief Returns a pointer to the child view found at \a index.
849
850	\param index The index of the child view to return a pointer of.
851
852	\return A pointer to the child view at \a index or \c NULL if not found.
853
854	\since BeOS R3
855*/
856
857
858/*!
859	\fn void BWindow::Minimize(bool minimize)
860	\brief Minimizes or un-minimizes the window based on \a minimize.
861
862	Unlike Hide() an Show(), Minimize() dims and un-dims the entry for the window
863	in Deskbar's window list rather than removing it. Also Minimize() calls are not
864	cumulative like Hide() and Show(); one \c false call will undo multiple \c true
865	calls.
866
867	Minimize() also acts as a hook method that is invoked when the user double-
868	clicks on the title tab of the window or selects the window from the DeskBar
869	window list. The \a minimize parameter is \c true if the window is about to be
870	hidden and \c false if it is about to be shown.
871
872	If you override Minimize() and you want to inherit BWindow's behavior, you
873	must call BWindow::Minimize().
874
875	\since BeOS R3
876*/
877
878
879/*!
880	\fn status_t BWindow::SendBehind(const BWindow* window)
881	\brief Moves the BWindow object behind \a window.
882
883	\param window A pointer to the window to move behind.
884
885	\returns \c B_OK on success or \c B_ERROR on failure.
886
887	\since BeOS R3
888*/
889
890
891/*!
892	\fn void BWindow::Flush() const
893	\brief Flushes the window's connection to App Server causing any pending
894	messages to be processed then returns immediately.
895
896	\since BeOS R3
897*/
898
899
900/*!
901	\fn void BWindow::Sync() const
902	\brief Synchronizes the attached window's connection to App Server
903	       causing any pending messages to be processed and then waits for
904	       the App Server to respond.
905
906	\since BeOS R3
907*/
908
909
910/*!
911	\fn void BWindow::DisableUpdates()
912	\brief Suppresses drawing within the window.
913
914	If you want the results of several drawing operations to appear in the
915	window all at once you disable updates, draw, and then re-enable updates.
916
917	\since BeOS R3
918*/
919
920
921/*!
922	\fn void BWindow::EnableUpdates()
923	\brief Re-enable drawing within the window.
924
925	If you want the results of several drawing operations to appear in the window
926	all at once you disable updates, draw, and then re-enable updates.
927
928	\since BeOS R3
929*/
930
931
932/*!
933	\fn void BWindow::BeginViewTransaction()
934	\brief Stall updates to App Server allowing you to batch drawing commands to
935	       limit flickering.
936
937	Unlike DisableUpdates() the messages are sent but are not processed.
938
939	\since Haiku R1
940*/
941
942
943/*!
944	\fn void BWindow::EndViewTransaction()
945	\brief Ends a view transaction allowing update to go to App Server again.
946
947	\since Haiku R1
948*/
949
950
951/*!
952	\fn bool BWindow::InViewTransaction() const
953	\brief Returns whether or not the window is currently in a view transaction.
954
955	\returns \c true if the window is currently in a view transaction,
956	         \c false otherwise.
957
958	\since Haiku R1
959*/
960
961
962/*!
963	\fn bool BWindow::IsFront() const
964	\brief Returns whether or not the window is the frontmost on screen.
965
966	\returns \c true if window is the frontmost on screen, \c false otherwise.
967
968	\since BeOS R3
969*/
970
971
972/*!
973	\fn void BWindow::MessageReceived(BMessage* message)
974	\brief Handle \a message received by the associated looper.
975
976	\param message The \a message received by the looper.
977
978	\see BHandler::MessageReceived()
979
980	\since BeOS R3
981*/
982
983
984/*!
985	\fn void BWindow::DispatchMessage(BMessage* message, BHandler* target)
986	\brief Window's central message-processing method.
987
988	This method called automatically as messages arrive in the queue, you should
989	never call DispatchMessage() yourself.
990
991	\warning Don't override this method in your BWindow subclass. Override
992	MessageReceived() instead to alter the window's message dispatching
993	mechanism.
994
995	\see BLooper::DispatchMessage()
996
997	\since BeOS R3
998*/
999
1000
1001/*!
1002	\fn void BWindow::FrameMoved(BPoint newPosition)
1003	\brief Hook method that gets called when the window is moved.
1004
1005	\param newPosition The point of the top left corner of the frame
1006		rectangle that the window has been moved to.
1007
1008	\since BeOS R3
1009*/
1010
1011
1012/*!
1013	\fn void BWindow::FrameResized(float newWidth, float newHeight)
1014	\brief Hook method that gets called when the window is resized.
1015
1016	\param newWidth The new \a width of the window.
1017	\param newHeight The new \a height of the window.
1018
1019	\since BeOS R3
1020*/
1021
1022
1023/*!
1024	\fn void BWindow::WorkspacesChanged(uint32 oldWorkspaces,
1025		uint32 newWorkspaces)
1026	\brief Hook method that gets called when the number of workspaces changes.
1027
1028	\param oldWorkspaces The old number of workspaces.
1029	\param newWorkspaces The new number of workspaces.
1030
1031	\since BeOS R3
1032*/
1033
1034
1035/*!
1036	\fn void BWindow::WorkspaceActivated(int32 workspace, bool state)
1037	\brief Hook method that gets called when the active workspace changes.
1038
1039	\param workspace The \a workspace number that was activated/deactivated.
1040	\param state \c true if activated, \c false if deactivated.
1041
1042	\since BeOS R3
1043*/
1044
1045
1046/*!
1047	\fn void BWindow::MenusBeginning()
1048	\brief Hook method that gets called just before a menu owned by the window is
1049	       shown.
1050
1051	\note This method is not invoked by a message, there is no
1052	      \c B_MENUS_BEGINNING flag.
1053
1054	\since BeOS R3
1055*/
1056
1057
1058/*!
1059	\fn void BWindow::MenusEnded()
1060	\brief Hook method that gets called just before a menu owned by the window is
1061	       hidden.
1062
1063	\note This method is not invoked by a message, there is no
1064	      \c B_MENUS_ENDED flag.
1065
1066	\since BeOS R3
1067*/
1068
1069
1070/*!
1071	\fn void BWindow::SetSizeLimits(float minWidth, float maxWidth,
1072		float minHeight, float maxHeight)
1073	\brief Set size limits on the window.
1074
1075	The user won't be able to resize the window beyond the limits set by this
1076	method. SetSizeLimits() constrains the user, not the programmer, you may
1077	still resize the window outside of the size limits set by this method by
1078	calling ResizeBy() or ResizeTo().
1079
1080	\param minWidth The minimum width of the window to set.
1081	\param maxWidth The maximum width of the window to set.
1082	\param minHeight The minimum height of the window to set.
1083	\param maxHeight The maximum height of the window to set.
1084
1085	\since BeOS R3
1086*/
1087
1088
1089/*!
1090	\fn void BWindow::GetSizeLimits(float* _minWidth, float* _maxWidth,
1091		float* _minHeight, float* _maxHeight)
1092	\brief Fills out the size limits set on the window.
1093
1094	\param _minWidth The minimum width of the window.
1095	\param _maxWidth The maximum width of the window.
1096	\param _minHeight The minimum height of the window.
1097	\param _maxHeight The maximum height of the window.
1098
1099	\since BeOS R3
1100*/
1101
1102
1103/*!
1104	\fn void BWindow::UpdateSizeLimits()
1105	\brief Updates the window's size limits from the minimum and maximum sizes
1106	       of its top view.
1107
1108	This method does nothing unless the \c B_AUTO_UPDATE_SIZE_LIMITS window flag
1109	is set.
1110
1111	The method is called automatically after a layout invalidation. Since it is
1112	invoked asynchronously, calling this method manually is necessary, if it is
1113	desired to adjust the limits (and as a possible side effect the window size)
1114	earlier, e.g. before the first call to the Show() method.)
1115
1116	\since Haiku R1
1117*/
1118
1119
1120/*!
1121	\fn status_t BWindow::SetDecoratorSettings(const BMessage& settings)
1122	\brief Set the window decorator settings according to \a settings.
1123
1124	\param settings The decorator \a settings message to set.
1125
1126	\returns \c B_OK if the decorator settings were set successfully or an error
1127	         code otherwise.
1128
1129	\since Haiku R1
1130*/
1131
1132
1133/*!
1134	\fn status_t BWindow::GetDecoratorSettings(BMessage* settings) const
1135	\brief Fill out the window's decorator settings into \a settings.
1136
1137	\param settings A pointer to a BMessage object to fill out.
1138
1139	\returns \c B_OK if the decorator settings were filled out successfully
1140	         or an error code otherwise.
1141
1142	\since Haiku R1
1143*/
1144
1145
1146/*!
1147	\fn void BWindow::SetZoomLimits(float maxWidth, float maxHeight)
1148	\brief Sets the maximum size that the window will zoom to when Zoom() is
1149	       called.
1150
1151	The window will zoom to the minimum of the screen size, the maximum values
1152	set by SetSizeLimits(), and the maximum values set by this method.
1153
1154	/see Zoom()
1155
1156	\since BeOS R3
1157*/
1158
1159
1160/*!
1161	\fn void BWindow::Zoom(BPoint origin, float width, float height)
1162	\brief Move window to \a origin, then resize to \a width and \a height.
1163
1164	You may call Zoom() even if the window has the \c B_NOT_ZOOMABLE flag set.
1165	This method may move and resize the window resulting in both the FrameMoved()
1166	and FrameResized() hook methods to be called.
1167
1168	\param origin The point that the window was moved to.
1169	\param width The new width of the window.
1170	\param height The new height of the window.
1171
1172	\since BeOS R3
1173*/
1174
1175
1176/*!
1177	\fn void BWindow::Zoom()
1178	\brief Resize the window to the minimum of the screen size, the maximum values
1179	       set by SetSizeLimits(), and the maximum values set by SetZoomLimits().
1180
1181	You may call Zoom() even if the window has the \c B_NOT_ZOOMABLE flag set.
1182	This method may move and resize the window resulting in both the FrameMoved()
1183	and FrameResized() hook methods to be called. This is the method called when
1184	the user clicks a window's zoom button.
1185
1186	\since BeOS R3
1187*/
1188
1189
1190/*!
1191	\fn void BWindow::ScreenChanged(BRect screenSize, color_space depth)
1192	\brief Hook method that is called when the screen that the window is located
1193	       on changes size or location or the color space of the screen changes.
1194
1195	\param screenSize The new screen size in the screen's coordinate system.
1196	\param depth The new color space of the screen.
1197
1198	\since BeOS R3
1199*/
1200
1201
1202/*!
1203	\fn void BWindow::SetPulseRate(bigtime_t rate)
1204	\brief Sets how often \c B_PULSE messages are posted to the window.
1205
1206	All BViews attached to a window share the same pulse rate.
1207
1208	\a rate should not be set to less than 100,000 microseconds, differences less
1209	than 50,000 microseconds may not be noticeable.
1210
1211	Setting the \a rate to 0 disables pulsing for all views attache to the window.
1212
1213	\param rate The pulse rate to set.
1214
1215	\since BeOS R3
1216*/
1217
1218
1219/*!
1220	\fn bigtime_t BWindow::PulseRate() const
1221	\brief Returns the pulse rate of the window.
1222
1223	\c B_PULSE messages are sent by default every 500,000 microseconds provided
1224	that no other messages are pending.
1225
1226	\returns The pulse rate of the window as a bigtime_t.
1227
1228	\since BeOS R3
1229*/
1230
1231
1232/*!
1233	\name Shortcut Methods
1234
1235	The key parameter is specified in the form of a Unicode code point. This
1236	is generally an ASCII character such as 'A' or a key constant such as
1237	\c B_RIGHT_ARROW. To use a UTF-8 character you must first convert it to a
1238	Unicode code point using BUnicodeChar::FromUTF8().
1239*/
1240
1241
1242//! @{
1243
1244
1245/*!
1246	\fn void BWindow::AddShortcut(uint32 key, uint32 modifiers, BMenuItem* item)
1247	\brief Creates a keyboard shortcut that activates a menu \a item.
1248
1249	\param key The character that activates the shortcut, case-insensitive.
1250	\param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
1251	       options include:
1252	       - \c B_SHIFT_KEY
1253	       - \c B_OPTION_KEY
1254	       - \c B_CONTROL_KEY
1255	       - \c B_MENU_KEY
1256	\param item The menu \a item to activate.
1257
1258	\since Haiku R1
1259*/
1260
1261
1262/*!
1263	\fn void BWindow::AddShortcut(uint32 key, uint32 modifiers, BMessage* message)
1264	\brief Creates a keyboard shortcut that sends a \a message to the window.
1265
1266	\warning Don't use this method to a create menu shortcut, add a BMenuItem
1267	         instead.
1268
1269	\param key The character that activates the shortcut, case-insensitive.
1270	\param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
1271	       options include:
1272	       - \c B_SHIFT_KEY
1273	       - \c B_OPTION_KEY
1274	       - \c B_CONTROL_KEY
1275	       - \c B_MENU_KEY
1276	\param message The \a message to send when the shortcut is activated. The
1277	       BWindow takes ownership of the \a message.
1278
1279	\since BeOS R3
1280*/
1281
1282
1283/*!
1284	\fn void BWindow::AddShortcut(uint32 key, uint32 modifiers, BMessage* message,
1285		BHandler* target)
1286	\brief Creates a keyboard shortcut that sends a \a message to the specified
1287	       \a target.
1288
1289	\warning Don't use this method to a create menu shortcut, add a BMenuItem
1290	         instead.
1291
1292	\param key The character that activates the shortcut, case-insensitive.
1293	\param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
1294	       options include one or more of the following:
1295	       - \c B_SHIFT_KEY
1296	       - \c B_OPTION_KEY
1297	       - \c B_CONTROL_KEY
1298	       - \c B_MENU_KEY
1299	\param message The \a message to send when the shortcut is activated. The
1300	       BWindow takes ownership of the \a message.
1301	\param target The handler to send the message to.
1302
1303	\since BeOS R3
1304*/
1305
1306
1307/*!
1308	\fn bool BWindow::HasShortcut(uint32 key, uint32 modifiers)
1309	\brief Returns whether or not the specified shortcut is set on the window.
1310
1311	\param key The character to check, case-insensitive.
1312	\param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
1313	       options include one or more of the following:
1314	       - \c B_SHIFT_KEY
1315	       - \c B_OPTION_KEY
1316	       - \c B_CONTROL_KEY
1317	       - \c B_MENU_KEY
1318
1319	\returns \c true if the window has the specified shortcut, \c false
1320	         otherwise.
1321
1322	\since Haiku R1
1323*/
1324
1325
1326/*!
1327	\fn void BWindow::RemoveShortcut(uint32 key, uint32 modifiers)
1328	\brief Removes the specified shortcut from the window.
1329
1330	The memory used by the shortcut message is freed.
1331
1332	\param key The character to remove, case-insensitive.
1333	\param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
1334	       options include one or more of the following:
1335	       - \c B_SHIFT_KEY
1336	       - \c B_OPTION_KEY
1337	       - \c B_CONTROL_KEY
1338	       - \c B_MENU_KEY
1339
1340	\since BeOS R3
1341*/
1342
1343
1344//! @}
1345
1346
1347/*!
1348	\fn BButton* BWindow::DefaultButton() const
1349	\brief Returns a pointer to the default button set on the window.
1350
1351	\return A pointer to the window's default button or \c NULL if it doesn't
1352	        have one.
1353
1354	\since BeOS R3
1355*/
1356
1357
1358/*!
1359	\fn void BWindow::SetDefaultButton(BButton* button)
1360	\brief Set the default button of the window to \a button.
1361
1362	The default button has a grey outline and is activated by the user pushing
1363	the Enter key. The user can activate the default button even if another view
1364	is currently set to be the focus view of the window.
1365
1366	A window may only have one default button at a time, to remove the current
1367	default without setting another button you may pass in \c NULL.
1368
1369	\param button A pointer to the button to set as the default or \c NULL to
1370	       unset.
1371
1372	\since BeOS R3
1373*/
1374
1375
1376/*!
1377	\fn bool BWindow::NeedsUpdate() const
1378	\brief Returns whether or not any of the attached views need to be updated.
1379
1380	\return \c true if an attached view needs to be updated, \c false otherwise.
1381
1382	\since BeOS R3
1383*/
1384
1385
1386/*!
1387	\fn void BWindow::UpdateIfNeeded()
1388	\brief Invokes Draw() immediately on each child view that needs updating.
1389
1390	This method is synchronous, it waits for each child view to update before
1391	returning. This method is ignored unless it is called from within the message
1392	loop of the thread that the BWindow is running in.
1393
1394	You may call this method as part of a hook function such as MouseMoved() or
1395	KeyDown() to force invalid views to be immediately redrawn without having to
1396	wait for the hook function to finish.
1397
1398	\since BeOS R3
1399*/
1400
1401
1402/*!
1403	\fn BView* BWindow::FindView(const char* viewName) const
1404	\brief Returns the attached view with the specified \a viewName.
1405
1406	\param viewName The name of the attached view to look for.
1407
1408	\return A pointer to the BView object or \c NULL if no view is found.
1409
1410	\since BeOS R3
1411*/
1412
1413
1414/*!
1415	\fn BView* BWindow::FindView(BPoint point) const
1416	\brief Returns a pointer to the attached view located at the specified
1417	       \a point.
1418
1419	\param point The \a point to get the view at in the window's coordinate
1420	       system.
1421
1422	\return A pointer to the BView object or \c NULL if no view is found.
1423
1424	\since BeOS R3
1425*/
1426
1427
1428/*!
1429	\fn BView* BWindow::CurrentFocus() const
1430	\brief Returns a pointer to the current focus view of the window.
1431
1432	\return A pointer to the current focus view of the window or \c NULL if
1433	        not found.
1434
1435	\since BeOS R3
1436*/
1437
1438
1439/*!
1440	\fn void BWindow::Activate(bool active)
1441	\brief Activates or deactivates the window based on \a active.
1442
1443	The title tab of the active window is drawn more brightly, the window is made
1444	frontmost, and it becomes the target of keyboard events. Calling Show()
1445	automatically activates the window calling the WindowActivated() hook method.
1446
1447	\param active \c true to activate the window, \c false to deactivate the
1448	       window.
1449
1450	\since BeOS R3
1451*/
1452
1453
1454/*!
1455	\fn void BWindow::WindowActivated(bool active)
1456	\brief Hook method that gets called when the window becomes activated or
1457	       deactivated.
1458
1459	\param active \c true if the window has become activated, \c false if the
1460	       window has become deactivated.
1461
1462	\since BeOS R3
1463*/
1464
1465
1466/*!
1467	\fn void BWindow::ConvertToScreen(BPoint* point) const
1468	\brief Convert \a point to the screen's coordinate system in place.
1469
1470	\param point A pointer to a BPoint object to convert.
1471
1472	\since BeOS R3
1473*/
1474
1475
1476/*!
1477	\fn BPoint BWindow::ConvertToScreen(BPoint point) const
1478	\brief Returns \a point converted to the screen's coordinate system.
1479
1480	\param point A BPoint object to convert.
1481
1482	\return A new BPoint object in the screen's coordinate system.
1483
1484	\since BeOS R3
1485*/
1486
1487
1488/*!
1489	\fn void BWindow::ConvertFromScreen(BPoint* point) const
1490	\brief Convert \a point from the screen's coordinate system to the
1491		   window's coordinate system in place.
1492
1493	\param point A pointer to a BPoint object to convert.
1494
1495	\since BeOS R3
1496*/
1497
1498
1499/*!
1500	\fn BPoint BWindow::ConvertFromScreen(BPoint point) const
1501	\brief Returns \a point converted from the screen's coordinate system to
1502	       the window's coordinate system.
1503
1504	\param point A BPoint object to convert.
1505
1506	\return A new BPoint object in the window's coordinate system.
1507
1508	\since BeOS R3
1509*/
1510
1511
1512/*!
1513	\fn void BWindow::ConvertToScreen(BRect* rect) const
1514	\brief Convert \a rect to the screen's coordinate system in place.
1515
1516	\param rect A pointer to a BRect object to convert.
1517
1518	\since BeOS R3
1519*/
1520
1521
1522/*!
1523	\fn BRect BWindow::ConvertToScreen(BRect rect) const
1524	\brief Returns \a rect converted to the screen's coordinate system.
1525
1526	\param rect A BRect object to convert.
1527
1528	\return A new BRect object in the screen's coordinate system.
1529
1530	\since BeOS R3
1531*/
1532
1533
1534/*!
1535	\fn void BWindow::ConvertFromScreen(BRect* rect) const
1536	\brief Convert \a rect from the screen's coordinate system to the
1537		   window's coordinate system in place.
1538
1539	\param rect A pointer to a BRect object to convert.
1540
1541	\since BeOS R3
1542*/
1543
1544
1545/*!
1546	\fn BRect BWindow::ConvertFromScreen(BRect rect) const
1547	\brief Returns \a rect converted from the screen's coordinate system to the
1548		   window's coordinate system.
1549
1550	\param rect A BRect object to convert.
1551
1552	\return A new BRect object in the window's coordinate system.
1553
1554	\since BeOS R3
1555*/
1556
1557
1558/*!
1559	\fn bool BWindow::IsMinimized() const
1560	\brief Returns whether or not the window is minimized.
1561
1562	\return \c true if the window is minimized, \c false otherwise.
1563
1564	\since BeOS R5
1565*/
1566
1567
1568/*!
1569	\fn BRect BWindow::Bounds() const
1570	\brief Returns the bounding rectangle of the window.
1571
1572	\return The bounding rectangle of the window as a BRect in the window's
1573	        coordinate system.
1574
1575	\sa Frame()
1576
1577	\since BeOS R3
1578*/
1579
1580
1581/*!
1582	\fn BRect BWindow::Frame() const
1583	\brief Returns the frame rectangle of the window.
1584
1585	\return The bounding rectangle of the window as a BRect in the screen
1586	        coordinate system.
1587
1588	\sa Bounds()
1589
1590	\since BeOS R3
1591*/
1592
1593
1594/*!
1595	\fn BRect BWindow::DecoratorFrame() const
1596	\brief Returns the frame rectangle of the window decorator.
1597
1598	\return The bounding rectangle of the window decorator as a BRect in the
1599	        screen coordinate system.
1600
1601	\since Haiku R1
1602*/
1603
1604
1605/*!
1606	\fn BSize BWindow::Size() const
1607	\brief Returns the size of the window.
1608
1609	\return The size of the window as a BSize in the screen coordinate system.
1610
1611	\since Haiku R1
1612*/
1613
1614
1615/*!
1616	\fn const char* BWindow::Title() const
1617	\brief Returns the window title as set by the constructor or SetTitle().
1618
1619	\return A pointer to the window title.
1620
1621	\since BeOS R3
1622*/
1623
1624
1625/*!
1626	\fn void BWindow::SetTitle(const char* title)
1627	\brief Sets the window title to \a title.
1628
1629	Also renames the window thread to "w>title" where "title" is the passed in
1630	title string.
1631
1632	\since BeOS R5
1633*/
1634
1635
1636/*!
1637	\fn bool BWindow::IsActive() const
1638	\brief Returns whether or not the window is active.
1639
1640	\return \c true if the window is active, \c false otherwise.
1641
1642	\since BeOS R3
1643*/
1644
1645
1646/*!
1647	\fn void BWindow::SetKeyMenuBar(BMenuBar* bar)
1648	\brief Set the specified menu \a bar as the key menu bar for the window.
1649
1650	The key menu bar is the one located at the top of the window at the root of
1651	the menu hierarchy that the user can navigate with the keyboard.
1652
1653	\param bar A pointer to the menu \a bar to set as as the key menu \a bar for
1654	       the window.
1655
1656	\since BeOS R3
1657*/
1658
1659
1660/*!
1661	\fn BMenuBar* BWindow::KeyMenuBar() const
1662	\brief Returns a pointer to the key menu bar set to the window.
1663
1664	If the window contains only one menu bar it is automatically considered to be
1665	the key menu bar for the window. If more than one menu bar is attached to the
1666	window then the last one added to the window's view hierarchy is considered
1667	to be the key menu bar for the window.
1668
1669	To explicitly set a menu bar as the key menu bar call SetKeyMenuBar().
1670
1671	\return A pointer to the key menu bar or \c NULL is not is set.
1672
1673	\since BeOS R3
1674*/
1675
1676
1677/*!
1678	\fn bool BWindow::IsModal() const
1679	\brief Returns whether or not the window is modal.
1680
1681	\return \c true if the window is modal, \c false otherwise.
1682
1683	\since BeOS R3
1684*/
1685
1686
1687/*!
1688	\fn bool BWindow::IsFloating() const
1689	\brief Returns whether or not the window is floating.
1690
1691	\return \c true if the window is floating, \c false otherwise.
1692
1693	\since BeOS R3
1694*/
1695
1696
1697/*!
1698	\fn status_t BWindow::AddToSubset(BWindow* window)
1699	\brief Adds \a window to be in the subset of the BWindow.
1700
1701	\return A status code.
1702	\retval B_OK \a window was added as a subset of the BWindow.
1703	\retval B_BAD_VALUE \c window is not \c B_NORMAL_WINDOW_FEEL or the BWindow
1704	        object's feel is not set to \c B_MODAL_SUBSET_WINDOW_FEEL or
1705			\c B_FLOATING_SUBSET_WINDOW_FEEL.
1706	\retval B_ERROR Could not lock the BWindow object.
1707
1708	\since BeOS R3
1709*/
1710
1711
1712/*!
1713	\fn status_t BWindow::RemoveFromSubset(BWindow* window)
1714	\brief Remove \a window from the subset of the BWindow.
1715
1716	\return A status code.
1717	\retval B_OK \a window was removed from the subset of the BWindow.
1718	\retval B_BAD_VALUE \c window is not \c B_NORMAL_WINDOW_FEEL or the BWindow
1719	        object's feel is not set to \c B_MODAL_SUBSET_WINDOW_FEEL or
1720			\c B_FLOATING_SUBSET_WINDOW_FEEL.
1721	\retval B_ERROR Could not lock the BWindow object.
1722
1723	\since BeOS R3
1724*/
1725
1726
1727/*!
1728	\fn status_t BWindow::SetType(window_type type)
1729	\brief Changes the window type set in the constructor to \a type.
1730
1731	\return \c B_OK on success or an error code on failure.
1732
1733	\since BeOS R3
1734*/
1735
1736
1737/*!
1738	\fn window_type BWindow::Type() const
1739	\brief Returns the current window type flag.
1740
1741	\return The currently set window type flag.
1742
1743	\since BeOS R3
1744*/
1745
1746
1747/*!
1748	\fn status_t BWindow::SetLook(window_look look)
1749	\brief Changes the window look set in the constructor to \a look.
1750
1751	\return \c B_OK on success or an error code on failure.
1752
1753	\since BeOS R3
1754*/
1755
1756
1757/*!
1758	\fn window_look BWindow::Look() const
1759	\brief Returns the current window look flag.
1760
1761	\return The currently set window look flag.
1762
1763	\since BeOS R3
1764*/
1765
1766
1767/*!
1768	\fn status_t BWindow::SetFeel(window_feel feel)
1769	\brief Changes the window feel set in the constructor to \a feel.
1770
1771	\return \c B_OK on success or an error code on failure.
1772
1773	\since BeOS R3
1774*/
1775
1776
1777/*!
1778	\fn window_feel BWindow::Feel() const
1779	\brief Returns the current window feel flag.
1780
1781	\return The currently set window feel flag.
1782
1783	\since BeOS R3
1784*/
1785
1786
1787/*!
1788	\fn status_t BWindow::SetFlags(uint32 flags)
1789	\brief Changes the window flags set in the constructor to \a flags.
1790
1791	\return \c B_OK on success or an error code on failure.
1792
1793	\since BeOS R3
1794*/
1795
1796
1797/*!
1798	\fn uint32 BWindow::Flags() const
1799	\brief Returns the current window flags.
1800
1801	\return The currently set window flags.
1802
1803	\since BeOS R3
1804*/
1805
1806
1807/*!
1808	\fn status_t BWindow::SetWindowAlignment(window_alignment mode,
1809		int32 h, int32 hOffset, int32 width, int32 widthOffset,
1810		int32 v, int32 vOffset, int32 height, int32 heightOffset)
1811	\brief Sets the alignment of the content of the window on the screen.
1812
1813	\since BeOS R3
1814*/
1815
1816
1817/*!
1818	\fn status_t BWindow::GetWindowAlignment(window_alignment* mode,
1819		int32* h, int32* hOffset, int32* width, int32* widthOffset,
1820		int32* v, int32* vOffset, int32* height, int32* heightOffset) const
1821	\brief Fills out the pointers with the alignment of the content of the
1822	       window on the screen.
1823
1824	\since BeOS R3
1825*/
1826
1827
1828/*!
1829	\fn uint32 BWindow::Workspaces() const
1830	\brief Returns the set of workspaces where the window can be displayed.
1831
1832	\since BeOS R3
1833*/
1834
1835
1836/*!
1837	\fn void BWindow::SetWorkspaces(uint32 workspaces)
1838	\brief Sets the set of workspaces where the window can be displayed.
1839
1840	\param workspaces
1841	- \c B_CURRENT_WORKSPACE to place the window in the currently displayed
1842	     workspace removing it from all others.
1843	- \c B_ALL_WORKSPACES to make the window show up in all workspaces.
1844
1845	\since BeOS R3
1846*/
1847
1848
1849/*!
1850	\fn BView* BWindow::LastMouseMovedView() const
1851	\brief Returns a pointer to the attached view that most recently received
1852	       a \c B_MOUSE_MOVED message.
1853
1854	\return A pointer the BView object that most recently received a
1855	        \c B_MOUSE_MOVED message or \c NULL if not found.
1856
1857	\since BeOS R3
1858*/
1859
1860
1861/*!
1862	\fn void BWindow::MoveBy(float dx, float dy)
1863	\brief Move the window by \a dx pixels horizontally and \a dy pixels
1864	       vertically.
1865
1866	\a dx and \a dy must be integral units.
1867
1868	\param dx The number of pixels to move the window vertically.
1869	\param dy The number of pixels to move the window horizontally.
1870
1871	\since BeOS R3
1872*/
1873
1874
1875/*!
1876	\fn void BWindow::MoveTo(BPoint point)
1877	\brief Move the window to \a point.
1878
1879	\param point the location to move the window in the screen's coordinate
1880	       system.
1881
1882	\since BeOS R3
1883*/
1884
1885
1886/*!
1887	\fn void BWindow::MoveTo(float x, float y)
1888	\brief Move the window to the specified \a x and \a y coordinates.
1889
1890	\a x and \a y must be integral units.
1891
1892	\param x The horizontal coordinate to move the window to in the screen's
1893	       coordinate system.
1894	\param y The vertical coordinate to move the window to in the screen's
1895	       coordinate system.
1896
1897	\since BeOS R3
1898*/
1899
1900
1901/*!
1902	\fn void BWindow::ResizeBy(float dx, float dy)
1903	\brief Resize the window by \a dx pixels horizontally and \a dy pixels vertically.
1904
1905	\a dx and \a dy must be integral units.
1906
1907	\brief dx The number of pixels to resize the window horizontally.
1908	\brief dy The number of pixels to resize the window vertically.
1909
1910	\since BeOS R3
1911*/
1912
1913
1914/*!
1915	\fn void BWindow::ResizeTo(float width, float height)
1916	\brief Resize the window to the specified \a width and \a height.
1917
1918	\a width and \a height must be integral units.
1919
1920	\param width The width to resize the window to.
1921	\param height The height to resize the window to.
1922
1923	\since BeOS R3
1924*/
1925
1926
1927/*!
1928	\fn void BWindow::CenterIn(const BRect& rect)
1929	\brief Center the window in \a rect.
1930
1931	\param rect The rectangle to center the window in.
1932
1933	\since Haiku R1
1934*/
1935
1936
1937/*!
1938	\fn void BWindow::CenterOnScreen()
1939	\brief Centers the window on the screen the window is currently on.
1940
1941	\since Haiku R1
1942*/
1943
1944
1945/*!
1946	\fn void BWindow::CenterOnScreen(screen_id id)
1947	\brief Centers the window on the screen with the passed in \a id.
1948
1949	\since Haiku R1
1950*/
1951
1952
1953/*!
1954	\fn void BWindow::Show()
1955	\brief Shows the window on screen, places it frontmost on the screen, adds
1956	       the window to Deskbar's window list, and makes it the active window.
1957
1958	If this is the first time Show() has been called on the window the message loop
1959	is started and it is unlocked.
1960
1961	Calls to Hide() and Show() are cumulative.
1962
1963	\since BeOS R3
1964*/
1965
1966
1967/*!
1968	\fn void BWindow::Hide()
1969	\brief Removes the window from the screen, removes it from Deskbar's window
1970	       list, and passes active status to another window.
1971
1972	Calls to Hide() and Show() are cumulative.
1973
1974	\since BeOS R3
1975*/
1976
1977
1978/*!
1979	\fn bool BWindow::IsHidden() const
1980	\brief Returns whether or not the window is hidden.
1981
1982	Windows are hidden by default, you must call Show() to show the window starting
1983	the message loop going.
1984
1985	\since BeOS R3
1986*/
1987
1988
1989/*!
1990	\fn bool BWindow::QuitRequested()
1991	\brief Hook method that gets called when the window receives a
1992	       \a B_QUIT_REQUESTED message.
1993
1994	\see Quit()
1995	\see BLooper::QuitRequested()
1996
1997	\since BeOS R3
1998*/
1999
2000
2001/*!
2002	\fn thread_id BWindow::Run()
2003	\brief Spawns the message loop thread and starts the window running.
2004
2005	\see BLooper::Run()
2006
2007	\since BeOS R3
2008*/
2009
2010
2011/*!
2012	\fn void BWindow::SetLayout(BLayout* layout)
2013	\brief Sets the \a layout of the window.
2014
2015	\param layout The \a layout to set.
2016
2017	\since Haiku R1
2018*/
2019
2020
2021/*!
2022	\fn BLayout* BWindow::GetLayout() const
2023	\brief Get the layout of the window.
2024
2025	\returns The layout of the window.
2026
2027	\since Haiku R1
2028*/
2029
2030
2031/*!
2032	\fn void BWindow::InvalidateLayout(bool descendants)
2033	\brief Invalidate layout.
2034
2035	\param descendants Also invalidate its children windows.
2036
2037	\since Haiku R1
2038*/
2039
2040
2041/*!
2042	\fn void BWindow::Layout(bool force)
2043	\brief Update the size limits and do the layout of the topmost view attached
2044	       to the window.
2045
2046	\param force If \c true, layout even if valid.
2047
2048	\since Haiku R1
2049*/
2050
2051
2052/*!
2053	\fn status_t BWindow::GetSupportedSuites(BMessage* data)
2054	\brief Reports the suites of messages and specifiers understood by the window.
2055
2056	\copydetails BLooper::GetSupportedSuites()
2057*/
2058
2059
2060/*!
2061	\fn BHandler* BWindow::ResolveSpecifier(BMessage* message, int32 index,
2062		BMessage* specifier, int32 what, const char* property)
2063	\copydoc BLooper::ResolveSpecifier()
2064*/
2065