Documentation
¶
Index ¶
- type Orientation
- type PositionChange
- type PositionChangeReason
- type PositionPolicy
- type SplitGeometry
- type SplitView
- func (sv *SplitView) AddSubview(child view.Viewable)
- func (sv *SplitView) DividerView() *view.UIView
- func (sv *SplitView) Geometry() SplitGeometry
- func (sv *SplitView) LeadingPane() *view.UIView
- func (sv *SplitView) On(event fltk_bridge.Event, handler func(fltk_bridge.Event) bool)
- func (sv *SplitView) OnPositionChanged(handler func(PositionChange))
- func (sv *SplitView) Position() float64
- func (sv *SplitView) PositionPixels() int
- func (sv *SplitView) Raw() fltk_bridge.Widget
- func (sv *SplitView) Resizable() bool
- func (sv *SplitView) SetAutomationID(id string) *SplitView
- func (sv *SplitView) SetDividerColors(normal, hover, active uint)
- func (sv *SplitView) SetDividerSize(size int)
- func (sv *SplitView) SetLeftView(content view.Viewable)
- func (sv *SplitView) SetLeftViewFixed(size int)
- func (sv *SplitView) SetMinimumSizes(leading, trailing int)
- func (sv *SplitView) SetPosition(pos float64)
- func (sv *SplitView) SetPositionPixels(position int)
- func (sv *SplitView) SetPositionPolicy(policy PositionPolicy)
- func (sv *SplitView) SetResizable(enabled bool)
- func (sv *SplitView) SetRightView(content view.Viewable)
- func (sv *SplitView) SetRightViewFixed(size int)
- func (sv *SplitView) TrailingPane() *view.UIView
- func (sv *SplitView) View() *view.UIView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Orientation ¶
type Orientation int
Orientation describes whether panes are arranged left/right or top/bottom.
const ( Horizontal Orientation = iota Vertical )
type PositionChange ¶ added in v0.0.25
type PositionChange struct {
Geometry SplitGeometry
Reason PositionChangeReason
}
PositionChange is delivered after an observable split-position change.
type PositionChangeReason ¶ added in v0.0.25
type PositionChangeReason string
PositionChangeReason identifies why pane geometry changed.
const ( ChangeProgrammatic PositionChangeReason = "programmatic" ChangeDrag PositionChangeReason = "drag" ChangeResize PositionChangeReason = "resize" )
type PositionPolicy ¶ added in v0.0.25
type PositionPolicy int
PositionPolicy controls what remains stable when the split view is resized.
const ( PreserveRatio PositionPolicy = iota PreserveLeadingSize PreserveTrailingSize )
type SplitGeometry ¶ added in v0.0.25
SplitGeometry reports pane sizes along the split axis.
type SplitView ¶
type SplitView struct {
// contains filtered or unexported fields
}
SplitView is a native two-pane container with a draggable divider.
func New ¶
func New(x, y, width, height int, orientation Orientation) *SplitView
New creates a split view. Horizontal arranges left/right panes; Vertical arranges top/bottom panes.
func (*SplitView) AddSubview ¶
func (*SplitView) DividerView ¶ added in v0.0.25
DividerView exposes divider automation and appearance hooks.
func (*SplitView) Geometry ¶ added in v0.0.25
func (sv *SplitView) Geometry() SplitGeometry
Geometry returns current sizes along the split axis.
func (*SplitView) LeadingPane ¶ added in v0.0.25
LeadingPane returns the stable internal leading-pane container.
func (*SplitView) On ¶
func (sv *SplitView) On(event fltk_bridge.Event, handler func(fltk_bridge.Event) bool)
func (*SplitView) OnPositionChanged ¶ added in v0.0.25
func (sv *SplitView) OnPositionChanged(handler func(PositionChange))
OnPositionChanged installs the split-position callback.
func (*SplitView) Position ¶
Position returns the current leading position as a ratio of total extent.
func (*SplitView) PositionPixels ¶ added in v0.0.25
PositionPixels returns the leading pane size in pixels.
func (*SplitView) Raw ¶
func (sv *SplitView) Raw() fltk_bridge.Widget
func (*SplitView) SetAutomationID ¶ added in v0.0.25
SetAutomationID assigns stable IDs to the split view and its parts.
func (*SplitView) SetDividerColors ¶ added in v0.0.25
SetDividerColors configures normal, hover, and active divider colors.
func (*SplitView) SetDividerSize ¶ added in v0.0.25
SetDividerSize configures the divider thickness in pixels.
func (*SplitView) SetLeftView ¶
SetLeftView sets the leading (left/top) pane content.
func (*SplitView) SetLeftViewFixed ¶
SetLeftViewFixed preserves a fixed leading size across parent resizes.
func (*SplitView) SetMinimumSizes ¶ added in v0.0.25
SetMinimumSizes configures independent leading and trailing minima.
func (*SplitView) SetPosition ¶
SetPosition sets a ratio-based position and preserves that ratio on resize.
func (*SplitView) SetPositionPixels ¶ added in v0.0.25
SetPositionPixels sets the leading pane size in pixels.
func (*SplitView) SetPositionPolicy ¶ added in v0.0.25
func (sv *SplitView) SetPositionPolicy(policy PositionPolicy)
SetPositionPolicy changes resize behavior without changing current geometry.
func (*SplitView) SetResizable ¶
SetResizable enables or disables divider dragging.
func (*SplitView) SetRightView ¶
SetRightView sets the trailing (right/bottom) pane content.
func (*SplitView) SetRightViewFixed ¶
SetRightViewFixed preserves a fixed trailing size across parent resizes.
func (*SplitView) TrailingPane ¶ added in v0.0.25
TrailingPane returns the stable internal trailing-pane container.