Mini Kabibi Habibi
// Copyright 2023 Adobe Systems Incorporated
font = static_small_font;
vToolIconHeight = 26 * gFontScale;
vToolIconWidth = 28 * 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/RefineEdgeSelection/Mac/SliderWidth=123');
#endif
#ifdef WinEve
vSliderWidth = zstring_asinteger(zstring: '$$$/Dialog/RefineEdgeSelection/Win/SliderWidth=120');
#endif
vIconButtonWidth = 40;
vIconButtonHeight = 28;
vEditWidth = max_digit_width() * 5 + gEditDoubleOutset;
vSmallerGap = 2;
zViewModeLabel = '$$$/Dialog/RefineEdgeSelection/ViewModeLabel=View:';
zNameShowBorder = '$$$/Dialog/RefineEdgeSelection/ShowBorder=Show Radius (J)';
zShowOriginal = '$$$/Dialog/RefineEdgeSelection/ShowOriginal=Show Original (P)';
zNameFindHardEdges = '$$$/Dialog/RefineEdgeSelection/AutoRadius=Sm&art Radius';
zNameBorderWidth = '$$$/Dialog/RefineEdgeSelection/BorderRadius=Radi&us:';
zNameImproveContrast = '$$$/Dialog/RefineEdgeSelection/ImproveContrast=&Contrast:';
zNameSmoothJaggedEdges = '$$$/Dialog/RefineEdgeSelection/Smooth=Smoot&h:';
zNameFeather = '$$$/Dialog/RefineEdgeSelection/FeatherRadius=&Feather:';
zNameContractExpand = '$$$/Dialog/RefineEdgeSelection/ContractExpand=&Shift Edge:';
zNameOutput = '$$$/Dialog/RefineEdgeSelection/Output=Output';
zNameDecontaminate = '$$$/Dialog/RefineEdgeSelection/Decontaminate=&Decontaminate Colors';
zNameDecontaminateAmount = '$$$/Dialog/RefineEdgeSelection/DecontaminateAmount=Amou&nt:';
zNameOutputTo = '$$$/Menu/RefineEdge/Output=&Output To:';
zNameRememberSettings = '$$$/Dialog/RefineEdgeSelection/RememberSettings=Remember Se&ttings';
vMaxLabelWidth = max(zstring_width(zstring: zViewModeLabel, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameBorderWidth, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameImproveContrast, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameSmoothJaggedEdges, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameFeather, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameContractExpand, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameDecontaminateAmount, font_id: gUIFont, font_size: gSmallFontSize), zstring_width(zstring: zNameOutputTo, font_id: gUIFont, font_size: gSmallFontSize));
zOutputSelection = '$$$/Menu/RefineEdge/Output/Selection=Selection';
zOutputLayerMask = '$$$/Menu/RefineEdge/Output/LayerMask=Layer Mask';
zOutputNewLayer = '$$$/Menu/RefineEdge/Output/NewLayer=New Layer';
zOutputNewLayerWithMask = '$$$/Menu/RefineEdge/Output/NewLayerWithMask=New Layer with Layer Mask';
zOutputNewDocument = '$$$/Menu/RefineEdge/Output/NewDocument=New Document';
zOutputNewDocumentWithMask = '$$$/Menu/RefineEdge/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;
zTipViewMode = '$$$/Dialog/ToolTip/RefineEdgeSelection/ViewMode=Choose a view to improve refinement visibility. Press F to cycle.';
zTipFindHardEdges = '$$$/Dialog/ToolTip/RefineEdgeSelection/FindHardEdges=Automatically adapt radius to image edges';
zTipShowBorder = '$$$/Dialog/ToolTip/RefineEdgeSelection/ShowBorder=Show refinement area defined by radius';
zTipBorderWidth = '$$$/Dialog/ToolTip/RefineEdgeSelection/BorderWidth=Size of the refinement area';
zTipImproveContrast = '$$$/Dialog/ToolTip/RefineEdgeSelection/ImproveContrast=Increase contrast of selection edge';
zTipFeatherRadius = '$$$/Dialog/ToolTip/RefineEdgeSelection/FeatherRadius=Soften selection edge';
zTipSmoothness = '$$$/Dialog/ToolTip/RefineEdgeSelection/Smoothness=Smooth jagged edges';
zTipContractExpandPercentage = '$$$/Dialog/ToolTip/RefineEdgeSelection/ContractExpandPercentage=Contract or expand selection edge';
zTipDecontaminate = '$$$/Dialog/ToolTip/RefineEdgeSelection/Decontaminate=Remove color fringe from the image';
zTipDecontaminateAmount = '$$$/Dialog/ToolTip/RefineEdgeSelection/DecontaminateAmount=Amount of color fringe to remove from the image';
zTipOutput = '$$$/Dialog/ToolTip/RefineEdgeSelection/Output=Apply refinements to selected output';
zTipRememberSettings = '$$$/Dialog/ToolTip/RefineEdgeSelection/RememberSettings=Always use these settings in Refine Edge and Refine Mask';
zPixel = '$$$/Dialog/AdaptCorrect/Pixel=px';
zPercent = '$$$/ControlsStrings/Percent=%';
zBlank = '$$$/Dialog/AdaptCorrect/Blank= ';
vPixelWidth = max(zstring_width(zstring: zPixel), zstring_width(zstring: zPercent), zstring_width(zstring: zBlank));
vPercentWidth = vPixelWidth;
vBlankWidth = vPixelWidth;
vTightMarginTop = 6;
vTightMarginBottom = 6;
dialog(name: '$$$/Dialog/RefineEdgeSelection/RefineEdge=Refine Edge', class_name: 'TRefineEdgeDialog', target_id: 'brwd', show: true, placement: place_column, child_horizontal: align_left) {
group(view_id: 'rfeg', spacing: gLargeSpace, 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/RefineEdgeSelection/ViewModeGroup=View Mode', spacing: gLargeSpace, placement: place_row) {
group(placement: place_row, child_vertical: align_center, tooltip: zTipViewMode) {
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: 'shbd', name: zNameShowBorder, tooltip: zTipShowBorder);
check_box(view_id: 'orig', name: zShowOriginal);
}
}
}
group(placement: place_row) {
group(placement: place_column, width: vToolColumnWidth, spacing: 0, vertical: align_top, child_horizontal: align_center) {
control(placement: place_offscreen, frame: frame_none, view_id: 'sltC', class_name: 'TToolSlot', height: vToolIconHeight, width: vToolIconWidth, enabled: true) {
slot_item(class_name: 'TRefineEdgeBorderAddTool');
slot_item(class_name: 'TRefineEdgeBorderRemoveTool');
}
}
cluster(view_id: 'bdcl', name: '$$$/Dialog/RefineEdgeSelection/BorderGroup=Edge Detection', spacing: gSpace) {
group(placement: place_row, spacing: gGap) {
label_place_holder();
check_box(view_id: 'auto', name: zNameFindHardEdges, tooltip: zTipFindHardEdges);
}
group(placement: place_row, class_name: 'TFixedUnitPopupSlider', view_id: 'radw', spacing: vSmallerGap, tooltip: zTipBorderWidth) {
static_text(name: zNameBorderWidth, view_id: 'brwh', width: vMaxLabelWidth, horizontal: align_right, class_name: 'THotText');
view(class_name: 'TNewLookSliderSet', view_id: 'bwsl', height: vSliderHeight, width: vSliderWidth, vertical: vSliderAlign);
edit_text(view_id: 'brwd', class_name: 'TFixedPoint', width: vEditWidth);
static_text(name: '$$$/Dialog/RefineEdgeSelection/Units/Px=px');
}
}
}
group(placement: place_row) {
view(width: vToolColumnWidth);
cluster(view_id: 'adcl', name: '$$$/Dialog/RefineEdgeSelection/AdjustGroup=Adjust Edge', spacing: gSpace) {
group(placement: place_row, class_name: 'TEditSlider', view_id: 'smtc', spacing: vSmallerGap, tooltip: zTipSmoothness) {
static_text(name: zNameSmoothJaggedEdges, view_id: 'smht', width: vMaxLabelWidth, horizontal: align_right, class_name: 'THotText');
view(class_name: 'TNewLookSliderSet', view_id: 'smsl', height: vSliderHeight, width: vSliderWidth, vertical: vSliderAlign);
edit_text(view_id: 'smth', class_name: 'TFixedPoint', width: vEditWidth);
static_text(name: '$$$/private/Dialog/RefineEdgeSelection/Empty=');
}
group(placement: place_row, class_name: 'TFixedUnitPopupSlider', view_id: 'radc', spacing: vSmallerGap, tooltip: zTipFeatherRadius) {
static_text(name: zNameFeather, view_id: 'radh', width: vMaxLabelWidth, horizontal: align_right, class_name: 'THotText');
view(class_name: 'TNewLookSliderSet', view_id: 'ftsl', height: vSliderHeight, width: vSliderWidth, vertical: vSliderAlign);
edit_text(view_id: 'rad ', class_name: 'TFixedPoint', width: vEditWidth);
static_text(name: '$$$/Dialog/RefineEdgeSelection/Units/Px=px');
}
group(placement: place_row, class_name: 'TEditSlider', view_id: 'cnts', spacing: vSmallerGap, tooltip: zTipImproveContrast) {
static_text(name: zNameImproveContrast, view_id: 'ctnh', width: vMaxLabelWidth, horizontal: align_right, class_name: 'THotText');
view(class_name: 'TNewLookSliderSet', view_id: 'ctsl', height: vSliderHeight, width: vSliderWidth, vertical: vSliderAlign);
edit_text(view_id: 'ctnm', width: vEditWidth, class_name: 'TFixedPoint');
static_text(name: '$$$/ControlsStrings/Percent=%');
}
group(placement: place_row, class_name: 'TEditSlider', view_id: 'chok', spacing: vSmallerGap, tooltip: zTipContractExpandPercentage) {
static_text(name: zNameContractExpand, view_id: 'chkh', width: vMaxLabelWidth, horizontal: align_right, class_name: 'THotText');
view(class_name: 'TNewLookSliderSet', view_id: 'chsl', height: vSliderHeight, width: vSliderWidth, vertical: vSliderAlign);
edit_text(view_id: 'ched', width: vEditWidth, class_name: 'TFixedPoint');
static_text(name: '$$$/ControlsStrings/Percent=%');
}
}
}
group(placement: place_row) {
view(width: vToolColumnWidth);
cluster(view_id: 'oucl', name: zNameOutput, spacing: gSpace) {
group(placement: place_row) {
label_place_holder();
check_box(view_id: 'dcon', dismiss: false, name: zNameDecontaminate, tooltip: zTipDecontaminate);
}
group(placement: place_row, class_name: 'TEditSlider', view_id: 'dcgp', spacing: vSmallerGap, tooltip: zTipDecontaminateAmount) {
static_text(name: zNameDecontaminateAmount, view_id: 'dcnh', width: vMaxLabelWidth, horizontal: align_right, class_name: 'THotText');
view(class_name: 'TNewLookSliderSet', view_id: 'dcas', height: vSliderHeight, width: vSliderWidth, vertical: vSliderAlign);
edit_text(view_id: 'dcat', width: vEditWidth, class_name: 'TFixedPoint');
static_text(name: '$$$/ControlsStrings/Percent=%');
}
// Note - this is a special case, regular #defines such as Macintosh or WIN_32 are not available here
#ifdef MacEve
popup(view_id: 'outp', resource_id: 2472, tooltip: zTipOutput);
#endif
#ifdef WinEve
popup(view_id: 'outp', resource_id: 2472, width: vOutputWidth, tooltip: zTipOutput);
#endif
}
}
group(placement: place_row) {
view(width: vToolColumnWidth);
check_box(view_id: 'rmst', dismiss: false, name: zNameRememberSettings, tooltip: zTipRememberSettings);
}
group(spacing: gLargeSpace, placement: place_row, child_horizontal: align_fill) {
group(width: vToolColumnWidth, horizontal: align_left) {
view(view_id: 'busy', class_name: 'TIconSeriesView', vertical: align_center, horizontal: align_center, width: 32, height: 32);
}
group(spacing: gLargeSpace, vertical: align_top, horizontal: align_right, placement: place_column) {
// Note - this is a special case, regular #defines such as Macintosh or WIN_32 are not available here
#ifdef MacEve
group(name: 'OKCancel', placement: place_row, show: true, horizontal: align_fill, reverse: true) {
#endif
#ifdef WinEve
group(name: 'OKCancel', placement: place_row, show: true, horizontal: align_fill) {
#endif
button(name: gOKString, horizontal: align_fill, view_id: 'ok ', show: true, dismiss: true,
default: true, font: static_font);
button(name: gCancelString, horizontal: align_fill, view_id: 'cncl', show: true, dismiss: true, font: static_font);
}
}
}
}
}
// Footer - Copyright 2023 Adobe Systems Incorporated