
__all__ = ["GridPropertyFrame"]

import omni.ui as ui
from ..base_frame import WidgetCollectionFrame
from ..create_widget import PropertyType


class GridPropertyFrame(WidgetCollectionFrame):
    def __init__(self, frame_label: str, widget: ui.Widget) -> None:
        super().__init__(frame_label, widget)

    def _build_ui(self):

        self._add_property(self._widget, "columnWidth", PropertyType.FLOAT)
        self._add_property(self._widget, "rowHeight", PropertyType.FLOAT)

        self._add_property(self._widget, "columnCount", PropertyType.INT, range_from=0)
        self._add_property(self._widget, "rowCount", PropertyType.INT, range_from=0)
