Beispiel #1
0
std::size_t
DebuggerClientImpl::property_set(
  const std::string& aPropertyLongName,
  int aStackDepth,
  int aContextId,
  std::size_t aMaxDataSize,
  const std::string& aPropertyAddress)
{
  std::size_t id = property_x("property_set", aPropertyLongName, aStackDepth, aContextId, aMaxDataSize);
  if (aPropertyAddress != "")
    *theOutStream << " -a " << aPropertyAddress;
  *theOutStream << '\0';
  theOutStream->flush();
  return id;
}
Beispiel #2
0
std::size_t
DebuggerClientImpl::property_get(
  const std::string& aPropertyLongName,
  int aStackDepth,
  int aContextId,
  std::size_t aMaxDataSize,
  int aDatapage,
  const std::string& aPropertyKey)
{
  std::size_t id = property_x("property_get", aPropertyLongName, aStackDepth, aContextId, aMaxDataSize);
  if (aDatapage >= 0)
    *theOutStream << " -p " << aDatapage;
  if (aPropertyKey != "")
    *theOutStream << " -k " << aPropertyKey;
  *theOutStream << '\0';
  theOutStream->flush();
  return id;
}
Beispiel #3
0
void
PatchPortModule::store_location()
{
	const float x = static_cast<float>(property_x());
	const float y = static_cast<float>(property_y());

	const LV2URIMap& uris = App::instance().uris();

	const Atom& existing_x = _model->get_property(uris.ingenui_canvas_x);
	const Atom& existing_y = _model->get_property(uris.ingenui_canvas_y);

	if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
			|| existing_x.get_float() != x || existing_y.get_float() != y) {
		Resource::Properties props;
		props.insert(make_pair(uris.ingenui_canvas_x, Atom(x)));
		props.insert(make_pair(uris.ingenui_canvas_y, Atom(y)));
		App::instance().engine()->put(_model->path(), props, Resource::INTERNAL);
	}
}
Beispiel #4
0
void
PatchPortModule::property_changed(const URI& key, const Atom& value)
{
	const LV2URIMap& uris = App::instance().uris();
	switch (value.type()) {
	case Atom::FLOAT:
		if (key == uris.ingenui_canvas_x) {
			move_to(value.get_float(), property_y());
		} else if (key == uris.ingenui_canvas_y) {
			move_to(property_x(), value.get_float());
		}
		break;
	case Atom::STRING:
		if (key == uris.lv2_name
				&& App::instance().configuration()->name_style() == Configuration::HUMAN) {
			set_name(value.get_string());
		} else if (key == uris.lv2_symbol
				&& App::instance().configuration()->name_style() == Configuration::PATH) {
			set_name(value.get_string());
		}
		break;
	case Atom::BOOL:
		if (key == uris.ingen_polyphonic) {
			set_stacked_border(value.get_bool());
		} else if (key == uris.ingen_selected) {
			if (value.get_bool() != selected()) {
				if (value.get_bool()) {
					_canvas->select_item(this);
				} else {
					_canvas->unselect_item(this);
				}
			}
		}
	default: break;
	}
}
Beispiel #5
0
	Gnome::Art::Point src_connection_point() {
		return Gnome::Art::Point(property_x(), property_y());
	}