bool
UserInterface::OnAppInitializing(AppRegistry& appRegistry)
{
	// TODO:
	// Initialize UI resources 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.

	// Uncomment the following statement to listen to the screen on/off events.
	//PowerManager::SetScreenEventListener(*this);

	// Create a form
	MainForm *pMainForm = new MainForm();
	pMainForm->Initialize();

	// Add the form to the frame
	Frame *pFrame = GetAppFrame()->GetFrame();
	pFrame->AddControl(*pMainForm);

	// Set the current form
	pFrame->SetCurrentForm(*pMainForm);

	// Draw and Show the form
	pMainForm->Draw();
	pMainForm->Show();

	return true;
}
bool
DrStrangecodeRssReader::OnAppInitializing(AppRegistry& appRegistry)
{

	// Create a form
	MainForm *pMainForm = new MainForm();
	pMainForm->Initialize();
	pMainForm->SetName(kMainFormNameString);

	ItemForm * pItemForm = new ItemForm();
	pItemForm->Initialize();
	pItemForm->SetName(kItemFormNameString);

	// Add the form to the frame
	Frame *pFrame = GetAppFrame()->GetFrame();

	pFrame->AddControl(*pMainForm);
	pFrame->AddControl(*pItemForm);

	// Set the current form
	pFrame->SetCurrentForm(*pMainForm);

	// Draw and Show the form
	pMainForm->Draw();
	pMainForm->Show();

	return true;
}
Пример #3
0
Tizen::Ui::Controls::Form*
FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId)
{
	Tizen::Ui::Controls::Form* pNewForm = null;
	SceneManager* pSceneManager = SceneManager::GetInstance();
	AppAssert(pSceneManager);

	if (formId == FORM_ANIMATION)
	{
		AnimationForm* pAnimationForm = new (std::nothrow) AnimationForm();
		pAnimationForm->Initialize();
		pNewForm = pAnimationForm;
	}
	else if (formId == FORM_BUTTON)
	{
		ButtonForm* pButtonForm = new (std::nothrow) ButtonForm();
		pButtonForm->Initialize();
		pNewForm = pButtonForm;
	}
	else if (formId == FORM_CHECK_BUTTON)
	{
		CheckButtonForm* pCheckButtonForm = new (std::nothrow) CheckButtonForm();
		pCheckButtonForm->Initialize();
		pNewForm = pCheckButtonForm;
	}
	else if (formId == FORM_COLOR_PICKER)
	{
		ColorPickerForm* pColorPickerForm = new (std::nothrow) ColorPickerForm();
		pColorPickerForm->Initialize();
		pNewForm = pColorPickerForm;
	}
	else if (formId == FORM_CUSTOM_BUTTON)
	{
		CustomButtonForm* pCustomButtonForm = new (std::nothrow) CustomButtonForm();
		pCustomButtonForm->Initialize();
		pNewForm = pCustomButtonForm;
	}
	else if (formId == FORM_TABBAR)
	{
		TabBarForm* pTabBarForm = new (std::nothrow) TabBarForm();
		pTabBarForm->Initialize();
		pNewForm = pTabBarForm;
	}
	else if (formId == FORM_DATE_TIME)
	{
		DateTimeForm* pDateTimeForm = new (std::nothrow) DateTimeForm();
		pDateTimeForm->Initialize();
		pNewForm = pDateTimeForm;
	}
	else if (formId == FORM_EDIT)
	{
		EditForm* pEditForm = new (std::nothrow) EditForm();
		pEditForm->Initialize();
		pNewForm = pEditForm;
	}
	else if (formId == FORM_ENRICHED_TEXT)
	{
		EnrichedTextForm* pEnrichedTextForm = new (std::nothrow) EnrichedTextForm();
		pEnrichedTextForm->Initialize();
		pNewForm = pEnrichedTextForm;
	}
	else if (formId == FORM_EXPANDABLE_EDIT_AREA)
	{
		ExpandableEditAreaForm* pExpandableEditAreaForm = new (std::nothrow) ExpandableEditAreaForm();
		pExpandableEditAreaForm->Initialize();
		pNewForm = pExpandableEditAreaForm;
	}
	else if (formId == FORM_GALLERY)
	{
		GalleryForm* pGalleryForm = new (std::nothrow) GalleryForm();
		pGalleryForm->Initialize();
		pNewForm = pGalleryForm;
	}
	else if (formId == FORM_GROUPED_LISTVIEW)
	{
		GroupedListViewForm* pGroupedListViewForm = new (std::nothrow) GroupedListViewForm();
		pGroupedListViewForm->Initialize();
		pNewForm = pGroupedListViewForm;
	}
	else if (formId == FORM_ICON_LISTVIEW)
	{
		IconListViewForm* pIconListViewForm = new (std::nothrow) IconListViewForm();
		pIconListViewForm->Initialize();
		pNewForm = pIconListViewForm;
	}
	else if (formId == FORM_LISTVIEW)
	{
		ListViewForm* pListViewForm = new (std::nothrow) ListViewForm();
		pListViewForm->Initialize();
		pNewForm = pListViewForm;
	}
	else if (formId == FORM_MAIN)
	{
		MainForm* pMainForm = new (std::nothrow) MainForm();
		pMainForm->Initialize();
		pNewForm = pMainForm;
	}
	else if (formId == FORM_MENU)
	{
		MenuForm* pMenuForm = new (std::nothrow) MenuForm();
		pMenuForm->Initialize();
		pNewForm = pMenuForm;
	}
	else if (formId == FORM_MSG_BOX_POPUP)
	{
		MsgBoxPopupForm* pMsgBoxPopupForm = new (std::nothrow) MsgBoxPopupForm();
		pMsgBoxPopupForm->Initialize();
		pNewForm = pMsgBoxPopupForm;
	}
	else if (formId == FORM_NAVIGATION)
	{
		NavigationForm* pNavigationForm = new (std::nothrow) NavigationForm();
		pNavigationForm->Initialize();
		pNewForm = pNavigationForm;
	}
	else if (formId == FORM_OVERLAYKEYPAD)
	{
		OverlayKeypadForm* pOverlayKeypadForm = new (std::nothrow) OverlayKeypadForm();
		pOverlayKeypadForm->Initialize();
		pNewForm = pOverlayKeypadForm;
	}
	else if (formId == FORM_PANEL)
	{
		PanelForm* pPanelForm = new (std::nothrow) PanelForm();
		pPanelForm->Initialize();
		pNewForm = pPanelForm;
	}
	else if (formId == FORM_PROGRESS)
	{
		ProgressForm* pProgressForm = new (std::nothrow) ProgressForm();
		pProgressForm->Initialize();
		pNewForm = pProgressForm;
	}
	else if (formId == FORM_SEARCHBAR)
	{
		SearchBarForm* pSearchBarForm = new (std::nothrow) SearchBarForm();
		pSearchBarForm->Initialize();
		pNewForm = pSearchBarForm;
	}
	else if (formId == FORM_SLIDER)
	{
		SliderForm* pSliderForm = new (std::nothrow) SliderForm();
		pSliderForm->Initialize();
		pNewForm = pSliderForm;
	}
	else if (formId == FORM_SPLIT_PANEL)
	{
		SplitPanelForm* pSplitPanelForm = new (std::nothrow) SplitPanelForm();
		pSplitPanelForm->Initialize();
		pNewForm = pSplitPanelForm;
	}
	else if (formId == FORM_TABLEVIEW)
	{
		TableViewForm* pTableViewForm = new (std::nothrow) TableViewForm();
		pTableViewForm->Initialize();
		pNewForm = pTableViewForm;
	}
	else if (formId == FORM_TEXTBOX)
	{
		TextBoxForm* pTextBoxForm = new (std::nothrow) TextBoxForm();
		pTextBoxForm->Initialize();
		pNewForm = pTextBoxForm;
	}
	else if (formId == FORM_QUICK_PANEL_FRAME)
	{
		QuickPanelFrameForm* pQuickPanelFrameForm = new (std::nothrow) QuickPanelFrameForm();
		pQuickPanelFrameForm->Initialize();
		pNewForm = pQuickPanelFrameForm;
	}

	return pNewForm;
}