Source code for rsmxo.Implementations.Display.Annotation.Rectangle

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from ..... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RectangleCls:
	"""
	| Commands in total: 8
	| Subgroups: 7
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("rectangle", core, parent)

	@property
	def value(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_value'):
			from .Value import ValueCls
			self._value = ValueCls(self._core, self._cmd_group)
		return self._value

	@property
	def remove(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_remove'):
			from .Remove import RemoveCls
			self._remove = RemoveCls(self._core, self._cmd_group)
		return self._remove

	@property
	def color(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_color'):
			from .Color import ColorCls
			self._color = ColorCls(self._core, self._cmd_group)
		return self._color

	@property
	def height(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_height'):
			from .Height import HeightCls
			self._height = HeightCls(self._core, self._cmd_group)
		return self._height

	@property
	def width(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_width'):
			from .Width import WidthCls
			self._width = WidthCls(self._core, self._cmd_group)
		return self._width

	@property
	def horizontal(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_horizontal'):
			from .Horizontal import HorizontalCls
			self._horizontal = HorizontalCls(self._core, self._cmd_group)
		return self._horizontal

	@property
	def vertical(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_vertical'):
			from .Vertical import VerticalCls
			self._vertical = VerticalCls(self._core, self._cmd_group)
		return self._vertical

[docs] def clear(self, annotation=repcap.Annotation.Default) -> None: """ ``DISPlay:ANNotation:RECTangle<*>:CLEar`` \n Snippet: ``driver.display.annotation.rectangle.clear(annotation = repcap.Annotation.Default)`` \n Deletes all rectangle annotations. :param annotation: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Annotation') """ annotation_cmd_val = self._cmd_group.get_repcap_cmd_value(annotation, repcap.Annotation) self._core.io.write(f'DISPlay:ANNotation:RECTangle{annotation_cmd_val}:CLEar')
[docs] def clear_and_wait(self, annotation=repcap.Annotation.Default, opc_timeout_ms: int = -1) -> None: annotation_cmd_val = self._cmd_group.get_repcap_cmd_value(annotation, repcap.Annotation) """ ``DISPlay:ANNotation:RECTangle<*>:CLEar`` \n Snippet: ``driver.display.annotation.rectangle.clear_and_wait(annotation = repcap.Annotation.Default)`` \n Deletes all rectangle annotations. Same as clear, but waits for the operation to complete before continuing further. Use the RsMxo.utilities.opc_timeout_set() to set the timeout value. :param annotation: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Annotation') :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'DISPlay:ANNotation:RECTangle{annotation_cmd_val}:CLEar', opc_timeout_ms)
def clone(self) -> 'RectangleCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = RectangleCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group