UNIVERS
15.3
UNIVERS base processing software API
|
#include <zqb_pixgroup.hpp>
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 () |
ZqbName & | operator= (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 () |
ZqbName & | operator= (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 |
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).
ZqbPixGroup::ZqbPixGroup | ( | const char * | szGrpName = NULL | ) |
Create empty group with given name. In case of NULL name automatic name will be generated.
|
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 |
Destroy the object.
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 |
Return screen location of the group.
Implements ZqbPixGrpControl.
|
virtual |
Return screen location of the group.
Implements ZqbPixGrpControl.
|
virtual |
Return coordinates of the group.
Implements ZqbPixGrpControl.
|
virtual |
Return coordinates of the group.
Implements ZqbPixGrpControl.
|
virtual |
Return size hint of the group. It's calculated on the basis of attached object hints in updateHint().
Implements ZqbPixGrpControl.
|
virtual |
Return size hint of the group. It's calculated on the basis of attached object hints in updateHint().
Implements ZqbPixGrpControl.
|
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 |
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 |
Return screen size of the group.
Implements ZqbPixGrpControl.
|
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 |
Return true if the group is placed (has assigned coordinates by setCoords).
Implements ZqbPixGrpControl.
|
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 |
Change screen location of the group. Return true if screen location was really changed and false otherwise.
Implements ZqbPixGrpControl.
|
virtual |
Change screen location of the group. Return true if screen location was really changed and false otherwise.
Implements ZqbPixGrpControl.
|
virtual |
Change screen location and size of group. Return true if coordinates were really changed and false otherwise.
Implements ZqbPixGrpControl.
|
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 |
Set or unset placed flag.
Implements ZqbPixGrpControl.
|
virtual |
Set or unset placed flag.
Implements ZqbPixGrpControl.
|
virtual |
Change screen size of the group. Return true if screen size was really changed and false otherwise.
Implements ZqbPixGrpControl.
|
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.
|
protected |
true enables coordinates usage. In case of false coordinates are wrong and don't correspond to right position on the screen.
|
protected |
Group size hint kind.
|
protected |
Weight factor of this group used in placement operations.
|
protected |
Actual coordinates of the group.
|
protected |
Group size hint limitation value in pixels.
|
protected |
Margin around children groups of this group.
|
protected |
Space between children groups of this group.
|
protected |
List of group memebers.
|
protected |
Name of the parent group.