Derived from: public MView, public BButton
Declared in: <MButton.h>
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.
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), and an int32 (called M_BUTTON_ID)
that has the value ID.
The MButton's size can be constrained with the size argument.
When the button has been activated and it's time to call BInvoker::Invoke(), MButton will add a boolean called M_DOUBLECLICK to the message. When this boolean is true, the button was doubleclicked. It also adds an int32 called M_BUTTON_MASK to the message, which indicates with which mousebuttons the MButton was clicked.
See also: the BButton constructor.
virtual ~MButton(void)
Cleans up after the MButton.
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.