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


C++ CCEGLView::setIMEKeyboardState方法代码示例

本文整理汇总了C++中CCEGLView::setIMEKeyboardState方法的典型用法代码示例。如果您正苦于以下问题:C++ CCEGLView::setIMEKeyboardState方法的具体用法?C++ CCEGLView::setIMEKeyboardState怎么用?C++ CCEGLView::setIMEKeyboardState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCEGLView的用法示例。


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

示例1: attachWithIME

bool CATextField::attachWithIME()
{
    bool bRet = CAIMEDelegate::attachWithIME();
    if (bRet)
    {
        // open keyboard
        CCEGLView * pGlView = CAApplication::getApplication()->getOpenGLView();
        if (pGlView)
        {
#if(CC_TARGET_PLATFORM==CC_PLATFORM_ANDROID||CC_TARGET_PLATFORM==CC_PLATFORM_IOS)
            if (getKeyboardType() ==KEY_BOARD_TYPE_NORMAL)
            {
                pGlView->setIMEKeyboardDefault();
            }
            else if (getKeyboardType() ==KEY_BOARD_TYPE_NUMBER)
            {
                pGlView->setIMEKeyboardNumber();
            }
            else if(getKeyboardType() ==KEY_BOARD_TYPE_ALPHABET)
            {
                pGlView->setIMEKeyboardAlphabet();
            }
#endif
            pGlView->setIMEKeyboardState(true);
        }
    }
    return bRet;
}
开发者ID:JayCai,项目名称:CrossApp,代码行数:28,代码来源:CATextField.cpp

示例2: hideKeyboard

// #HLP_BEGIN
void CCDirector::hideKeyboard(){
    
    if (s3eOSReadStringAvailable() == S3E_FALSE)
        return;
    
    CCEGLView * pGlView = s_SharedDirector->getOpenGLView();
    pGlView->setIMEKeyboardState(false);

    CCIMEDispatcher *d = CCIMEDispatcher::sharedDispatcher();
    d->removeCurrentDelegate();
}
开发者ID:saranpol,项目名称:cocos2d-x,代码行数:12,代码来源:CCDirector.cpp

示例3: detachWithIME

bool CCTextFieldTTF::detachWithIME()
{
    bool bRet = CCIMEDelegate::detachWithIME();
    if (bRet)
    {
        // close keyboard
        CCEGLView * pGlView = CCDirector::sharedDirector()->getOpenGLView();
        if (pGlView)
        {
            pGlView->setIMEKeyboardState(false);
        }
    }
    return bRet;
}
开发者ID:liyonghelpme,项目名称:cocostudio,代码行数:14,代码来源:CCTextFieldTTF.cpp

示例4: detachWithIME

bool CATextView::detachWithIME()
{
	bool bRet = CAIMEDelegate::detachWithIME();
	if (bRet)
	{
		// close keyboard
		CCEGLView * pGlView = CAApplication::getApplication()->getOpenGLView();
		if (pGlView)
		{
			pGlView->setIMEKeyboardState(false);
		}
	}
	return bRet;
}
开发者ID:dksai414,项目名称:CrossApp,代码行数:14,代码来源:CATextView.cpp

示例5: attachWithIME

bool CCTextInput::attachWithIME()
{
    bool bRet = CCIMEDelegate::attachWithIME();
    if (bRet)
    {
        // open keyboard
        CCEGLView * pGlView = CCDirector::sharedDirector()->getOpenGLView();
        if (pGlView)
        {
            pGlView->setIMEKeyboardState(true);
        }
    }
    return bRet;
}
开发者ID:liyonghelpme,项目名称:WangguoLua,代码行数:14,代码来源:CCTextInput.cpp

示例6: detachWithIME

bool CCTextFieldTTF::detachWithIME()
{
    this->unschedule(schedule_selector(CCTextFieldTTF::blick));
    //std::string sText(m_pInputText->c_str());
    CCLabelTTF::setString(m_pInputText->c_str());
    bool bRet = CCIMEDelegate::detachWithIME();
    if (bRet)
    {
        // close keyboard
        CCEGLView * pGlView = CCDirector::sharedDirector()->getOpenGLView();
        if (pGlView)
        {
            pGlView->setIMEKeyboardState(false);
        }
    }
    return bRet;
}
开发者ID:caoguoping,项目名称:warCraft,代码行数:17,代码来源:CCTextFieldTTF.cpp

示例7: attachWithIME

bool CATextField::attachWithIME()
{
    bool bRet = CAIMEDelegate::attachWithIME();
    if (bRet)
    {
        // open keyboard
        CCEGLView * pGlView = CAApplication::getApplication()->getOpenGLView();
        if (pGlView)
        {
#if(CC_TARGET_PLATFORM==CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM==CC_PLATFORM_IOS)
            if (getKeyboardType() ==KEY_BOARD_TYPE_NORMAL)
            {
                pGlView->setIMEKeyboardDefault();
            }
            else if (getKeyboardType() ==KEY_BOARD_TYPE_NUMBER)
            {
                pGlView->setIMEKeyboardNumber();
            }
            else if(getKeyboardType() ==KEY_BOARD_TYPE_ALPHABET)
            {
                pGlView->setIMEKeyboardAlphabet();
            }
            
            if (getKeyboardReturnType() ==KEY_BOARD_RETURN_SEND)
            {
                pGlView->setIMEKeyboardReturnSend();
            }
            else if (getKeyboardReturnType() ==KEY_BOARD_RETURN_SEARCH)
            {
                pGlView->setIMEKeyboardReturnSearch();
            }
            else if(getKeyboardReturnType() ==KEY_BOARD_RETURN_DONE)
            {
                pGlView->setIMEKeyboardReturnDone();
            }
#endif
            this->showCursorMark();
            m_pCursorMark->setCenterOrigin(CCPoint(getCursorX() + m_iHoriMargins, m_obContentSize.height / 2));
            pGlView->setIMEKeyboardState(true);
        }
    }
    return bRet;
}
开发者ID:Brian1900,项目名称:CrossApp,代码行数:43,代码来源:CATextField.cpp

示例8: attachWithIME

bool CATextView::attachWithIME()
{
	bool bRet = CAIMEDelegate::attachWithIME();
	if (bRet)
	{
		// open keyboard
		CCEGLView * pGlView = CAApplication::getApplication()->getOpenGLView();
		if (pGlView)
		{
#if( CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS )

            pGlView->setIMEKeyboardReturnEnter();

#endif
			pGlView->setIMEKeyboardState(true);
		}
	}
	return bRet;
}
开发者ID:PossibleZero,项目名称:CrossApp,代码行数:19,代码来源:CATextView.cpp

示例9: attachWithIME

bool CCTextFieldTTF::attachWithIME()
{
    bool bRet = CCIMEDelegate::attachWithIME();
    if (bRet)
    {
        // open keyboard
        CCEGLView * pGlView = CCDirector::sharedDirector()->getOpenGLView();
        if (pGlView)
        {
            if (getKeyboardType() ==KEY_BOARD_TYPE_NORMAL) {
                pGlView->setIMEKeyboardDefault();
            }
            else if (getKeyboardType() ==KEY_BOARD_TYPE_NUMBER) {
                pGlView->setIMEKeyboardNumber();
            }
            pGlView->setIMEKeyboardState(true);
        }
    }
    return bRet;
}
开发者ID:caoguoping,项目名称:warCraft,代码行数:20,代码来源:CCTextFieldTTF.cpp

示例10: detachWithIME

bool CATextField::detachWithIME()
{
    bool bRet = CAIMEDelegate::detachWithIME();
    if (bRet)
    {
        // close keyboard
        CCEGLView * pGlView = CAApplication::getApplication()->getOpenGLView();
        
        if (pGlView)
        {
            
#if(CC_TARGET_PLATFORM==CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM==CC_PLATFORM_IOS)
            pGlView->setIMEKeyboardDefault();
            pGlView->setIMEKeyboardReturnEnter();
#endif
            pGlView->setIMEKeyboardState(false);
        }
    }
    return bRet;
}
开发者ID:hawkchch,项目名称:CrossApp,代码行数:20,代码来源:CATextField.cpp


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