#include <Window.h>
Inheritance diagram for BWindow:

BWindow objects draw windows by talking to the App Server. If you want to take over the entire screen or draw directly into the graphics card's frame buffer (by-passing the App Server), you should use a BDirectWindow or BWindowScreen object (both classes are defined in the Game Kit).
Public Member Functions | |
| BWindow (BRect frame, const char *title, window_type type, uint32 flags, uint32 workspace=B_CURRENT_WORKSPACE) | |
| BWindow (BRect frame, const char *title, window_look look, window_feel feel, uint32 flags, uint32 workspace=B_CURRENT_WORKSPACE) | |
| virtual | ~BWindow () |
| BWindow (BMessage *data) | |
| virtual status_t | Archive (BMessage *data, bool deep=true) const |
| virtual void | Quit () |
| void | Close () |
| BWindow * | Parent () |
| status_t | AddChild (BWindow *window) |
| bool | RemoveChild (BWindow *window) |
| bool | RemoveSelf () |
| void | AddChild (BView *child, BView *before=NULL) |
| bool | RemoveChild (BView *child) |
| int32 | CountChildren () const |
| BView * | ChildAt (int32 index) const |
| virtual void | DispatchMessage (BMessage *message, BHandler *handler) |
| virtual void | MessageReceived (BMessage *message) |
| virtual void | FrameMoved (BPoint new_position) |
| virtual void | WorkspacesChanged (uint32 old_ws, uint32 new_ws) |
| virtual void | WorkspaceActivated (int32 ws, bool state) |
| virtual void | FrameResized (float new_width, float new_height) |
| virtual void | Minimize (bool minimize) |
| virtual void | Zoom (BPoint rec_position, float rec_width, float rec_height) |
| void | Zoom () |
| void | SetZoomLimits (float max_h, float max_v) |
| virtual void | ScreenChanged (BRect screen_size, color_space depth) |
| void | SetPulseRate (bigtime_t rate) |
| bigtime_t | PulseRate () const |
| void | AddShortcut (uint32 key, uint32 modifiers, BMessage *msg) |
| void | AddShortcut (uint32 key, uint32 modifiers, BMessage *msg, BHandler *target) |
| void | RemoveShortcut (uint32 key, uint32 modifiers) |
| void | SetDefaultButton (BButton *button) |
| BButton * | DefaultButton () const |
| virtual void | MenusBeginning () |
| virtual void | MenusEnded () |
| bool | NeedsUpdate () const |
| void | UpdateIfNeeded () |
| BView * | FindView (const char *view_name) const |
| BView * | FindView (BPoint) const |
| BView * | CurrentFocus () const |
| void | ClearExplicitFocus () |
| void | Activate (bool=true) |
| virtual void | WindowActivated (bool state) |
| void | ConvertToScreen (BPoint *pt) const |
| BPoint | ConvertToScreen (BPoint pt) const |
| void | ConvertFromScreen (BPoint *pt) const |
| BPoint | ConvertFromScreen (BPoint pt) const |
| void | ConvertToScreen (BRect *rect) const |
| BRect | ConvertToScreen (BRect rect) const |
| void | ConvertFromScreen (BRect *rect) const |
| BRect | ConvertFromScreen (BRect rect) const |
| void | MoveBy (float dx, float dy) |
| void | MoveTo (BPoint) |
| void | MoveTo (float x, float y) |
| void | ResizeBy (float dx, float dy) |
| void | ResizeTo (float width, float height) |
| virtual void | Show () |
| virtual void | Hide () |
| bool | IsHidden () const |
| bool | IsMinimized () const |
| void | SetWindowColor (rgb_color color) |
| rgb_color | WindowColor () const |
| void | Flush () const |
| void | Sync () const |
| void | SetCurrentBeep (const char *name) |
| const char * | CurrentBeep () const |
| status_t | SendBehind (const BWindow *window) |
| void | DisableUpdates () |
| void | EnableUpdates () |
| void | BeginViewTransaction () |
| void | EndViewTransaction () |
| status_t | ClipWindowToPicture (BPicture *picture, BPoint offset, uint32 flags) |
| BRect | Bounds () const |
| BRect | Frame () const |
| const char * | Title () const |
| void | SetTitle (const char *title) |
| bool | IsFront () const |
| bool | IsActive () const |
| void | SetKeyMenuBar (BMenuBar *bar) |
| BMenuBar * | KeyMenuBar () const |
| void | SetSizeLimits (float min_h, float max_h, float min_v, float max_v) |
| void | GetSizeLimits (float *min_h, float *max_h, float *min_v, float *max_v) |
| uint32 | Workspaces () const |
| void | SetWorkspaces (uint32) |
| BView * | LastMouseMovedView () const |
| virtual BHandler * | ResolveSpecifier (BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property) |
| virtual status_t | GetSupportedSuites (BMessage *data) |
| status_t | AddToSubset (BWindow *window) |
| status_t | RemoveFromSubset (BWindow *window) |
| virtual status_t | Perform (perform_code d, void *arg) |
| status_t | SetType (window_type type) |
| window_type | Type () const |
| status_t | SetLook (window_look look) |
| window_look | Look () const |
| status_t | SetFeel (window_feel feel) |
| window_feel | Feel () const |
| status_t | SetFlags (uint32) |
| uint32 | Flags () const |
| bool | IsModal () const |
| bool | IsFloating () const |
| status_t | GetFrameState (BMessage *dest) const |
| status_t | UpdateFrameState (const BMessage &changes) |
| status_t | SetWindowAlignment (window_alignment mode, int32 h, int32 hOffset=0, int32 width=0, int32 widthOffset=0, int32 v=0, int32 vOffset=0, int32 height=0, int32 heightOffset=0) |
| status_t | GetWindowAlignment (window_alignment *mode=NULL, int32 *h=NULL, int32 *hOffset=NULL, int32 *width=NULL, int32 *widthOffset=NULL, int32 *v=NULL, int32 *vOffset=NULL, int32 *height=NULL, int32 *heightOffset=NULL) const |
| virtual bool | QuitRequested () |
| virtual thread_id | Run () |
| virtual status_t | UISettingsChanged (const BMessage *changes, uint32 flags) |
| virtual BView * | NextNavigableView (BView *currentFocus, uint32 flags) |
| void | DequeueAll () |
| bool | find_token_and_handler (BMessage *msg, int32 *token, BHandler **handler) |
Static Public Member Functions | |
| static BArchivable * | Instantiate (BMessage *data) |
Friends | |
| class | BApplication |
| class | BBitmap |
| class | BControl |
| class | BScrollBar |
| class | BView |
| class | BMenuItem |
| class | BWindowScreen |
| class | BDirectWindow |
| class | BFilePanel |
| class | _CEventPort_ |
| void | _set_menu_sem_ (BWindow *w, sem_id sem) |
| status_t | _safe_get_server_token_ (const BLooper *, int32 *) |
|
||||||||||||||||||||||||
|
Creates a new window.
|
|
||||||||||||||||||||||||||||
|
Creates a new window. For more parameters look above. |
|
|
You never delete your BWindows; call Quit() instead. |
|
|
|
|
|
Makes the BWindow the active window (if bringFront is
|
|
||||||||||||
|
Places child (and its child views) in the window, adds it to the window's view list, and adds it to the window's list of handlers:
Each BView in child's hierarchy is sent an AttachedToWindow() call. When they've all had a chance to respond, they're each sent an AllAttached() call. If child has already been added to a view hierarchy, or if before isn't in the window's view list, AddChild() fails.
|
|
|
|
|
||||||||||||||||||||
|
See AddShortcut() above. Notes on the arguments:
|
|
||||||||||||||||
|
Creates a keyboard shortcut: When the user types Command+modifiers+key, message is sent to handler. If a shortcut already exists for modifiers+key, it's removed before the new shortcut is added. Notes on the arguments:
As with all Command events, a |
|
|
Adds windows to this window's subset. This affects modal and floating windows with a subset feel only (i.e.
|
|
||||||||||||
|
Archives the BWindow by recording its frame rectangle, title, type, and flags in the BMessage data. If the deep flag is
Reimplemented from BLooper. Reimplemented in BDirectWindow, and BAlert. |
|
|
|
|
|
This function return the rectangle that encloses the window's content area. The bounds rectangle (Bounds()) is expressed in the window's coordinate system.
|
|
|
Returns the index'th view in the window's view list, or
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
Converts the argument from screen coordinates to window coordinates. The rect needn't fall within this BWindow's bounds.
The BWindow must be locked. |
|
|
Converts the argument from screen coordinates to window coordinates. The rect needn't fall within this BWindow's bounds.
The BWindow must be locked. |
|
|
Converts the argument from screen coordinates to window coordinates. The point needn't fall within this BWindow's bounds.
The BWindow must be locked. |
|
|
Converts the argument from screen coordinates to window coordinates. The point needn't fall within this BWindow's bounds.
The BWindow must be locked. |
|
|
Converts the argument from window coordinates to screen coordinates. The rect needn't fall within this BWindow's bounds.
The BWindow must be locked. |
|
|
Converts the argument from window coordinates to screen coordinates. The rect needn't fall within this BWindow's bounds.
The BWindow must be locked. |
|
|
Converts the argument from window coordinates to screen coordinates. The point needn't fall within this BWindow's bounds.
The BWindow must be locked. |
|
|
Converts the argument from window coordinates to screen coordinates. The point needn't fall within this BWindow's bounds.
The BWindow must be locked. |
|
|
|
|
|
|
|
|
Returns the current focus view for the BWindow, or
|
|
|
Return the window's default button. This is the button that's mapped to the Enter key. The user can activate the default button at any time - even if another BView is the focus view (the focus view will not receive a When you promote or demote a default button, it's automatically redisplayed and receives a BButton::MakeDefault() call. |
|
|
|
|
|
This function disable automatic updating within the window Any drawing that's done while updates are disabled is suppressed until updates are re-enabled. If you're doing a lot of drawing within the window, and you want the results of the drawing to appear all at once, you should disable updates, draw, and then re-enable updates.
|
|
||||||||||||
|
Implementation detail; see BLooper::DispatchMessage().
Reimplemented from BLooper. Reimplemented in BDirectWindow, BAlert, and BDirectGLWindow. |
|
|
This function enable automatic updating within the window Any drawing that's done while updates are disabled is suppressed until updates are re-enabled. If you're doing a lot of drawing within the window, and you want the results of the drawing to appear all at once, you should disable updates, draw, and then re-enable updates.
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
Find a view located at the window.
|
|
|
Find a view located at the window.
|
|
|
|
|
|
This function cause this window's App Server-bound messages to be sent immediately. Flush() sends the messages and returns immediately;
|
|
|
This function return the rectangle that encloses the window's content area. The frame rectangle (Frame()) is expressed in the screen's coordinate system.
|
|
|
This hook function are invoked just after the window's frame is moved, whether by the user or programatically. The arguments give the window's new origin (in screen coordinates). The default implementations do nothing. param origin New Window position
Reimplemented in BDirectWindow, and BDirectGLWindow. |
|
||||||||||||
|
This hook function are invoked just after the window's frame is resized, whether by the user or programatically. The arguments give the window's new dimensions. The default implementations do nothing.
Reimplemented in BDirectWindow, BAlert, and BDirectGLWindow. |
|
|
|
|
||||||||||||||||||||
|
These functions set limits on the size of the window. The user won't be able to resize the window beyond the limits set by SetSizeLimits() - to make it have a width less than minWidth or greater than , nor a height less than minHeight or greater than maxHeight. By default, the minimums are sufficiently small and the maximums sufficiently large to accommodate any window within reason. GetSizeLimits() writes the current limits to the variables provided.
|
|
|
Reimplemented from BLooper. Reimplemented in BDirectWindow, BAlert, and BDirectGLWindow. |
|
||||||||||||||||||||||||||||||||||||||||
|
Returns the current window alignment.
|
|
|
Removes the window from the screen, removes it from Deskbar's window list, and passes active status to some other window (if this is the active window). If Hide() is called more than once, you'll need to call Show() an equal number of times for the window to become visible again. Reimplemented in BDirectWindow, BWindowScreen, and BDirectGLWindow. |
|
|
Reimplemented from BLooper. Reimplemented in BDirectWindow, and BAlert. |
|
|
|
|
|
This function return
|
|
|
This function return |
|
|
|
|
|
|
|
|
This function return |
|
|
|
|
|
|