PLaSK library
|
Event class for events types: EVENT_CHILDREN_INSERT and EVENT_CHILDREN_REMOVE. More...
#include <plask/geometry/object.hpp>
Public Member Functions | |
ChildrenListChangedEvent (GeometryObject *source, FlagsType flags, const std::size_t beginIndex, const std::size_t endIndex) | |
Public Member Functions inherited from plask::GeometryObject::Event | |
FlagsType | flagsForParent () const |
Get event's flags for parent in tree of geometry (useful to calculate flags for event which should be generated by parent of object which is a source of this event). | |
FlagsType | flagsForParentWithChildrenWasChangedInformation () const |
Get event's flags for parent in tree of geometry, for parents which want to delegate information about changes of children list. | |
bool | hasFlag (Flags flag) const |
Check if given flag is set. | |
bool | isDelete () const |
Check if EVENT_DELETE flag is set, which mean that source of event is deleted. | |
bool | isResize () const |
Check if EVENT_RESIZE flag is set, which mean that source of event could be resized. | |
bool | isDelgatedFromChild () const |
Check if EVENT_DELEGATED flag is set, which mean that source delegate event from its child. | |
bool | hasChangedChildrenList () const |
Check if CHILD_LIST flag is set, which mean that children list of source could be changed. | |
bool | hasChangedEdges () const |
Check if EVENT_EDGES flag is set, which mean that edges connected with source could changed. | |
const GeometryObject * | originalSource () const |
Get original source of event which can differ from source if event was delegated. | |
Event (GeometryObject *source, FlagsType flags=0) | |
Construct event. | |
Event (GeometryObject *source, const GeometryObject *originalSource, FlagsType flags) | |
Construct event. | |
Public Member Functions inherited from plask::EventWithSourceAndFlags< GeometryObject, unsigned > | |
const GeometryObject * | source () const |
Get source of event. | |
GeometryObject * | source () |
Get source of event. | |
const T * | source () const |
Get source of event casted (using dynamic_cast) to given type T. | |
T * | source () |
Get source of event casted (using dynamic_cast) to given type T. | |
FlagsType | flags () const |
Get event's flags. | |
FlagsType | flagsWithout (FlagsType flagsToRemove) const |
Get event's flags with excluded flagsToRemove . | |
bool | hasAllFlags (FlagsType flags) const |
Check if given all of flags are set. | |
bool | hasAnyFlag (FlagsType flags) const |
Check if one of given flags are set. | |
EventWithSourceAndFlags (GeometryObject *source, FlagsType flags=0) | |
Construct event. | |
virtual | ~EventWithSourceAndFlags () |
Virtual destructor for eventual subclassing. | |
Public Attributes | |
const std::size_t | beginIndex |
Index of first child which was changed. | |
const std::size_t | endIndex |
Index of last children which was changed incremented by 1. | |
Additional Inherited Members | |
Public Types inherited from plask::GeometryObject::Event | |
enum | Flags : FlagsType { EVENT_DELETE = 1 << 0 , EVENT_RESIZE = 1 << 1 , EVENT_DELEGATED = 1 << 2 , EVENT_CHILDREN_INSERT = 1 << 3 , EVENT_CHILDREN_REMOVE = 1 << 4 , EVENT_CHILDREN_GENERIC = 1 << 5 , EVENT_EDGES , EVENT_STEPS = 1 << 7 , EVENT_USER_DEFINED = 1 << 8 } |
Event flags (which describes event properties). More... | |
Public Types inherited from plask::EventWithSourceAndFlags< GeometryObject, unsigned > | |
typedef unsigned | FlagsType |
Event class for events types: EVENT_CHILDREN_INSERT and EVENT_CHILDREN_REMOVE.
Provides extra information about changes: first and last index.
Definition at line 214 of file object.hpp.
|
inline |
Definition at line 217 of file object.hpp.
const std::size_t plask::GeometryObject::ChildrenListChangedEvent::beginIndex |
Index of first child which was changed.
Definition at line 224 of file object.hpp.
const std::size_t plask::GeometryObject::ChildrenListChangedEvent::endIndex |
Index of last children which was changed incremented by 1.
Definition at line 227 of file object.hpp.