void App::eventMac(const wxString & fileName) { wxCommandEvent tEvent(wxEventFwOpen, wxIDEventFwOpen); tEvent.SetString( fileName ); tEvent.SetEventObject( this ); wxFrame *frame = wxDynamicCast( wxTheApp->GetTopWindow() , wxFrame ) ; if (frame != NULL) frame->GetEventHandler()->ProcessEvent( tEvent ); else SLM_FATAL ("Window not found !") }
std::vector<Event>& s_wEvent::eventGen(std::vector<Event>& ReturnValue){ Event tBase=Base; int SubDiv=ceil(double(tBase.Length)/double(subLength)); //that line is horrible, I'll look at that later, maybe. for(int i=1;i<=SubDiv;i++){//prepare yourself for a terrible use of a constructor, almost as bad as the Win32 API Event tEvent(((tBase.Name)+" "+ustd::intToString(i)+"/"+ustd::intToString(SubDiv)),//Name ((i==SubDiv?tBase.Length:subLength)),//Length (tBase.Start),//we're shifting the start later on (tBase.End)); ReturnValue.push_back(tEvent); tBase.Start+=tEvent.Length; } //this is some magical debug thingy I wrote to return ReturnValue; }