| 135 | UCHAR **GuiControlType::sRaisesEvents = ConstructEventSupportArray(); |
| 136 | |
| 137 | bool GuiControlType::SupportsEvent(GuiEventType aEvent) |
| 138 | { |
| 139 | if (UCHAR *this_raises = sRaisesEvents[type]) |
| 140 | { |
| 141 | for (;; ++this_raises) |
| 142 | { |
| 143 | if (*this_raises == aEvent) |
| 144 | return true; |
| 145 | if (!*this_raises) // Checked after aEvent, as it will often be the first item in the array. |
| 146 | break; |
| 147 | } |
| 148 | } |
| 149 | if (aEvent == GUI_EVENT_CONTEXTMENU) |
| 150 | return true; // All controls implicitly support this. |
| 151 | return false; |
| 152 | } |
| 153 | |
| 154 | |
| 155 | // Helper function used to convert a token to an Array object. |
nothing calls this directly
no outgoing calls
no test coverage detected