本文整理汇总了C++中AddPendingEvent函数的典型用法代码示例。如果您正苦于以下问题:C++ AddPendingEvent函数的具体用法?C++ AddPendingEvent怎么用?C++ AddPendingEvent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AddPendingEvent函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetDataForItem
void ProjectExplorerWindow::OnTreeItemContextMenu(wxTreeEvent& event)
{
m_tree->SelectItem(event.GetItem(), true);
if (m_contextMenu != NULL)
{
ItemData* itemData = GetDataForItem(event.GetItem());
// If this is a file, display the context menu.
if (itemData != NULL && itemData->file != NULL && itemData->symbol == NULL)
{
wxTreeEvent copy(event);
copy.SetInt(0);
copy.SetEventType(wxEVT_TREE_CONTEXT_MENU);
AddPendingEvent(copy);
}
//Is a basic directory
else if (itemData == NULL)
{
wxTreeEvent copy(event);
copy.SetInt(1);
copy.SetEventType(wxEVT_TREE_CONTEXT_MENU);
AddPendingEvent(copy);
}
}
}
开发者ID:Halfbrick,项目名称:decoda,代码行数:30,代码来源:ProjectExplorerWindow.cpp
示例2: ev
void wxCheckedListCtrl::OnActivateEvent(wxListEvent& event)
{
long item = event.GetItem().GetId();
if (item == wxNOT_FOUND || !IsEnabled(item))
{
// skip this item
event.Skip();
return;
}
wxListEvent ev(wxEVT_NULL, GetId());
ev.m_itemIndex = item;
// send the check event
if (IsChecked(item))
{
ev.SetEventType(wxEVT_COMMAND_LIST_ITEM_UNCHECKED);
Check(item, FALSE);
AddPendingEvent(ev);
} else {
ev.SetEventType(wxEVT_COMMAND_LIST_ITEM_CHECKED);
Check(item, TRUE);
AddPendingEvent(ev);
}
event.Skip();
}
开发者ID:KastB,项目名称:OpenCPN,代码行数:26,代码来源:checkedlistctrl.cpp
示例3: GetCellEditor
void nwxGrid::OnEditorEnd(wxGridEvent &e)
{
if(m_nEditorOn)
{
m_nEditorOn--;
int nRow = e.GetRow();
int nCol = e.GetCol();
// memory leak on following line
wxGridCellEditor *pEdit = GetCellEditor(nRow, nCol);
wxControl *pControl = (pEdit == NULL) ? NULL : pEdit->GetControl();
wxTextCtrl *pText =
(pControl == NULL)
? NULL
: wxDynamicCast(pControl,wxTextCtrl);
if(pText != NULL)
{
wxString s;
s = pText->GetValue();
if(s == m_sEditorStartValue || s != m_sValue)
{
// value hasn't changed but we still want to force a
// CELL_CHANGED event
wxGridEvent ee(e);
ee.SetEventType(wxEVT_GRID_CELL_CHANGED);
AddPendingEvent(ee);
}
if(pEdit != NULL)
{
pEdit->DecRef();
}
}
}
e.Skip();
}
开发者ID:HelloWilliam,项目名称:osiris,代码行数:35,代码来源:nwxGrid.cpp
示例4: wxCHECK_MSG
bool wxLuaDebuggerCServer::StartServer()
{
wxCHECK_MSG(m_serverSocket == NULL, false, wxT("Debugger server socket already created"));
m_shutdown = false;
m_serverSocket = new wxLuaCSocket();
m_serverSocket->m_name = wxString::Format(wxT("wxLuaDebuggerCServer::m_serverSocket (%ld)"), (long)wxGetProcessId());
if (m_serverSocket->Listen(m_port_number))
{
wxCHECK_MSG(m_pThread == NULL, false, wxT("Debugger server thread already created"));
if (!m_shutdown)
{
m_pThread = new wxLuaDebuggerCServer::LuaThread(this);
return ((m_pThread != NULL) &&
(m_pThread->Create() == wxTHREAD_NO_ERROR) &&
(m_pThread->Run() == wxTHREAD_NO_ERROR));
}
}
else
{
wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_ERROR, this);
debugEvent.SetMessage(m_serverSocket->GetErrorMsg(true));
AddPendingEvent(debugEvent);
delete m_serverSocket;
m_serverSocket = NULL;
m_shutdown = true;
}
return false;
}
开发者ID:oeuftete,项目名称:wx-xword,代码行数:34,代码来源:wxldserv.cpp
示例5: raiseMovementEvent
void
raiseMovementEvent(
wxWindow &Control,
std::shared_ptr<StateAccessToken> &Access,
std::function<seec::cm::MovementResult (seec::cm::ProcessState &State)> Mover)
{
auto const Handler = Control.GetEventHandler();
if (!Handler) {
wxLogDebug("raiseMovementEvent: wxWindow does not have an event handler.");
return;
}
if (!Access) {
wxLogDebug("raiseMovementEvent: no access provided.");
return;
}
auto LockAccess = Access->getAccess();
if (!LockAccess) { // Token is out of date.
wxLogDebug("raiseMovementEvent: access token is outdated.");
return;
}
ProcessMoveEvent Ev {
SEEC_EV_PROCESS_MOVE,
Control.GetId(),
std::move(Mover)
};
Ev.SetEventObject(&Control);
LockAccess.release();
Handler->AddPendingEvent(Ev);
}
开发者ID:mheinsen,项目名称:seec,代码行数:35,代码来源:ProcessMoveEvent.cpp
示例6: HitTest
void CMuleNotebook::OnMouseButtonRelease(wxMouseEvent &event)
{
if (GetImageList() == NULL) {
// This Mulenotebook has no images on tabs, so nothing to do.
event.Skip();
return;
}
long xpos, ypos;
event.GetPosition(&xpos, &ypos);
long flags = 0;
int tab = HitTest(wxPoint(xpos,ypos),&flags);
if ((tab != -1) && (((flags == wxNB_HITTEST_ONICON) && event.LeftUp()) ||
((flags == wxNB_HITTEST_ONLABEL) && event.MiddleUp()))) {
// User did click on a 'x' or middle click on the label
#if MULE_NEEDS_DELETEPAGE_WORKAROUND
/* WORKAROUND: Instead of calling DeletePage, we need to wait for the
* mouse release signal to reach Gtk. Inconsistent with normal wxEvent
* behaviour the button release handler in wxWidgets don't evaluate
* the result of the signal handling. */
wxNotebookEvent evt( wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, GetId(), tab );
evt.SetEventObject(this);
AddPendingEvent( evt );
#else
DeletePage(tab);
#endif // MULE_NEEDS_DELETEPAGE_WORKAROUND
} else {
// Is not a 'x'. Send this event up.
event.Skip();
}
}
开发者ID:amule-project,项目名称:amule,代码行数:33,代码来源:MuleNotebook.cpp
示例7: p
void tcOOBView::OnLButtonDown(wxMouseEvent& event)
{
wxPoint point = event.GetPosition();
wxRealPoint p(double(point.x), double(point.y));
if (CategoryShowHideClick(p))
{
return;
}
if (tsOOBInfo* info =
ButtonContainingPoint(p))
{
long new_key = info->mnID;
if (new_key != mnSelectedKey)
{
wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_NEWHOOK) ;
command.SetEventObject(this);
command.SetExtraLong(new_key);
AddPendingEvent(command);
}
mnSelectedKey = new_key;
tcSound::Get()->PlayEffect("ShortBeep");
mbMouseDrag = true;
msFormationChangeInfo.mnFollowerKey = info->mnID;
}
}
开发者ID:WarfareCode,项目名称:gcblue,代码行数:30,代码来源:tcOOBView.cpp
示例8: ButtonContainingPoint
void tcOOBView::OnLButtonDClick(wxMouseEvent& event)
{
wxPoint point = event.GetPosition();
if (tsOOBInfo* info =
ButtonContainingPoint(wxRealPoint((float)point.x,(float)point.y)))
{
long new_key = info->mnID;
if (new_key != -1)
{
long flags = 0;
if (event.ShiftDown()) flags += 1;
if (event.ControlDown()) flags += 2;
if (event.AltDown()) flags += 4;
wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_DCLICKHOOK) ;
command.SetEventObject(this);
command.SetExtraLong(flags);
AddPendingEvent(command);
}
mnSelectedKey = new_key;
tcSound::Get()->PlayEffect("ShortBeep");
}
}
开发者ID:WarfareCode,项目名称:gcblue,代码行数:25,代码来源:tcOOBView.cpp
示例9: event
void EventNotifier::PostReloadExternallyModifiedEvent(bool prompt)
{
if(_eventsDiabled)
return;
wxCommandEvent event( prompt ? wxEVT_CMD_RELOAD_EXTERNALLY_MODIFIED : wxEVT_CMD_RELOAD_EXTERNALLY_MODIFIED_NOPROMPT );
AddPendingEvent( event );
}
开发者ID:05storm26,项目名称:codelite,代码行数:7,代码来源:event_notifier.cpp
示例10: fprintf
void ClangPlugin::OnClangReparseFinished( wxEvent& event )
{
//#ifdef CLANGPLUGIN_TRACE_FUNCTIONS
fprintf(stdout,"%s\n", __PRETTY_FUNCTION__);
//#endif
ClangProxy::ReparseJob* pJob = static_cast<ClangProxy::ReparseJob*>(event.GetEventObject());
if ( HasEventSink(clEVT_DIAGNOSTICS_UPDATED ) )
{
ClangProxy::GetDiagnosticsJob job( cbEVT_CLANG_ASYNCTASK_FINISHED, idClangGetDiagnostics, pJob->GetTranslationUnitId(), pJob->GetFilename() );
m_Proxy.AppendPendingJob(job);
}
ClangEvent evt( clEVT_REPARSE_FINISHED, pJob->GetTranslationUnitId(), pJob->GetFilename());
ProcessEvent(evt);
#if 0
if (pJob->m_TranslId != this->m_TranslUnitId)
{
std::cout<<" Reparse finished but another file was loaded"<<std::endl;
return;
}
if (m_ReparseNeeded)
{
fprintf(stdout,"%s: Reparsing again, was modified while we were busy...\n", __PRETTY_FUNCTION__);
wxCommandEvent evt(cbEVT_COMMAND_REPARSE, idReparse);
AddPendingEvent(evt);
}
else
{
//m_DiagnosticTimer.Stop();
//m_DiagnosticTimer.Start(DIAGNOSTIC_DELAY, wxTIMER_ONE_SHOT);
}
#endif
}
开发者ID:progmboy,项目名称:ClangLib,代码行数:32,代码来源:clangplugin.cpp
示例11: event
/////////////////////
// Ask to stop later
void AudioPlayer::RequestStop() {
wxCommandEvent event(wxEVT_STOP_AUDIO, 1000);
event.SetEventObject(this);
wxMutexGuiEnter();
AddPendingEvent(event);
wxMutexGuiLeave();
}
开发者ID:BackupTheBerlios,项目名称:aegisub-svn,代码行数:9,代码来源:audio_player.cpp
示例12: event
void EventNotifier::PostFileSavedEvent(const wxString& filename)
{
clCommandEvent event( wxEVT_FILE_SAVED );
event.SetString( filename );
event.SetFileName( filename );
AddPendingEvent( event );
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:7,代码来源:event_notifier.cpp
示例13: GetId
void NetPlayDialog::StopGame()
{
wxCommandEvent stop_event{ DOLPHIN_EVT_STOP_SOFTWARE, GetId() };
stop_event.SetEventObject(this);
AddPendingEvent(stop_event);
}
开发者ID:Tinob,项目名称:Ishiiruka,代码行数:7,代码来源:NetWindow.cpp
示例14: event
void CamArtProvider::ArtLoad(BOOL newbitmaps, BOOL defer)
{
// If we already have an event pending, don't generate a new one
if (m_GetBitmapEventPending && !newbitmaps) return;
if (newbitmaps && m_pMissingImage && m_pHash && !m_pHash->empty())
{
ResIDWithFlagsToBitmapPtr::iterator current;
for( current = m_pHash->begin(); current != m_pHash->end(); ++current )
{
// we don't need to worry about memory management as deleting the
// bitmaps are CamResource::'s responsibility
if (current->second.m_pImage == m_pMissingImage)
m_pMissingImage = NULL; // mark as required to be loaded on the event
}
}
// Send ourselves a deferred event
m_GetBitmapEventPending = TRUE;
wxCamArtProviderEvent event (wxEVT_CAMARTPROVIDER_GETBITMAP, 0, defer);
if (defer)
AddPendingEvent(event);
else
ProcessEvent(event);
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:26,代码来源:cartprov.cpp
示例15: AddPendingEvent
void wxZEditNode::AskRefresh()
{
wxSizeEvent event;
event.SetEventObject(this);
event.SetEventType(14000);
AddPendingEvent(event);
}
开发者ID:pulkomandy,项目名称:.theRush-,代码行数:7,代码来源:wxEditNode.cpp
示例16: CWidgetBase
CWidgetActiveTransfer::CWidgetActiveTransfer(wxWindow* pParent, BSLHOST hHost, BSLTRANSFER hTransfer) :
CWidgetBase(pParent, ID_WIDGETACTIVETRANSFER)
{
CBSLClient* pState = wxGetApp().GetState();
CBSLTransfer bslTransfer;
m_pButtonBar = NULL;
m_pButtonBarSizer = NULL;
m_hHost = hHost;
m_hTransfer = hTransfer;
// Create Controls
CreateControls(true, true, false);
// Update control state.
pState->GetTransfer(m_hTransfer, &bslTransfer);
SetWidgetName(bslTransfer.GetName());
UpdateControls(bslTransfer);
UpdateControlsButtonBar(bslTransfer);
ToggleVisibility(bslTransfer);
// Give time for all the controls to figure out their layout and render
// properly.
wxCommandEvent evt(wxEVT_WIDGETACTIVETRANSFER_INIT);
AddPendingEvent(evt);
}
开发者ID:romw,项目名称:boincsentinels,代码行数:27,代码来源:WidgetActiveTransfer.cpp
示例17: newEvent
void CBOINCListCtrl::PostDrawProgressBarEvent() {
if (m_bProgressBarEventPending) return;
CDrawProgressBarEvent newEvent(wxEVT_DRAW_PROGRESSBAR, this);
AddPendingEvent(newEvent);
m_bProgressBarEventPending = true;
}
开发者ID:BME-IK,项目名称:gridbee-nacl-framework,代码行数:7,代码来源:BOINCListCtrl.cpp
示例18: evt
void StocksListCtrl::OnEditStocks(wxCommandEvent& /*event*/)
{
if (m_selected_row < 0) return;
wxListEvent evt(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxID_ANY);
AddPendingEvent(evt);
}
开发者ID:afeimsdn,项目名称:moneymanagerex,代码行数:7,代码来源:stockspanel.cpp
示例19: GetId
void InfoPanel::EmitTitleChangeEvent(const wxString& new_title)
{
wxCommandEvent event{DOLPHIN_EVT_CHANGE_ISO_PROPERTIES_TITLE, GetId()};
event.SetEventObject(this);
event.SetString(new_title);
AddPendingEvent(event);
}
开发者ID:Anti-Ultimate,项目名称:dolphin,代码行数:7,代码来源:InfoPanel.cpp
示例20: filesRemovedEvent
void EventNotifier::PostFileRemovedEvent(const wxArrayString& files)
{
if(_eventsDiabled)
return;
clCommandEvent filesRemovedEvent(wxEVT_PROJ_FILE_REMOVED);
filesRemovedEvent.SetStrings( files );
AddPendingEvent( filesRemovedEvent );
}
开发者ID:05storm26,项目名称:codelite,代码行数:8,代码来源:event_notifier.cpp
注:本文中的AddPendingEvent函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论