Derived from: nothing
Declared in: layoutMatrix.h
Library: libBeGUI.so
The LayoutMatrix Class controls the sizing and placement of gadgets in a window. They know about their own sizes and positions, so other LayoutMatrices may be positioned with respect to them.
Note: 
All instances of the LayoutMatrix Class will be automatically attached to the ScrollingWindow or BaseWindowwhich is passed in the constructor method. When the ScrollingWindow or BaseWindow is done with the LayoutMatrix it will delete the LayoutMatrix. It is therefore manditory to create the LayoutMatrix using the "new" allocator.
LayoutMatrix(const uint32 uparamFlags,
These are the constructors. The parameter uparamFlags, lets the class know how all it's gadgets will be sized. There are only two choices, SAMESIZE and BESTSIZE. SAMESIZE tells the class to make every LayoutMatrixItem in the class occupy the same space as all others. This makes for nice looking tables of buttons. BESTSIZE lets the class calculate the least possible size for each layoutMatrixItem and sizes them accordingly. This is very useful when a number of irregularly shaped object are grouped together, like buttons, checkboxes, and color controls.
The next two parameters, uparamRows and uparamColumns let the class know how you want the items arranged. For instance, if the class contains 12 LayoutMatrixItems and you want them arranged in a single long line, set uparamRows equal to 1 and uparamColumns equal to 12. Or, if you want 3 LayoutMatrixItems across and 4 down, set uparamRows equal to 4 and uparamColumns equal to 3. The critical thing is that the number of LayoutMatrixItems in the class must be equal to the product of uparamRows and uparamColumns (uparamRows * uparamColumns). A sanity check for this is not in place--I will probably put one in place soon, as there will be a crash if the rule is not followed!
The parameter wparamScrollingWindow or wparamBaseWindow let's the class know to which window (see ScrollingWindow or BaseWindow)it belongs so that it may attach itself to that window's list of LayoutMatrices.
This is the destructor. It just deletes some internal lists.
This is the real work horse of the class. It calculates all it's LayoutMatrixItem sizes and positions. It calculates it's own size and stores this information for your future use. It readies itself to be placed in the position specified by paramMatrixLeft and paramMatrixTop. It uses the semaphore to insure that all it's calculations are finished before the next LayoutMatrix starts it's calculations, as the second LayoutMatrix may well use values from the first LayoutMatrix.
Overview
[method summary]
LayoutMatrix()
LayoutMatrix(const uint32 uparamFlags,
const uint32 uparamRows,
const uint32 uparamColumns,
ScrollingWindow * wparamScrollingWindow);
const uint32 uparamRows,
const uint32 uparamColumns,
BaseWindow * wparamBaseWindow);
~LayoutMatrix()
~LayoutMatrix();
Calc()
void Calc(const float paramMatrixLeft,
const float paramMatrixTop,
sem_id paramSemID);
for version 1.4.2
Copyright © 1998-1999 Ed Musgrove Be Developer #2076. All rights reserved.
edgar@harbornet.com
emusgrov@linknet.kitsap.lib.wa.us
Last modified March 17, 1999.