IupFlowBox
| Definition: |
include pGUI.e
Ihandle ih = IupFlowBox(Ihandles children={}, string attributes="", dword_seq args={}) |
||
| Description: |
Deprecated. A Phix-specific addon written before IupMultiBox() was available,
use that instead since it has many additional features this does not and probably never will, as well as being easier to use.
An IupFlowBox is a Phix/pGUI addition to IUP which is simply a (tagged) IupVbox containing nested IupHbox (some of which may be empty), which relies on a RESIZE_CB callback that invokes IupReparent() to move child elements between the IupHbox, which must be (independently) set on the containing dialog as follows: IupResizeFlow(dlg) just invokes IupSetResizeFlowCallback(dlg) and therefore behaves identically. Obviously the former is somewhat easier to type whereas the latter is a somewhat clearer statement of intent. Should you have your own (existing) RESIZE_CB routine, then instead you can and should invoke {} = IupResizeFlow_cb(dlg,w,h) directly from that. It invokes IupRefresh(dlg), so you do not have to. Should you invoke IupResizeFlow[_cb](dlg) when dlg does not contain any IupFlowBox, it should do no real harm, and likewise you can use IupAppend(), IupInsert(), IupDetach(), and IupDestroy() on IupFlowBox elements just like anything else. IupFlowBox can also be nested (but have only been tested to a depth of 2). children: Identifier(s) of interface element(s). It can be NULL or {}. For more information on the attributes and args parameters see IupSetAttributes. Returns: the identifier of the created element. |
||
| pwa/p2js: | Not supported. | ||
| Remarks: |
If something works for you, fine, but where it does not, these are my thoughts:
The operation of an IupFlowBox relies on FLOWBOX=FlowBox on the outer IupVbox, EXPAND=YES and GAP/MARGIN of 0 on both the IupVbox and IupHbox, and EXPAND=NO on all children. Setting the latter to YES or attempting to incorporate IupFill() elements is likely to have unpredictable results. Any SPACING/PADDING/GAP needed must be on the children passed to IupFlowBox, rather than on the internal IupVbox/Hbox controls, and any needed IupFill() should be left/right[**] or above/below the IupFlowBox, rather than (top-level) within it. [**] Something like {IupFill(1/3),IupFlexBox(1/3),IupFill(1/3)} might be ok, but obviously something like {IupFill(),IupFlexBox(fixed static size),IupFill()} is probably the very definition of utterly pointless. While untested, more deeply nested EXPAND=YES and IupFill() might in fact be fine, although at present I struggle to imagine such being useful/useable without some kind of explicit manual resizing mechanism. |
||
| Example: |
The following images are from demo\pGUI\IupFlowBox.exw
|

