• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ IsAttached函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ConnectOutput

/////////////////////////////////////////////////////////////////////////////////////////////
// Output means output of SSM, so this connects plugin inputs to a jack destination
void JackClient::ConnectOutput(int n, const std::string &JackPort) {
    if(!IsAttached()) return;
    std::cerr << "JackClient::ConnectOutput: connecting source [" << m_OutputPortMap[n]->Name << "] \
        to dest [" << JackPort << "]" << std::endl;

    if(m_OutputPortMap[n]->ConnectedTo != "") {
        if(jack_disconnect(m_Client, jack_port_name(m_OutputPortMap[n]->Port), m_OutputPortMap[n]->ConnectedTo.c_str()))
            error("JackClient::ConnectOutput: cannot disconnect output port [%s] to [%s]",
                  m_OutputPortMap[n]->ConnectedTo.c_str(),
                  m_OutputPortMap[n]->Name.c_str());
    }

    m_OutputPortMap[n]->ConnectedTo = JackPort;
    if(jack_connect(m_Client, jack_port_name(m_OutputPortMap[n]->Port), JackPort.c_str()))
        error("JackClient::ConnectOutput: cannot connect output port [%s] to [%s]",
              m_OutputPortMap[n]->Name.c_str(), JackPort.c_str());
    m_OutputPortMap[n]->Connected = true;
}
开发者ID:K0F,项目名称:FreeJ,代码行数:20,代码来源:audio_jack.cpp


示例2: Refresh

wxMenu *wxMenuBar::Remove(size_t pos)
{
    wxMenu *menu = wxMenuBarBase::Remove(pos);
    if ( !menu )
        return NULL;

    if ( IsAttached() )
    {
        if (s_macInstalledMenuBar == this)
            ::DeleteMenu( menu->MacGetMenuId() /* m_menus[pos]->MacGetMenuId() */ ) ;

        Refresh();
    }

    m_titles.RemoveAt(pos);

    return menu;
}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:18,代码来源:menu.cpp


示例3: MOZ_ASSERT

void
SourceBuffer::Abort(ErrorResult& aRv)
{
  MOZ_ASSERT(NS_IsMainThread());
  MSE_API("Abort()");
  if (!IsAttached()) {
    aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
    return;
  }
  if (mMediaSource->ReadyState() != MediaSourceReadyState::Open) {
    aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
    return;
  }
  AbortBufferAppend();
  mContentManager->ResetParserState();
  mAttributes->SetAppendWindowStart(0);
  mAttributes->SetAppendWindowEnd(PositiveInfinity<double>());
}
开发者ID:Jar-win,项目名称:Waterfox,代码行数:18,代码来源:SourceBuffer.cpp


示例4: MSE_DEBUG

void
SourceBuffer::Remove(double aStart, double aEnd, ErrorResult& aRv)
{
  MSE_DEBUG("%p Remove(Start=%f End=%f)", this, aStart, aEnd);
  if (!IsAttached() || mUpdating ||
      mMediaSource->ReadyState() != MediaSourceReadyState::Open) {
    aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
    return;
  }
  if (aStart < 0 || aStart > mMediaSource->Duration() ||
      aEnd <= aStart) {
    aRv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
    return;
  }
  StartUpdating();
  /// TODO: Run coded frame removal algorithm asynchronously (would call StopUpdating()).
  StopUpdating();
}
开发者ID:bchukuka,项目名称:gecko-dev,代码行数:18,代码来源:SourceBuffer.cpp


示例5: ASSERT

BOOL COXShortkeysOrganizer::AddAccelTable(HACCEL hAccelTable, 
										  CMultiDocTemplate* pDocTemplate)
{
	ASSERT(hAccelTable!=NULL);

	if(!IsAttached())
	{
		TRACE(_T("COXShortkeysOrganizer::AddAccelTable: there is no attached frame window. You have to attach frame window before calling this function\n"));
		return FALSE;
	}

	COXArrAccelerators* pArrAccels=FindAcceleratorTable(pDocTemplate);
	if(pArrAccels!=NULL)
	{
		TRACE(_T("COXShortkeysOrganizer::AddAccelTable: accelerator table for specified CMultiDocTemplate object has already been added\n"));
		return FALSE;
	}

	OXACCELTABLE accelTable;
	accelTable.m_docTemplate=pDocTemplate;

	int nAccelCount=::CopyAcceleratorTable(hAccelTable,NULL,0);
	if(nAccelCount!=0)
	{
		ACCEL* pAccel=new ACCEL[nAccelCount];
		if (pAccel==NULL)
		{
			TRACE(_T("COXShortkeysOrganizer::AddAccelTable: failed to copy an accelerator table\n"));
			return FALSE;
		}
		VERIFY(::CopyAcceleratorTable(hAccelTable,pAccel,nAccelCount)==nAccelCount);

		for(int nIndex=0; nIndex<nAccelCount; nIndex++)
		{
			accelTable.m_accelerators.Add(pAccel[nIndex]);
		}

		delete[] pAccel;
	}

	m_arrAccelTables.Add(accelTable);

	return TRUE;
}
开发者ID:Spritutu,项目名称:AiPI-1,代码行数:44,代码来源:OXShortkeysOrganizer.cpp


示例6: OnMnuEditCopyUpdateUI

void ThreadSearch::OnMnuEditCopyUpdateUI(wxUpdateUIEvent& event)
{
    if ( !IsAttached() )
    {
        event.Skip(); return;
    }

    wxWindow* pFocused = wxWindow::FindFocus();
    if (not pFocused) return;

    wxMenuBar* mbar = Manager::Get()->GetAppFrame()->GetMenuBar();
    if (not mbar) return;

    bool hasSel = false;
    // if the following window have the focus, own the copy.
    if ( pFocused == m_pCboSearchExpr )
    {
        //event.Enable(m_pCboSearchExpr->CanCopy());
        hasSel =  m_pCboSearchExpr->CanCopy() ;
        //LOGIT( _T("OnMnuEditCopyUpdateUI m_pCboSearchExpr") );
    }
    else if ( pFocused == m_pThreadSearchView->m_pCboSearchExpr )
    {
        //event.Enable(m_pThreadSearchView->m_pCboSearchExpr->CanCopy());
        hasSel = m_pThreadSearchView->m_pCboSearchExpr->CanCopy();
        //LOGIT( _T("OnMnuEditCopyUpdateUI m_pThreadSearchView->m_pCboSearchExpr") );
    }
    else if ( pFocused == static_cast<wxWindow*>(m_pThreadSearchView->m_pSearchPreview) )
    {
        hasSel = m_pThreadSearchView->m_pSearchPreview->GetSelectionStart() != m_pThreadSearchView->m_pSearchPreview->GetSelectionEnd();
        //LOGIT( _T("OnMnuEditCopyUpdateUI m_pSearchPreview") );
    }
    if ( hasSel )
    {
        mbar->Enable(idMenuEditCopy, hasSel);
        wxToolBar* pMainToolBar = (wxToolBar*) ::wxFindWindowByName(wxT("toolbar"), NULL);
        if (pMainToolBar) pMainToolBar->EnableTool(idMenuEditCopy, hasSel);
        return;
    }

    event.Skip();
    return;

}
开发者ID:stahta01,项目名称:codeblocks_backup,代码行数:44,代码来源:ThreadSearch.cpp


示例7: GetMenuItems

wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
{
    // we need to find the item's position in the child list
    size_t pos;
    wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();
    for ( pos = 0; node; pos++ )
    {
        if ( node->GetData() == item )
            break;

        node = node->GetNext();
    }

#if wxUSE_ACCEL
    // remove the corresponding accel from the accel table
    int n = FindAccel(item->GetId());
    if ( n != wxNOT_FOUND )
    {
        delete m_accels[n];

        m_accels.RemoveAt(n);

#if wxUSE_OWNER_DRAWN
        ResetMaxAccelWidth();
#endif
    }
    //else: this item doesn't have an accel, nothing to do
#endif // wxUSE_ACCEL

    // remove the item from the menu
    if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )
    {
        wxLogLastError(wxT("RemoveMenu"));
    }

    if ( IsAttached() && GetMenuBar()->IsAttached() )
    {
        // otherwise, the change won't be visible
        GetMenuBar()->Refresh();
    }

    // and from internal data structures
    return wxMenuBase::DoRemove(item);
}
开发者ID:0ryuO,项目名称:dolphin-avsync,代码行数:44,代码来源:menu.cpp


示例8: Execute

int HeaderFixup::Execute()
{
  // if not attached, exit
  if ( !IsAttached() )
    return -1;

  // if no project is opened -> inform the user and do not operate
  const cbProject* prj = Manager::Get()->GetProjectManager()->GetActiveProject();
  if (!prj)
  {
    cbMessageBox(_("You need to open a project/workspace before using this plugin!"),
                 _T("Header Fixup"), wxICON_ERROR | wxOK);
    return -1;
  }

  Execution Dlg(NULL);
  Dlg.ShowModal();
  return 0;
}// Execute
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:19,代码来源:headerfixup.cpp


示例9: wxCHECK_RET

void wxMenuBar::Refresh()
{
    if ( IsFrozen() )
        return;

    wxCHECK_RET( IsAttached(), wxT("can't refresh unattached menubar") );

#if defined(WINCE_WITHOUT_COMMANDBAR)
    if (GetToolBar())
    {
        CommandBar_DrawMenuBar((HWND) GetToolBar()->GetHWND(), 0);
    }
#elif defined(WINCE_WITH_COMMANDBAR)
    if (m_commandBar)
        DrawMenuBar((HWND) m_commandBar);
#else
    DrawMenuBar(GetHwndOf(GetFrame()));
#endif
}
开发者ID:Zombiebest,项目名称:Dolphin,代码行数:19,代码来源:menu.cpp


示例10: return

bool CEngineTap::Bypass(bool Enable)
{
	if (Enable == m_IsBypassed)	// if already in requested state
		return(TRUE);	// nothing to do
#ifdef ENGINE_TAP_NATTER
	_tprintf(_T("CEngineTap::Bypass %d\n"), Enable);
#endif
	m_IsBypassed = Enable;	// update state first to fail safe
	if (IsAttached()) {	// if attached to plugin
		if (Enable) {	// if entering bypass
			if (!Disconnect(*m_Plugin))	// disconnect from plugin
				return(FALSE);
		} else {	// exiting bypass
			if (!Connect(*m_Plugin))	// connect to plugin
				return(FALSE);
		}
	}
	return(TRUE);
}
开发者ID:victimofleisure,项目名称:FFRend,代码行数:19,代码来源:EngineTap.cpp


示例11: AbortUpdating

void
SourceBuffer::Abort(ErrorResult& aRv)
{
  if (!IsAttached()) {
    aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
    return;
  }
  if (mMediaSource->ReadyState() != MediaSourceReadyState::Open) {
    aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
    return;
  }
  if (mUpdating) {
    // TODO: Abort segment parser loop, buffer append, and stream append loop algorithms.
    AbortUpdating();
  }
  // TODO: Run reset parser algorithm.
  mAppendWindowStart = 0;
  mAppendWindowEnd = PositiveInfinity<double>();
}
开发者ID:karzler,项目名称:DivFirefoxTesting,代码行数:19,代码来源:SourceBuffer.cpp


示例12: GetMenuItems

wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
{
    // we need to find the item's position in the child list
    size_t pos;
    wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();
    for ( pos = 0; node; pos++ )
    {
        if ( node->GetData() == item )
            break;

        node = node->GetNext();
    }

#if wxUSE_ACCEL
    RemoveAccel(item);
#endif // wxUSE_ACCEL

    // Update indices of radio groups.
    if ( m_radioData )
    {
        if ( m_radioData->UpdateOnRemoveItem(pos) )
        {
            wxASSERT_MSG( item->IsRadio(),
                          wxT("Removing non radio button from radio group?") );
        }
        //else: item being removed is not in a radio group
    }

    // remove the item from the menu
    if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )
    {
        wxLogLastError(wxT("RemoveMenu"));
    }

    if ( IsAttached() && GetMenuBar()->IsAttached() )
    {
        // otherwise, the change won't be visible
        GetMenuBar()->Refresh();
    }

    // and from internal data structures
    return wxMenuBase::DoRemove(item);
}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:43,代码来源:menu.cpp


示例13: DEBUGLOG

cLiveStreamer::~cLiveStreamer()
{
  DEBUGLOG("Started to delete live streamer");

  cTimeMs t;

  DEBUGLOG("Stopping streamer thread ...");
  Cancel(5);
  DEBUGLOG("Done.");

  cMutexLock lock(&m_FilterMutex);

  DEBUGLOG("Detaching");

  if(m_PatFilter != NULL && m_Device != NULL) {
    m_Device->Detach(m_PatFilter);
    delete m_PatFilter;
    m_PatFilter = NULL;
  }

  if (IsAttached()) {
    Detach();
  }

  for (std::list<cTSDemuxer*>::iterator i = m_Demuxers.begin(); i != m_Demuxers.end(); i++) {
    if ((*i) != NULL) {
      DEBUGLOG("Deleting stream demuxer for pid=%i and type=%i", (*i)->GetPID(), (*i)->GetType());
      delete (*i);
    }
  }
  m_Demuxers.clear();

  delete m_Queue;

  m_uid = 0;

  {
    cMutexLock lock(&m_DeviceMutex);
    m_Device = NULL;
  }

  DEBUGLOG("Finished to delete live streamer (took %llu ms)", t.Elapsed());
}
开发者ID:giga91,项目名称:vdr-plugin-xvdr,代码行数:43,代码来源:livestreamer.c


示例14: if

bool GDocApp<OptionsFmt>::SetDirty(bool Dirty)
{
	if (IsAttached() && (d->Dirty ^ Dirty))
	{
		// Changing...
		if (Dirty)
		{
			// Setting dirty
			d->Dirty = true;
			SetCurFile(d->CurFile);
		}
		else
		{
			// Clearing dirty
			int Result = LgiMsg(this,
								LgiLoadString(L_DOCAPP_SAVE_CHANGE, "Do you want to save your changes?"),
								d->AppName,
								MB_YESNOCANCEL);
			if (Result == IDYES)
			{
				if (!ValidStr(d->CurFile))
				{
					GMru::OnCommand(IDM_SAVEAS);
				}
				else
				{
					_SaveFile(d->CurFile);
				}
			}
			else if (Result == IDCANCEL)
			{
				return false;
			}

			d->Dirty = false;
			SetCurFile(d->CurFile);
		}

		OnDirty(d->Dirty);
	}

	return true;
}
开发者ID:FEI17N,项目名称:Lgi,代码行数:43,代码来源:GDocApp.cpp


示例15: Append

void
SourceBuffer::AppendData(const uint8_t* aData, uint32_t aLength, ErrorResult& aRv)
{
  if (!IsAttached() || mUpdating) {
    aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
    return;
  }
  if (mMediaSource->ReadyState() == MediaSourceReadyState::Ended) {
    mMediaSource->SetReadyState(MediaSourceReadyState::Open);
  }
  // TODO: Run coded frame eviction algorithm.
  // TODO: Test buffer full flag.
  MSE_DEBUG("%p Append(ArrayBuffer=%u)", this, aLength);
  StartUpdating();
  // XXX: For future reference: NDA call must run on the main thread.
  mDecoder->NotifyDataArrived(reinterpret_cast<const char*>(aData),
                              aLength,
                              mDecoder->GetResource()->GetLength());
  // TODO: Run buffer append algorithm asynchronously (would call StopUpdating()).
  mDecoder->GetResource()->AppendData(aData, aLength);

  // Eviction uses a byte threshold. If the buffer is greater than the
  // number of bytes then data is evicted. The time range for this
  // eviction is reported back to the media source. It will then
  // evict data before that range across all SourceBuffer's it knows
  // about.
  const int evict_threshold = 1000000;
  bool evicted = mDecoder->GetResource()->EvictData(evict_threshold);
  if (evicted) {
    double start = 0.0;
    double end = 0.0;
    GetBufferedStartEndTime(&start, &end);

    // We notify that we've evicted from the time range 0 through to
    // the current start point.
    mMediaSource->NotifyEvicted(0.0, start);
  }
  StopUpdating();

  // Schedule the state machine thread to ensure playback starts
  // if required when data is appended.
  mMediaSource->GetDecoder()->ScheduleStateMachineThread();
}
开发者ID:karzler,项目名称:DivFirefoxTesting,代码行数:43,代码来源:SourceBuffer.cpp


示例16: BuildToolBar

bool ThreadSearch::BuildToolBar(wxToolBar* toolBar)
{
    if ( !IsAttached() || !toolBar )
        return false;

    m_pToolbar = toolBar;
    m_pThreadSearchView->SetToolBar(toolBar);

    const wxString &prefix = m_pThreadSearchView->GetImagePrefix();

    ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("app"));
    if (cfg->ReadBool(_T("/environment/toolbar_size"),true))
        m_pToolbar->SetToolBitmapSize(wxSize(16,16));
    else
        m_pToolbar->SetToolBitmapSize(wxSize(22,22));

    m_pCboSearchExpr = new wxComboBox(toolBar, controlIDs.Get(ControlIDs::idCboSearchExpr),
                                      wxEmptyString, wxDefaultPosition, wxSize(130, -1), 0, NULL, wxCB_DROPDOWN);
    m_pCboSearchExpr->SetToolTip(_("Text to search"));

    toolBar->AddControl(m_pCboSearchExpr);
    toolBar->AddTool(controlIDs.Get(ControlIDs::idBtnSearch), _(""),
                     wxBitmap(prefix + wxT("findf.png"), wxBITMAP_TYPE_PNG),
                     wxBitmap(prefix + wxT("findfdisabled.png"), wxBITMAP_TYPE_PNG),
                     wxITEM_NORMAL, _("Run search"));
    toolBar->AddTool(controlIDs.Get(ControlIDs::idBtnOptions), _(""),
                     wxBitmap(prefix + wxT("options.png"), wxBITMAP_TYPE_PNG),
                     wxBitmap(prefix + wxT("optionsdisabled.png"), wxBITMAP_TYPE_PNG),
                     wxITEM_NORMAL, _("Show options window"));
    m_pThreadSearchView->UpdateOptionsButtonImage(m_FindData);

    m_pCboSearchExpr->Append(m_pThreadSearchView->GetSearchHistory());
    if ( m_pCboSearchExpr->GetCount() > 0 )
    {
        m_pCboSearchExpr->SetSelection(0);
    }

    toolBar->Realize();
    toolBar->SetInitialSize();

    return true;
}
开发者ID:stahta01,项目名称:codeblocks_backup,代码行数:42,代码来源:ThreadSearch.cpp


示例17: wxCHECK_RET

void wxMenuBar::SetMenuLabel(size_t pos, const wxString& label)
{
    wxCHECK_RET( pos < GetMenuCount(), wxT("invalid menu index") );

    m_menus[pos]->wxMenuBase::SetTitle(label);

    if ( !IsAttached() )
    {
        return;
    }
    //else: have to modify the existing menu

    int mswpos = MSWPositionForWxMenu(GetMenu(pos),pos);

    UINT_PTR id;
    UINT flagsOld = ::GetMenuState((HMENU)m_hMenu, mswpos, MF_BYPOSITION);
    if ( flagsOld == 0xFFFFFFFF )
    {
        wxLogLastError(wxT("GetMenuState"));

        return;
    }

    if ( flagsOld & MF_POPUP )
    {
        // HIBYTE contains the number of items in the submenu in this case
        flagsOld &= 0xff;
        id = (UINT_PTR)::GetSubMenu((HMENU)m_hMenu, mswpos);
    }
    else
    {
        id = pos;
    }

    if ( ::ModifyMenu(GetHmenu(), mswpos, MF_BYPOSITION | MF_STRING | flagsOld,
                      id, label.t_str()) == (int)0xFFFFFFFF )
    {
        wxLogLastError(wxT("ModifyMenu"));
    }

    Refresh();
}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:42,代码来源:menu.cpp


示例18: OnEditorActivated

// ----------------------------------------------------------------------------
void JumpTracker::OnEditorActivated(CodeBlocksEvent& event)
// ----------------------------------------------------------------------------
{
    // Record this activation event and place activation in history
    event.Skip();

    if (m_bShuttingDown) return;
    if (not IsAttached()) return;

    // Don't record closing editor activations
    if (m_bProjectClosing)
        return;

    EditorBase* eb = event.GetEditor();
    wxString edFilename = eb->GetFilename();
    cbEditor* cbed = Manager::Get()->GetEditorManager()->GetBuiltinEditor(eb);

    if (not cbed)
    {
        // Since wxAuiNotebook added, there's no cbEditor associated during
        // an initial cbEVT_EDITOR_ACTIVATED event. So we ignore the inital
        // call and get OnEditorOpened() to re-issue OnEditorActivated() when
        // it does have a cbEditor, but no cbProject associated;
        #if defined(LOGGING)
        LOGIT( _T("JT [OnEditorActivated ignored:no cbEditor[%s]"), edFilename.c_str());
        #endif
        return;
    }

    #if defined(LOGGING)
    LOGIT( _T("JT Editor Activated[%s]"), eb->GetShortName().c_str() );
    #endif

    cbStyledTextCtrl* edstc = cbed->GetControl();
    if(edstc->GetCurrentLine() == wxSCI_INVALID_POSITION)
        return;

    long edPosn = edstc->GetCurrentPos();
    //if ( m_Cursor not_eq JumpDataContains(edFilename, edPosn) )
        JumpDataAdd(edFilename, edPosn);
    return;
}//OnEditorActivated
开发者ID:yjdwbj,项目名称:cb10-05-ide,代码行数:43,代码来源:JumpTracker.cpp


示例19: SHORT1FROMMR

wxMenu* wxMenuBar::Remove(
  size_t                            nPos
)
{
    wxMenu*                         pMenu = wxMenuBarBase::Remove(nPos);
    SHORT                           nId;

    if (!pMenu)
        return NULL;

    nId = SHORT1FROMMR(::WinSendMsg( (HWND)GetHmenu()
                                    ,MM_ITEMIDFROMPOSITION
                                    ,MPFROMSHORT(nPos)
                                    ,(MPARAM)0)
                                   );
    if (nId == MIT_ERROR)
    {
        wxLogLastError(wxT("LogLastError"));
        return NULL;
    }
    if (IsAttached())
    {
        ::WinSendMsg( (HWND)GetHmenu()
                     ,MM_REMOVEITEM
                     ,MPFROM2SHORT(nId, TRUE)
                     ,(MPARAM)0
                    );

#if wxUSE_ACCEL
        if (pMenu->HasAccels())
        {
            //
            // Need to rebuild accell table
            //
            RebuildAccelTable();
        }
#endif // wxUSE_ACCEL
        Refresh();
    }
    m_titles.RemoveAt(nPos);
    return pMenu;
} // end of wxMenuBar::Remove
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:42,代码来源:menu.cpp


示例20: BuildModuleMenu

void cbDebuggerPlugin::BuildModuleMenu(const ModuleType type, wxMenu* menu, cb_unused const FileTreeData* data)
{
    if (!IsAttached())
        return;
    // we 're only interested in editor menus
    // we 'll add a "debug watches" entry only when the debugger is running...
    if (type != mtEditorManager || !menu)
        return;
    cbDebuggerPlugin *active_plugin = Manager::Get()->GetDebuggerManager()->GetActiveDebugger();
    if (active_plugin != this)
        return;

    wxString word;
    if (IsRunning())
    {
        // has to have a word under the caret...
        word = GetEditorWordAtCaret();
    }
    Manager::Get()->GetDebuggerManager()->BuildContextMenu(*menu, word, IsRunning());
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:20,代码来源:cbplugin.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsAutoVacuumWorkerProcess函数代码示例发布时间:2022-05-30
下一篇:
C++ IsArray函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap