|
splitter - splitter gadget pane - which pane to return: 0: first pane (left, or top) 1: second pane (right, or bottom) |
|
Returns one of a splitter's two panes so you can put gadgets in it. A splitter divides its space into two panes with a draggable divider - style 1 side by side, style 2 stacked. The panes themselves are panels: pass the returned handle as the group parameter when creating gadgets, read its size with ClientWidth/ClientHeight, even colour it with SetPanelColor. viewportPane=SplitterPanel(workSplitter,0) inspectorPane=SplitterPanel(workSplitter,1) This is the backbone of the classic editor layout: 3D viewport on one side, inspector on the other. Give gadgets inside each pane SetGadgetLayout rules and they follow the divider as the user drags it. Pane handles are positive type-checked ids that stay valid for the splitter's lifetime - they are freed with it, never individually. Any pane value other than 0 or 1 stops with a runtime error. See it working in the world-editor shell sample. See also: CreateSplitter, SetSplitterLimits, CreatePanel, SetGadgetLayout, ClientWidth, ClientHeight. |