PCSX2 Documentation/WxWidgets Coding Strategies: Difference between revisions

Jump to navigation Jump to search
Line 85: Line 85:
     wxPostEvent( myWidget->GetEventHandler(), evt );
     wxPostEvent( myWidget->GetEventHandler(), evt );
</nowiki>
</nowiki>
... So the moral of the story is: Use `GetEventHandler()` when possible (basically anything except the `wxApp` object), and use `AddPendingEvent()` unless you need a return code _and_ know you're on the main GUI thread.
... So the moral of the story is: Use <code>GetEventHandler()</code> when possible (basically anything except the <code>wxApp</code> object), and use <code>AddPendingEvent()</code> unless you need a return code ''and'' know you're on the main GUI thread.


==Guidelines when Using Windows/Linux Specific Code==
==Guidelines when Using Windows/Linux Specific Code==