GSplitter Class Reference

Displays 2 views side by side. More...

#include <LgiClasses.h>

Inheritance diagram for GSplitter:

GLayout GView

List of all members.

Public Member Functions

char * GetClass ()
int64 Value ()
 Get the position of the split in px.
void Value (int64 i)
 Sets the position of the split.
bool IsVertical ()
 True if the split is vertical.
void IsVertical (bool v)
 Sets the split to horizontal or vertical.
bool DoesSplitFollow ()
 True if the split follows the opposite.
void DoesSplitFollow (bool i)
 Sets the split to follow the opposite.
GViewGetViewA ()
 Return the left/top view.
void DetachViewA ()
 Detach the left/top view.
void SetViewA (GView *a, bool Border=true)
 Sets the left/top view.
GViewGetViewB ()
 Return the right/bottom view.
void DetachViewB ()
 Detach the right/bottom view.
void SetViewB (GView *b, bool Border=true)
 Sets the right/bottom view.
int BarSize ()
 Get the size of the bar that splits the views.
void BarSize (int i)
 Set the bar size.
GViewI * FindControl (OsView hCtrl)
 Find a view by it's os handle.
bool Attach (GViewI *p)
 Attaches the view to a parent view.
bool Pour (GRegion &r)
void OnPaint (GSurface *pDC)
 Called to paint the onscreen representation of the view.
void OnPosChange ()
 Called when the view position changes.
void OnMouseClick (GMouse &m)
 The mouse was clicked over this view.
void OnMouseMove (GMouse &m)
 The mouse moves over the control.
void OnMouseExit (GMouse &m)
 Mouse leaves the area over the control.
int OnHitTest (int x, int y)
void OnChildrenChanged (GViewI *Wnd, bool Attaching)
 Called when the contents of the Children list have changed.

Detailed Description

Displays 2 views side by side.

Member Function Documentation

bool GSplitter::Attach ( GViewI *  p  )  [virtual]

Attaches the view to a parent view.

Each GView starts in an un-attached state. When you attach it to a Parent GView the view gains a OS-specific handle and becomes visible on the screen (if the Visible() property is TRUE). However if a view is inserted into the Children list of a GView and it's parent pointer is set correctly it will still paint on the screen without the OS knowing about it. This is known in Lgi as a "virtual window" and is primarily used to cut down on windowing resources. Mouse clicks are handled by the parent window and passed down to the virtual children. Virtual children are somewhat limited. They can't receive focus, or participate in drag and drop operations. If you want to see an example have a look at the GToolBar code.

Reimplemented from GLayout.

char* GSplitter::GetClass (  )  [inline]

The class' name. Should be overriden in child classes to return the right class name. Mostly used for debugging, but in the win32 port it is also the default WIN32 class name passed to RegisterClass() in GView::CreateClass().

the Class' name for debugging

Reimplemented from GLayout.

int GSplitter::OnHitTest ( int  x,
int  y 

Return the type of cursor that should be visible when the mouse is at x,y e.g. LCUR_Normal

Reimplemented from GView.

bool GSplitter::Pour ( GRegion r  )  [virtual]

Lay out all the children views into the client area according to their own internal rules. Space is given in a first come first served basis.

Reimplemented from GLayout.

The documentation for this class was generated from the following files:

Generated on Wed Dec 1 15:41:04 2010 for Lgi by  doxygen