mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:55:08 +00:00
CObject: Add custom_event() virtual.
This way you can just override custom_event() to catch CCustomEvent instead of having to filter the entire event stream with event(). :^)
This commit is contained in:
parent
1ecb7462b7
commit
a634fab3c4
2 changed files with 8 additions and 0 deletions
|
@ -37,6 +37,8 @@ void CObject::event(CEvent& event)
|
|||
case CEvent::Invalid:
|
||||
ASSERT_NOT_REACHED();
|
||||
break;
|
||||
case CEvent::Custom:
|
||||
return custom_event(static_cast<CCustomEvent&>(event));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -70,6 +72,10 @@ void CObject::child_event(CChildEvent&)
|
|||
{
|
||||
}
|
||||
|
||||
void CObject::custom_event(CCustomEvent&)
|
||||
{
|
||||
}
|
||||
|
||||
void CObject::start_timer(int ms)
|
||||
{
|
||||
if (m_timer_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue