Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
UppHub
Status & Roadmap
FAQ
Authors & License
Forums
Funding U++
Search on this site











SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo

Splitter

 

class Splitter : public Ctrl

Splitter is a widget that contains two or more child widgets arranged either horizontally or vertically. User can then alter the distribution of area between individual widgets by dragging separator bars.

 

 

Public Method List

 

Callback WhenSplitFinish

Invoked after use has finished moving the split.

 


 

void Set(Ctrl& l, Ctrl& r)

Sets t splitter to contain two child widgets.

 


 

Splitter& SetPos(int newpos, int index = 0)

Sets the position of separator between widgets at index and index + 1. Units of newpos express ratio, 10000 is the full width or height.

 


 

int GetPos(int index = 0const

Returns the position of separator between widgets at index and index + 1.

 


 

int GetCount() const

Returns the number of child widgets.

 


 

int PosToClient(int posconst

Converts position (where full width or height is 10000) into view coordinate.

 


 

int ClientToPos(Point clientconst

Converts view coordinate (either x or y, based on orientaion) into position  (where full width or height is 10000).

 


 

void Zoom(int i)

Makes widget i to cover whole splitter area (other widgets are hidden).

 


 

void NoZoom()

Reverts to normal operation after Zoom.

 


 

int GetZoom() const

Returns the index of zoomed widget or negative value if none.  

 


 

void SetMin(int i, int w)

Sets the minimal width of widget  i to w * total width / 10000.

 


 

void SetMinPixels(int i, int w)

Sets the minimal width of widget  i to w pixels.

 


 

int GetSplitWidth() const

Width of spllitter handle in pixels.

 


 

Splitter& Vert()

Sets splitter to vertical mode - separator bars in this mode are horizontal. Returns *this.

 


 

Splitter& Horz()

Sets splitter to horizontal mode - separator bars in this mode are vertical. Returns *this.

 


 

virtual void Add(Ctrl& pane)

virtual Splitter& operator<<(Ctrl& pane)

Adds the new pane.

 


 

void Insert(int pos, Ctrl& pane)

Inserts a new pane at pos.

 


 

void Remove(Ctrl& pane)

Removes pane from splitter.

 


 

void Swap(Ctrl& pane, Ctrl& newpane)

Replaces pane with newpane .

 


 

Splitter& Horz(Ctrl& left, Ctrl& right)

Same as Set(left, right); return Vert();

 


 

Splitter& Vert(Ctrl& top, Ctrl& bottom)

Same as Set(top bottom); return Horz();

 


 

Splitter& BarWidth(int w)

Sets the width of separator bar to w.

 


 

bool IsHorz() const

bool IsVert() const

Tests whether Splitter is horizontal or vertical.

 


 

void Clear()

Removes panes from Splitter.

 


 

void Reset()

Resets Splitter to default state.

 

 

Do you want to contribute?