Mini Kabibi Habibi

Current Path : C:/Program Files/Adobe/Adobe Photoshop 2025/Required/drover_layouts/
Upload File :
Current File : C:/Program Files/Adobe/Adobe Photoshop 2025/Required/drover_layouts/drover_schema.txt

//
// Builtin eve2 enumerations for horizontal alignment. See also 
// [`layout_attributes_alignment_t`](https://stlab.adobe.com/structadobe_1_1layout__attributes__alignment__t.html).
//

enum alignment_h {
    @align_left,
    @align_center,
    @align_right,
    // Expand to include whatever extra width is available.
    @align_fill
}

//
// Builtin eve2 enumerations for vertical alignment. See also 
// [`layout_attributes_alignment_t`](https://stlab.adobe.com/structadobe_1_1layout__attributes__alignment__t.html).
//

enum alignment_v {
    @align_top,
    @align_center,
    @align_bottom,
    // Expand to include whatever extra height is available.
    @align_fill
}

//
// Builtin eve2 enumerations for placement. See also 
// [`layout_attributes_placement_t`](https://stlab.adobe.com/structadobe_1_1layout__attributes__placement__t.html).
//

enum placement {
    // Lay out children along the X axis. See also #!row.
    @place_row,
    // Lay out children along the Y axis. See also #!column.
    @place_column,
    // Lay out children along the Z axis (stacked on top of each other). See also #!overlay.
    @place_overlay
}

//
// Guide masks are used to intentionally permit or suppress guide propagation from the children of a
// container up and out through the container. Without a guide mask, a container inherits all of
// its children's guides. Label (horizontal) and baseline (vertical) guides are treated separately.
// The presence of a tag denotes the suppression of that guide type.
//

enum guide_masks {
    // Both vertical and horizontal guides propagate
    [],
    // Vertical (baseline) guides do not propagate
    [ @guide_baseline ],
    // Horizontal (label) guides do not propagate
    [ @guide_label ],
    // No guides propagate
    [ @guide_baseline, @guide_label ]
}

//
// Guide balancing is the ability to evenly space guides with respect to each other. The aesthetic
// principal behind guide balancing is that lines of text are more legible when the space between
// them is equal. Balancing guides is most useful with baseline (vertical) guides. In a column of
// widgets, it is possible for them to have different heights, resulting in baselines that are
// different distances from one another. By enabling guide balancing at the container level, the
// engine will ensure the guides within the container are equidistant from one another.
//

enum guide_balances {
    // No guide balancing happens
    [],
    // Vertical (baseline) guides are balanced
    [ @guide_baseline ],
    // Horizontal (label) guides are balanced
    [ @guide_label ],
    // Both vertical and horizontal guides are balanced
    [ @guide_baseline, @guide_label ]
}

//
// Placeable overrides are available to all roots, containers, and leaves.
//
// Also see these eve2 
// [placeable overrides, their defaults, and notes](https://stlab.adobe.com/classadobe_1_1eve__t.html#a0f6f82e74650ad9d0a5954f1ceda8cca).
//

def _abstract_alignable {
    // See also the original
    // [`alignment` docs](https://stlab.adobe.com/structadobe_1_1layout__attributes__alignment__t.html).
    horizontal: alignment_h {
        default: @align_left
    }
    // See also the original
    // [`alignment` docs](https://stlab.adobe.com/structadobe_1_1layout__attributes__alignment__t.html).
    vertical: alignment_v {
        default: @align_top
    }
}

//
// Spacing enumerations are defined by Drover and used to convey relationships between UI elements.
// Their use should be encouraged versus "magic numbers". See also the 
// [source location](https://git.corp.adobe.com/DVA/dva/blob/main/Drover/dvaadameve/src/UI_LayoutTheme.cpp#L80)
// where they are defined.
//
enum spacing {
    0,
    @connected_spacing,
    // e.g., the distance between a widget and its label
    @label_widget_spacing,
    @button_group_spacing,
    @related_spacing,
    @inter_group_spacing,
    // e.g., the gap between a `Cancel` button and a `Preview` checkbox in a column
    @unrelated_spacing,
    @separated_spacing,
    @checkbox_spacing
}

//
// Container overrides are available only containers and roots - not leaves (which is why these
// overrides and `_abstract_alignable` have been separated from the eve2 `placeable` concept). Also
// specifies the `container` attribute but NOT the `root` attribute, so this abstract should be
// inherited by containers in the layout that are not themselves the root container.
//

def _abstract_container(container: true): _abstract_alignable {
    // See also the original [`placement` docs](https://stlab.adobe.com/structadobe_1_1layout__attributes__placement__t.html).
    placement: placement {
        default: @place_row
    }
    // See also the original [`alignment` docs](https://stlab.adobe.com/structadobe_1_1layout__attributes__alignment__t.html).
    child_horizontal: alignment_h {
        default: @align_left
    }
    // See also the original [`alignment` docs](https://stlab.adobe.com/structadobe_1_1layout__attributes__alignment__t.html).
    child_vertical: alignment_v {
        default: @align_top
    }
    // TODO: Fix default magic number.
    spacing: spacing {
        default: 10
    }
    margin: spacing {
        default: 0
    }
    // All guides will propagate through this container to its parent.
    guide_mask: guide_masks {
        default: []
    }
    // No guide balancing by default along either axis.
    guide_balance: guide_balances {
        default: []
    }
}

//
// An abstract schema definition- not an actual layout widget. These root overrides are available
// only to roots. Also explicitly unspecifies the `container` attribute and sets the `root`
// attribute, so this abstract should be inherited by layout roots and NOT sub-containers within
// the layout. In other words, "root" containers MUST be at the top level of a layout. In
// contrast, "containers" MUST be a container but MUST NOT be a root. It is possible for some
// containers to also be root containers, but they are more an exception than the rule.
//

def _abstract_root(container: false, root: true): _abstract_container;

//
// Rows layout their children along the X axis.
//

def row(noncreating: true): _abstract_container {
    // `placement` is intrinsic to `row`.
    placement: delete;
}

//
// Columns layout children along the Y axis.
//

def column(noncreating: true): _abstract_container {
    // `placement` is intrinsic to `column`.
    placement: delete;

    // Just kidding! Columns do not propagate baselines by default.
    guide_mask: guide_masks {
        default: [ @guide_baseline ]
    }
}

//
// Overlays layout children along the Z axis. Note this use container's use is infrequent, and often
// holds children that govern their own visibility and/or inclusion in the layout (e.g., tab
// views).
//

def overlay(noncreating: true): _abstract_container {
    // `placement` is intrinsic to `overlay`.
    placement: delete;
    child_vertical: alignment_v {
        default: @align_fill
    }
}

//
// sub_layout holds the rest of the layout that comes from the dialog.
// Used in a base such as ok_cancel_dialog
//

def sub_layout {
    _meta {
        instance_type: "polymorphic_container",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/utils/polymorphic_container.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/utils/polymorphic_container.cpp",
        adaptor_type: "sub_layout_adapter",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/utils/polymorphic_container.cpp"
    }
    // name of the sublayout to be included inline where this instance currently resides in the layout.
    name: string {
        required: true
    }
}

//
// A window is an abstract container that is a root that must have a name.
//

def _abstract_window: _abstract_root {
    name: zstring {
        required: true
    }
}

//
// A dialog.
//

def dialog: _abstract_window {
    _meta {
        instance_type: "dvaui::ui::UI_Dialog",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/ui/UI_Dialog.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/ui/src/UI_Dialog.cpp",
        adaptor_type: "UI_EveDialogAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }
    placement: placement {
        default: @place_column
    }
    margin: spacing {
        default: @unrelated_spacing
    }
}

//
// A context bar. Unfortunately the Drover implementation requires they have a name, even though it
// is never visible on screen. (Apparently the name is used for automation testing purposes to
// locate the window.)
//

def context_bar(root: true) {
    _meta {
        instance_type: "context_bar_window",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/context_bar.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/context_bar.cpp",
        adaptor_type: "context_bar_window_adapter",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/context_bar.cpp"
    }
    name: zstring {
        required: true
    }
}

//
// Drag bar. This is the little grab-bar to the leftmost side of a context bar that the user drags
// to relocate the bar. It requires no user-defined overrides.
//

def drag_bar {
    _meta {
        instance_type: "drag_control",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/drag_bar.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/drag_bar.cpp",
        adaptor_type: "drag_control_bar_adapter",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/drag_bar.cpp"
    }
}

//
// Axis along which the #!separator should extend.
//

enum separator_direction {
    // With this value the separator becomes `horizontal: @align_fill`.
    @horizontal,
    // With this value the separator becomes `vertical: @align_fill`.
    @vertical
}

//
// Also known as a divider. The only override it needs is when it should be vertical.
//

def separator {
    _meta {
        instance_type: "dvaui::controls::UI_Divider",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_Divider.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_Divider.cpp",
        field_type: "dvaui::controls::UI_Divider::SharedPtr",
        adaptor_type: "UI_EveDividerAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }

    // `horizontal` or `vertical` will be set to `@align_fill` accordingly.
    direction: separator_direction {
        default: @horizontal
    }

    // This override is always derived from the value of `@direction`.
    horizontal: delete;

    // This override is always derived from the value of `@direction`.
    vertical: delete;
}

//
// Findable is an abstract notion that adds an identifier that is searched for within the C++ to
// find and drive a UI entity imperatively. Most of the time this will be applied to leaf nodes,
// but some containers are findable, too.
//

def _abstract_findable {
    // The identifier used to find this widget instance at runtime (e.g., via `GetTypedControl`).
    identifier: string;
}

//
// Many widgets leverage the `bind` override to link them to a layout sheet cell at runtime. That
// cell that then be driven programmatically in C++ and/or from widgets in the layout that are
// bound to the same cell.
//

def _abstract_bindable {
    // A `name` that corresponds to the name of an interface or output cell in this layout's sheet.
    // The implementation will establish a link between this UI element and the layout sheet cell,
    // notifying the UI element when the cell's value changes.
    bind : name;
}

//
// A generic subview. Note that it can be both a container and a root. When used as a root,
// oftentimes it is inserted into a preexisting layout (but needs its own layout implementation for
// whatever reason.) When used as a container, it usually requires some kind of custom on-screen
// look (otherwise it would be better to use a row/column/overlay.)
//

def subview(container: true, root: true): _abstract_root, _abstract_findable {
    _meta {
        instance_type: "dvaadameve::UI_EveSubView",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/UI_EveDialog.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveDialog.cpp",
        field_type: "dvaadameve::UI_EveSubView::SharedPtr",
        adaptor_type: "UI_EveSubViewAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }
    placement: placement {
        default: @place_column
    }
}

//
// `optional` is used to contain children whose visibility can be toggled while the containing
// layout is live. Instead of a typical show/hide widget behavior, `optional` containers will
// remove themselves from the eve2 layout forest, causing the containing layout to resize itself as
// the `optional` pops in and out of the UI. The widget does this by monitoring a layout sheet
// cell, comparing the cell's value against a "show" value held by the `optional`. When the cell
// and the `optional` have the same value, the `optional` is included in the layout and its
// contents visible to the user. Otherwise, it is removed from the layout and its contents not
// shown.
//
// In the Drover implementation, `optional`s are implemented as created "tab view" subviews, however
// they can be used in any context.
//

def optional: _abstract_container, _abstract_bindable {
    _meta {
        instance_type: "dvaadameve::UI_TabView",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_TabView.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_TabView.cpp",
        field_type: "dvaadameve::UI_TabView::SharedPtr",
        adaptor_type: "UI_EveTabViewAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }
    placement: placement {
        default: @place_column
    }
    // The is the value the bound cell (via `bind`) must be in order for this `optional` to be
    // included in the layout. Otherwise, the optional will be excluded.
    value: any {
        default: true
    }
}

//
// An abstract mixin that adds a name and tooltip to a UI element.
//

def _abstract_named {
    // The string used when rendering the widget in the layout.
    name: zstring {
        required: true
    }
    // Alternative text (tooltip) for the widget.
    alt: zstring;
}

//
// This is the schema base class for most UI views or UI controllers. It includes the findable
// abstraction that lets the user specify identifiers for the widget so they can be bound and
// driven by the C++ backing the layout.
//

def _abstract_interactive : _abstract_alignable, _abstract_named, _abstract_findable;

//
// Visual style variant for #!group.
//

enum group_variant {
    // Header label + top divider line
    @divider,
    // Header label only
    @header
}

//
// A container that draws itself with a frame and text label. Intended to visually group multiple UI
// elements together. Not interactive.
//

def group : _abstract_container, _abstract_named {
    _meta {
        instance_type: "dvaui::controls::UI_OutlineBox",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_OutlineBox.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_OutlineBox.cpp",
        field_type: "dvaui::controls::UI_OutlineBox::SharedPtr",
        adaptor_type: "UI_EveGroupBoxAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }
    
    variant: group_variant {
        required: true
    }

    placement: placement {
        default: @place_column
    }
}

//
// It's a button. Go on, click it. Don't be shy. What does it do, you ask? I have no idea; I am just
// the widget documentation.
//

def button: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_Button",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_Button.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_Button.cpp",
        field_type: "dvaui::controls::UI_Button::SharedPtr",
        adaptor_type: "DVA_ButtonAdapterFactory",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/adaptors/src/UI_EveButtonAdapter.cpp"
    }
    image: string;
}

//
// These are buttons found in context bars. They support a combination of text and an icon. Note
// that these are Drover buttons, but will go through one of several button subclass adaptors
// during widget creation depending on the contents of the button.
//

// This is actualy action button and we should consider renaming the widget in order to avoid confusion.
def context_button: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_PictureTextButton",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_PictureTextButton.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_PictureTextButton.cpp",
        field_type: "dvaui::controls::UI_PictureTextButton::SharedPtr",
        adaptor_type: "context_button_adaptor",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/adaptors/src/UI_EveButtonAdapter.cpp"
    }
    image: string;
    // `name` is optional for this widget.
    name: zstring {
        required: false
    }
}

//
// There should be only one OK button in a given layout. This is the button that will be triggered
// when the <kbd>Return</kbd> key is pressed. This button will also have slightly different
// presentation in the layout to call it out as the default commit button.
//

def ok_button: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_Button",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_Button.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_Button.cpp",
        field_type: "dvaui::controls::UI_Button::SharedPtr",
        adaptor_type: "DVA_ButtonAdapterFactory",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/adaptors/src/UI_EveButtonAdapter.cpp"
    }
    name: zstring {
        required: false,
        default: "$$$/ControlStrings/OK=OK"
    }
}

//
// There should be only one Cancel button in a given layout. This is the button that will be
// triggered when the <kbd>Escape</kbd> key is pressed.
//

def cancel_button: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_Button",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_Button.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_Button.cpp",
        field_type: "dvaui::controls::UI_Button::SharedPtr",
        adaptor_type: "DVA_ButtonAdapterFactory",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/adaptors/src/UI_EveButtonAdapter.cpp"
    }
    name: zstring {
        required: false,
        default: "$$$/ControlStrings/Cancel=Cancel"
    }
}

//
// Eve has the notion of "guides", which are added optionally to a given widget during measurement.
// If the guides are present, eve2 will align them for the widgets that use them. If no guides are
// specified for a widget, eve2 will not adjust the widget's size or position with respect to
// guides that may be present. eve2 has both horizontal (aka "colon alignment") and vertical
// (aka "baseline alignment") guides. eve2 will do cross-hierarchy guide alignment. So two
// colon-aligned widgets do not have to be in the same column, for example. A `guide_consumer` does
// nothing to the layout other than emit either horizontal or vertical guides which will cause its
// siblings to be repositioned accordingly. For example, in a column with an edit field and a
// checkbox, if you want the checkbox box placed immediately under the edit field, add a horizontal
// `guide_consumer` as its prior sibling to shift it the same width as the checkbox label.
//

def guide_consumer(noncreating: true) {
    _meta {
        adaptor_type: "UI_EveGuideConsumerAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }
    consume_horizontal: number {
        default: 0,
        min: 0
    }
    consume_vertical: number {
        default: 0,
        min: 0
    }
}

//
// Used to present unmodifiable text to the user. `static_text` is reflowable.
// In order to reflow text, `characters` must be nonzero. Typically
// `characters` is used in conjunction with `horizonal: @align_fill` to make
// the text paragraph as wide as it can be.
//

def static_text: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_StaticText",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_StaticText.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_StaticText.cpp",
        field_type: "dvaui::controls::UI_StaticText::SharedPtr",
        adaptor_type: "UI_EveStaticTextAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }

    // A semantic minimum width regardless of the value of `name`. Given
    // `characters: N`, the widget will be wide enough to display `N`
    // characters of average width without truncation or clipping.
    // (Where "average width" is implementation-defined.) A value of
    // `0` will use the length of the widget's `name` for its minimum
    // width. When nonzero, the height of the static text field will
    // adjust to show the full text.
    characters: number {
        default: 0,
        min: 0
    }
    // Set headingText to true for bold font in static_text
    headingText: bool;
    // Set multiLine to true if you need static_text to have multiple lines
    multiLine: bool;
    // textAlignment { 'left', 'right', 'center'} for alignment of multiline strings
    textAlignment: string;
}

//
// Used to display images and icons. Color management is optional.
//

def image: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_ColorManagedImage",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_ColorManagedImage.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_ColorManagedImage.cpp",
        field_type: "dvaui::controls::UI_ColorManagedImage::SharedPtr",
        adaptor_type: "UI_EveStaticImageAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }

    // `name` is not used for static imagery.
    name: delete;

    // `image` is the name of the image/icon to display. For Photoshop, the names of
    // these resources come from `pngresources/IconResources.txt`. Use the high-level
    // name of the icon; the thematic variant will be auto-selected. If the images
    // are PNG files the name must end with `.png`, otherwise the engine will assume
    // SVG. For example, `CxUI_FlagOffensive` SVG icon would be just
    // `CxUI_FlagOffensive`
    image: string {
        required: true
    }

    // Whether the image should be color managed. When `true`, color management is applied.
    color_managed: bool {
        default: false
    }

    // Whether to display the image in a disabled/grayed-out state.
    display_disabled: bool {
        default: false
    }

    // Whether to display a border around the image.
    border: bool {
        default: false
    }

    // Whether to use padding inside the border. Only valid when `border` is `true`.
    use_padding: bool {
        default: false
    }

    // Whether to scale the image to fit within the allocated rectangle while maintaining
    // aspect ratio.
    fit_to_rect: bool {
        default: false
    }
}

//
// A mask preview is a widget that allows the display of both a 1-channel mask as well as
// as a 3-channel image. It is used to preview the mask in and show the orignial image in
// the Replace Color dialog.
//

def mask_preview: _abstract_interactive {
    _meta {
        instance_type: "ps::drover::mask_preview",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_MaskPreview.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_MaskPreview.cpp",
        field_type: "ps::drover::mask_preview::SharedPtr",
        adaptor_type: "ps::drover::mask_preview_adapter",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/tree/main/photoshop/interfaces/drover/controls/mask_preview.hpp"
    }

    // `name` is not used for mask previews.
    name: delete;
}

//
// A field for text based entry. For numeric entry, use #!edit_slider.
//

def edit_text: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_TextEdit",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_TextEdit.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_TextEdit.cpp",
        field_type: "dvaui::controls::UI_TextEdit::SharedPtr",
        adaptor_type: "UI_EveTextEditAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }

    // A semantic minimum width. Given a `characters: N`, the edit field will be wide enough to
    // display `N` characters of average width without truncation or clipping.
    // (Where "average width" is implementation-defined.)
    // drover spectrumPolicy set the default characters to 0 instead of 10.
    characters: number {
        default: 0,
        min: 0,
        max: 100
    }
    // For prompt edit fields in Generate fill context, we dont need a name for edit text
    name: zstring {
        required: false
    }
}

//
// Checkboxes can be driven either programmatically or via layout sheet cell (via `bind`). In the
// latter case the cell can also be bound to other UI elements, resulting in the checkbox driving
// other widgets' behaviors as its value is toggled (or vice versa). For example, a `checkbox` and
// an #!optional can be bound to the same cell, letting the checkbox drive the visibility state of
// the optional (and the elements it contains).
//

def checkbox: _abstract_interactive, _abstract_bindable {
    _meta {
        instance_type: "dvaui::controls::UI_Checkbox",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_Checkbox.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_Checkbox.cpp",
        field_type: "dvaui::controls::UI_Checkbox::SharedPtr",
        adaptor_type: "UI_EveCheckboxAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }
    // The is the value the bound cell (via `bind`) must be in order for this `checkbox` to show a
    // checkmark. Otherwise, this `checkbox` will be unchecked. When specified, this is also the
    // value the checkbox will set the cell to when it goes from unchecked to checked by the user.
    value_on: any {
        default: true
    }
    // This is the value the checkbox will set the bound cell (via `bind`) to when it goes from
    // checked to unchecked by the user. This does _not_ have to be the value of the cell in order
    // for the checkbox to be unchecked.
    value_off: any {
        default: false
    }
}

//
// Radio buttons are usually contained within a #!radiogroup to manage their states
// programmatically. (It doesn't have to be this way. If they're built right, it is possible to
// drive them via a layout sheet value.)
//

def radio_button: _abstract_interactive, _abstract_bindable {
    _meta {
        instance_type: "dvaui::controls::UI_RadioButton",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_RadioButton.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_RadioButton.cpp",
        field_type: "dvaui::controls::UI_RadioButton::SharedPtr",
        adaptor_type: "UI_EveRadioButtonAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }
    // The is the value the bound cell (via `bind`) must be in order for this `radio_button` to show
    // filled/pressed. Otherwise, this `radio_button` will be empty/unpressed. When specified, this
    // is also the value the radio button will set the cell to when it goes from unpressed to
    // pressed by the user.
    value: any {
        default: true
    }
}

//
// Radio groups are the containers around #!radio_button widgets that programmatically govern their
// toggled states, as they are mututally exclusive. The container type establishes the
// mutual-exclusion relationship between the radio buttons it contains.
//

def radiogroup: _abstract_container {
    _meta {
        instance_type: "dvaui::controls::UI_RadioGroup",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_RadioButton.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_RadioButton.cpp",
        field_type: "dvaui::controls::UI_RadioGroup::SharedPtr",
        adaptor_type: "UI_EveRadioGroupAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }

    placement: placement {
        default: @place_column
    }

    spacing: spacing {
        default: 0
    }
}

//
// A hint to the engine on how to measure a #!popup. These are strings that turn into values of the
// enum `PickerMeasureStrategy` (UI_Popup.h).
//
enum popup_width_semantics {
    // size based on Spectrum defaults
    "default",
    // size to total size of selected item
    "selectedItem",
    // size to total size of longest item in the picker
    "maxItem"
}

// Popups are an odd duck in Drover: they have permitted the declaration of popup items by making
// them children of the popup in the layout itself. Therefore, `popup` needs to be marked as a
// container type, even though it really isn't. Also because of this weird relationship to its
// children, this is the only container the linter won't remove if it has no children (as the popup
// will be populated at runtime.)

def popup(container: true, empty_container: true): _abstract_interactive {
    _meta {
        instance_type: "dvaadameve::UI_Popup",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_Popup.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_Popup.cpp",
        field_type: "dvaadameve::UI_Popup::SharedPtr",
        adaptor_type: "UI_EvePopupAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/adaptors/src/UI_EvePopupAdapter.cpp"
    }

    name: zstring {
        required: false
    }

    measureStrategy : popup_width_semantics {
        default: "default"
    }
}

//
// This is the type Drover allows as a children to a #!popup. It doesn't actually create a widget;
// rather, they are used to populate their parent popup with items. These items cannot be defined
// in any context other than as a child of `popup`.
//
def popup_item : _abstract_findable, _abstract_named {
    _meta {
        adaptor_type: "DVA_PopupItemAdapterFactory",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_ControlFactory.cpp"
    }

    // alt is not allowed for a popup item
    alt: delete;
}

//
// (This widget is **DEPRECATED** in favor of #!edit_slider.) Numeric entry _without_ a unit.
//

def number_edit: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_NumberEdit",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_NumberEdit.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_NumberEdit.cpp",
        field_type: "dvaadameve::UI_NumberEdit::SharedPtr",
        adaptor_type: "UI_EveNumberEditAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }

    // Must be less than `maxValue`; reversing the range is not allowed.
    minValue: number {
        default: 0
    }

    // Must be greater than `minValue`; reversing the range is not allowed.
    maxValue: number {
        default: 100
    }

    // See `edit_slider.digits` for more information.
    digits: number {
        default: 0,
        min: 0
    }

    // See `edit_slider.characters` for more information.
    characters: number {
        default: 0,
        min: 0
    }

    // See `edit_slider.decimal_places` for more information (note the key is not the same).
    decimalPlaces: number {
        default: 0,
        min: 0
    }

    // How much the value should change by when keyboard arrow keys are pressed.
    // Values are pulled from `UI_NumberData`.
    increment: number {
        default: 1
    }
}

//
// The various units available for #!edit_slider and #!unit_edit_number.
//

enum number_units {
    // "NoUnit", but using hexadecimal display
    "NumberEditUnit_Base16",
    "NumberEditUnit_CM",
    "NumberEditUnit_Degree",
    "NumberEditUnit_Foot",
    "NumberEditUnit_Ha",
    "NumberEditUnit_Inch",
    "NumberEditUnit_M",
    "NumberEditUnit_MM",
    "NumberEditUnit_NoUnit",
    "NumberEditUnit_Percent",
    "NumberEditUnit_Pica",
    "NumberEditUnit_Pixel",
    "NumberEditUnit_Point",
    "NumberEditUnit_Q",
    "NumberEditUnit_Time"
}

//
// (This widget is **DEPRECATED** in favor of #!edit_slider.) Numeric entry _with_ a unit.
//

def unit_edit_number: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_UnitNumberEdit",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_UnitNumberEdit.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_UnitNumberEdit.cpp",
        field_type: "dvaadameve::UI_UnitNumberEdit::SharedPtr",
        adaptor_type: "UI_EveUnitNumericEditAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }

    // TODO: This _should_ be required.
    name : zstring {
        required: false
    }

    // Must be less than `maxValue`; reversing the range is not allowed.
    minValue: number {
        default: 0
    }

    // Must be greater than `minValue`; reversing the range is not allowed.
    maxValue: number {
        default: 100
    }

    // See `edit_slider.characters` for more information.
    characters: number {
        default: 0,
        min: 0
    }

    // See `edit_slider.digits` for more information.
    digits: number {
        default: 12,
        min: 0
    }

    // See `edit_slider.decimal_places` for more information. Note the adaptor layer uses an improper key `decimalPlaces` whose value is `decimal_places`.
    decimal_places: number {
        default: 6,
        min: 0
    }

    // See `edit_slider.disable_unit_conversion` for more information
    disable_unit_conversion: bool {
        default: false
    }

    // See `edit_slider.unit` for more information.
    unit: number_units {
        default: "NumberEditUnit_NoUnit"
    }
}

def hue_sat_ramp_slider: _abstract_interactive {
    _meta {
        instance_type: "hue_sat_ramp_slider",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/hue_sat_ramp_slider.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/hue_sat_ramp_slider.cpp",
        field_type: "hue_sat_ramp_slider::SharedPtr",
        adaptor_type: "hue_sat_ramp_slider_adapter",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/hue_sat_ramp_slider.cpp"
    }

    identifier : string {
        required: true
    }

    // this widget does not have a name.
    name: delete;
}

//
// `ok_cancel_reset_column` is a column that contains OK and Cancel buttons with a reasonable
// spacing between them. When the <kbd>Option</kbd>/<kbd>Alt</kbd> key is held down, the Cancel
// button will become Reset.
//

def ok_cancel_reset_column: _abstract_alignable {
    _meta {
        instance_type: "ok_cancel_reset_column",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/buttons.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/buttons.cpp",
        field_type: "ok_cancel_reset_column"
    }
}

//
// These are the varying ways an #!edit_slider can be presented in a layout.
//
enum edit_slider_variant {
    // A top row with a slider and edit field, and a slider underneath them.
    "stacked",
    // same as "stacked", but with a smaller minimum length for the slider.
    "stacked_compact",
    // A single row of a label, slider, and edit field
    "flat",
    // A label and an edit field appended with a dropdown where the slider is shown when clicked.
    "popup",
    // A label and an edit field _without a slider_. Useful for values that are not usually fine-grain controlled, such as document bounds.
    "noslider"
}

//
// `edit_slider` is the de-facto widget for numeric entry, with or without a unit. There are a few
// different ways the widget will lay itself out in the UI in order to accommodate various needs
// (e.g., limited space or lots of edit_sliders.) This widget should supercede uses of both 
// #!number_edit and #!unit_edit_number.
//
// For non-numeric (text) entry, use #!edit_text.
//

def edit_slider: _abstract_interactive {
    _meta {
        instance_type: "edit_slider",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/edit_slider.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/edit_slider.cpp",
        field_type: "edit_slider",
        adaptor_type: "edit_slider_builder_properties",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/edit_slider.cpp"
    }

    // Minimum valid value. If `min_value` is greater than `max_value`, the slider behavior will be reversed.
    min_value: number {
        default: 0
    }

    // Maximum valid value. If `max_value` is less than `min_value`, the slider behavior will be reversed.
    max_value: number {
        default: 100
    }

    // Specifies an exact number of characters to measure, regardless of unit, formatting, or
    // anything else. If both `digits` and `characters` are specified, `digits` is ignored.
    characters: number {
        default: 0,
        min: 0
    }

    // Specifies the amount of digit characters to measure, and we implicitly add either a fixed
    // number of characters for the unit, or measure the actual unit and decimal format, depending
    // on skin level. If both `digits` and `characters` are specified, `digits` is ignored.
    digits: number {
        default: 12,
        min: 0
    }

    // How many decimal places are allowed during entry. This value does not contribute to the
    // measurement of the widget.
    decimal_places: number {
        default: 6,
        min: 0
    }

    // What base unit the value is in.
    unit: number_units {
        default: "NumberEditUnit_NoUnit"
    }

    // Determines if the unit is allowed to change
    disable_unit_conversion: bool {
        default: false
    }

    // Have a conversation with Design as to which variant is best given the context.
    variant: edit_slider_variant {
        default: "stacked"
    }
}

//
// `preset_list` is a composite widget that provides a preset selection interface with a label,
// popup menu to select a preset, and hamburger menu for managing them.
//

def preset_list: _abstract_interactive {
    _meta {
        instance_type: "preset_list",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/preset_list.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/preset_list.cpp",
        field_type: "preset_list",
        adaptor_type: "preset_list_builder_properties",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/preset_list.cpp"
    }
}

//
// The corner rounding options available for #!swatch.
//
enum swatch_rounding {
    // Defer to the design vocabulary for an appropriate amount
    @corner_rounding_default,
    // Square corners
    @corner_rounding_none,
    // Slightly rounded corners (the design vocabulary specifies the exact radius)
    @corner_rounding_normal,
    // Round corners until they touch. This will produce a circle for swatches with a 1:1 aspect
    // ratio, and a pill-shaped swatch otherwise.
    @corner_rounding_full
}

//
// `swatch` is a widget that displays a color value and can be clicked on to perform some action
// (e.g., launch a color picker). It supports different corner rounding styles, including drawing
// the swatch as a circle.
//

def swatch: _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_Swatch",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_Swatch.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_Swatch.cpp",
        field_type: "dvaui::controls::UI_Swatch::SharedPtr",
        adaptor_type: "UI_EveSwatchAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }

    // `name` is optional for this widget.
    name : zstring {
        required: false
    }

    // When `true`, the width of the swatch will be double its height.
    wide : bool {
        default: false
    }

    corner_rounding: swatch_rounding {
        default: @corner_rounding_default
    }

    // This is the fixed color the swatch should take. The expression should be a dictionary with
    // `r`, `g`, and `b` elements whose values range from `0.0` to `1.0`.
    // Example: `{ r: 0.42, g: 0.2, b: 0 }`.
    value: any;
}

//
// Orientation options for #!slider.
//
enum slider_orientation {
    // Layout the slider horizontally.
    @horizontal,
    // Layout the slider vertically.
    @vertical
}

//
// A slider widget for numeric input. The slider provides a visual track with a thumb that can be
// dragged to adjust the value. It supports both horizontal and vertical orientations, as well as
// various customization options like tick marks, center ticks, and pointer directions.
//

def slider: _abstract_interactive, _abstract_bindable {
    _meta {
        instance_type: "dvaui::controls::UI_Slider",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_Slider.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_Slider.cpp",
        field_type: "dvaui::controls::UI_Slider::SharedPtr",
        adaptor_type: "UI_EveSliderAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/adaptors/src/UI_EveSliderAdapter.cpp"
    }

    // Sliders do not have names.
    name: delete;

    // Minimum value of the slider range.
    min_value: number {
        default: 0
    }

    // Maximum value of the slider range.
    max_value: number {
        default: 100
    }

    // The orientation of the slider.
    orientation: slider_orientation {
        default: @horizontal
    }

    // Whether to show a tick mark at the center of the slider.
    center_tick: bool {
        default: false
    }

    // Whether to show tick marks along the slider track.
    show_ticks: bool {
        default: false
    }

    // Whether to snap the slider value to the nearest tick mark.
    snap_on_ticks: bool {
        default: true
    }

    // Whether to snap the slider value to integer values.
    snap_to_int: bool {
        default: true
    }

    // The increment for keyboard navigation and value changes.
    interval: number {
        default: 1
    }

    // Minimum length of the slider in pixels.
    minLength: number {
        default: 100,
        min: 0
    }
}

// service_placeholder_view is not actually a container in the layout sense, its a container in c++
// this is created to hold service picker buttons used in Gen-fill and Gen image workflows
def service_placeholder_view(container: false, root: false) : subview {
    _meta {
        instance_type: "service_placeholder_view",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/service_picker_button.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/service_picker_button.cpp",
        field_type: "service_placeholder_view::SharedPtr",
        adaptor_type: "service_picker_button_adapter",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/service_picker_button.cpp"
    }
}

// This is a meta-widget for #!subview that adds a default margin of `10`.
// `popup_subview` must be the top level container in the #!flyout_subview window
def popup_subview(container: false) : subview {
    _meta {
        instance_type: "dvaadameve::UI_EveSubView",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/UI_EveDialog.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveDialog.cpp",
        field_type: "dvaadameve::UI_EveSubView::SharedPtr",
        adaptor_type: "UI_EveSubViewAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }
    // TODO: get rid of magic number
    margin: spacing {
        default: 10
    }
}

// flyout_subview is actually a button that opens a flyout window with complex layouts.
// naming is a bit confusion here.
def flyout_subview : _abstract_interactive {
    _meta {
        instance_type: "dvaadameve::controls::UI_FlyoutSubView",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/controls/UI_FlyoutSubView.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/controls/src/UI_FlyoutSubView.cpp",
        field_type: "dvaadameve::controls::UI_FlyoutSubView::SharedPtr",
        adaptor_type: "UI_EveFlyoutSubViewAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/adaptors/src/UI_EveFlyoutSubViewAdapter.cpp"
    }
    // the name of the layout that is going to be generated when this button is clicked.
    // The top-level (root) container in this layout must be #!popup_subview.
    eve_source: string {
        required: true
    }
    // if you specify an image, the button will have the image as icon otherwise its a down arrow icon.
    image: string;
    // Flyout Subview does not honour name field as it is a picture button
    name: delete;
}

// hot_text_url is a link text button. You can specify the url in the layouts or
// you can point to a link in cpp
def hot_text_url : _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_HotTextURL",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_HotTextURL.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_HotTextURL.cpp",
        field_type: "dvaui::controls::UI_HotTextURL::SharedPtr",
        adaptor_type: "UI_EveHotTextURLAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/src/UI_EveNodeAdapters.cpp"
    }
    //not required. We can specify in c++ as well
    url: zstring;
}

// button_bar is actually action group. the buttons are placed in a row by default
// you have to specify detils of individual buttons in the group using items parameter
// each item can have a name, identifier, index as value
def button_bar : _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_ButtonBar",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_ButtonBar.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_ButtonBar.cpp",
        field_type: "dvaui::controls::UI_ButtonBar::SharedPtr",
        adaptor_type: "UI_EveButtonBarAdapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaadameve/adaptors/src/UI_EveButtonBarAdapter.cpp"
    }
    placement: placement {
        default: @place_row
    }
    items: any;
    name: zstring {
        required:false
    }
}

// synthetic_text_to_image_styles_cellview is a custom subview designed to show a custom made
// UI_CellsView called effect styles cellview. This custom control is used
// in Gen-fill and Gen image dialogs and context bars. This grid view contains thumbnail as cells. Each
// cells also have a name attached to it.
// you can also select the cells and the cells will have a selected color and checkbox icon.
def synthetic_text_to_image_styles_cellview(container : false, root: false) : subview {
    _meta {
        instance_type: "synthetic_text_to_image_styles_grid_view",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/photoshop/synthesis/include/synthesis/drover/drover_synthetic_text_to_image_styles_cellview.hpp",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/photoshop/synthesis/sources/drover/drover_synthetic_text_to_image_styles_cellview.cpp",
        field_type: "synthetic_text_to_image_styles_grid_view::SharedPtr",
        adaptor_type: "synthetic_text_to_image_styles_grid_view_adapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/photoshop/synthesis/sources/drover/drover_synthetic_text_to_image_styles_cellview.cpp"
    }
}

// flyout button is a primary outline button which does not have focus indicator.
// this is currently used in context bar flyouts.
def flyout_button : _abstract_interactive {
    _meta {
        instance_type: "dvaui::controls::UI_TextButton",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/UI_TextButton.h",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/Drover/dvaui/controls/src/UI_TextButton.cpp",
        field_type: "flyout_button::SharedPtr",
        adaptor_type: "synthetic_text_to_image_styles_grid_view_adapter",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/sources/drover/controls/buttons.cpp"
    }
}

// synthetic_reference_image_presets_cellview is a custom gridview designed to be used in reference image
// flyouts especially composition reference and style reference
// in Gen-fill and Gen image context bars. This grid view contains thumbnail as cells.
// you can select one cell at a time and can have callback to get the details/thumbnail of that cell
def synthetic_reference_image_presets_cellview(container : false, root: false) : subview {
    _meta {
        instance_type: "synthetic_reference_image_presets_cellview",
        instance_header: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/photoshop/synthesis/include/synthesis/drover/drover_synthetic_reference_image_presets_cellview.hpp",
        instance_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/photoshop/synthesis/sources/drover/drover_synthetic_reference_image_presets_cellview.cpp",
        field_type: "synthetic_reference_image_presets_grid_view::SharedPtr",
        adaptor_type: "synthetic_reference_image_presets_grid_view_adapter",
        adaptor_source: "https://git.corp.adobe.com/DVA/dva/blob/teams/photoshop/main/photoshop/synthesis/sources/drover/drover_synthetic_reference_image_presets_cellview.cpp"
    }
}

//
// this is a custom control which is just an image with a rounded outline around it. This is currently used
// in generative reference image flyouts. This should actually be an image with rounded frame parameters
// like this
// image(identifier: "".
//       image:"",
//      frame: @round );
//
def rounded_icon_image : _abstract_interactive {
    _meta {
        instance_type: "rounded_icon_image",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/rounded_icon_image_view.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/rounded_icon_image_view.cpp",
        field_type: "rounded_icon_image_view::SharedPtr",
        adaptor_type: "rounded_icon_image_view_adapter",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/rounded_icon_image_view.cpp"
    }
    // this is the image that will draw in the center and is needed
    image: string {
        required:true
    }
    // this control cannot have a name
    name: delete;
}

//
// this is a custom control designed for reference image flyouts. This can show any thumbnail created from
// TVMArrayList. This also has a discard icon which a user can use to delete the image.
//
def thumbnail_view : _abstract_interactive {
    _meta {
        instance_type: "thumbnail_view",
        instance_header: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/thumbnail_view.hpp",
        instance_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/thumbnail_view.cpp",
        field_type: "thumbnail_view::SharedPtr",
        adaptor_type: "thumbnail_view_adapter",
        adaptor_source: "https://git.corp.adobe.com/photoshop/photoshop/blob/main/photoshop/interfaces/drover/controls/thumbnail_view.cpp"
    }
    // this control cannot have a name
    name: delete;
}