Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

GLayout Class Reference

A GView with scroll bars. More...

#include <LgiClasses.h>

Inheritance diagram for GLayout:

GView GTarget GEvent GFlags GDocView GDropDown GList GProgressPane GSplitter GTableLayout GToolBar GTree List of all members.

Public Member Functions

virtual void GetScrollPos (int &x, int &y)
 Gets the current scroll bar values.
virtual void SetScrollPos (int x, int y)
 Sets the current scroll bar values.
bool GetPourLargest ()
 Gets the "pour largest" setting.
void SetPourLargest (bool i)
 Sets the "pour largest" setting.
int OnEvent (GMessage *Msg)
 Handles the incoming events.
bool Pour (GRegion &r)
bool Attach (GView *p)
 Attaches the view to a parent view.
GRectGetClient ()
 Get the client region of the window relitive to itself (ie always 0,0-x,y).
void OnPosChange ()
 Called when the view position changes.
int OnNotify (GView *c, int f)
 Called when a child view or view with it's SetNotify() set to this window changes.

Protected Member Functions

virtual bool SetScrollBars (bool x, bool y)
 Sets which of the scroll bars is visible.

Protected Attributes

GScrollBarVScroll
 The vertical scroll bar.
GScrollBarHScroll
 The horizontal scroll bar.

Detailed Description

A GView with scroll bars.

This class adds scroll bars to the standard GView base class. The scroll bars can be directly accessed using the VScroll and HScroll member variables. Although you should always do a NULL check on the pointer before using, if the scroll bar is not activated using GLayout::SetScrollBars then VScroll and/or HScroll will by NULL. When the scroll bar is used to scroll the GLayout control you will receive an event on GView::OnNotify with the control ID of the scrollbar, which is either IDC_VSCROLL or IDC_HSCROLL.


Member Function Documentation

bool GLayout::Attach GView 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 GView.

Reimplemented in GSplitter.

int GLayout::OnNotify GView c,
int  f
[virtual]
 

Called when a child view or view with it's SetNotify() set to this window changes.

The event by default will bubble up to the GWindow at the top of the window heirarchy visiting each GView on the way. If it reaches a GView that processes it then the event stops propergating up the heirarchy.

Reimplemented from GView.

Reimplemented in GHtml, GList, GDropDown, GProgressPane, GTextView3, and GTree.

bool GLayout::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 GView.

Reimplemented in GProgressPane, GToolBar, and GSplitter.

void GLayout::SetPourLargest bool  i  ) 
 

Sets the "pour largest" setting.

When "pour largest" is switched on the pour function automatically lays the control into the largest rectangle available. This is useful for putting a single GView into a splitter pane or a tab view and having it just take up all the space.

bool GLayout::SetScrollBars bool  x,
bool  y
[protected, virtual]
 

Sets which of the scroll bars is visible.

Parameters:
x  Make the horizontal scroll bar visible
y  Make the vertical scroll bar visible


The documentation for this class was generated from the following files:
Generated on Wed Oct 26 14:47:00 2005 for Lgi by  doxygen 1.4.1