コード例 #1
0
void Notification::Configure(KObjectRef properties)
{
	this->title = properties->GetString("title");
	this->message = properties->GetString("message");
	this->iconURL = properties->GetString("icon");
	this->timeout = properties->GetInt("timeout", -1);
	this->clickedCallback = properties->GetMethod("callback");
}
コード例 #2
0
ファイル: php_evaluator.cpp プロジェクト: mital/kroll
	static string GetContextId(KObjectRef global)
	{
		string contextId(global->GetString("__php_module_id__"));
		if (contextId.empty())
		{
			static int nextId = 0;
			contextId.append("__kroll__namespace__");
			contextId.append(KList::IntToChars(++nextId));
			global->SetString("__php_module_id__", contextId);
		}

		return contextId;
	}
コード例 #3
0
ファイル: window_config.cpp プロジェクト: fossamikom/TideSDK
/*static*/
AutoPtr<WindowConfig> WindowConfig::FromProperties(KObjectRef properties)
{
	WindowConfig* c = new WindowConfig();
	c->SetID(properties->GetString("id", c->GetID()));
	c->SetURL(properties->GetString("url", c->GetURL()));
	c->SetURLRegex(properties->GetString("urlRegex", c->GetURLRegex()));
	c->SetTitle(properties->GetString("title", c->GetTitle()));
	c->SetContents(properties->GetString("contents", c->GetContents()));
	c->SetURLRegex(properties->GetString("baseURL", c->GetBaseURL()));
	c->SetX(properties->GetInt("x", c->GetX()));
	c->SetY(properties->GetInt("y", c->GetY()));
	c->SetWidth(properties->GetInt("width", c->GetWidth()));
	c->SetMinWidth(properties->GetInt("minWidth", c->GetMinWidth()));
	c->SetMaxWidth(properties->GetInt("maxWidth", c->GetMaxWidth()));
	c->SetHeight(properties->GetInt("height", c->GetHeight()));
	c->SetMinHeight(properties->GetInt("minHeight", c->GetMinHeight()));
	c->SetMaxHeight(properties->GetInt("maxHeight", c->GetMaxHeight()));
	c->SetMaximizable(CoerceBool(properties, "maximizable", c->IsMaximizable()));
	c->SetMinimizable(CoerceBool(properties, "minimizable", c->IsMinimizable()));
	c->SetCloseable(CoerceBool(properties, "closeable", c->IsCloseable()));
	c->SetResizable(CoerceBool(properties, "resizable", c->IsResizable()));
	c->SetFullscreen(CoerceBool(properties, "fullscreen", c->IsFullscreen()));
	c->SetMaximized(CoerceBool(properties, "maximized", c->IsMaximized()));
	c->SetMinimized(CoerceBool(properties, "minimized", c->IsMinimized()));
	c->SetUsingChrome(CoerceBool(properties, "usingChrome", c->IsUsingChrome()));
	c->SetToolWindow(CoerceBool(properties, "toolWindow", c->IsToolWindow()));
	c->SetTopMost(CoerceBool(properties, "topMost", c->IsTopMost()));
	c->SetVisible(CoerceBool(properties, "visible", c->IsVisible()));
	c->SetTransparentBackground(CoerceBool(properties,
		"transparentBackground", c->HasTransparentBackground()));
	c->SetTransparency(properties->GetDouble("transparency", c->GetTransparency()));

#ifdef OS_OSX
	c->SetTexturedBackground(properties->GetDouble("texturedBackground", c->HasTexturedBackground()));
#endif

	EnforceMaxMinConstraints(c);
	EnforceTransparentBackgroundSettings(c);
	return c;
}