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


C++ CATextView类代码示例

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


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

示例1: Java_org_CrossApp_lib_CrossAppTextView_keyBoardHeightReturn

    //textView delegate
	JNIEXPORT void JNICALL Java_org_CrossApp_lib_CrossAppTextView_keyBoardHeightReturn(JNIEnv *env, jclass cls, jint key, jint height)
    {
		CATextView* textView = s_map[(int)key];
        if (textView->getDelegate())
        {
            textView->getDelegate()->keyBoardHeight(textView, (int)s_px_to_dip(height));
        }
    }
开发者ID:DreamCastleShanghai,项目名称:dkomClient,代码行数:9,代码来源:CATextView.cpp

示例2: Java_org_CrossApp_lib_CrossAppTextView_resignFirstResponder

	JNIEXPORT void JNICALL Java_org_CrossApp_lib_CrossAppTextView_resignFirstResponder(JNIEnv *env, jclass cls, jint key)
    {
		CATextView* textView = s_map[(int)key];
        if (textView->isFirstResponder())
        {
            textView->resignFirstResponder();
        }
    }
开发者ID:DreamCastleShanghai,项目名称:dkomClient,代码行数:8,代码来源:CATextView.cpp

示例3: CATextView

CATextView* CATextView::createWithCenter(const CCRect& rect)
{
	CATextView *text = new CATextView();
	if (text && text->initWithCenter(rect))
	{
		text->autorelease();
		return text;
	}
	CC_SAFE_DELETE(text);
	return NULL;
}
开发者ID:alliadt,项目名称:CrossApp,代码行数:11,代码来源:CATextView.cpp

示例4: Java_org_CrossApp_lib_CrossAppTextView_keyBoardReturnCallBack

 //return call back
 JNIEXPORT void JNICALL Java_org_CrossApp_lib_CrossAppTextView_keyBoardReturnCallBack(JNIEnv *env, jclass cls, jint key, jint height)
 {
     CATextView* textView = s_map[(int)key];
     
     textView->resignFirstResponder();
     
     if (textView->getDelegate())
     {
         textView->getDelegate()->textViewShouldReturn(textView);
     }
 }
开发者ID:DreamCastleShanghai,项目名称:dkomClient,代码行数:12,代码来源:CATextView.cpp

示例5: CATextView

CATextView* CATextView::createWithCenter(const CCRect& rect)
{
	CATextView* pTextView = new CATextView();
	if (pTextView && pTextView->initWithCenter(rect))
	{
		pTextView->autorelease();
		return pTextView;
	}
	CC_SAFE_DELETE(pTextView);
	return NULL;
}
开发者ID:dksai414,项目名称:CrossApp,代码行数:11,代码来源:CATextView.cpp

示例6: CATextView

CATextView* CATextView::createWithLayout(const DLayout& layout)
{
    CATextView* textView = new CATextView();
    if (textView&&textView->initWithLayout(layout))
    {
        textView->autorelease();
        return textView;
    }
    
    CC_SAFE_RELEASE_NULL(textView);
    return NULL;
}
开发者ID:boaass,项目名称:CrossApp,代码行数:12,代码来源:CATextView.cpp

示例7: Java_org_CrossApp_lib_CrossAppTextView_text

	JNIEXPORT void JNICALL Java_org_CrossApp_lib_CrossAppTextView_text(JNIEnv *env, jclass cls, jint key, jbyteArray textBuffer, int lenght)
    {
        char* buffer = (char*)malloc(sizeof(char) * lenght);
        env->GetByteArrayRegion(textBuffer, 0, lenght, (jbyte *)buffer);
        
        std::string text;
        text.resize(lenght);
        for (int i=0; i<lenght; i++)
        {
            text[i] = buffer[i];
        }
        
        s_lock = true;
		CATextView* textView = s_map[(int)key];
        textView->setText(text);
        s_lock = false;
    }
开发者ID:DreamCastleShanghai,项目名称:dkomClient,代码行数:17,代码来源:CATextView.cpp

示例8: Java_org_CrossApp_lib_CrossAppTextView_textChange

	JNIEXPORT bool JNICALL Java_org_CrossApp_lib_CrossAppTextView_textChange(JNIEnv *env, jclass cls, jint key, jstring before, jstring change, int arg0, int arg1)
    {
        const char* charBefore = env->GetStringUTFChars(before, NULL);
        std::string strBefore = charBefore;
        env->ReleaseStringUTFChars(before, charBefore);
        const char* charChange = env->GetStringUTFChars(change, NULL);
        std::string strChange = charChange;
        env->ReleaseStringUTFChars(change, charChange);
        
		CATextView* textView = s_map[(int)key];
		if (textView->getDelegate())
		{
			return textView->getDelegate()->textViewShouldChangeCharacters(textView, arg0, arg1, strChange.c_str());
		}

		return true;
    }
开发者ID:DreamCastleShanghai,项目名称:dkomClient,代码行数:17,代码来源:CATextView.cpp


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