Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Attributes
Visualization::LayoutFormElement Class Reference

Base class for a layout element. More...

Inheritance diagram for Visualization::LayoutFormElement:
Visualization::FormElement

Public Member Functions

 LayoutFormElement ()=default
 
 LayoutFormElement (const LayoutFormElement &)=default
 
 ~LayoutFormElement ()
 
bool hasCursorWhenEmpty (Item *item)
 
bool noBoundaryCursors (Item *item)
 
bool noInnerCursors (Item *item)
 
bool notLocationEquivalentCursors (Item *item)
 
LayoutFormElementoperator= (const LayoutFormElement &)=delete
 
LayoutFormElementsetHasCursorWhenEmpty (std::function< bool(Item *item)> hasCursorWhenEmptyGetter)
 Sets a getter (hasCursorWhenEmptyGetter) for checking if the element should have cursors when empty dynamically while rendering. More...
 
LayoutFormElementsetNoBoundaryCursors (std::function< bool(Item *item)> noBoundaryCursorsGetter)
 Sets a getter (noBoundaryCursorsGetter) for checking if the element should not have any boundary cursors dynamically while rendering. More...
 
LayoutFormElementsetNoInnerCursors (std::function< bool(Item *item)> noInnerCursorsGetter)
 Sets a getter (noInnerCursorsGetter) for checking if the element should not have any inner cursors dynamically while rendering. More...
 
LayoutFormElementsetNotLocationEquivalentCursors (std::function< bool(Item *item)> notLocationEquivalentCursorsGetter)
 Sets a getter (notLocationEquivalentCursorsGetter) for checking if the element's cursors are not location equivalent dynamically while rendering. More...
 
- Public Member Functions inherited from Visualization::FormElement
 FormElement ()=default
 
 FormElement (const FormElement &other)
 
virtual ~FormElement ()
 
virtual QList< const Item *const DeclarativeItemBase::* > allHandledChildPointers ()
 Returns a list of all pointer to child items of this form. More...
 
virtual FormElementclone () const =0
 Copy this element and all its children into a new element tree. More...
 
FormElementcloneIfAlreadyUsed ()
 
virtual void computeSize (Item *item, int availableWidth, int availableHeight)=0
 Method called inside the item's updateGeometry method to compute it's size and position it's child elements. More...
 
virtual void destroyChildItems (Item *item, QList< const Item *const DeclarativeItemBase::* > handledChildren)
 This method is recursively called on all form elements to destroy all the information they might have about a specific item. More...
 
virtual bool elementOrChildHasFocus (Item *item) const
 Method called inside the item's elementOrChildHasFocus and by some layout form elements. More...
 
int height (Item *item) const
 Returns the cached height of this form element for the specified item. More...
 
virtual bool isEmpty (const Item *item) const
 Method called inside the item's isEmpty method, and by some layout form elements. More...
 
bool isFormRoot () const
 
FormElementoperator= (const FormElement &)=delete
 
FormElementparent () const
 
QPoint pos (Item *item) const
 Returns the cached position of this form element for the specified item. More...
 
virtual QList< ItemRegionregions (DeclarativeItemBase *item, int parentX=0, int parentY=0)
 Method called inside the item's regions method and returns cursor and item regions of all contained form elements for this item. More...
 
FormElementsetBottomMargin (int bottom)
 Sets the bottom margin of this form element. More...
 
FormElementsetFormRoot ()
 Sets this element to be a formRoot. More...
 
virtual void setItemPositions (Item *item, int parentX=0, int parentY=0)
 Method called inside the item's updateGeometry method to recursively position it's child items relative to the item's position. More...
 
FormElementsetLeftMargin (int left)
 Sets the left margin of this form element. More...
 
FormElementsetMargins (int left, int top, int right, int bottom)
 Sets the left, top, right and bottom margins to the respective values. More...
 
FormElementsetMargins (int margin)
 Sets all the margins of this form element to the value specified as margin. More...
 
void setPos (Item *item, const QPoint &position)
 Caches the position of this form element for the specified item. More...
 
FormElementsetRightMargin (int right)
 Sets the right margin of this form element. More...
 
FormElementsetTopMargin (int top)
 Sets the top margin of this form element. More...
 
virtual QList< FormElement * > shapeElements ()
 Returns the list of shape elements inside this form element. More...
 
QSize size (Item *item) const
 Returns the cached size of this form element for the specified item. More...
 
virtual bool sizeDependsOnParent (const Item *item) const =0
 Method called inside the item's sizeDependsOnParent method, and by some layout form elements. More...
 
virtual void synchronizeWithItem (Item *item)
 Method called inside the item's determineChildren method to let the form element and it's children update their information about items and nodes belonging to this item. More...
 
int width (Item *item) const
 Returns the cached width of this form element for the specified item. More...
 
int x (Item *item) const
 Returns the cached position on the x-axis of this form element for the specified item. More...
 
int xEnd (Item *item) const
 Returns the cached position on the x-axis where this form element ends for the specified item. More...
 
int y (Item *item) const
 Returns the cached position on the y-axis of this form element for the specified item. More...
 
int yEnd (Item *item) const
 Returns the cached position on the y-axis where this form element ends for the specified item. More...
 

Private Attributes

std::function< bool(Item *item)> hasCursorWhenEmptyGetter_ {}
 
std::function< bool(Item *item)> noBoundaryCursorsGetter_ {}
 
std::function< bool(Item *item)> noInnerCursorsGetter_ {}
 
std::function< bool(Item *item)> notLocationEquivalentCursorsGetter_ {}
 

Additional Inherited Members

- Protected Member Functions inherited from Visualization::FormElement
void addChild (FormElement *child)
 Adds a child to the list of children. More...
 
int bottomMargin ()
 Returns the bottom margin. More...
 
const QVector< FormElement * > & children () const
 Returns the list of children. More...
 
int leftMargin ()
 Returns the left margin. More...
 
void removeChild (FormElement *child)
 Removes a child from the list of children. More...
 
int rightMargin ()
 Returns the right margin. More...
 
void setSize (Item *item, const QSize &size)
 Caches the size of this form element for the specified item. More...
 
int topMargin ()
 Returns the top margin. More...
 

Detailed Description

Base class for a layout element.

Constructor & Destructor Documentation

◆ LayoutFormElement() [1/2]

Visualization::LayoutFormElement::LayoutFormElement ( )
default

◆ LayoutFormElement() [2/2]

Visualization::LayoutFormElement::LayoutFormElement ( const LayoutFormElement )
default

◆ ~LayoutFormElement()

Visualization::LayoutFormElement::~LayoutFormElement ( )
inline

Member Function Documentation

◆ hasCursorWhenEmpty()

bool Visualization::LayoutFormElement::hasCursorWhenEmpty ( Item item)
inline

◆ noBoundaryCursors()

bool Visualization::LayoutFormElement::noBoundaryCursors ( Item item)
inline

◆ noInnerCursors()

bool Visualization::LayoutFormElement::noInnerCursors ( Item item)
inline

◆ notLocationEquivalentCursors()

bool Visualization::LayoutFormElement::notLocationEquivalentCursors ( Item item)
inline

◆ operator=()

LayoutFormElement& Visualization::LayoutFormElement::operator= ( const LayoutFormElement )
delete

◆ setHasCursorWhenEmpty()

LayoutFormElement * Visualization::LayoutFormElement::setHasCursorWhenEmpty ( std::function< bool(Item *item)>  hasCursorWhenEmptyGetter)
inline

Sets a getter (hasCursorWhenEmptyGetter) for checking if the element should have cursors when empty dynamically while rendering.

◆ setNoBoundaryCursors()

LayoutFormElement * Visualization::LayoutFormElement::setNoBoundaryCursors ( std::function< bool(Item *item)>  noBoundaryCursorsGetter)
inline

Sets a getter (noBoundaryCursorsGetter) for checking if the element should not have any boundary cursors dynamically while rendering.

◆ setNoInnerCursors()

LayoutFormElement * Visualization::LayoutFormElement::setNoInnerCursors ( std::function< bool(Item *item)>  noInnerCursorsGetter)
inline

Sets a getter (noInnerCursorsGetter) for checking if the element should not have any inner cursors dynamically while rendering.

◆ setNotLocationEquivalentCursors()

LayoutFormElement * Visualization::LayoutFormElement::setNotLocationEquivalentCursors ( std::function< bool(Item *item)>  notLocationEquivalentCursorsGetter)
inline

Sets a getter (notLocationEquivalentCursorsGetter) for checking if the element's cursors are not location equivalent dynamically while rendering.

Member Data Documentation

◆ hasCursorWhenEmptyGetter_

std::function<bool(Item* item)> Visualization::LayoutFormElement::hasCursorWhenEmptyGetter_ {}
private

◆ noBoundaryCursorsGetter_

std::function<bool(Item* item)> Visualization::LayoutFormElement::noBoundaryCursorsGetter_ {}
private

◆ noInnerCursorsGetter_

std::function<bool(Item* item)> Visualization::LayoutFormElement::noInnerCursorsGetter_ {}
private

◆ notLocationEquivalentCursorsGetter_

std::function<bool(Item* item)> Visualization::LayoutFormElement::notLocationEquivalentCursorsGetter_ {}
private