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


C++ Frame::Construct方法代码示例

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


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

示例1: Frame

bool
UiControls::OnAppInitializing(AppRegistry& appRegistry)
{
	// TODO:
	// Initialize UI resources (forms, buttons, etc.) and application specific data.
	// The application's permanent data and context can be obtained from the appRegistry.
	// If this method is successful, return true; otherwise, return false.
	// If this method returns false, the application will be terminated.
	/////////////////////////////////////////////////////////////////////////////////////
	//this codes is automatically inserted by Tizen application wizard.
	Frame* pAppFrame = new Frame();
	pAppFrame->Construct();
	AddFrame(*pAppFrame);
	////////////////////////////////////////////////////////////////////////////////////

	// Prepare Scene management.

	SceneRegister::RegisterAllScenes();
	SceneManager* pSceneManager = SceneManager::GetInstance();
	pSceneManager->GoForward(ForwardSceneTransition(SCENE_MAIN_FORM));

	// Uncomment the following statement to listen to the screen on/off events.
	//PowerManager::SetScreenEventListener(*this);
	
	return true;
}
开发者ID:justinkchen,项目名称:giraffe,代码行数:26,代码来源:UiControls.cpp

示例2: new

//
// create the ScummVM system
//
TizenAppForm *systemStart(Tizen::App::Application *app) {
	logEntered();

	Frame *appFrame = new (std::nothrow) TizenAppFrame();
	if (!appFrame || appFrame->Construct() == E_FAILURE) {
		AppLog("Failed to create appFrame");
		return NULL;
	}
	app->AddFrame(*appFrame);

	TizenAppForm *appForm = new TizenAppForm();
	if (!appForm) {
		AppLog("Failed to create appForm");
		return NULL;
	}

	if (E_SUCCESS != appForm->Construct() ||
		E_SUCCESS != appFrame->AddControl(appForm)) {
		delete appForm;
		AppLog("Failed to construct appForm");
		return NULL;
	}

	appFrame->SetCurrentForm(appForm);
	appForm->GetVisualElement()->SetShowState(false);

	logLeaving();
	return appForm;
}
开发者ID:SinSiXX,项目名称:scummvm,代码行数:32,代码来源:system.cpp

示例3: OnAppInitialized

bool VisTizenGLESApp::OnAppInitialized(void)
{
  using namespace Tizen::Ui;
  using namespace Tizen::Ui::Controls;

  // Create the app's UI frame.
  Frame* pAppFrame = new Frame();
  pAppFrame->Construct();
  pAppFrame->SetOrientation(ORIENTATION_LANDSCAPE);
  AddFrame(*pAppFrame);

  // Create and register our Tizen form with the app frame.
  VisTizenGLESForm* pTizenGLESForm = new VisTizenGLESForm( this );
  pTizenGLESForm->Construct( FORM_STYLE_NORMAL );
  GetAppFrame()->GetFrame()->AddControl( pTizenGLESForm );

  // Set and handle device orientation.
  pTizenGLESForm->SetOrientation( ORIENTATION_LANDSCAPE );
  pTizenGLESForm->AddOrientationEventListener( *this );

  // Register for handling frame events. We use this only for deactivating the automatic switching off of the
  // screen - trying to do that in OnForeground() doesn't work as expected.
  pAppFrame->AddFrameEventListener( *this );

  // Register our Tizen form with Vision (to allow for hooking up input events etc.).
  VVideo::SetUIForm( pTizenGLESForm );

  // Start up Vision.
  if (!VisionInitFunction())
  {
    VisionDeInitFunction();
    return false;
  }

  return true;
}
开发者ID:Arpit007,项目名称:projectanarchy,代码行数:36,代码来源:VisTizenGLESApp.cpp

示例4: Frame

bool
GCubeApp::OnAppInitialized(void)
{
	// フレーム作成
	Frame *pFrame = new Frame();
	pFrame->Construct();
	pFrame->SetName(L"GCube");

	// フォーム作成
	Form *pForm = new Form();
	if (settings->showStatusBar) {
		pForm->Construct(FORM_STYLE_INDICATOR);
	} else {
		pForm->Construct(FORM_STYLE_NORMAL);
	}
	pForm->AddTouchEventListener(*this);
	pForm->AddOrientationEventListener(*this);

	pFrame->AddControl(pForm);
	pFrame->SetCurrentForm(pForm);

	// 画面の向き
	enum Orientation orientation = ORIENTATION_NONE;
	if (settings->orientationPortrait) {
		if (settings->orientationLandscapeLeft || settings->orientationLandscapeRight) {
			orientation = ORIENTATION_AUTOMATIC;
		} else {
			orientation = ORIENTATION_PORTRAIT;
		}
	} else {
		if (settings->orientationPortraitUpsideDown) {
			if (settings->orientationLandscapeLeft || settings->orientationLandscapeRight) {
				orientation = ORIENTATION_AUTOMATIC_FOUR_DIRECTION;
			} else {
				orientation = ORIENTATION_PORTRAIT_REVERSE;
			}
		} else {
			if (settings->orientationLandscapeLeft) {
				orientation = ORIENTATION_LANDSCAPE_REVERSE;
			} else {
				if (settings->orientationLandscapeRight) {
					orientation = ORIENTATION_LANDSCAPE;
				}
			}
		}
	}

	pFrame->SetOrientation(orientation);
	pForm->SetOrientation(orientation);
	pFrame->SetMultipointTouchEnabled(true);
	AddFrame(*pFrame);

	{
		__player = new Tizen::Graphics::Opengl::GlPlayer;
		__player->Construct(Tizen::Graphics::Opengl::EGL_CONTEXT_CLIENT_VERSION_2_X, pForm);
		__player->SetFps(settings->frameRate);
		__player->SetEglAttributePreset(Tizen::Graphics::Opengl::EGL_ATTRIBUTES_PRESET_ARGB8888);
		EGLint eglConfigList[] =
		{
		  EGL_RED_SIZE, 8,
		  EGL_GREEN_SIZE, 8,
		  EGL_BLUE_SIZE, 8,
		  EGL_ALPHA_SIZE, 8,
		  EGL_DEPTH_SIZE, 16,
		  EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
		  EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
		  EGL_NONE
		};
		__player->SetEglAttributeList(eglConfigList);
		__player->Start();
	}

	__renderer = new GlRendererTemplate();
	__player->SetIGlRenderer(__renderer);

	int w = __renderer->GetTargetControlWidth();
	int h = __renderer->GetTargetControlHeight();

	if (settings->debugButtonPos > 0) {
		// デバッグボタン作成
		// TODO: XMLで作成
		int dy = 0;
		if (settings->showStatusBar) {
			dy = 60;
		}
		Button* pDebugButton = new Button();
		if (settings->debugButtonPos == 1) {
			pDebugButton->Construct(Rectangle(w-80, h-80-dy, 70, 70), L"D");
		} else if (settings->debugButtonPos == 2) {
			pDebugButton->Construct(Rectangle(10, h-80-dy, 70, 70), L"D");
		} else if (settings->debugButtonPos == 3) {
			pDebugButton->Construct(Rectangle(w-80, 10, 70, 70), L"D");
		} else {
			pDebugButton->Construct(Rectangle(10, 10, 70, 70), L"D");
		}
		pDebugButton->SetActionId(ID_DEBUG_BUTTON);
		pDebugButton->AddActionEventListener(*this);
		pForm->AddControl(pDebugButton);

		// ポップアップ作成
//.........这里部分代码省略.........
开发者ID:gclue,项目名称:GCube2,代码行数:101,代码来源:GCubeApp.cpp


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