Derived from: none
Declared in: <MDividable.h>
An MDividable is an abstract class that provides an interface for aligning objects that can be "divided". Currently this includes MTextControl, Mpopup and SpinButton, all of which have a label on the left, and a data-entry part on the right.
If rolemodel is non-NULL, the control should use rolemodel's LabelWidth() as its own. If on the other hand rolemodel is NULL, it should use its own preferred labelwidth.
void DivideSameAs(MDividable *dividable)
With this function you tell the MDividable that it should use the same division between label and data as the given MDividable dividable. You will not normally call this function directly, but will instead call the global DivideSame() function instead.
virtual float LabelWidth()=0
This function must be implemented by classes derived from MDividable, and should return the width of the label part of the object.
void DivideSame(MView *div1, MDividable *div2, ...)
This global function is a convenient shortcut for calling DivideSame on all objects you want to align. It takes a NULL-terminated list of MViews (which should also be MDividables), and will align them so that the seperation between label and data-entry part is the same for all objects. If you change the label of one of the objects later on, you should call this function again.
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.