Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
BDirectWindow Class Reference

Provides direct access to the video card graphics frame buffer. More...

Inherits BWindow.

Public Member Functions

 BDirectWindow (BRect frame, const char *title, window_look look, window_feel feel, uint32 flags, uint32 workspace=B_CURRENT_WORKSPACE)
 Creates and initializes a BDirectWindow object.
 
 BDirectWindow (BRect frame, const char *title, window_type type, uint32 flags, uint32 workspace=B_CURRENT_WORKSPACE)
 Creates and initializes a BDirectWindow object.
 
virtual ~BDirectWindow ()
 Destroys the BDirectWindow and frees all memory used by it.
 
virtual status_t Archive (BMessage *data, bool deep=true) const
 Archive window into message data. Not implemented.
 
virtual void DirectConnected (direct_buffer_info *info)
 Hook method called when your application learns about the state of the graphics display and changes occur.
 
virtual void DispatchMessage (BMessage *message, BHandler *handler)
 Window's central message-processing method.
 
virtual void FrameMoved (BPoint newPosition)
 Hook method that gets called when the window is moved.
 
virtual void FrameResized (float newWidth, float newHeight)
 Hook method that gets called when the window is resized.
 
status_t GetClippingRegion (BRegion *region, BPoint *origin=NULL) const
 Sets region to the current clipping region of the direct window.
 
virtual status_t GetSupportedSuites (BMessage *data)
 Reports the suites of messages and specifiers understood by the window.
 
virtual void Hide ()
 Removes the window from the screen, removes it from Deskbar's window list, and passes active status to another window.
 
bool IsFullScreen () const
 Returns whether the window is in full-screen or windowed mode.
 
virtual void MenusBeginning ()
 Hook method that gets called just before a menu owned by the window is shown.
 
virtual void MenusEnded ()
 Hook method that gets called just before a menu owned by the window is hidden.
 
virtual void MessageReceived (BMessage *message)
 Handle message received by the associated looper.
 
virtual void Minimize (bool minimize)
 Minimizes or un-minimizes the window based on minimize.
 
virtual status_t Perform (perform_code code, void *arg)
 Internal method.
 
virtual void Quit ()
 Deletes the window and all child views, destroys the window thread, removes the window's connection to the Application Server, and deletes the object.
 
virtual BHandlerResolveSpecifier (BMessage *message, int32 index, BMessage *specifier, int32 what, const char *property)
 
virtual void ScreenChanged (BRect screenFrame, color_space depth)
 Hook method that is called when the screen that the window is located on changes size or location or the color space of the screen changes.
 
status_t SetFullScreen (bool enable)
 Enables or disables full-screen mode.
 
virtual void Show ()
 Shows the window on screen, places it frontmost on the screen, adds the window to Deskbar's window list, and makes it the active window.
 
virtual void WindowActivated (bool state)
 Hook method that gets called when the window becomes activated or deactivated.
 
virtual void WorkspaceActivated (int32 workspaceIndex, bool state)
 Hook method that gets called when the active workspace changes.
 
virtual void WorkspacesChanged (uint32 oldWorkspaces, uint32 newWorkspaces)
 Hook method that gets called whenever the workspaces the window is in changes.
 
virtual void Zoom (BPoint recPosition, float recWidth, float recHeight)
 Move window to origin, then resize to width and height.
 
- Public Member Functions inherited from BWindow
 BWindow (BMessage *archive)
 Archive constructor.
 
 BWindow (BRect frame, const char *title, window_look look, window_feel feel, uint32 flags, uint32 workspace=B_CURRENT_WORKSPACE)
 Creates a new BWindow object with the specified look and feel.
 
 BWindow (BRect frame, const char *title, window_type type, uint32 flags, uint32 workspace=B_CURRENT_WORKSPACE)
 Creates a new BWindow object.
 
virtual ~BWindow ()
 Destroys the BWindow object and all attached views.
 
void Activate (bool=true)
 Activates or deactivates the window based on active.
 
void AddChild (BLayoutItem *child)
 Add the child layout item to the view hierarchy.
 
void AddChild (BView *child, BView *before=NULL)
 Adds child to the view hierarchy immediately before before.
 
status_t AddToSubset (BWindow *window)
 Adds window to be in the subset of the BWindow.
 
virtual status_t Archive (BMessage *archive, bool deep=true) const
 Archives the object into the data message.
 
void BeginViewTransaction ()
 Stall updates to App Server allowing you to batch drawing commands to limit flickering.
 
BRect Bounds () const
 Returns the bounding rectangle of the window.
 
void CenterIn (const BRect &rect)
 Center the window in rect.
 
void CenterOnScreen ()
 Centers the window on the screen the window is currently on.
 
void CenterOnScreen (screen_id id)
 Centers the window on the screen with the passed in id.
 
BViewChildAt (int32 index) const
 Returns a pointer to the child view found at index.
 
void Close ()
 Deprecated alias for BWindow::Quit().
 
void ConvertFromScreen (BPoint *point) const
 Convert point from the screen's coordinate system to the window's coordinate system in place.
 
BPoint ConvertFromScreen (BPoint point) const
 Returns point converted from the screen's coordinate system to the window's coordinate system.
 
void ConvertFromScreen (BRect *rect) const
 Convert rect from the screen's coordinate system to the window's coordinate system in place.
 
BRect ConvertFromScreen (BRect rect) const
 Returns rect converted from the screen's coordinate system to the window's coordinate system.
 
void ConvertToScreen (BPoint *point) const
 Convert point to the screen's coordinate system in place.
 
BPoint ConvertToScreen (BPoint point) const
 Returns point converted to the screen's coordinate system.
 
void ConvertToScreen (BRect *rect) const
 Convert rect to the screen's coordinate system in place.
 
BRect ConvertToScreen (BRect rect) const
 Returns rect converted to the screen's coordinate system.
 
int32 CountChildren () const
 Returns the number of child views that the window has.
 
BViewCurrentFocus () const
 Returns a pointer to the current focus view of the window.
 
BRect DecoratorFrame () const
 Returns the frame rectangle of the window decorator.
 
BButtonDefaultButton () const
 Returns a pointer to the default button set on the window.
 
void DisableUpdates ()
 Suppresses drawing within the window.
 
virtual void DispatchMessage (BMessage *message, BHandler *handler)
 Window's central message-processing method.
 
void EnableUpdates ()
 Re-enable drawing within the window.
 
void EndViewTransaction ()
 Ends a view transaction allowing update to go to App Server again.
 
window_feel Feel () const
 Returns the current window feel flag.
 
BViewFindView (BPoint) const
 Returns a pointer to the attached view located at the specified point.
 
BViewFindView (const char *viewName) const
 Returns the attached view with the specified viewName.
 
uint32 Flags () const
 Returns the current window flags.
 
void Flush () const
 Flushes the window's connection to App Server causing any pending messages to be processed then returns immediately.
 
BRect Frame () const
 Returns the frame rectangle of the window.
 
virtual void FrameMoved (BPoint newPosition)
 Hook method that gets called when the window is moved.
 
virtual void FrameResized (float newWidth, float newHeight)
 Hook method that gets called when the window is resized.
 
status_t GetDecoratorSettings (BMessage *settings) const
 Fill out the window's decorator settings into settings.
 
BLayoutGetLayout () const
 Get the layout of the window.
 
void GetSizeLimits (float *minWidth, float *maxWidth, float *minHeight, float *maxHeight)
 Fills out the size limits set on the window.
 
virtual status_t GetSupportedSuites (BMessage *data)
 Reports the suites of messages and specifiers understood by the window.
 
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
 Fills out the pointers with the alignment of the content of the window on the screen.
 
virtual void Hide ()
 Removes the window from the screen, removes it from Deskbar's window list, and passes active status to another window.
 
void InvalidateLayout (bool descendants=false)
 Invalidate layout.
 
bool InViewTransaction () const
 Returns whether or not the window is currently in a view transaction.
 
bool IsActive () const
 Returns whether or not the window is active.
 
bool IsFloating () const
 Returns whether or not the window is floating.
 
bool IsFront () const
 Returns whether or not the window is the frontmost on screen.
 
bool IsHidden () const
 Returns whether or not the window is hidden.
 
bool IsMinimized () const
 Returns whether or not the window is minimized.
 
bool IsModal () const
 Returns whether or not the window is modal.
 
bool IsOffscreenWindow () const
 Tests if window is used for drawing into a BBitmap. This is mostly used by the Interface Kit itself.
 
BMenuBarKeyMenuBar () const
 Returns a pointer to the key menu bar set to the window.
 
BViewLastMouseMovedView () const
 Returns a pointer to the attached view that most recently received a B_MOUSE_MOVED message.
 
void Layout (bool force)
 Update the size limits and do the layout of the topmost view attached to the window.
 
window_look Look () const
 Returns the current window look flag.
 
virtual void MenusBeginning ()
 Hook method that gets called just before a menu owned by the window is shown.
 
virtual void MenusEnded ()
 Hook method that gets called just before a menu owned by the window is hidden.
 
virtual void MessageReceived (BMessage *message)
 Handle message received by the associated looper.
 
virtual void Minimize (bool minimize)
 Minimizes or un-minimizes the window based on minimize.
 
void MoveBy (float dx, float dy)
 Move the window by dx pixels horizontally and dy pixels vertically.
 
void MoveOnScreen (uint32 flags=0)
 Update window size and position to make it visible on screen.
 
void MoveTo (BPoint)
 Move the window to point.
 
void MoveTo (float x, float y)
 Move the window to the specified x and y coordinates.
 
bool NeedsUpdate () const
 Returns whether or not any of the attached views need to be updated.
 
virtual status_t Perform (perform_code code, void *data)
 Internal method.
 
bigtime_t PulseRate () const
 Returns the pulse rate of the window.
 
virtual void Quit ()
 Deletes the window and all child views, destroys the window thread, removes the window's connection to the Application Server, and deletes the object.
 
virtual bool QuitRequested ()
 Hook method that gets called when the window receives a B_QUIT_REQUESTED message.
 
bool RemoveChild (BView *child)
 Removes child from the view hierarchy.
 
status_t RemoveFromSubset (BWindow *window)
 Remove window from the subset of the BWindow.
 
void ResizeBy (float dx, float dy)
 Resize the window by dx pixels horizontally and dy pixels vertically.
 
void ResizeTo (float width, float height)
 Resize the window to the specified width and height.
 
void ResizeToPreferred ()
 Resize the window to the preferred size of the window's layout.
 
virtual BHandlerResolveSpecifier (BMessage *message, int32 index, BMessage *specifier, int32 what, const char *property)
 
virtual thread_id Run ()
 Spawns the message loop thread and starts the window running.
 
virtual void ScreenChanged (BRect screenSize, color_space depth)
 Hook method that is called when the screen that the window is located on changes size or location or the color space of the screen changes.
 
status_t SendBehind (const BWindow *window)
 Moves the BWindow object behind window.
 
status_t SetDecoratorSettings (const BMessage &settings)
 Set the window decorator settings according to settings.
 
void SetDefaultButton (BButton *button)
 Set the default button of the window to button.
 
status_t SetFeel (window_feel feel)
 Changes the window feel set in the constructor to feel.
 
status_t SetFlags (uint32)
 Changes the window flags set in the constructor to flags.
 
void SetKeyMenuBar (BMenuBar *bar)
 Set the specified menu bar as the key menu bar for the window.
 
virtual void SetLayout (BLayout *layout)
 Sets the layout of the window.
 
status_t SetLook (window_look look)
 Changes the window look set in the constructor to look.
 
void SetPulseRate (bigtime_t rate)
 Sets how often B_PULSE messages are posted to the window.
 
void SetSizeLimits (float minWidth, float maxWidth, float minHeight, float maxHeight)
 Set size limits on the window.
 
void SetTitle (const char *title)
 Sets the window title to title.
 
status_t SetType (window_type type)
 Changes the window type set in the constructor to type.
 
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)
 Sets the alignment of the content of the window on the screen.
 
void SetWorkspaces (uint32)
 Sets the set of workspaces where the window can be displayed.
 
void SetZoomLimits (float maxWidth, float maxHeight)
 Sets the maximum size that the window will zoom to when Zoom() is called.
 
virtual void Show ()
 Shows the window on screen, places it frontmost on the screen, adds the window to Deskbar's window list, and makes it the active window.
 
BSize Size () const
 Returns the size of the window.
 
void Sync () const
 Synchronizes the attached window's connection to App Server causing any pending messages to be processed and then waits for the App Server to respond.
 
const char * Title () const
 Returns the window title as set by the constructor or SetTitle().
 
window_type Type () const
 Returns the current window type flag.
 
void UpdateIfNeeded ()
 Invokes Draw() immediately on each child view that needs updating.
 
void UpdateSizeLimits ()
 Updates the window's size limits from the minimum and maximum sizes of its top view.
 
virtual void WindowActivated (bool focus)
 Hook method that gets called when the window becomes activated or deactivated.
 
virtual void WorkspaceActivated (int32 workspace, bool state)
 Hook method that gets called when the active workspace changes.
 
uint32 Workspaces () const
 Returns the set of workspaces where the window can be displayed.
 
virtual void WorkspacesChanged (uint32 oldWorkspaces, uint32 newWorkspaces)
 Hook method that gets called whenever the workspaces the window is in changes.
 
void Zoom ()
 Resize the window to the minimum of the screen size, the maximum values set by SetSizeLimits(), and the maximum values set by SetZoomLimits().
 
virtual void Zoom (BPoint origin, float width, float height)
 Move window to origin, then resize to width and height.
 
void AddShortcut (uint32 key, uint32 modifiers, BMessage *message)
 Creates a keyboard shortcut that sends a message to the window.
 
void AddShortcut (uint32 key, uint32 modifiers, BMessage *message, BHandler *target)
 Creates a keyboard shortcut that sends a message to the specified target.
 
bool HasShortcut (uint32 key, uint32 modifiers)
 Returns whether or not the specified shortcut is set on the window.
 
void RemoveShortcut (uint32 key, uint32 modifiers)
 Removes the specified shortcut from the window.
 
- Public Member Functions inherited from BLooper
 BLooper (const char *name=NULL, int32 priority=B_NORMAL_PRIORITY, int32 portCapacity=B_LOOPER_PORT_DEFAULT_CAPACITY)
 Construct a new BLooper with a priority and an capacity.
 
virtual ~BLooper ()
 Destruct the looper.
 
virtual status_t Perform (perform_code d, void *arg)
 Internal method.
 
status_t PostMessage (uint32 command)
 Post a message with the command as what identifier to this looper.
 
status_t PostMessage (BMessage *message)
 Post a message to this looper.
 
status_t PostMessage (uint32 command, BHandler *handler, BHandler *replyTo=NULL)
 Sends a message with command what identifier to the handler associated with this looper. A response may be sent to the replyTo handler asynchronously.
 
status_t PostMessage (BMessage *message, BHandler *handler, BHandler *replyTo=NULL)
 Send a message to the handler associated with this looper. A response may be sent to the replyTo handler asynchronously.
 
BMessageCurrentMessage () const
 Retrieve the current message.
 
BMessageDetachCurrentMessage ()
 Get ownership of the message currently being processed.
 
void DispatchExternalMessage (BMessage *message, BHandler *handler, bool &_detached)
 Internal method to support single-threaded GUI toolkits.
 
BMessageQueueMessageQueue () const
 Get a pointer to the internal message queue of this looper.
 
bool IsMessageWaiting () const
 Check if there is a message waiting.
 
void AddHandler (BHandler *handler)
 Associate a handler to this looper.
 
bool RemoveHandler (BHandler *handler)
 Disassociate a handler from this looper.
 
int32 CountHandlers () const
 Get the number of handlers associated with this looper.
 
BHandlerHandlerAt (int32 index) const
 Get the handler at an index of the list of associated handlers.
 
int32 IndexOf (BHandler *handler) const
 Get the index of the handler that is in the associated handler list.
 
BHandlerPreferredHandler () const
 Get the preferred handler.
 
void SetPreferredHandler (BHandler *handler)
 Set a preferred handler.
 
thread_id LockingThread () const
 Return the thread id of the thread that currently holds the lock.
 
int32 CountLocks () const
 Return the number of recursive locks that are currently being held on this looper.
 
int32 CountLockRequests () const
 Return the number of pending locks.
 
sem_id Sem () const
 Return the id of the semaphore that is used to lock this looper.
 
virtual void AddCommonFilter (BMessageFilter *filter)
 Add a common filter to the list of filters that are applied to all incoming messages.
 
virtual bool RemoveCommonFilter (BMessageFilter *filter)
 Remove a filter from the common message filter list.
 
virtual void SetCommonFilterList (BList *filters)
 Set a new list of filters that need to be applied to all incoming messages.
 
BListCommonFilterList () const
 Return a list of filters applied to all incoming messages.
 
 BLooper (BMessage *data)
 Construct a looper from an archived message.
 
void Loop ()
 Run the event loop in the current thread.
 
bool Lock ()
 Lock the looper.
 
void Unlock ()
 Unlock a locked looper.
 
bool IsLocked () const
 Check if a looper is locked.
 
status_t LockWithTimeout (bigtime_t timeout)
 Lock a looper with a timeout.
 
thread_id Thread () const
 Return the thread id of the internal message looper thread.
 
team_id Team () const
 Return the team id in which this looper exists.
 
- Public Member Functions inherited from BHandler
 BHandler (const char *name=NULL)
 Construct a new handler with a name.
 
virtual ~BHandler ()
 Free the filters of this handler, as well as the list of observers.
 
virtual status_t Perform (perform_code d, void *arg)
 Perform some action (Internal method defined for binary compatibility purposes).
 
 BHandler (BMessage *data)
 Construct a handler from an archived message.
 
BLooperLooper () const
 Return a pointer to the looper that this handler is associated with.
 
void SetName (const char *name)
 Set or change the name of this handler.
 
const char * Name () const
 Return the name of this handler.
 
virtual void SetNextHandler (BHandler *handler)
 Set the next handler in the chain that the message is passed on to if this handler cannot process it.
 
BHandlerNextHandler () const
 Return the next hander in the chain to which the message is passed on.
 
virtual void AddFilter (BMessageFilter *filter)
 Add filter as a prerequisite to this handler.
 
virtual bool RemoveFilter (BMessageFilter *filter)
 Remove filter from the filter list.
 
virtual void SetFilterList (BList *filters)
 Set the internal list of filters to filters.
 
BListFilterList ()
 Return a pointer to the list of filters.
 
bool LockLooper ()
 Lock the looper associated with this handler.
 
status_t LockLooperWithTimeout (bigtime_t timeout)
 Lock the looper associated with this handler, with a time out value.
 
void UnlockLooper ()
 Unlock the looper.
 
status_t StartWatching (BMessenger target, uint32 what)
 Subscribe this handler to watch a specific state change of a target.
 
status_t StartWatchingAll (BMessenger target)
 Subscribe this handler to watch a target for all events.
 
status_t StopWatching (BMessenger target, uint32 what)
 Unsubscribe this handler from watching a specific state.
 
status_t StopWatchingAll (BMessenger target)
 Unsubscribe this handler from watching all states.
 
status_t StartWatching (BHandler *observer, uint32 what)
 Subscribe an observer for a specific state change of this handler.
 
status_t StartWatchingAll (BHandler *observer)
 Subscribe an observer for a all state changes.
 
status_t StopWatching (BHandler *observer, uint32 what)
 Unsubscribe an observer from watching a specific state.
 
status_t StopWatchingAll (BHandler *observer)
 Unsubscribe an observer from watching all states.
 
virtual void SendNotices (uint32 what, const BMessage *notice=NULL)
 Emit a state change to the observers.
 
bool IsWatched () const
 Check if there are any observers watching this handler.
 
- Public Member Functions inherited from BArchivable
 BArchivable ()
 Constructor. Does nothing.
 
 BArchivable (BMessage *from)
 Constructor. Does important behind-the-scenes work in the unarchiving process.
 
virtual ~BArchivable ()
 Destructor. Does nothing.
 
virtual status_t AllArchived (BMessage *archive) const
 Method relating to the use of BArchiver.
 
virtual status_t AllUnarchived (const BMessage *archive)
 Method relating to the use of BUnarchiver.
 
virtual status_t Archive (BMessage *into, bool deep=true) const
 Archive the object into a BMessage.
 
virtual status_t Perform (perform_code d, void *arg)
 Perform some action (Internal method defined for binary compatibility purposes).
 

Static Public Member Functions

static BArchivableInstantiate (BMessage *data)
 Instantiate window from message data. Not implemented.
 
static bool SupportsWindowMode (screen_id id=B_MAIN_SCREEN_ID)
 Returns whether or not the specified screen supports windowed mode.
 
- Static Public Member Functions inherited from BWindow
static BArchivableInstantiate (BMessage *archive)
 Creates a new BWindow object from the data message.
 
- Static Public Member Functions inherited from BLooper
static BArchivableInstantiate (BMessage *data)
 Static method to instantiate a looper from an archived message.
 
static BLooperLooperForThread (thread_id thread)
 Static method to retrieve a BLooper for a specified thread.
 
- Static Public Member Functions inherited from BHandler
static BArchivableInstantiate (BMessage *data)
 Static method to instantiate a handler from an archived message.
 
- Static Public Member Functions inherited from BArchivable
static BArchivableInstantiate (BMessage *archive)
 Static member to restore objects from messages.
 

Additional Inherited Members

- Protected Member Functions inherited from BLooper
BMessageMessageFromPort (bigtime_t=B_INFINITE_TIMEOUT)
 Hook method to retrieve a message from the looper's port.
 

Detailed Description

Provides direct access to the video card graphics frame buffer.

Since
BeOS R3

Constructor & Destructor Documentation

◆ BDirectWindow() [1/2]

BDirectWindow::BDirectWindow ( BRect  frame,
const char *  title,
window_type  type,
uint32  flags,
uint32  workspace = B_CURRENT_WORKSPACE 
)

Creates and initializes a BDirectWindow object.

Parameters
frameThe initial frame rectangle of the window.
titleThe title of the Window.
typeWindow type (see BWindow).
flagsWindow flags (see BWindow).
workspaceWorkspace of the direct window (see BWindow).
Since
BeOS R3

◆ BDirectWindow() [2/2]

BDirectWindow::BDirectWindow ( BRect  frame,
const char *  title,
window_look  look,
window_feel  feel,
uint32  flags,
uint32  workspace = B_CURRENT_WORKSPACE 
)

Creates and initializes a BDirectWindow object.

Parameters
frameThe initial frame rectangle of the window.
titleThe title of the Window.
lookWindow look (see BWindow).
feelWindow feel (see BWindow).
flagsWindow flags (see BWindow).
workspaceWorkspace of the direct window (see BWindow).
Since
BeOS R3

◆ ~BDirectWindow()

BDirectWindow::~BDirectWindow ( )
virtual

Destroys the BDirectWindow and frees all memory used by it.

Do not delete a BDirectWindow object directly, call Quit() instead.

Destroying a BDirectWindow involves a few steps to make sure that it is disconnected and cleaned up.

Set the fConnectionDisabled flag to true to prevent DirectConnected() from attempting to reconnect while it's being destroyed.

next call Hide() and finally Sync() to force the direct window to disconnect from direct access.

Once these steps are complete you may do your usual destructor work.

Since
BeOS R3

Member Function Documentation

◆ Archive()

status_t BDirectWindow::Archive ( BMessage data,
bool  deep = true 
) const
virtual

Archive window into message data. Not implemented.

Since
BeOS R3

Reimplemented from BWindow.

◆ DirectConnected()

void BDirectWindow::DirectConnected ( direct_buffer_info info)
virtual

Hook method called when your application learns about the state of the graphics display and changes occur.

This is the heart of BDirectWindow.

Parameters
infoThe direct_buffer_info struct
Since
BeOS R3

◆ DispatchMessage()

virtual void BDirectWindow::DispatchMessage ( BMessage message,
BHandler target 
)
virtual

Window's central message-processing method.

This method called automatically as messages arrive in the queue, you should never call DispatchMessage() yourself.

Warning
Don't override this method in your BWindow subclass. Override MessageReceived() instead to alter the window's message dispatching mechanism.
See also
BLooper::DispatchMessage()
Since
BeOS R3

Reimplemented from BWindow.

◆ FrameMoved()

virtual void BDirectWindow::FrameMoved ( BPoint  newPosition)
virtual

Hook method that gets called when the window is moved.

Parameters
newPositionThe point of the top left corner of the frame rectangle that the window has been moved to.
Since
BeOS R3

Reimplemented from BWindow.

◆ FrameResized()

virtual void BDirectWindow::FrameResized ( float  newWidth,
float  newHeight 
)
virtual

Hook method that gets called when the window is resized.

Parameters
newWidthThe new width of the window.
newHeightThe new height of the window.
Since
BeOS R3

Reimplemented from BWindow.

◆ GetClippingRegion()

status_t BDirectWindow::GetClippingRegion ( BRegion region,
BPoint origin = NULL 
) const

Sets region to the current clipping region of the direct window.

If origin is not NULL, the region is offset by origin.

Warning
GetClippingRegion() should only be called from within the DirectConnected() method. If called outside GetClippingRegion() will return B_ERROR.
Parameters
regionThe clipping region to fill out.
originAn origin to offset the region by.
Returns
A status code.
Return values
B_OKEverything went as expected.
B_BAD_VALUEregion was NULL.
B_ERRORWindow not locked or not in DirectConnected() method.
B_NO_MEMORYNot enough memory to fill region
Since
BeOS R3

◆ GetSupportedSuites()

virtual status_t BDirectWindow::GetSupportedSuites ( BMessage data)
virtual

Reports the suites of messages and specifiers understood by the window.

Since
BeOS R3

Reimplemented from BWindow.

◆ Hide()

virtual void BDirectWindow::Hide ( )
virtual

Removes the window from the screen, removes it from Deskbar's window list, and passes active status to another window.

Calls to Hide() and Show() are cumulative.

Since
BeOS R3

Reimplemented from BWindow.

◆ Instantiate()

BArchivable * BDirectWindow::Instantiate ( BMessage data)
static

Instantiate window from message data. Not implemented.

Since
BeOS R3

◆ IsFullScreen()

bool BDirectWindow::IsFullScreen ( ) const

Returns whether the window is in full-screen or windowed mode.

Returns
true if in full-screen mode, false if in windowed mode.
Since
BeOS R3

◆ MenusBeginning()

virtual void BDirectWindow::MenusBeginning ( )
virtual

Hook method that gets called just before a menu owned by the window is shown.

Note
This method is not invoked by a message, there is no B_MENUS_BEGINNING flag.
Since
BeOS R3

Reimplemented from BWindow.

◆ MenusEnded()

virtual void BDirectWindow::MenusEnded ( )
virtual

Hook method that gets called just before a menu owned by the window is hidden.

Note
This method is not invoked by a message, there is no B_MENUS_ENDED flag.
Since
BeOS R3

Reimplemented from BWindow.

◆ MessageReceived()

virtual void BDirectWindow::MessageReceived ( BMessage message)
virtual

Handle message received by the associated looper.

Parameters
messageThe message received by the looper.
See also
BHandler::MessageReceived()
Since
BeOS R3

Reimplemented from BWindow.

◆ Minimize()

virtual void BDirectWindow::Minimize ( bool  minimize)
virtual

Minimizes or un-minimizes the window based on minimize.

Unlike Hide() an Show(), Minimize() dims and un-dims the entry for the window in Deskbar's window list rather than removing it. Also Minimize() calls are not cumulative like Hide() and Show(); one false call will undo multiple true calls.

Minimize() also acts as a hook method that is invoked when the user double- clicks on the title tab of the window or selects the window from the DeskBar window list. The minimize parameter is true if the window is about to be hidden and false if it is about to be shown.

If you override Minimize() and you want to inherit BWindow's behavior, you must call BWindow::Minimize().

Since
BeOS R3

Reimplemented from BWindow.

◆ Perform()

virtual status_t BDirectWindow::Perform ( perform_code  d,
void *  arg 
)
virtual

Internal method.

Since
Haiku R1

Reimplemented from BWindow.

◆ Quit()

virtual void BDirectWindow::Quit ( )
virtual

Deletes the window and all child views, destroys the window thread, removes the window's connection to the Application Server, and deletes the object.

Use this method to destroy a window rather than using the delete operator.

This method works much like the BLooper::Quit(), it doesn't return when called from the BWindow's thread and it returns after all messages have been processed when called from another thread and the BWindow and its thread has been destroyed.

Warning
The window must first be locked before calling Quit().
See also
BLooper::Quit()
Since
BeOS R3

Reimplemented from BWindow.

◆ ResolveSpecifier()

virtual BHandler * BDirectWindow::ResolveSpecifier ( BMessage message,
int32  index,
BMessage specifier,
int32  what,
const char *  property 
)
virtual

Determine the proper handler for a scripting message.

Parameters
messageThe scripting message to determine the handler.
indexThe index of the specifier.
specifierThe message which contains the specifier.
whatThe 'what' field of the specifier message.
propertyThe name of the target property.
Returns
A pointer to the proper BHandler for the given scripting message.
Since
BeOS R3

Reimplemented from BWindow.

◆ ScreenChanged()

virtual void BDirectWindow::ScreenChanged ( BRect  screenSize,
color_space  depth 
)
virtual

Hook method that is called when the screen that the window is located on changes size or location or the color space of the screen changes.

Parameters
screenSizeThe new screen size in the screen's coordinate system.
depthThe new color space of the screen.
Since
BeOS R3

Reimplemented from BWindow.

◆ SetFullScreen()

status_t BDirectWindow::SetFullScreen ( bool  enable)

Enables or disables full-screen mode.

The SupportsWindowMode() method determines whether or not the video card is capable of supporting windowed mode.

When the window is in full screen mode it will always have the focus and no other window can be in front of it.

Parameters
enabletrue to enable fullscreen mode, false for windowed mode.
Returns
A status code.
Return values
B_OKEverything went as expected.
B_ERRORAn error occurred while trying to switch between full screen and windowed mode.
See also
BDirectWindow::SupportsWindowMode()
Since
BeOS R3

◆ Show()

virtual void BDirectWindow::Show ( )
virtual

Shows the window on screen, places it frontmost on the screen, adds the window to Deskbar's window list, and makes it the active window.

If this is the first time Show() has been called on the window the message loop is started and it is unlocked.

Calls to Hide() and Show() are cumulative.

Since
BeOS R3

Reimplemented from BWindow.

◆ SupportsWindowMode()

static bool BDirectWindow::SupportsWindowMode ( screen_id  id = B_MAIN_SCREEN_ID)
static

Returns whether or not the specified screen supports windowed mode.

Because this is a static function you don't have to construct a BDirectWindow object to call it.

Parameters
idThe id of the screen you want to check, B_MAIN_SCREEN_ID by default.
Returns
true if the screen support windowed mode, false otherwise.
Since
BeOS R3

◆ WindowActivated()

virtual void BDirectWindow::WindowActivated ( bool  active)
virtual

Hook method that gets called when the window becomes activated or deactivated.

Parameters
activetrue if the window has become activated, false if the window has become deactivated.
Since
BeOS R3

Reimplemented from BWindow.

◆ WorkspaceActivated()

virtual void BDirectWindow::WorkspaceActivated ( int32  workspace,
bool  state 
)
virtual

Hook method that gets called when the active workspace changes.

This method is only called when a workspace in which the window resides is activated or deactivated.

Parameters
workspaceThe workspace number that was activated/deactivated.
statetrue if activated, false if deactivated.
Since
BeOS R3

Reimplemented from BWindow.

◆ WorkspacesChanged()

virtual void BDirectWindow::WorkspacesChanged ( uint32  oldWorkspaces,
uint32  newWorkspaces 
)
virtual

Hook method that gets called whenever the workspaces the window is in changes.

Parameters
oldWorkspacesThe old set of workspaces the window was visible in.
newWorkspacesThe new set of workspaces the window is visible in.
Since
BeOS R3

Reimplemented from BWindow.

◆ Zoom()

virtual void BDirectWindow::Zoom ( BPoint  origin,
float  width,
float  height 
)
virtual

Move window to origin, then resize to width and height.

You may call Zoom() even if the window has the B_NOT_ZOOMABLE flag set.

This method may move and resize the window resulting in both the FrameMoved() and FrameResized() hook methods to be called.

You can override this method to change how your window behaves when the user clicks the zoom button or when Zoom() is called.

Parameters
originThe point that the window was moved to.
widthThe new width of the window.
heightThe new height of the window.
Since
BeOS R3

Reimplemented from BWindow.