class PtDivider PtContainer { divider_flags; // flag (Pt_ARG_DIVIDER_FLAGS) divider_offset; // short (Pt_ARG_DIVIDER_OFFSET) divider_sizes; // PhPoint array (Pt_ARG_DIVIDER_SIZES) }
This widget is a container that makes adjustable rows or columns out of its child widgets, such as PtButtons or PtPanes. Its instance variables let you control how or whether the children get resized, and to find their relative positions.
![]() | For detailed information, please refer to PtDivider in the Photon documentation. |
This instance variable specifies divider characteristics, and may be a combination of zero or more of the following flags:
| Constant | Description |
|---|---|
| Pt_DIVIDER_NORESIZE | Generates the callback without resizing children. |
| Pt_DIVIDER_RESIZE_BOTH | ON, the default, resizes the widgets on either side of the handle. OFF moves the immediately right (or bottom) children and resizes the immediately left (or top) child and the far right (or bottom) child. |
| Pt_DIVIDER_INVISIBLE | Hides the drag outline. Used with Pt_DIVIDER_NORESIZE. |
| Pt_DIVIDER_CASCADE | Internal informational bit. |
An integer specifying how much to offset the PtPoints in the divider_sizes array in both the x and y directions. This is used to modify the divider_sizes array, but has no effect on the positioning of the children of the PtDivider.
A read-only array of PhPoints indicating the top left-hand corner of each child of the PtDivider.
This example, ex_PtDivider.g, is included in the gamma_ph_#_examples_1_QNX4.tgz file available on the Cogent Web Site.
#!/usr/cogent/bin/phgamma
/*
* This example loads a PtDivider that holds three
* buttons arranged vertically.
*/
require_lisp("PhotonWidgets.lsp");
require_lisp("PhabTemplate.lsp");
PtInit(nil);
wfile = PhabReadWidgetFile ("WidgetFiles/wgt/divider.wgtw");
window = PhabCreateWidgets(wfile, nil, nil);
win = PhabLookupWidget(window,#divider,nil);
div = PhabLookupWidget(window,#MainDivider,nil);
/*
* Demonstrate no resizing. To prevent resizing, uncomment the
* following line.
*/
//div.divider_flags = Pt_DIVIDER_NORESIZE | Pt_DIVIDER_INVISIBLE;
PtRealizeWidget(win);
/*
* Assign an offset, and then print the offset and sizes.
*/
div.divider_offset = -10;
pretty_princ("Offset: ",div.divider_offset,"\n");
pretty_princ("Sizes: ",div.divider_sizes,"\n");
PtMainLoop();