UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
ZqbPixGroup Class Reference

#include <zqb_pixgroup.hpp>

Inheritance diagram for ZqbPixGroup:
ZqbPixGrpControl ZqbAutoName ZqbPixGrpControl ZqbAutoName ZqbName ZqbName ZqbName ZqbName

Public Member Functions

 ZqbPixGroup (const char *szGrpName=NULL)
 
virtual ~ZqbPixGroup ()
 
void updateHint ()
 
virtual int getSize () const
 
virtual int getCoord () const
 
virtual void getCoords (int c[2]) const
 
virtual bool setCoords (int c[2])
 
virtual bool setCoord (int c)
 
virtual bool setSize (int d)
 
virtual ZqbSizeHint getHint () const
 
virtual int getHintLimit () const
 
virtual bool isPlaced () const
 
virtual void setPlaced (bool bFlag)
 
const char * getParentGroup () const
 
void setParentGroup (const char *szParentGrpName)
 
float getWeight () const
 
void setWeight (float fWeight)
 
void addMember (ZqbPixGrpMember *pMember)
 
void removeMember (ZqbPixGrpMember *pMember)
 
void setSpace (int iSpace)
 
int getSpace () const
 
void setMargin (int iMargin)
 
int getMargin () const
 
 ZqbPixGroup (const char *szGrpName=NULL)
 
virtual ~ZqbPixGroup ()
 
void updateHint ()
 
virtual int getSize () const
 
virtual int getCoord () const
 
virtual void getCoords (int c[2]) const
 
virtual bool setCoords (int c[2])
 
virtual bool setCoord (int c)
 
virtual bool setSize (int d)
 
virtual ZqbSizeHint getHint () const
 
virtual int getHintLimit () const
 
virtual bool isPlaced () const
 
virtual void setPlaced (bool bFlag)
 
const char * getParentGroup () const
 
void setParentGroup (const char *szParentGrpName)
 
float getWeight () const
 
void setWeight (float fWeight)
 
void addMember (ZqbPixGrpMember *pMember)
 
void removeMember (ZqbPixGrpMember *pMember)
 
void setSpace (int iSpace)
 
int getSpace () const
 
void setMargin (int iMargin)
 
int getMargin () const
 
- Public Member Functions inherited from ZqbPixGrpControl
virtual ~ZqbPixGrpControl ()
 
bool isInside (int c) const
 
virtual ~ZqbPixGrpControl ()
 
bool isInside (int c) const
 
- Public Member Functions inherited from ZqbAutoName
 ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL)
 
virtual ~ZqbAutoName ()
 
 ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL)
 
virtual ~ZqbAutoName ()
 
- Public Member Functions inherited from ZqbName
 ZqbName (const char *szRoot, const char *szCustomName=NULL)
 
 ZqbName (const ZqbName &name)
 
virtual ~ZqbName ()
 
ZqbNameoperator= (const ZqbName &name)
 
virtual const char * getName () const
 
virtual const char * getType () const
 
bool hasName (const char *szString) const
 
 ZqbName (const char *szRoot, const char *szCustomName=NULL)
 
 ZqbName (const ZqbName &name)
 
virtual ~ZqbName ()
 
ZqbNameoperator= (const ZqbName &name)
 
virtual const char * getName () const
 
virtual const char * getType () const
 
bool hasName (const char *szString) const
 

Protected Attributes

int m_iCoords [2]
 
ZqbSizeHint m_eGrpHint
 
int m_iGrpHintLimit
 
ZqbPixGrpMembers m_Members
 
bool m_bPlaced
 
char * m_szParentGrpName
 
float m_fWeightFactor
 
int m_iNestedSpace
 
int m_iNestedMargin
 
- Protected Attributes inherited from ZqbName
char * m_szName
 
char * m_szRoot
 

Detailed Description

Object for centralized one dimensional geometry management for group of visible objects.

Implements so called "pixel group" abstraction. A group may have several attached objects which have the same size and location on the screen. So, coordinates are stored in the group object and all attached objects use them. It's supposed that some external manager manipulates geometry of all grouped objects by means of the group.

In addition to coordinates objects may provide information about desirable size setting policy. So, some object may have arbitrary size, some can't elapse less than some size, some should have fixed size. This information is so called "size hint". Size hint information is composed from size hint itself (see ZqbSizeHint) and size hint limitation value (for minimum or fixed size).

Group always has a parent group and the weight. All groups with the same parent obtain size in proportion to their weight (regarding size hint, of course).

Constructor & Destructor Documentation

ZqbPixGroup::ZqbPixGroup ( const char *  szGrpName = NULL)

Create empty group with given name. In case of NULL name automatic name will be generated.

virtual ZqbPixGroup::~ZqbPixGroup ( )
virtual

Destroy the object.

ZqbPixGroup::ZqbPixGroup ( const char *  szGrpName = NULL)

Create empty group with given name. In case of NULL name automatic name will be generated.

virtual ZqbPixGroup::~ZqbPixGroup ( )
virtual

Destroy the object.

Member Function Documentation

void ZqbPixGroup::addMember ( ZqbPixGrpMember pMember)

Add one more group member. This operation is performed automatically in ZqbPixGrpMember constructor.

void ZqbPixGroup::addMember ( ZqbPixGrpMember pMember)

Add one more group member. This operation is performed automatically in ZqbPixGrpMember constructor.

virtual int ZqbPixGroup::getCoord ( ) const
virtual

Return screen location of the group.

Implements ZqbPixGrpControl.

virtual int ZqbPixGroup::getCoord ( ) const
virtual

Return screen location of the group.

Implements ZqbPixGrpControl.

virtual void ZqbPixGroup::getCoords ( int  c[2]) const
virtual

Return coordinates of the group.

Implements ZqbPixGrpControl.

virtual void ZqbPixGroup::getCoords ( int  c[2]) const
virtual

Return coordinates of the group.

Implements ZqbPixGrpControl.

virtual ZqbSizeHint ZqbPixGroup::getHint ( ) const
virtual

Return size hint of the group. It's calculated on the basis of attached object hints in updateHint().

Implements ZqbPixGrpControl.

virtual ZqbSizeHint ZqbPixGroup::getHint ( ) const
virtual

Return size hint of the group. It's calculated on the basis of attached object hints in updateHint().

Implements ZqbPixGrpControl.

virtual int ZqbPixGroup::getHintLimit ( ) const
virtual

Return hint limitation size (meaningful for Z_SH_MIN_SIZE and Z_SH_FIXED_SIZE hints). It's calculated on the basis of attached object hints in updateHint().

Implements ZqbPixGrpControl.

virtual int ZqbPixGroup::getHintLimit ( ) const
virtual

Return hint limitation size (meaningful for Z_SH_MIN_SIZE and Z_SH_FIXED_SIZE hints). It's calculated on the basis of attached object hints in updateHint().

Implements ZqbPixGrpControl.

int ZqbPixGroup::getMargin ( ) const

Get number of pixels placed before first and after last group.

int ZqbPixGroup::getMargin ( ) const

Get number of pixels placed before first and after last group.

const char* ZqbPixGroup::getParentGroup ( ) const

Return name of the parent group or "" if not set.

const char* ZqbPixGroup::getParentGroup ( ) const

Return name of the parent group or "" if not set.

virtual int ZqbPixGroup::getSize ( ) const
virtual

Return screen size of the group.

Implements ZqbPixGrpControl.

virtual int ZqbPixGroup::getSize ( ) const
virtual

Return screen size of the group.

Implements ZqbPixGrpControl.

int ZqbPixGroup::getSpace ( ) const

Get number of pixels placed between children groups.

int ZqbPixGroup::getSpace ( ) const

Get number of pixels placed between children groups.

float ZqbPixGroup::getWeight ( ) const

Return relative weight of this group size among other brother groups.

float ZqbPixGroup::getWeight ( ) const

Return relative weight of this group size among other brother groups.

virtual bool ZqbPixGroup::isPlaced ( ) const
virtual

Return true if the group is placed (has assigned coordinates by setCoords).

Implements ZqbPixGrpControl.

virtual bool ZqbPixGroup::isPlaced ( ) const
virtual

Return true if the group is placed (has assigned coordinates by setCoords).

Implements ZqbPixGrpControl.

void ZqbPixGroup::removeMember ( ZqbPixGrpMember pMember)

Remove pointed group member. This operation is performed automatically in ZqbPixGrpMember destructor.

void ZqbPixGroup::removeMember ( ZqbPixGrpMember pMember)

Remove pointed group member. This operation is performed automatically in ZqbPixGrpMember destructor.

virtual bool ZqbPixGroup::setCoord ( int  c)
virtual

Change screen location of the group. Return true if screen location was really changed and false otherwise.

Implements ZqbPixGrpControl.

virtual bool ZqbPixGroup::setCoord ( int  c)
virtual

Change screen location of the group. Return true if screen location was really changed and false otherwise.

Implements ZqbPixGrpControl.

virtual bool ZqbPixGroup::setCoords ( int  c[2])
virtual

Change screen location and size of group. Return true if coordinates were really changed and false otherwise.

Implements ZqbPixGrpControl.

virtual bool ZqbPixGroup::setCoords ( int  c[2])
virtual

Change screen location and size of group. Return true if coordinates were really changed and false otherwise.

Implements ZqbPixGrpControl.

void ZqbPixGroup::setMargin ( int  iMargin)

Assign number of pixels placed before first and after last group.

void ZqbPixGroup::setMargin ( int  iMargin)

Assign number of pixels placed before first and after last group.

void ZqbPixGroup::setParentGroup ( const char *  szParentGrpName)

Set name of the parent group.

void ZqbPixGroup::setParentGroup ( const char *  szParentGrpName)

Set name of the parent group.

virtual void ZqbPixGroup::setPlaced ( bool  bFlag)
virtual

Set or unset placed flag.

Implements ZqbPixGrpControl.

virtual void ZqbPixGroup::setPlaced ( bool  bFlag)
virtual

Set or unset placed flag.

Implements ZqbPixGrpControl.

virtual bool ZqbPixGroup::setSize ( int  d)
virtual

Change screen size of the group. Return true if screen size was really changed and false otherwise.

Implements ZqbPixGrpControl.

virtual bool ZqbPixGroup::setSize ( int  d)
virtual

Change screen size of the group. Return true if screen size was really changed and false otherwise.

Implements ZqbPixGrpControl.

void ZqbPixGroup::setSpace ( int  iSpace)

Assign number of pixels placed between children groups.

void ZqbPixGroup::setSpace ( int  iSpace)

Assign number of pixels placed between children groups.

void ZqbPixGroup::setWeight ( float  fWeight)

Set relative weight of this group which will be used in placement operations.

void ZqbPixGroup::setWeight ( float  fWeight)

Set relative weight of this group which will be used in placement operations.

void ZqbPixGroup::updateHint ( )

Recalculate new values for getHint() and getHintLimit() on the basis of actual size hints, returned by objects.

void ZqbPixGroup::updateHint ( )

Recalculate new values for getHint() and getHintLimit() on the basis of actual size hints, returned by objects.

Member Data Documentation

bool ZqbPixGroup::m_bPlaced
protected

true enables coordinates usage. In case of false coordinates are wrong and don't correspond to right position on the screen.

ZqbSizeHint ZqbPixGroup::m_eGrpHint
protected

Group size hint kind.

float ZqbPixGroup::m_fWeightFactor
protected

Weight factor of this group used in placement operations.

int ZqbPixGroup::m_iCoords
protected

Actual coordinates of the group.

int ZqbPixGroup::m_iGrpHintLimit
protected

Group size hint limitation value in pixels.

int ZqbPixGroup::m_iNestedMargin
protected

Margin around children groups of this group.

int ZqbPixGroup::m_iNestedSpace
protected

Space between children groups of this group.

ZqbPixGrpMembers ZqbPixGroup::m_Members
protected

List of group memebers.

char * ZqbPixGroup::m_szParentGrpName
protected

Name of the parent group.


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