예제 #1
0
/**
 * Set a text for a label.
 * @param aLabel Handle to the label.
 * @param aText Label text.
 */
void setLabelText(MAWidgetHandle aLabel, MAUtil::String aText)
{
	maWidgetSetProperty(aLabel,MAW_LABEL_TEXT, aText.c_str());
}
예제 #2
0
/**
 * Set a text for a button.
 * @param aButton Handle to the button.
 * @param aText Button text.
 */
void setButtonText(MAWidgetHandle aButton, MAUtil::String aText)
{
	maWidgetSetProperty(aButton, MAW_BUTTON_TEXT, aText.c_str());
}
예제 #3
0
파일: Screen.cpp 프로젝트: kopsha/MoSync
	/**
	 * Set the title of the screen.
	 * The title is used by tab screen to display a text on the tab indicator.
	 * @param title The screen title.
	 */
	void Screen::setTitle(const MAUtil::String& title)
	{
		setProperty(MAW_SCREEN_TITLE, title.c_str());
	}
예제 #4
0
파일: WebView.cpp 프로젝트: jaumem/MoSync
	/**
	 * Open a web page.
	 * @param url The URL open.
	 */
	void WebView::openURL(const MAUtil::String& url)
	{
		this->setProperty(MAW_WEB_VIEW_URL, url.c_str());
	}
예제 #5
0
파일: Screen.cpp 프로젝트: kopsha/MoSync
	/**
	 * Check if a screen is shown.
	 * @return true if the screen is visible, false otherwise.
	 */
	bool Screen::isShown()
	{
        MAUtil::String value = this->getPropertyString(MAW_SCREEN_IS_SHOWN);
        return (strcmp(value.c_str(), "true") == 0) ? true : false;
	}
예제 #6
0
파일: Screen.cpp 프로젝트: kopsha/MoSync
	/**
	* Add a new menu item to the Options Menu associated to this screen.
	* Platform: Android and WP7.
	* Option Menus are Android specific concept. The Options Menu is launched by
	* pressing the Menu key. The options menu is where you should include
	* actions and other options that are relevant to the current activity
	* context, such as "Search," "Compose email," or "Settings".
	* When opened, the first visible portion is the icon menu, which holds
	* up to six menu items. If your menu includes more than six items, Android
	* places the sixth item and the rest into the overflow menu, which the user
	* can open by selecting More. Those items do not display icons. On Windows
	* Phone 7 the control used is the application bar.
	*
	* @param title The title associated for the new item.
	*
	* Note: On Windows phone 7, by using this function you will obtain an
	* application bar menu item (text only)
	*
	* @return The index on which the menu item was added in the options menu,
	* an error code otherwise.
	*/
	int Screen::addOptionsMenuItem(const MAUtil::String title)
	{
		return maWidgetScreenAddOptionsMenuItem(
				getWidgetHandle(), title.c_str(), "", 0 );
	}
예제 #7
0
/**
 * Handle the log message.
 */
void MessageHandler::handleLog(WebViewMessage& message)
{
    MAUtil::String s = message.getParam("message");
    maWriteLog(s.c_str(), s.length());
}
예제 #8
0
	/**
	 * \brief This function is used for writing the settings to the settings file
	 */
	void SettingsManager::_writeSettings()
	{
		_settingsFile = maFileOpen(_settingsFileCompletePath->c_str(), MA_ACCESS_READ_WRITE);

		maFileTruncate(_settingsFile, 0);

		char buffer[Model::BUFF_SIZE];
		MAUtil::String binaryMask;

		if(_showAll) binaryMask = "100";
		else if(_showMonthly) binaryMask = "010";
		else if(_showFromDate) binaryMask = "001";

		sprintf(buffer, "%s|%d|%s|%s|%.2f", _coin.c_str(), _date._day, Model::DateStructToString(_date).c_str(), binaryMask.c_str(), _debtValue);

		maFileWrite(_settingsFile, buffer, strlen(buffer));
		maFileClose(_settingsFile);
	}
예제 #9
0
/**
 * Main screen is notified of a purchase error.
 * @param errorMessage.
 */
void MainScreen::productError(MAUtil::String errorMessage)
{
	// Another purchase can now be requested.
	mBuyButton->setEnabled(true);
	maAlert("Purchase error", errorMessage.c_str(), "OK","","");
}