The Pedigree Project  0.1
Public Types | Public Member Functions | Protected Types | Protected Attributes | Private Attributes | List of all members
Container Class Reference

#include <winman.h>

+ Inheritance diagram for Container:
+ Collaboration diagram for Container:

Public Types

enum  Layout { SideBySide, Stacked }
 
- Public Types inherited from WObject
enum  Type { Container, Window, Root }
 

Public Member Functions

 Container (WObject *pParent)
 
virtual Type getType () const
 
Layout getLayout () const
 
void setLayout (Layout newLayout)
 
::WindowgetFocusWindow () const
 
void setFocusWindow (::Window *w)
 
void addChild (WObject *pChild, bool bNoRetile=false)
 
void replaceChild (WObject *pChild, WObject *pNewChild)
 
void insertChild (WObject *pCurrent, WObject *pNewChild)
 
void removeChild (WObject *pChild)
 
size_t getChildCount () const
 
WObjectgetChild (size_t n) const
 
WObjectgetLeftSibling (const WObject *pChild) const
 
WObjectgetRightSibling (const WObject *pChild) const
 
WObjectgetLeftObject () const
 
WObjectgetRightObject () const
 
WObjectgetLeft (const WObject *obj) const
 
WObjectgetRight (const WObject *obj) const
 
WObjectgetUp (const WObject *obj) const
 
WObjectgetDown (const WObject *obj) const
 
void retile ()
 
WObjectgetParent () const
 
virtual void resize (ssize_t horizDistance, ssize_t vertDistance, WObject *pChild=0)
 
void render (cairo_t *cr)
 
virtual void norefresh ()
 Don't refresh the context on every reposition.
 
virtual void yesrefresh ()
 Refresh context on every reposition.
 
- Public Member Functions inherited from WObject
void reposition (size_t x=~0UL, size_t y=~0UL, size_t w=~0UL, size_t h=~0UL)
 
void bump (ssize_t bumpX=0, ssize_t bumpY=0)
 
virtual void resized ()
 
PedigreeGraphics::Rect getCopyDimensions () const
 

Protected Types

typedef std::vector< WObject * > WObjectList_t
 

Protected Attributes

std::vector< WObject * > m_Children
 

Private Attributes

WObjectm_pParent
 
Layout m_Layout
 
::Windowm_pFocusWindow
 

Additional Inherited Members

- Protected Member Functions inherited from WObject
void setDimensions (PedigreeGraphics::Rect &rt)
 
PedigreeGraphics::RectgetDimensions ()
 
virtual void refreshContext ()
 Refresh our graphical context, called after reposition.
 

Detailed Description

Container: contains windows (and other containers) and defines layout semantics, including management of the sizing of its own children.

Definition at line 314 of file winman.h.

Member Function Documentation

void Container::addChild ( WObject pChild,
bool  bNoRetile = false 
)
inline

Add a new child.

Definition at line 365 of file winman.h.

WObject* Container::getChild ( size_t  n) const
inline

Gets the nth child in the container.

Definition at line 456 of file winman.h.

size_t Container::getChildCount ( ) const
inline

Gets the number of children in the container.

Definition at line 448 of file winman.h.

WObject * Container::getDown ( const WObject obj) const

Gets the object below the given child, or 0 if no object is below the given child. This is a VISUAL below.

Definition at line 730 of file objects.cc.

References getDown().

Referenced by getDown().

+ Here is the caller graph for this function:

WObject * Container::getLeft ( const WObject obj) const

Gets the object to the left of the given child, or 0 if no object is to the left of the given child. This is a VISUAL left.

Definition at line 619 of file objects.cc.

References getLeft().

Referenced by getLeft().

+ Here is the caller graph for this function:

WObject * Container::getLeftObject ( ) const

Finds any object to our left, other than the root container. This is the left of the container itself.

Definition at line 609 of file objects.cc.

WObject * Container::getLeftSibling ( const WObject pChild) const

Finds the left sibling of the given child. Note that in the 'Stacked' layout, this is the container above the child, not the container to its left.

Definition at line 568 of file objects.cc.

WObject* Container::getParent ( ) const
inline

Parent of this container.

Definition at line 530 of file winman.h.

WObject * Container::getRight ( const WObject obj) const

Gets the object to the right of the given child, or 0 if no object is to the right of the given child. This is a VISUAL right.

Definition at line 656 of file objects.cc.

References getRight().

Referenced by getRight().

+ Here is the caller graph for this function:

WObject * Container::getRightObject ( ) const

Finds any object to our right, other than the root container. This is the right of the container itself.

Definition at line 614 of file objects.cc.

WObject * Container::getRightSibling ( const WObject pChild) const

Finds the right sibling of the given child. Note that in the 'Stacked' layout, this is the container below the child, not the container to its right.

Definition at line 588 of file objects.cc.

WObject * Container::getUp ( const WObject obj) const

Gets the object above the given child, or 0 if no object is above the given child. This is a VISUAL above.

Definition at line 693 of file objects.cc.

References getUp().

Referenced by getUp().

+ Here is the caller graph for this function:

void Container::insertChild ( WObject pCurrent,
WObject pNewChild 
)
inline

Inserts a child after the given child, or at the end if pCurrent is null.

Definition at line 402 of file winman.h.

void Container::removeChild ( WObject pChild)
inline

Removes the given child.

Definition at line 426 of file winman.h.

void Container::render ( cairo_t *  cr)
virtual

Render children

Reimplemented from WObject.

Definition at line 550 of file objects.cc.

References render().

Referenced by render().

+ Here is the caller graph for this function:

void Container::replaceChild ( WObject pChild,
WObject pNewChild 
)
inline

Replaces a child.

Definition at line 384 of file winman.h.

void Container::resize ( ssize_t  horizDistance,
ssize_t  vertDistance,
WObject pChild = 0 
)
virtual

Resize the entire container. A child might ask us to do this if it is resized horizontally and we are tiling Stacked, as it no longer fits inside our container.

Implements WObject.

Reimplemented in RootContainer.

Definition at line 466 of file objects.cc.

References resize().

Referenced by resize(), and RootContainer::resize().

+ Here is the caller graph for this function:

void Container::retile ( )

Taking our dimensions and layout into account, retile our children. This will resize and reposition children, which may cause them to retile also.

Definition at line 414 of file objects.cc.

References retile().

Referenced by retile().

+ Here is the caller graph for this function:


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