The Layout Library: MButton

Derived from: public MView, public BButton

Declared in: <MButton.h>


Overview

An MButton is a BButton which has been adapted to be a part of layoutlib, and has been enhanced in such a way that it doesn't keep the window locked if you keep the button pressed. In all other respects, an MButton works just like a BButton. For further information about BButtons, you are encouraged to read the BeBook.


Constructor and Destructor


MButton()

      MButton(const char *label, BMessage *message, BHandler *target=NULL, minimax size=minimax(-1,-1,65536,65536,1))
      MButton(const char *label, ulong ID, minimax size=minimax(-1,-1,65536,65536,1))

Initializes an MButton that will display the label label.
The first form of the constructor will assign the model message to the button, and set up the target BHandler as the target for this message.
The second form of the constructor will create a BMessage(M_BUTTON_SELECTED), which will contain a pointer to the button (whose name is defined by the constant M_BUTTON_POINTER_NAME), and an int32 (called M_BUTTON_ID_NAME) that has the value ID.
The MButton's size can be constrained with the size argument.

See also: the BButton constructor.


~MButton()

      virtual ~MButton(void)

Cleans up after the MButton.



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

Be is a registered trademark; BeOS, BeBox, BeWare, GeekPort, the Be logo, and the BeOS logo are trademarks of Be, Inc.