Mini Kabibi Habibi
// Copyright 2023 Adobe Systems Incorporated
vToolIconWidth = 28 * gFontScale;
vToolIconHeight = 26 * gFontScale;
vToolColumnWidth = vToolIconWidth + 6;
vSliderHeight = 12;
vSliderAlign = align_center;
// Note - this is a special case, regular #defines such as Macintosh or WIN_32 are not available here
#ifdef MacEve
vSliderWidth = zstring_asinteger(zstring: '$$$/Dialog/FocusMask/Mac/SliderWidth=123');
#endif
// Note - this is a special case, regular #defines such as Macintosh or WIN_32 are not available here
#ifdef WinEve
vSliderWidth = zstring_asinteger(zstring: '$$$/Dialog/FocusMask/Win/SliderWidth=120');
#endif
vEditWidth = max_digit_width() * 5 + gEditDoubleOutset;
vSmallerGap = 2;
zViewModeLabel = '$$$/Dialog/FocusMask/ViewModeLabel=View:';
zNameInFocusRadius = '$$$/Dialog/FocusMask/InFocusRadius=&In-Focus Range:';
zNameImageNoiseLevel = '$$$/Dialog/FocusMask/ImageNoiseLevel=Image &Noise Level:';
zNameBinarySegLambda = '$$$/private/Dialog/FocusMask/BinarySegLambda=Binary Seg Lambda:';
zNameBinarySegSigma = '$$$/private/Dialog/FocusMask/BinarySegSigma=Binary Seg Sigma:';
zNamePowerLaw = '$$$/private/Dialog/FocusMask/PowerLaw=Power Law:';
zNameOutputTo = '$$$/Menu/FocusMask/Output=&Output To:';
zNameAdvanced = '$$$/Dialog/FocusMask/Advanced=Advanced';
zNameGoToRefineEdge = '$$$/Dialog/FocusMask/SelectAndMask=Se&lect and Mask...';
zTooltipGoToRefineEdge = '$$$/Dialog/ToolTip/FocusMask/SelectAndMask=Send the selection to Select and Mask';
zAutoInFocusRadiusLabel = '$$$/Dialog/FocusMask/InFocusRadius/Auto=&Auto';
zAutoImageNoiseLevelLabel = '$$$/Dialog/FocusMask/ImageNoiseLevel/Auto=Au&to';
zAutoLabel = '$$$/Dialog/FocusMask/Auto=Auto';
zAutoTooltip = '$$$/Dialog/ToolTip/FocusMask/AutoCheckbox=Use automatic calculation';
zSoftMaskLabel = '$$$/Dialog/FocusMask/SoftMask=&Soften Edge';
zSoftMaskTooltip = '$$$/Dialog/ToolTip/FocusMask/CreateSoftMask=Run additional processing to soften the edge';
vMaxLabelWidth = max(zstring_width(zstring: zViewModeLabel, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameInFocusRadius, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameImageNoiseLevel, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameBinarySegLambda, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameBinarySegSigma, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNamePowerLaw, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameOutputTo, font_id: gUIFont, font_size: gSmallFontSize));
zOutputSelection = '$$$/Menu/FocusMask/Output/Selection=Selection';
zOutputLayerMask = '$$$/Menu/FocusMask/Output/LayerMask=Layer Mask';
zOutputNewLayer = '$$$/Menu/FocusMask/Output/NewLayer=New Layer';
zOutputNewLayerWithMask = '$$$/Menu/FocusMask/Output/NewLayerWithMask=New Layer with Layer Mask';
zOutputNewDocument = '$$$/Menu/FocusMask/Output/NewDocument=New Document';
zOutputNewDocumentWithMask = '$$$/Menu/FocusMask/Output/NewDocumentWithMask=New Document with Layer Mask';
vMaxOutputWidth = max(zstring_width(zstring: zOutputSelection, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zOutputLayerMask, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zOutputNewLayer, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zOutputNewLayerWithMask, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zOutputNewDocument, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zOutputNewDocumentWithMask, font_id: gUIFont, font_size: gSmallFontSize));
vOutputWidth = vMaxOutputWidth + 28;
dialog(name: '$$$/Dialog/FocusMask/FocusMask=Focus Area', class_name: 'TFocusMaskDialog', show: true, placement: place_column, child_horizontal: align_left) {
group(view_id: 'fmdg', placement: place_column, child_horizontal: align_fill) {
group(placement: place_row) {
group(placement: place_column, width: vToolColumnWidth, spacing: 0, vertical: align_top, child_horizontal: align_center) {
control(view_id: 'sltA', class_name: 'TTempZoomToolSlot', height: vToolIconHeight, width: vToolIconWidth);
control(view_id: 'sltB', class_name: 'TTempHandToolSlot', height: vToolIconHeight, width: vToolIconWidth);
}
cluster(view_id: 'vmcl', name: '$$$/Dialog/FocusMask/ViewModeGroup=View Mode', spacing: gSpace, placement: place_row) {
group(placement: place_row, child_vertical: align_center, tooltip: '$$$/Dialog/ToolTip/FocusMask/ViewMode=Choose a view to improve visibility. Press F to cycle.') {
static_text(name: zViewModeLabel, width: vMaxLabelWidth, horizontal: align_right);
view(view_id: 'vwmd', class_name: 'TViewModeControl', frame: frame_bevel, height: 40, width: 40 + 13);
}
group(placement: place_column, spacing: 12) {
check_box(view_id: 'prev', name: '$$$/Dialog/FocusMask/Preview=Preview', tooltip: '$$$/Dialog/ToolTip/FocusMask/Preview=Toggle selection preview');
}
}
}
group(placement: place_row) {
group(placement: place_column, spacing: 0, width: vToolColumnWidth, vertical: align_top, child_horizontal: align_center) {
control(view_id: 'sltC', class_name: 'TFocusMaskAddToolSlot', height: vToolIconHeight, width: vToolIconWidth);
control(view_id: 'sltD', class_name: 'TFocusMaskSubtractToolSlot', height: vToolIconHeight, width: vToolIconWidth);
}
cluster(view_id: 'fmpr', name: '$$$/Dialog/FocusMask/Parameters=Parameters', spacing: gSpace) {
group(placement: place_row, class_name: 'TEditSlider', view_id: 'rads', spacing: vSmallerGap, tooltip: '$$$/Dialog/ToolTip/FocusMask/InFocusRange=Adjust to fine tune the focus area') {
static_text(name: zNameInFocusRadius, view_id: 'rdnm', width: vMaxLabelWidth, horizontal: align_right, class_name: 'THotText');
slider(view_id: 'rdsl', height: vSliderHeight, width: vSliderWidth, vertical: vSliderAlign);
edit_text(view_id: 'rdtx', class_name: 'TSliderFixedPoint', width: vEditWidth);
static_text(name: '$$$/private/Dialog/FocusMask/Empty=');
check_box(view_id: 'rdcb', tooltip: zAutoTooltip, name: zAutoInFocusRadiusLabel);
}
cluster(view_id: 'advc', name: zNameAdvanced, placement: place_column, use_reveal: true, use_bold_label: true, noFrame: true) {
group(placement: place_row, class_name: 'TEditSlider', view_id: 'imns', spacing: vSmallerGap, tooltip: '$$$/Dialog/ToolTip/FocusMask/ImageNoiseLevel=Increase the image noise level if too much background is selected in a noisy image') {
static_text(name: zNameImageNoiseLevel, view_id: 'innm', width: vMaxLabelWidth, horizontal: align_right, class_name: 'THotText');
slider(view_id: 'insl', height: vSliderHeight, width: vSliderWidth, vertical: vSliderAlign);
edit_text(view_id: 'intx', class_name: 'TSliderFixedPoint', width: vEditWidth);
static_text(name: '$$$/private/Dialog/FocusMask/Empty=');
check_box(view_id: 'incb', tooltip: zAutoTooltip, name: zAutoImageNoiseLevelLabel);
}
}
}
}
group(placement: place_row) {
view(width: vToolColumnWidth);
cluster(view_id: 'oucl', name: '$$$/Dialog/FocusMask/Output=Output', spacing: gSpace) {
popup(view_id: 'outp', resource_id: 2472, tooltip: '$$$/Dialog/ToolTip/FocusMask/Output=Output type');
}
}
group(placement: place_row) {
view(width: vToolColumnWidth);
check_box(view_id: 'soft', dismiss: false, name: zSoftMaskLabel, tooltip: zSoftMaskTooltip);
}
group(spacing: gLargeSpace, placement: place_row, child_horizontal: align_fill, vertical: align_center) {
group(placement: place_row, horizontal: align_left) {
view(view_id: 'busy', class_name: 'TIconSeriesView', width: 32, height: 28);
button(name: zNameGoToRefineEdge, view_id: 'refe', show: true, dismiss: true, font: static_font, dialogButton: false, tooltip: zTooltipGoToRefineEdge);
}
group(spacing: gLargeSpace, horizontal: align_right, placement: place_column) {
group(name: 'OKCancel', placement: place_row, show: true, horizontal: align_fill) {
button(name: gCancelString, horizontal: align_fill, view_id: 'cncl', show: true, dismiss: true, font: static_font);
button(name: gOKString, horizontal: align_fill, view_id: 'ok ', show: true, dismiss: true,
default: true, font: static_font);
}
}
}
}
}
// Footer - Copyright 2023 Adobe Systems Incorporated