The Layout Library: MDragBar

Derived from: public MView, public BControl

Declared in: <MDragBar.h>


Overview

An MDragBar is a view that allows you to drag around the window that contains it. Use this to make "alternative" windows, e.g. by creating a borderless window with an MDragBar stuck on the left side.


Constructor and Destructor


MDragBar()

    MDragBar(minimax size=minimax(1,1,1E6,1E6))
    MDragBar(BMessage*)
Creates an MDragBar, initialises FILL_COLOR to the yellowish color that titletabs normally have, and sets the flags to include M_NO_COLOR_CHANGES.

~MDragBar()

    virtual ~MDragBar()
Destroys the MDragBar.

Static Functions


Instantiate()

    static BArchivable *Instantiate(BMessage *archive)
Not yet implemented.


Member Functions


Archive()

    virtual long Archive(BMessage *archive, bool deep=true) const
Not yet implemented.


AttachedToWindow()

    virtual void AttachedToWindow()
---===[[[]]]===---


DetachedFromWindow()

    virtual void DetachedFromWindow()
Kills the asynchronous thread that takes care of dragging the window.


Draw()

    virtual void Draw(BRect rect)
Draws the MDragBar, including a focus-indicator if the control is focused.


KeyDown()

    virtual void KeyDown(const char *bytes, int32 numbytes)
Monitors cursor-key presses, so the window containing the MDragBar can be moved with the keyboard as well as the mouse.


MouseDown()

    virtual void MouseDown(BPoint)
Spawns a thread that takes care of window-dragging.


Copyright © 1997 Marco Nelissen (marcone@xs4all.nl) All rights reserved.

Be, BeOS, BeBox, BeWare, GeekPort, the Be logo, the BeOS logo, roColour, Beatware and Beatware painter are trademarks or registered trademarks of their respective owners.