Crazy Eddies GUI System
0.6.2
|
Class that collects together a set of Event objects. More...
Inherited by CEGUI::GlobalEventSet, CEGUI::MouseCursor, CEGUI::Renderer, CEGUI::System, and CEGUI::Window.
Public Types | |
typedef ConstBaseIterator < EventMap > | Iterator |
Public Member Functions | |
EventSet () | |
Constructor for EventSet objects. | |
virtual | ~EventSet (void) |
Destructor for EventSet objects. | |
void | addEvent (const String &name) |
Add a new Event to the EventSet with the given name. More... | |
void | removeEvent (const String &name) |
Removes the Event with the given name. All connections to the event are disconnected. More... | |
void | removeAllEvents (void) |
Remove all Event objects from the EventSet. More... | |
bool | isEventPresent (const String &name) |
Checks to see if an Event with the given name is present in the EventSet. More... | |
virtual Event::Connection | subscribeEvent (const String &name, Event::Subscriber subscriber) |
Subscribes a handler to the named Event. If the named Event is not yet present in the EventSet, it is created and added. More... | |
virtual Event::Connection | subscribeEvent (const String &name, Event::Group group, Event::Subscriber subscriber) |
Subscribes a handler to the specified group of the named Event. If the named Event is not yet present in the EventSet, it is created and added. More... | |
virtual Event::Connection | subscribeScriptedEvent (const String &name, const String &subscriber_name) |
Subscribes the named Event to a scripted funtion. More... | |
virtual Event::Connection | subscribeScriptedEvent (const String &name, Event::Group group, const String &subscriber_name) |
Subscribes the specified group of the named Event to a scripted funtion. More... | |
virtual void | fireEvent (const String &name, EventArgs &args, const String &eventNamespace="") |
Fires the named event passing the given EventArgs object. More... | |
bool | isMuted (void) const |
Return whether the EventSet is muted or not. More... | |
void | setMutedState (bool setting) |
Set the mute state for this EventSet. More... | |
Iterator | getIterator (void) const |
Return a EventSet::Iterator object to iterate over the events currently added to the EventSet. | |
Protected Types | |
typedef std::map< String, Event *, String::FastLessCompare > | EventMap |
Protected Member Functions | |
Event * | getEventObject (const String &name, bool autoAdd=false) |
Return a pointer to the Event object with the given name, optionally adding such an Event object to the EventSet if it does not already exist. More... | |
void | fireEvent_impl (const String &name, EventArgs &args) |
Implementation event firing member. | |
EventSet (EventSet &e) | |
EventSet & | operator= (EventSet &e) |
Protected Attributes | |
EventMap | d_events |
bool | d_muted |
true if events for this EventSet have been muted. | |
Class that collects together a set of Event objects.
The EventSet is a means for code to attach a handler function to some named event, and later, for that event to be fired and the subscribed handler(s) called.
void CEGUI::EventSet::addEvent | ( | const String & | name | ) |
Add a new Event to the EventSet with the given name.
name | String object containing the name to give the new Event. The name must be unique for the EventSet. |
AlreadyExistsException | Thrown if an Event already exists named name. |
References isEventPresent().
Referenced by CEGUI::Tree::addTreeEvents(), and getEventObject().
|
virtual |
Fires the named event passing the given EventArgs object.
name | String object holding the name of the Event that is to be fired (triggered) |
args | The EventArgs (or derived) object that is to be bassed to each subscriber of the Event. Once all subscribers have been called the 'handled' field of the event is updated appropriately. |
eventNamespace | String object describing the global event namespace prefix for this event. |
Reimplemented in CEGUI::GlobalEventSet.
References CEGUI::GlobalEventSet::fireEvent(), fireEvent_impl(), and CEGUI::GlobalEventSet::getSingleton().
Referenced by CEGUI::ScrollablePane::handleAutoSizePaneChanged(), CEGUI::Window::onActivated(), CEGUI::Window::onAlphaChanged(), CEGUI::Window::onAlwaysOnTopChanged(), CEGUI::ScrolledContainer::onAutoSizeSettingChanged(), CEGUI::ScrollablePane::onAutoSizeSettingChanged(), CEGUI::Tree::onBranchClosed(), CEGUI::Tree::onBranchOpened(), CEGUI::Window::onCaptureGained(), CEGUI::Window::onCaptureLost(), CEGUI::Editbox::onCaratMoved(), CEGUI::MultiLineEditbox::onCaratMoved(), CEGUI::Combobox::onCaratMoved(), CEGUI::Window::onCharacter(), CEGUI::Window::onChildAdded(), CEGUI::Window::onChildRemoved(), CEGUI::ListHeaderSegment::onClickableSettingChanged(), CEGUI::PushButton::onClicked(), CEGUI::TabButton::onClicked(), CEGUI::MenuItem::onClicked(), CEGUI::Window::onClippingChanged(), CEGUI::FrameWindow::onCloseClicked(), CEGUI::ScrolledContainer::onContentChanged(), CEGUI::ScrollablePane::onContentPaneChanged(), CEGUI::ScrollablePane::onContentPaneScrolled(), CEGUI::Window::onDeactivated(), CEGUI::Window::onDestructionStarted(), CEGUI::Window::onDisabled(), CEGUI::Tooltip::onDisplayTimeChanged(), CEGUI::DragContainer::onDragAlphaChanged(), CEGUI::Window::onDragDropItemDropped(), CEGUI::Window::onDragDropItemEnters(), CEGUI::Window::onDragDropItemLeaves(), CEGUI::DragContainer::onDragDropTargetChanged(), CEGUI::DragContainer::onDragEnabledChanged(), CEGUI::DragContainer::onDragEnded(), CEGUI::DragContainer::onDragMouseCursorChanged(), CEGUI::ListHeader::onDragMoveSettingChanged(), CEGUI::DragContainer::onDragPositionChanged(), CEGUI::ListHeader::onDragSizeSettingChanged(), CEGUI::DragContainer::onDragStarted(), CEGUI::DragContainer::onDragThresholdChanged(), CEGUI::Combobox::onDropListDisplayed(), CEGUI::Combobox::onDroplistRemoved(), CEGUI::Editbox::onEditboxFullEvent(), CEGUI::MultiLineEditbox::onEditboxFullEvent(), CEGUI::Combobox::onEditboxFullEvent(), CEGUI::Window::onEnabled(), CEGUI::Tooltip::onFadeTimeChanged(), CEGUI::Window::onFontChanged(), CEGUI::Window::onHidden(), CEGUI::Window::onHorizontalAlignmentChanged(), CEGUI::ScrollablePane::onHorzScrollbarModeChanged(), CEGUI::MultiLineEditbox::onHorzScrollbarModeChanged(), CEGUI::Listbox::onHorzScrollbarModeChanged(), CEGUI::Tree::onHorzScrollbarModeChanged(), CEGUI::Combobox::onHorzScrollbarModeChanged(), CEGUI::MultiColumnList::onHorzScrollbarModeChanged(), CEGUI::Tooltip::onHoverTimeChanged(), CEGUI::Window::onIDChanged(), CEGUI::MouseCursor::onImageChanged(), CEGUI::Window::onInheritsAlphaChanged(), CEGUI::Editbox::onInvalidEntryAttempted(), CEGUI::Combobox::onInvalidEntryAttempted(), CEGUI::Window::onKeyDown(), CEGUI::Window::onKeyUp(), CEGUI::MultiColumnList::onListColumnMoved(), CEGUI::MultiColumnList::onListColumnSized(), CEGUI::ItemListBase::onListContentsChanged(), CEGUI::Listbox::onListContentsChanged(), CEGUI::Tree::onListContentsChanged(), CEGUI::Combobox::onListContentsChanged(), CEGUI::MultiColumnList::onListContentsChanged(), CEGUI::ComboDropList::onListSelectionAccepted(), CEGUI::Combobox::onListSelectionAccepted(), CEGUI::Combobox::onListSelectionChanged(), CEGUI::Editbox::onMaskCodePointChanged(), CEGUI::Editbox::onMaskedRenderingModeChanged(), CEGUI::Editbox::onMaximumTextLengthChanged(), CEGUI::MultiLineEditbox::onMaximumTextLengthChanged(), CEGUI::Combobox::onMaximumTextLengthChanged(), CEGUI::Spinner::onMaximumValueChanged(), CEGUI::Spinner::onMinimumValueChanged(), CEGUI::TabButton::onMouseButtonDown(), CEGUI::Window::onMouseButtonDown(), CEGUI::Window::onMouseButtonUp(), CEGUI::Window::onMouseClicked(), CEGUI::Window::onMouseDoubleClicked(), CEGUI::Window::onMouseEnters(), CEGUI::Window::onMouseLeaves(), CEGUI::TabButton::onMouseMove(), CEGUI::Window::onMouseMove(), CEGUI::Window::onMouseTripleClicked(), CEGUI::TabButton::onMouseWheel(), CEGUI::Window::onMouseWheel(), CEGUI::ListHeaderSegment::onMovableSettingChanged(), CEGUI::Window::onMoved(), CEGUI::Listbox::onMultiselectModeChanged(), CEGUI::Tree::onMultiselectModeChanged(), CEGUI::MultiColumnList::onNominatedSelectColumnChanged(), CEGUI::MultiColumnList::onNominatedSelectRowChanged(), CEGUI::Window::onParentDestroyChanged(), CEGUI::Window::onParentSized(), CEGUI::MenuBase::onPopupClosed(), CEGUI::MenuBase::onPopupOpened(), CEGUI::ProgressBar::onProgressChanged(), CEGUI::ProgressBar::onProgressDone(), CEGUI::Editbox::onReadOnlyChanged(), CEGUI::MultiLineEditbox::onReadOnlyChanged(), CEGUI::Combobox::onReadOnlyChanged(), CEGUI::Window::onRenderingEnded(), CEGUI::Window::onRenderingStarted(), CEGUI::FrameWindow::onRollupToggled(), CEGUI::Scrollbar::onScrollConfigChanged(), CEGUI::Scrollbar::onScrollPositionChanged(), CEGUI::ListHeader::onSegmentAdded(), CEGUI::ListHeaderSegment::onSegmentClicked(), CEGUI::ListHeader::onSegmentClicked(), CEGUI::ListHeaderSegment::onSegmentDragPositionChanged(), CEGUI::ListHeaderSegment::onSegmentDragStart(), CEGUI::ListHeaderSegment::onSegmentDragStop(), CEGUI::ListHeader::onSegmentOffsetChanged(), CEGUI::ListHeader::onSegmentRemoved(), CEGUI::ListHeader::onSegmentSequenceChanged(), CEGUI::ListHeaderSegment::onSegmentSized(), CEGUI::ListHeader::onSegmentSized(), CEGUI::ItemEntry::onSelectionChanged(), CEGUI::TabControl::onSelectionChanged(), CEGUI::Listbox::onSelectionChanged(), CEGUI::Tree::onSelectionChanged(), CEGUI::MultiColumnList::onSelectionChanged(), CEGUI::MultiColumnList::onSelectionModeChanged(), CEGUI::Checkbox::onSelectStateChange(), CEGUI::RadioButton::onSelectStateChanged(), CEGUI::Window::onShown(), CEGUI::Window::onSized(), CEGUI::ListHeaderSegment::onSizingSettingChanged(), CEGUI::ListHeader::onSortColumnChanged(), CEGUI::MultiColumnList::onSortColumnChanged(), CEGUI::ListHeaderSegment::onSortDirectionChanged(), CEGUI::ListHeader::onSortDirectionChanged(), CEGUI::MultiColumnList::onSortDirectionChanged(), CEGUI::ItemListBase::onSortEnabledChanged(), CEGUI::ItemListBase::onSortModeChanged(), CEGUI::Listbox::onSortModeChanged(), CEGUI::Tree::onSortModeChanged(), CEGUI::Combobox::onSortModeChanged(), CEGUI::ListHeader::onSortSettingChanged(), CEGUI::ListHeaderSegment::onSplitterDoubleClicked(), CEGUI::ListHeader::onSplitterDoubleClicked(), CEGUI::Spinner::onStepChanged(), CEGUI::Editbox::onTextAcceptedEvent(), CEGUI::Combobox::onTextAcceptedEvent(), CEGUI::Window::onTextChanged(), CEGUI::Spinner::onTextInputModeChanged(), CEGUI::Editbox::onTextInvalidatedEvent(), CEGUI::Combobox::onTextInvalidatedEvent(), CEGUI::Editbox::onTextSelectionChanged(), CEGUI::MultiLineEditbox::onTextSelectionChanged(), CEGUI::Combobox::onTextSelectionChanged(), CEGUI::Thumb::onThumbPositionChanged(), CEGUI::Thumb::onThumbTrackEnded(), CEGUI::Slider::onThumbTrackEnded(), CEGUI::Scrollbar::onThumbTrackEnded(), CEGUI::Thumb::onThumbTrackStarted(), CEGUI::Slider::onThumbTrackStarted(), CEGUI::Scrollbar::onThumbTrackStarted(), CEGUI::Tooltip::onTooltipActive(), CEGUI::Tooltip::onTooltipInactive(), CEGUI::Editbox::onValidationStringChanged(), CEGUI::Combobox::onValidationStringChanged(), CEGUI::Spinner::onValueChanged(), CEGUI::Slider::onValueChanged(), CEGUI::Window::onVerticalAlignmentChanged(), CEGUI::ScrollablePane::onVertScrollbarModeChanged(), CEGUI::MultiLineEditbox::onVertScrollbarModeChanged(), CEGUI::Listbox::onVertScrollbarModeChanged(), CEGUI::Tree::onVertScrollbarModeChanged(), CEGUI::Combobox::onVertScrollbarModeChanged(), CEGUI::MultiColumnList::onVertScrollbarModeChanged(), CEGUI::Window::onWindowRendererAttached(), CEGUI::Window::onWindowRendererDetached(), CEGUI::MultiLineEditbox::onWordWrapModeChanged(), CEGUI::Window::onZChanged(), CEGUI::DirectX9Renderer::setDisplaySize(), CEGUI::DirectX81Renderer::setDisplaySize(), CEGUI::DirectX10Renderer::setDisplaySize(), CEGUI::OpenGLRenderer::setDisplaySize(), CEGUI::IrrlichtRenderer::setDisplaySize(), and CEGUI::Window::update().
Return a pointer to the Event object with the given name, optionally adding such an Event object to the EventSet if it does not already exist.
References addEvent().
Referenced by fireEvent_impl(), and subscribeEvent().
bool CEGUI::EventSet::isEventPresent | ( | const String & | name | ) |
Checks to see if an Event with the given name is present in the EventSet.
Referenced by addEvent().
bool CEGUI::EventSet::isMuted | ( | void | ) | const |
Return whether the EventSet is muted or not.
References d_muted.
Referenced by CEGUI::Spinner::onTextInputModeChanged(), and CEGUI::Spinner::onValueChanged().
void CEGUI::EventSet::removeAllEvents | ( | void | ) |
void CEGUI::EventSet::removeEvent | ( | const String & | name | ) |
void CEGUI::EventSet::setMutedState | ( | bool | setting | ) |
Set the mute state for this EventSet.
setting |
References d_muted.
Referenced by CEGUI::Spinner::onTextInputModeChanged(), and CEGUI::Spinner::onValueChanged().
|
virtual |
Subscribes a handler to the named Event. If the named Event is not yet present in the EventSet, it is created and added.
name | String object containing the name of the Event to subscribe to. |
subscriber | Function or object that is to be subscribed to the Event. |
References getEventObject(), and CEGUI::Event::subscribe().
Referenced by CEGUI::TabControl::addButtonForTabContent(), CEGUI::TabControl::addTab(), CEGUI::ListHeader::createInitialisedSegment(), CEGUI::Tree::initialise(), CEGUI::FrameWindow::initialiseComponents(), CEGUI::Spinner::initialiseComponents(), CEGUI::ItemListbox::initialiseComponents(), CEGUI::ScrolledItemListBase::initialiseComponents(), CEGUI::Slider::initialiseComponents(), CEGUI::ItemListBase::initialiseComponents(), CEGUI::Scrollbar::initialiseComponents(), CEGUI::MultiLineEditbox::initialiseComponents(), CEGUI::Listbox::initialiseComponents(), CEGUI::ScrollablePane::initialiseComponents(), CEGUI::Combobox::initialiseComponents(), CEGUI::MultiColumnList::initialiseComponents(), CEGUI::ScrolledContainer::onChildAdded(), CEGUI::FalagardStaticText::onLookNFeelAssigned(), CEGUI::LuaScriptModule::subscribeEvent(), and CEGUI::System::System().
|
virtual |
Subscribes a handler to the specified group of the named Event. If the named Event is not yet present in the EventSet, it is created and added.
name | String object containing the name of the Event to subscribe to. |
group | Group which is to be subscribed to. Subscription groups are called in ascending order. |
subscriber | Function or object that is to be subscribed to the Event. |
References getEventObject(), and CEGUI::Event::subscribe().
|
virtual |
Subscribes the named Event to a scripted funtion.
name | String object containing the name of the Event to subscribe to. |
subscriber_name | String object containing the name of the script funtion that is to be subscribed to the Event. |
References CEGUI::System::getScriptingModule(), CEGUI::System::getSingletonPtr(), and CEGUI::ScriptModule::subscribeEvent().
|
virtual |
Subscribes the specified group of the named Event to a scripted funtion.
name | String object containing the name of the Event to subscribe to. |
group | Group which is to be subscribed to. Subscription groups are called in ascending order. |
subscriber_name | String object containing the name of the script funtion that is to be subscribed to the Event. |
References CEGUI::System::getScriptingModule(), CEGUI::System::getSingletonPtr(), and CEGUI::ScriptModule::subscribeEvent().