当前位置: 首页>>代码示例>>C++>>正文


C++ FireEvent函数代码示例

本文整理汇总了C++中FireEvent函数的典型用法代码示例。如果您正苦于以下问题:C++ FireEvent函数的具体用法?C++ FireEvent怎么用?C++ FireEvent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了FireEvent函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Refresh

//Setting values
void wxFixWidthImportCtrl::SetValues(const wxArrayInt& values)
{
    size_t nval = values.GetCount();
    size_t i, j, tot;
    int val;

    m_values.Clear();

    if ( nval < 1 )
    {   Refresh();
        FireEvent();
        return;
    }

    //Add the first value
    m_values.Add( values.Item(0) );

    //Add/insert the rest, avoiding duplicates
    for ( i=1; i<nval; i++)
    {   j=0;
        val = values.Item(i);
        tot = m_values.GetCount();
        while ( j < tot && val > m_values.Item(j) )
            j++;
        if ( j >= tot && val > m_values.Item(tot-1) )
            m_values.Add(val);
        if ( j < tot && val < m_values.Item(j) )
            m_values.Insert(val, j);
    }

    Refresh();
    FireEvent();
}
开发者ID:maxmods,项目名称:wx.mod,代码行数:34,代码来源:fiximp.cpp

示例2: evt1

void SListBoxEx::NotifySelChange( int nOldSel,int nNewSel)
{
    EventLBSelChanging evt1(this);
    
    evt1.nOldSel=nOldSel;
    evt1.nNewSel=nNewSel;
    FireEvent(evt1);
    
    if(evt1.bCancel) return ;

    m_iSelItem=nNewSel;
    if(nOldSel!=-1)
    {
        m_arrItems[nOldSel]->ModifyItemState(0,WndState_Check);
        RedrawItem(nOldSel);
    }
    if(m_iSelItem!=-1)
    {
        m_arrItems[m_iSelItem]->ModifyItemState(WndState_Check,0);
        RedrawItem(m_iSelItem);
    }
    
    EventLBSelChanged evt2(this);
    evt2.nOldSel=nOldSel;
    evt2.nNewSel=nNewSel;
    FireEvent(evt2);
}
开发者ID:435420057,项目名称:soui,代码行数:27,代码来源:SListboxex.cpp

示例3: FireEvent

LRESULT CPdnWnd::OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	if((wParam == SC_CLOSE || wParam == SC_DEFAULT) && m_sCloseHandler.length())
	{
		FireEvent(m_sCloseHandler, 0, 0);
		return 0;
	}
	else if((wParam == SC_SCREENSAVE || (wParam == SC_MONITORPOWER &&
		lParam == 2) ) && m_sScreenSaveHandler.length())
	{
		FireEvent(m_sScreenSaveHandler, 0, 0);
	}
	else if(wParam == SC_MINIMIZE && m_sMinHandler.length())
	{
		FireEvent(m_sMinHandler, 0, 0);
	}
	else if(wParam == SC_RESTORE && m_sRestoreHandler.length())
	{
		FireEvent(m_sRestoreHandler, 0, 0);
	}
	else if(wParam == SC_MAXIMIZE)
	{
	}
	return ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);
}
开发者ID:chiling,项目名称:pandion,代码行数:25,代码来源:PdnWnd.cpp

示例4: if

LRESULT CPdnWnd::OnWTSSessionChange(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	if(wParam == 0x1 /* WTS_CONSOLE_CONNECT */) {
	}
	else if(wParam == 0x2 /* WTS_CONSOLE_DISCONNECT */) {
	}
	else if(wParam == 0x3 /* WTS_REMOTE_CONNECT */) {
	}
	else if(wParam == 0x4 /* WTS_REMOTE_DISCONNECT */) {
	}
	else if(wParam == 0x5 /* WTS_SESSION_LOGON */) {
	}
	else if(wParam == 0x6 /* WTS_SESSION_LOGOFF */) {
	}
	else if(wParam == 0x7 /* WTS_SESSION_LOCK */ &&
		m_sWorkstationLockHandler.length()) {
		FireEvent(m_sWorkstationLockHandler, 0, 0);
	}
	else if(wParam == 0x8 /* WTS_SESSION_UNLOCK */ &&
		m_sWorkstationUnlockHandler.length()) {
		FireEvent(m_sWorkstationUnlockHandler, 0, 0);
	}
	else if(wParam == 0x9 /* WTS_SESSION_REMOTE_CONTROL */) {
	}

	return 0;
}
开发者ID:chiling,项目名称:pandion,代码行数:27,代码来源:PdnWnd.cpp

示例5: FireEvent

void KAIVM::Active()
{
    if (m_nPendingEvent != aevInvalid)
    {
        int nEvent = m_nPendingEvent;
        m_nPendingEvent = aevInvalid;

        FireEvent(nEvent, m_dwPendingEventSrc, m_nPendingEventParam);
    }

    if (m_nPrimaryTimerFrame != 0 && g_pSO3World->m_nGameLoop >= m_nPrimaryTimerFrame)
    {
        m_nPrimaryTimerFrame = 0;
        FireEvent(aevOnPrimaryTimer, m_pOwner->m_dwID, g_pSO3World->m_nGameLoop);
    }

    if (m_nSecondaryTimerFrame != 0 && g_pSO3World->m_nGameLoop >= m_nSecondaryTimerFrame)
    {
        m_nSecondaryTimerFrame = 0;
        FireEvent(aevOnSecondaryTimer, m_pOwner->m_dwID, g_pSO3World->m_nGameLoop);
    }

    if (m_nTertiaryTimerFrame != 0 && g_pSO3World->m_nGameLoop >= m_nTertiaryTimerFrame)
    {
        m_nTertiaryTimerFrame = 0;
        FireEvent(aevOnTertiaryTimer, m_pOwner->m_dwID, g_pSO3World->m_nGameLoop);
    }
}
开发者ID:1suming,项目名称:pap2,代码行数:28,代码来源:KAIVM.cpp

示例6: FireEvent

void *InstallThread::Action()
{
    LocalDictionary *dict = dynamic_cast<LocalDictionary*>((Dictionary*)m_data);
    if (dict) {
        FireEvent(wxT(""), myID_START);
        m_exword->InstallDictionary(dict);
        FireEvent(wxT(""), myID_FINISH);
    }
    return NULL;
}
开发者ID:brijohn,项目名称:exword_tools,代码行数:10,代码来源:InstallThread.cpp

示例7: evt

BOOL STabCtrl::SetCurSel( int nIndex )
{
    if( nIndex < 0 || nIndex> (int)GetItemCount()-1 || (m_nCurrentPage == nIndex)) return FALSE;
    int nOldPage = m_nCurrentPage;
    
    EventTabSelChanging evt(this);
    evt.uOldSel=nOldPage;
    evt.uNewSel=nIndex;

    FireEvent(evt);

    if (evt.bCancel)
        return FALSE;

    STabPage *pTab=GetItem(nIndex);

    CRect rcItem;

    GetItemRect(m_nCurrentPage, rcItem);
    InvalidateRect(rcItem);
    GetItemRect(nIndex, rcItem);
    InvalidateRect(rcItem);
    
    if(m_tabSlider)
    {
        m_tabSlider->Stop();
    }
    if(m_nAnimateSteps && IsVisible(TRUE) && nOldPage!=-1 && nIndex !=-1)
    {
        m_tabSlider = new STabSlider(this,nOldPage,nIndex,m_nAnimateSteps);
    }else
    {
        if(nOldPage!=-1)
        {
            GetItem(nOldPage)->SetVisible(FALSE,TRUE);
        }
        if(nIndex!=-1)
        {
            GetItem(nIndex)->SetVisible(TRUE,TRUE);
        }
    }
    m_nCurrentPage = nIndex;
        
    EventTabSelChanged evt2(this);
    evt2.uNewSel=nIndex;
    evt2.uOldSel=nOldPage;

    FireEvent(evt2);
    return TRUE;
}
开发者ID:kenchen1101,项目名称:soui,代码行数:50,代码来源:STabCtrl.cpp

示例8: LOG

HRESULT CSampleMSPStream::ProcessGraphEvent(
    IN  long lEventCode,
    IN  long lParam1,
    IN  long lParam2
    )
{
    LOG((MSP_EVENT, "CSampleMSPStream::ProcessGraphEvent - enter"));

    HRESULT        hr = S_OK;

    switch (lEventCode)
    {
    case EC_COMPLETE:
        
        hr = FireEvent(CALL_STREAM_INACTIVE, (HRESULT) lParam1, CALL_CAUSE_UNKNOWN);
        break;
    
    case EC_USERABORT:
        
        hr = FireEvent(CALL_STREAM_INACTIVE, S_OK, CALL_CAUSE_UNKNOWN);
        break;

    case EC_ERRORABORT:
    case EC_STREAM_ERROR_STOPPED:
    case EC_STREAM_ERROR_STILLPLAYING:
    case EC_ERROR_STILLPLAYING:

        hr = FireEvent(CALL_STREAM_FAIL, (HRESULT) lParam1, CALL_CAUSE_UNKNOWN);
        break;

    default:
        
        LOG((MSP_EVENT, "CSampleMSPStream::ProcessGraphEvent - "
            "ignoring event code %d", lEventCode));
        break;
    }

    if ( FAILED(hr) )
    {
        LOG((MSP_ERROR, "CSampleMSPStream::ProcessGraphEvent - "
            "FireEvent failed - exit 0x%08x", hr));

        return hr;
    }

    LOG((MSP_EVENT, "CSampleMSPStream::ProcessGraphEvent - exit S_OK"));

    return S_OK;
}
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:49,代码来源:SampStrm.Cpp

示例9: AddRef

LRESULT SItemPanel::DoFrameEvent(UINT uMsg,WPARAM wParam,LPARAM lParam)
{
    AddRef();

    if(!IsDisabled())
    {
        switch(uMsg)
        {
        case WM_MOUSEHOVER: 
            {
                ModifyState(WndState_Hover,0,TRUE);
                EventItemPanelHover evt(this);
                FireEvent(evt);
                break;
            }
        case WM_MOUSELEAVE: 
            {
                ModifyState(0,WndState_Hover,TRUE);
                EventItemPanelLeave evt(this);
                FireEvent(evt);
                break;
            }
        case WM_LBUTTONDOWN:
            {
                EventItemPanelClick evt(this);
                FireEvent(evt);
                break;
            }
        case WM_RBUTTONDOWN:
            {
                EventItemPanelRclick evt(this);
                FireEvent(evt);
                break;
            }
        case WM_LBUTTONDBLCLK:
            {
                EventItemPanelDbclick evt(this);
                FireEvent(evt);
                break;
            }
        }
    }

    SetMsgHandled(FALSE);
    LRESULT lRet=__super::DoFrameEvent(uMsg,wParam,lParam);
    Release();
    return lRet;
}
开发者ID:showna,项目名称:soui,代码行数:48,代码来源:SItemPanel.cpp

示例10: if

//Setting the selected line (0 to nulines-1)
void wxFixWidthImportCtrl::SelectLine(size_t nline)
{
    size_t nulines = m_Lines.GetCount();
    if ( nline >= 0 && nline != m_markedL && nulines > 0)
    {   if ( nline >= nulines )
            m_markedL = nulines - 1;
        else
            m_markedL = nline;

        //Adjust vertical scrollbar's thumb position
        int pos=0; //number of hidden lines upwards
        int range = m_scrbarV->GetRange();
        int tsize = m_scrbarV->GetThumbSize();
        if (m_markedL == nulines - 1) //last line
            pos = range - tsize;
        else if (m_markedL > 0) //middle line, cuasi-center m_markedL
            pos = m_markedL - (tsize - 1)/2; //page is tsize-1

        pos = wxMin(pos, range - tsize);
        pos = wxMax(pos, 0);

        m_scrbarV->SetThumbPosition(pos);
        m_curposL = (size_t)pos;

        Refresh();
        FireEvent();
    }
}
开发者ID:maxmods,项目名称:wx.mod,代码行数:29,代码来源:fiximp.cpp

示例11: SDropdownList

    bool SSearchDropdownList::OnEditNotify(EventArgs *e)
    {
        EventRENotify *pEvtNotify = sobj_cast<EventRENotify>(e);
        if(pEvtNotify->iNotify == EN_CHANGE)
        {
            if(!m_pDropDownWnd)
            {
                m_pDropDownWnd = new SDropdownList(this);
                m_pDropDownWnd -> Create(m_xmlDropdown.child(KNode_PopupStyle));
                SASSERT(m_pDropDownWnd);
            }

            EventFillSearchDropdownList evt(this);
            evt.strKey = sobj_cast<SEdit>(e->sender)->GetWindowText();
            evt.pDropdownWnd = m_pDropDownWnd;
            FireEvent(evt);
            
            if(evt.bPopup)
            {
                AdjustDropdownList();
            }else
            {
                CloseUp(IDCANCEL);
            }
        }
        return true;
    }
开发者ID:FuckGOV,项目名称:soui,代码行数:27,代码来源:SSearchDropdownList.cpp

示例12: _T

	// Notify the Firefox that the progress has changed.
	void CPlugin::OnIEProgressChanged(int progress)
	{
		CString strEventType = _T("IEProgressChanged");
		CString strDetail;
		strDetail.Format(_T("%d"), progress);
		FireEvent(strEventType, strDetail);
	}
开发者ID:cha63501,项目名称:Fire-IE,代码行数:8,代码来源:plugin.cpp

示例13: TabsToSpaces

//Fill array with file passed
bool wxFixWidthImportCtrl::LoadFile(const wxString& filename, const wxMBConv& conv)
{
    wxTextFile file;
    if (!file.Open(filename, conv) )
        return false;

    m_Lines.Clear();
    wxString str;
    m_maxLen = 0;
    size_t i = 0;
    size_t nto = file.GetLineCount();
    if (nto > 0)
    {   m_Lines.Alloc(nto);
        for ( i=0; i < nto; i++ )
        {   str = file.GetLine(i);

            if (m_tabSize > -1) //replace tabs with needed spaces
                str = TabsToSpaces(str);

            if (str.Len() > m_maxLen)
                m_maxLen = str.Len();

            m_Lines.Add(str);
        }
    }

    m_Lines.Shrink();

    m_curposX = m_curposL = m_markedL = m_LAct = 0;
    AdjustScrollbars();
    Refresh();
    FireEvent();
    return true;
}
开发者ID:maxmods,项目名称:wx.mod,代码行数:35,代码来源:fiximp.cpp

示例14: switch

bool DesktopNode::updateChildren()
{
    if ((status_filter_ & NODE_NOT_ON_CLOUD) && !checkCloudCacheOrUpdate())
    {
        // pending scaning until cloud info is retrieved
        pending_scan_ = true;
        return true;
    }    

    switch (current_display_mode_)
    {
        case BY_FOLDER:
            updateChildrenByFolder();
            break;
        case BY_SORT:
            updateChildrenBySort();
            break;
        case EXPAND_ALL:
            updateChildrenByExpandingAll();
            break;
        default:
            return false;
    }
    setDirty(false);

    NodeChildenReadyArgs children_ready_args;
    children_ready_args.current_node_path = absolutePath();
    children_ready_args.succeeded = true;
    children_ready_args.children = filterChildren(children_);
    FireEvent(EventChildrenIsReady, children_ready_args);
    return true;
}
开发者ID:chenhbzl,项目名称:OriginApp,代码行数:32,代码来源:local_desktop_node.cpp

示例15: Move

    void SFlyWnd::OnAnimatorState( int percent )
    {
        if(percent == SAnimator::PER_END)
        {
            m_bAniMove = TRUE;
            Move(m_rcAniEnd);
            m_bAniMove = FALSE;
            m_bFloat = FALSE;

            GetContainer()->UnregisterTimelineHandler(this);
        }else
        {
            CRect rcWnd;
            rcWnd.left   = m_rcAniBegin.left   + (m_rcAniEnd.left  - m_rcAniBegin.left  ) * percent / 100; 
            rcWnd.top    = m_rcAniBegin.top    + (m_rcAniEnd.top   - m_rcAniBegin.top   ) * percent / 100;
            rcWnd.right  = m_rcAniBegin.right  + (m_rcAniEnd.right - m_rcAniBegin.right ) * percent / 100;
            rcWnd.bottom = m_rcAniBegin.bottom + (m_rcAniEnd.bottom- m_rcAniBegin.bottom) * percent / 100;

            m_bAniMove = TRUE;
            Move(rcWnd);
            m_bFloat = FALSE;
            m_bAniMove = FALSE;
        }
        FlyStateEvent evt(this,percent,m_bEndPos);
        FireEvent(evt);
    }
开发者ID:ming-hai,项目名称:soui,代码行数:26,代码来源:SFlyWnd.cpp


注:本文中的FireEvent函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。