@code
void FunctionInAWorkerThread(const wxString& str)
{
- wxCommandEvent * const e = new wxCommandEvent;
+ wxCommandEvent* evt = new wxCommandEvent;
- // NOT e->SetString(str) as this would be a shallow copy
- e->SetString(str.c_str()); // make a deep copy
+ // NOT evt->SetString(str) as this would be a shallow copy
+ evt->SetString(str.c_str()); // make a deep copy
- wxTheApp->QueueEvent(new wxCommandEvent
+ wxTheApp->QueueEvent( evt );
}
@endcode
@param event
Event to process.
- @returns @true if a suitable event handler function was found and
+ @return @true if a suitable event handler function was found and
executed, and the function did not call wxEvent::Skip.
@see SearchEventTable()
@param event
Event to process.
- @returns @true if the event was processed, @false if no handler was found
+ @return @true if the event was processed, @false if no handler was found
or an exception was thrown.
@see wxWindow::HandleWindowEvent
@param event
Event to be matched against an event table entry.
- @returns @true if a suitable event handler function was found and
+ @return @true if a suitable event handler function was found and
executed, and the function did not call wxEvent::Skip.
@remarks This function looks through the object's event table and tries
int GetSelection() const;
/**
- Returns item string for a listbox or choice selection event (not valid for
- a deselection).
+ Returns item string for a listbox or choice selection event. If one
+ or several items have been deselected, returns the index of the first
+ deselected item. If some items have been selected and others deselected
+ at the same time, it will return the index of the first selected item.
*/
wxString GetString() const;
bool IsChecked() const;
/**
- For a listbox or similar event, returns @true if it is a selection, @false if it
- is a deselection.
+ For a listbox or similar event, returns @true if it is a selection, @false
+ if it is a deselection. If some items have been selected and others deselected
+ at the same time, it will return @true.
*/
bool IsSelection() const;