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


C++ DELETEP函数代码示例

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


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

示例1: insert

 void insert(int mx, int my, int msize)
 {
     if(size == msize)
     {
         filled = 0xF;
         return;
     }
     int csize = size>>1, i = 0;
     if(mx >= x+csize) i |= 1;
     if(my >= y+csize) i |= 2;
     if(csize == msize)
     {
         filled |= (1 << i);
         return;
     }
     if(!child[i]) child[i] = new QuadNode(i&1 ? x+csize : x, i&2 ? y+csize : y, csize);
     child[i]->insert(mx, my, msize);
     loopj(4) if(child[j])
     {
         if(child[j]->filled == 0xF)
         {
             DELETEP(child[j]);
             filled |= (1 << j);
         }
     }
 }
开发者ID:MonoAlithica,项目名称:Moteur-Narratif,代码行数:26,代码来源:material.cpp

示例2: DELETEP

/*!
 * This method oborts the current visual drag.
 */
void   FV_VisualDragText::abortDrag(void)
{
        if(m_pAutoScrollTimer != NULL)
	{
		m_pAutoScrollTimer->stop();
		DELETEP(m_pAutoScrollTimer);
	}
	m_bSelectedRow = false;
	bool bDidCopy = m_bDoingCopy;
	m_bDoingCopy = false;
	m_bNotDraggingImage = false;
	clearCursor();
	UT_DEBUGMSG(("Abort Drag! \n"));
	if(m_iVisualDragMode != FV_VisualDrag_DRAGGING)
	{
//
// we didn't actually drag anything. Just release the selection.
//
	        setMode(FV_VisualDrag_NOT_ACTIVE);
		return;
	}
	getGraphics()->setClipRect(&m_recCurFrame);
	m_pView->updateScreen(false);
	getGraphics()->setClipRect(NULL);
	setMode(FV_VisualDrag_NOT_ACTIVE);
	if(!bDidCopy)
	{
	  m_pView->cmdUndo(1);
	}
	return;
}
开发者ID:tchx84,项目名称:debian-abiword-packages,代码行数:34,代码来源:fv_VisualDragText.cpp

示例3: DELETEP

GlobSessionPacket::~GlobSessionPacket()
{
	for (size_t i=0; i<m_pPackets.size(); ++i)
	{
		DELETEP( m_pPackets[i] );
	}
}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:7,代码来源:AbiCollab_Packet.cpp

示例4: Google_removeFromMenus

static void
Google_removeFromMenus()
{
  // First we need to get a pointer to the application itself.
  XAP_App *pApp = XAP_App::getApp();

  // remove the edit method
  EV_EditMethodContainer* pEMC = pApp->getEditMethodContainer() ;
  EV_EditMethod * pEM = ev_EditMethod_lookup ( "AbiGoogle_invoke" ) ;
  pEMC->removeEditMethod ( pEM ) ;
  DELETEP( pEM ) ;

  // now remove crap from the menus
  int frameCount = pApp->getFrameCount();
  XAP_Menu_Factory * pFact = pApp->getMenuFactory();

  pFact->removeMenuItem("Main",NULL,Google_MenuLabel);
  pFact->removeMenuItem("contextText",NULL,Google_MenuLabel);
  for(int i = 0;i < frameCount;++i)
    {
      // Get the current frame that we're iterating through.
      XAP_Frame* pFrame = pApp->getFrame(i);
      pFrame->rebuildMenus();
    }
}
开发者ID:Distrotech,项目名称:abiword,代码行数:25,代码来源:AbiGoogle.cpp

示例5: UT_CreateWindowEx

HWND AP_Win32LeftRuler::createWindow(HWND hwndContainer,
									UT_uint32 left, UT_uint32 top,
									UT_uint32 height)
{
		
	XAP_Win32App * app = static_cast<XAP_Win32App *>(XAP_App::getApp());
	m_hwndLeftRuler = UT_CreateWindowEx(0, s_LeftRulerWndClassName, NULL,
									 WS_CHILD | WS_VISIBLE,
									 left, top, s_iFixedWidth, height,
									 hwndContainer, NULL, app->getInstance(), NULL);
	UT_return_val_if_fail (m_hwndLeftRuler,0);
	SWL(m_hwndLeftRuler, this);
	
	
	DELETEP(m_pG);
	GR_Win32AllocInfo ai(GetDC(m_hwndLeftRuler), m_hwndLeftRuler);
	GR_Win32Graphics * pG = (GR_Win32Graphics *)XAP_App::getApp()->newGraphics(ai);

	m_pG = pG;
	UT_return_val_if_fail (pG, 0);
	pG->init3dColors();
	
	RECT rSize;
	GetClientRect(m_hwndLeftRuler,&rSize);
	setHeight(rSize.bottom);
	setWidth(rSize.right);

	return m_hwndLeftRuler;
}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:29,代码来源:ap_Win32LeftRuler.cpp

示例6: _constructWindow

void AP_UnixDialog_FormatFrame::runModeless(XAP_Frame * pFrame)
{
	// Build the window's widgets and arrange them
	m_windowMain = _constructWindow();
	UT_return_if_fail(m_windowMain);

	// Populate the window's data items
	_populateWindowData();
	_connectSignals();
	abiSetupModelessDialog(GTK_DIALOG(m_windowMain), pFrame, this, BUTTON_CLOSE);
	
	// *** this is how we add the gc for Column Preview ***
	// attach a new graphics context to the drawing area
	UT_return_if_fail(m_wPreviewArea && m_wPreviewArea->window);

	// make a new Unix GC
	DELETEP (m_pPreviewWidget);
	GR_UnixCairoAllocInfo ai(m_wPreviewArea);
	m_pPreviewWidget = (GR_UnixCairoGraphics*) XAP_App::getApp()->newGraphics(ai);

	// Todo: we need a good widget to query with a probable
	// Todo: non-white (i.e. gray, or a similar bgcolor as our parent widget)
	// Todo: background. This should be fine
	m_pPreviewWidget->init3dColors(m_wPreviewArea->style);

	// let the widget materialize

	_createPreviewFromGC(m_pPreviewWidget,
						 static_cast<UT_uint32>(m_wPreviewArea->allocation.width),
						 static_cast<UT_uint32>(m_wPreviewArea->allocation.height));	
	
	m_pFormatFramePreview->draw();
	
	startUpdater();
}
开发者ID:monkeyiq,项目名称:odf-2011-track-changes-git-svn,代码行数:35,代码来源:ap_UnixDialog_FormatFrame.cpp

示例7: DELETEP

bool AP_CocoaToolbar_StyleCombo::repopulate(void)
{
	// repopulate the vector from the current document
    // If ithere is one present

	AD_Document * pAD_Doc = m_pFrame->getCurrentDoc();
	if(!pAD_Doc)
	{
		return false;
	}

	// clear anything that's already there
	m_vecContents.clear();

	m_pDocument = static_cast<PD_Document *>(pAD_Doc);

	UT_GenericVector<PD_Style*>* pStyles = NULL;
	m_pDocument->enumStyles(pStyles);
	UT_uint32 nStyles = pStyles->getItemCount();

	for (UT_uint32 k = 0; k < nStyles; k++)
	{
		const PD_Style * pStyle;
		pStyle = pStyles->getNthItem(k);
		if(pStyle) {
			m_vecContents.addItem(pStyle->getName());
		}
	}
	DELETEP(pStyles);

	return true;
}
开发者ID:tchx84,项目名称:debian-abiword-packages,代码行数:32,代码来源:ap_CocoaToolbar_StyleCombo.cpp

示例8: setDisplaySize

bool GR_VectorImage::convertFromBuffer(const UT_ByteBuf* pBB, 
                                       const std::string& /*mimetype*/,
									   UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight)
{
  setDisplaySize ( iDisplayWidth, iDisplayHeight );

  DELETEP(m_pBB_Image);

  m_pBB_Image = new UT_ByteBuf;

  bool bCopied = m_pBB_Image->append(pBB->getPointer(0), pBB->getLength());

  if (!bCopied) DELETEP(m_pBB_Image);

  return bCopied;
}
开发者ID:Distrotech,项目名称:abiword,代码行数:16,代码来源:gr_VectorImage.cpp

示例9: abi_plugin_unregister

/**
 * Unregister the OpenDocument plugin
 */
ABI_BUILTIN_FAR_CALL int abi_plugin_unregister (XAP_ModuleInfo * mi)
{
    mi->name    = 0;
    mi->desc    = 0;
    mi->version = 0;
    mi->author  = 0;
    mi->usage   = 0;

    IE_Imp::unregisterImporter (pImp_sniffer);
    DELETEP(pImp_sniffer);

    IE_Exp::unregisterExporter (pExp_sniffer);
    DELETEP(pExp_sniffer);

    return 1;
}
开发者ID:tanya-guza,项目名称:abiword,代码行数:19,代码来源:ie_impexp_OpenDocument.cpp

示例10: switch

void ODe_AbiDocListener::_handleListenerImplAction() {
    switch (m_listenerImplAction.getAction()) {
        case ODe_ListenerAction::ACTION_PUSH:
            m_implStack.push_back(
                ODe_AbiDocListener::StackCell(m_pCurrentImpl, m_deleteCurrentWhenPop));
                
            m_pCurrentImpl = m_listenerImplAction.getListenerImpl();
            m_deleteCurrentWhenPop = m_listenerImplAction.deleteWhenPop();

            UT_ASSERT(m_pCurrentImpl);
            break;
        
        case ODe_ListenerAction::ACTION_POP:
            if (m_deleteCurrentWhenPop) {
                DELETEP(m_pCurrentImpl);
            } else {
                m_pCurrentImpl = NULL;
            }

            if (m_implStack.getItemCount() > 0) {
                StackCell stackCell;
                stackCell = m_implStack.getLastItem();            
                m_pCurrentImpl = stackCell.m_pListenerImpl;
                m_deleteCurrentWhenPop = stackCell.m_deleteWhenPop;
                
                m_implStack.pop_back();
            }
            break;
    }
}
开发者ID:Distrotech,项目名称:abiword,代码行数:30,代码来源:ODe_AbiDocListener.cpp

示例11: _setEncoding

UT_Error IE_Exp_Text::_writeDocument(void)
{
	// Don't call base method if user cancels encoding dialog
	if (!(!m_bIsEncoded || m_bExplicitlySetEncoding || _doEncodingDialog(m_szEncoding)))
		return UT_SAVE_CANCELLED;

	// TODO If we're going to the clipboard and the OS supports unicode, set encoding.
	// TODO Only supports Windows so far.
	// TODO Should use a finer-grain technique than IsWinNT() since Win98 supports unicode clipboard.
	if (getDocRange())
	{
#ifdef WIN32
		if (UT_IsWinNT())
			_setEncoding(XAP_EncodingManager::get_instance()->getNativeUnicodeEncodingName());
#endif
	}

	m_pListener = _constructListener();
	if (!m_pListener)
		return UT_IE_NOMEMORY;

	if (getDocRange())
		getDoc()->tellListenerSubset(static_cast<PL_Listener *>(m_pListener),getDocRange());
	else
		getDoc()->tellListener(static_cast<PL_Listener *>(m_pListener));
	DELETEP(m_pListener);

	return ((m_error) ? UT_IE_COULDNOTWRITE : UT_OK);
}
开发者ID:monkeyiq,项目名称:odf-2011-track-changes-git-svn,代码行数:29,代码来源:ie_exp_Text.cpp

示例12: switch

BOOL CALLBACK AP_Win32Dialog_GenericInput::s_dlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    switch (msg)
    {
    case WM_INITDIALOG:
    {
        AP_Win32Dialog_GenericInput* pThis = (AP_Win32Dialog_GenericInput *)lParam;
        UT_return_val_if_fail(pThis, false);
        SetWindowLongPtrW(hWnd,DWLP_USER,lParam);
        return pThis->_onInitDialog(hWnd,wParam,lParam);
    }
    case WM_COMMAND:
    {
        AP_Win32Dialog_GenericInput* pThis = (AP_Win32Dialog_GenericInput *)GetWindowLongPtrW(hWnd,DWLP_USER);
        UT_return_val_if_fail(pThis, false);
        return pThis->_onCommand(hWnd,wParam,lParam);
    }
    case WM_DESTROY:
    {
        AP_Win32Dialog_GenericInput* pThis = (AP_Win32Dialog_GenericInput *)GetWindowLongPtrW(hWnd,DWLP_USER);
        UT_return_val_if_fail(pThis, false);
        DELETEP(pThis->m_pWin32Dialog);
        return true;
    }
    default:
        // Message not processed - Windows should take care of it
        return false;
    }
}
开发者ID:tanya-guza,项目名称:abiword,代码行数:29,代码来源:ap_Win32Dialog_GenericInput.cpp

示例13: UT_go_directory_create

UT_Error IE_Exp_EPUB::EPUB3_writeStructure()
{
    m_oebpsDir = m_baseTempDir + G_DIR_SEPARATOR_S;
    m_oebpsDir += "OEBPS";

    UT_go_directory_create(m_oebpsDir.c_str(), NULL);

    std::string indexPath = m_oebpsDir + G_DIR_SEPARATOR_S;
    indexPath += "index.xhtml";

    // Exporting document to XHTML using HTML export plugin 
    char *szIndexPath = (char*) g_malloc(strlen(indexPath.c_str()) + 1);
    strcpy(szIndexPath, indexPath.c_str());
    IE_Exp_HTML_WriterFactory *pWriterFactory = new IE_Exp_EPUB_EPUB3WriterFactory();
    m_pHmtlExporter = new IE_Exp_HTML(getDoc());
    m_pHmtlExporter->setWriterFactory(pWriterFactory);
    m_pHmtlExporter->suppressDialog(true);
    m_pHmtlExporter->setProps(
        "embed-css:no;html4:no;use-awml:no;declare-xml:yes;add-identifiers:yes;");
    
    m_pHmtlExporter->set_SplitDocument(m_exp_opt.bSplitDocument);
    m_pHmtlExporter->set_MathMLRenderPNG(m_exp_opt.bRenderMathMLToPNG);
    m_pHmtlExporter->writeFile(szIndexPath);
    g_free(szIndexPath);
    DELETEP(pWriterFactory);
    return UT_OK;
}
开发者ID:hfiguiere,项目名称:abiword,代码行数:27,代码来源:ie_exp_EPUB.cpp

示例14: IE_TOCHelper

IE_Exp_HTML_NavigationHelper::IE_Exp_HTML_NavigationHelper(
    PD_Document* pDocument, const UT_UTF8String &baseName)
: IE_TOCHelper(pDocument),
  m_suffix(""),
  m_minTOCLevel(0),
  m_minTOCIndex(0),
  m_baseName(UT_go_basename_from_uri(baseName.utf8_str()))
{
    m_suffix = strchr(m_baseName, '.');
    m_minTOCLevel = 10;
    for (int i = 0; i < getNumTOCEntries(); i++)
    {
        int currentLevel = 10;
        getNthTOCEntry(i, &currentLevel);
        if (currentLevel < m_minTOCLevel)
        {
            m_minTOCLevel = currentLevel;
            m_minTOCIndex = i;
        }
    }
            
    IE_Exp_HTML_BookmarkListener * bookmarkListener =
        new IE_Exp_HTML_BookmarkListener(pDocument, this);
    pDocument->tellListener(bookmarkListener);
    DELETEP(bookmarkListener);
}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:26,代码来源:ie_exp_HTML_NavigationHelper.cpp

示例15: g_signal_handler_disconnect

AP_UnixLeftRuler::~AP_UnixLeftRuler(void)
{
	GtkWidget * toplevel = static_cast<XAP_UnixFrameImpl *>(m_pFrame->getFrameImpl())->getTopLevelWindow();
	if (toplevel && g_signal_handler_is_connected(G_OBJECT(toplevel), m_iBackgroundRedrawID)) {
		g_signal_handler_disconnect(G_OBJECT(toplevel),m_iBackgroundRedrawID);
	}
	DELETEP(m_pG);
}
开发者ID:lokeshguddu,项目名称:AbiWord,代码行数:8,代码来源:ap_UnixLeftRuler.cpp


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