(Up to GLayout)

GSplitter

The splitter object takes up all the remaining space in a container and has two panes. The split between the panes can be resized by the user. Any window can be drawn in each pane, if no window is added then a blank space is drawn.

The window that gets added as a splitter pane with have it's Pour() function called when the size and position of the pane changes. This allows you to add Gview type objects into the pane and have them resize properly.


class GSplitter :
    public GLayout
{
public:
    // Properties
    bool DoesSplitFollow()
    bool IsVertical()
    int Split(int i)
    int Split()
    void DoesSplitFollow(bool i)
    void IsVertical(bool i)

    // Views
    GWindow *GetViewA()
    GWindow *GetViewB()
    void SetViewA(GWindow *a, bool Border = true)
    void SetViewB(GWindow *b, bool Border = true)
};

GSplitter::DoesSplitFollow

bool DoesSplitFollow()

returns whether the split follows the right/bottom.


GSplitter::IsVertical

bool IsVertical()

returns whether the split is vertical.


GSplitter::Split

int Split(int i)

Argument Description
int i Pixels from the top / left hand side that the split should be. Use negitive coordinates from the bottom / right hand side.

Sets the split's position.


GSplitter::Split

int Split()

Get the split's position.


GSplitter::DoesSplitFollow

void DoesSplitFollow(bool i)

Argument Description
bool i split position follows the bottom/right side.

Set the split following behaviour.


GSplitter::IsVertical

void IsVertical(bool i)

Argument Description
bool i

Sets the split to be vertical or not.


GSplitter::GetViewA

GWindow *GetViewA()

Returns the view in the top/left pane.


GSplitter::GetViewB

GWindow *GetViewB()

returns the view in the bottom / right pane.


GSplitter::SetViewA

void SetViewA(GWindow *a, bool Border = true)

Argument Description
GWindow *a Window to insert in first pane.
bool Border = true true to draw a border around the window.

Sets the first (top/left most) view.


GSplitter::SetViewB

void SetViewB(GWindow *b, bool Border = true)

Argument Description
GWindow *b Window to insert into the view.
bool Border = true true to draw a border around the view.

Sets the second (bottom/right most) view.


Built: 13/9/2001 2:28:30 PM
© 2001 Matthew Allen
Lgi HomePage