Mini Kabibi Habibi
layout testbed
{
constant:
k_strongly_agree: 4;
interface:
showOptional: true;
fixedPointValue: 0;
fixedPointMin: 0;
fixedPointMax: 1;
fixedPointPlaces: 0;
sliderSetWidth: 300;
sliderRadius: 6;
showAdditional: @None;
showClusters <== showAdditional == @Cluster_Variations;
showLikertScales <== showAdditional == @Likert_Scales;
likert_has_value : false;
likert_value : empty;
likert_value_is_strongly_agree : false <== likert_value == k_strongly_agree;
/* bound to checkbox to control dynamically rather than via qDebugDraw: true on the dialog view */
debugDraw : true;
logic:
/* Tie the state of the "has value" checkbox to whether or not the likert control has a value */
relate {
likert_has_value <== likert_value == empty ? false : true;
likert_value <== likert_has_value == true ? (likert_value == empty ? 0 : likert_value) : empty;
}
view TPSDialog(name: '$$$/private/testbed/title=testbed',
margin: 15,
isResizable: true,
dboxProcIdentifier: -1)
{
row(horizontal: align_fill)
{
TButton(identifier: @ok, dismiss: true, default: true, name: '$$$/private/testbed/close=X');
TCheckBox(name: '$$$/private/testbed/DebugDraw=Enable Debug Drawing', bind: @debugDraw, horizontal: align_right);
}
TStaticText(name: '$$$/private/testbed/heading=Sample Heading', font: headingFont);
TStaticText(name: '$$$/private/testbed/subheading=Sample Subheading', font: subheadingFont);
TCluster(placement: place_column, name: '$$$/private/testbed/sliders=Sliders')
{
row(horizontal: align_fill)
{
THotText(horizontal: align_left, hotTextEditIdentifier: @fixedPointText, name: '$$$/private/testbed/FixedPointLabel=Value:');
TFixedPoint(identifier: @fixedPointText, horizontal: align_right, bind: @fixedPointValue, maxChars: 4, minValue: fixedPointMin, maxValue: fixedPointMax, places: fixedPointPlaces);
}
TNewLookSliderSet(bind: @fixedPointValue, width: sliderSetWidth, height: 12, minValue: fixedPointMin, maxValue: fixedPointMax);
column(spacing: 0)
{
TBandRamp(width: sliderSetWidth - sliderRadius * 2, height: 16, horizontal: align_center, increasing: true);
TSliderSet(bind: @fixedPointValue, width: sliderSetWidth, height: 12, minValue: fixedPointMin, maxValue: fixedPointMax, track_type: @none);
}
column(spacing: 0)
{
TMultibandRamp(identifier: @multibandRamp, width: sliderSetWidth - sliderRadius * 2, height: 16, horizontal: align_center);
TSliderSet(bind: @fixedPointValue, width: sliderSetWidth, height: 12, minValue: fixedPointMin, maxValue: fixedPointMax, track_type: @none);
}
}
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TFixedGrid(identifier: @fixedGrid, horizontal: align_fill);
}
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TStaticText(name: '$$$/private/testbed/static=Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
horizontal: align_fill,
width: 20,
lines: 1,
autoWrap: true);
}
row(horizontal: align_fill)
{
column(horizontal: align_fill)
{
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TModernCheckbox(name: '$$$/private/ControlsStrings/ModernCheckbox=Modern Checkbox');
}
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TModernTextButton(name: '$$$/private/ControlsStrings/ModernTextButton=Modern Text Button');
}
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TImageWidget(image_path: 'DebugImageTesting/PNGTestImage.png',
width: 100,
height: 100);
}
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TImageWidget(identifier: @userprofilepic,
image_path: '',
width: 276,
height: 276);
}
}
column(horizontal: align_fill)
{
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TIconButton(iconRootName : 'PP_CanvasPortrait',
dataType : 'int32',
layoverText : 'Icon With Text',
layoverTextPosition : align_center,
width : 20,
height : 20);
}
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TIconButton(iconRootName : 'PP_CanvasPortrait',
dataType : 'int32',
layoverText : 'Icon With Text',
layoverTextPosition : align_left,
width : 20,
height : 20);
}
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TIconButton(iconRootName : 'PP_CanvasPortrait',
dataType : 'int32',
layoverText : 'Icon With Text',
layoverTextPosition : align_right,
width : 20,
height : 20);
}
}
}
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
TRadioBar (
skin : 'text',
identifier1 : 'LrIp',
name1 : '$$$/private/testbed/radiobar/LoremIpsum=Lorem Ipsum',
tooltip1 : '$$$/private/testbed/radiobar/LoremIpsum=Lorem Ipsum',
identifier2 : 'FooF',
name2 : '$$$/private/testbed/radiobar/FooFoo=Foo Foo',
tooltip2 : '$$$/private/testbed/radiobar/FooFoo=Foo Foo',
identifier3 : 'Bar ',
name3 : '$$$/private/testbed/radiobar/Bar=Bar',
tooltip3 : '$$$/private/testbed/radiobar/Bar=Bar',
horizontal : align_fill);
}
TOptional(bind: @showOptional, vertical: align_fill, horizontal: align_fill)
{
row()
{
/* REVISIT (TBL): On windows, the ZMenuPopup below doesn't get laid out to give space for its label, even though it seems
to get measured for and set correctly. As a workaround, use a static text instead of putting the label in the menu
resource (spent too much time down rabbit holes lately). - tluxon 4.28.23*/
TStaticText(name: '$$$/private/testbed/ShowAdditionalControls=Show Additional Controls');
/* If you want to add more options to this popup, add them to the SMNU_EveTestBedShowAdditionalPopup resource (the
resourceIdentifier matches that define) in PSResources.cpp.
WARNING: The strategy of binding a textual popup to a cell and driving other logic based on the selected option is not
localization friendly. It works here because we are using private, un-localized ZStrings in debug functionality. We do
use this for icon based popups where we associate a private ZString though; see exportPrefs.eve for an example.
- tluxon 4.28.23 */
ZMenuPopup( resourceIdentifier : 3719,
noCheckmarks : true,
bind : @showAdditional);
}
TOptional (bind: @showClusters, placement: place_column, horizontal : align_fill)
{
TCluster ( name : '$$$/private/testbed/ClustersVariations=Cluster Variations',
placement : place_column,
horizontal : align_fill)
{
/* NOTE: TCheckBoxCluster not represented in each of these columns because at the time I added it there was no eve2
support for it (or the top_offset that the child checkbox uses). */
TStaticText(name : '$$$/private/testbed/ClusterVariationsDesc=Various configurations of TCluster.');
row(horizontal : align_fill)
{
TCluster ( name: '$$$/private/testbed/Cluster/RevealAndFrameUnspecified=Reveal Unspecified, Frame Unspecified',
placement: place_column,
horizontal : align_fill)
{
TCluster( horizontal : align_fill)
{
TStaticText(name : '$$$/private/testbed/LorumIpsumNoLabel=Lorum Impsum (No Label)');
}
/* NOTE: TCluster adds extra top margin by default; give high contrast no-label cluster even margins for balanced top/bottom spacing */
TCluster( horizontal : align_fill,
margin : [10, 10, 10, 10],
useHighContrast : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsumHighContrast=Lorum Impsum (No Label, High Contrast)');
}
TCluster( name : '$$$/private/testbed/Cluster/Plain=Plain Label',
horizontal : align_fill)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
TCluster( name : '$$$/private/testbed/Cluster/Bold=Bold Label',
horizontal : align_fill,
useBoldLabel: true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
TCluster( name : '$$$/private/testbed/Cluster/NoFrameBold=No Frame Bold Label',
horizontal : align_fill,
useBoldLabel: true,
boldNoFrame : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
}
TCluster ( name: '$$$/private/testbed/Cluster/RevealUnspecifiedFrameFalse=Reveal Unspecified, frame: false',
placement: place_column,
horizontal : align_fill)
{
TCluster( horizontal : align_fill,
frame: false)
{
TStaticText(name : '$$$/private/testbed/LorumIpsumNoLabel=Lorum Impsum (No Label)');
}
/* NOTE: TCluster adds extra top margin by default; give high contrast no-label cluster even margins for balanced top/bottom spacing */
TCluster( horizontal : align_fill,
frame : false,
margin : [10, 10, 10, 10],
useHighContrast : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsumHighContrast=Lorum Impsum (No Label, High Contrast)');
}
TCluster( name : '$$$/private/testbed/Cluster/Plain=Plain Label',
horizontal : align_fill,
frame : false)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
TCluster( name : '$$$/private/testbed/Cluster/Bold=Bold Label',
horizontal : align_fill,
frame : false,
useBoldLabel: true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
TCluster( name : '$$$/private/testbed/Cluster/NoFrameBold=No Frame Bold Label',
horizontal : align_fill,
frame : false,
useBoldLabel: true,
boldNoFrame : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
}
TCluster ( name: '$$$/private/testbed/Cluster/RevealFrameUnspecified=Reveal, Frame Unspecified',
placement: place_column,
horizontal : align_fill)
{
TCluster( horizontal : align_fill,
useReveal : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsumNoLabel=Lorum Impsum (No Label)');
}
/* NOTE: TCluster adds extra top margin by default; give high contrast no-label cluster even margins for balanced top/bottom spacing */
TCluster( horizontal : align_fill,
useReveal : true,
margin : [10, 10, 10, 10],
useHighContrast : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsumHighContrast=Lorum Impsum (No Label, High Contrast)');
}
TCluster( name : '$$$/private/testbed/Cluster/Plain=Plain Label',
horizontal : align_fill,
useReveal : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
TCluster( name : '$$$/private/testbed/Cluster/Bold=Bold Label',
horizontal : align_fill,
useReveal : true,
useBoldLabel: true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
TCluster( name : '$$$/private/testbed/Cluster/NoFrameBold=No Frame Bold Label',
horizontal : align_fill,
useReveal : true,
useBoldLabel: true,
boldNoFrame : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
}
TCluster ( name: '$$$/private/testbed/Cluster/RevealFrameFalse=Reveal, frame: false',
placement: place_column,
horizontal : align_fill)
{
TCluster( horizontal : align_fill,
useReveal : true,
frame : false)
{
TStaticText(name : '$$$/private/testbed/LorumIpsumNoLabel=Lorum Impsum (No Label)');
}
/* NOTE: TCluster adds extra top margin by default; give high contrast no-label cluster even margins for balanced top/bottom spacing */
TCluster( horizontal : align_fill,
useReveal : true,
frame : false,
margin : [10, 10, 10, 10],
useHighContrast : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsumHighContrast=Lorum Impsum (No Label, High Contrast)');
}
TCluster( name : '$$$/private/testbed/Cluster/Plain=Plain Label',
horizontal : align_fill,
useReveal : true,
frame : false)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
TCluster( name : '$$$/private/testbed/Cluster/Bold=Bold Label',
horizontal : align_fill,
useReveal : true,
frame : false,
useBoldLabel: true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
TCluster( name : '$$$/private/testbed/Cluster/NoFrameBold=No Frame Bold Label',
horizontal : align_fill,
useReveal : true,
frame : false,
useBoldLabel: true,
boldNoFrame : true)
{
TStaticText(name : '$$$/private/testbed/LorumIpsum=Lorum Impsum');
}
}
}
}
}
TOptional (bind: @showLikertScales, placement: place_column, horizontal : align_fill)
{
TCluster ( name : '$$$/private/testbed/LikertScales=Likert Scales',
placement : place_column,
horizontal : align_fill)
{
TStaticText(name : '$$$/private/testbed/LikertScalesDesc=Default on top, custom options on bottom.');
TModernCheckbox(bind: @likert_has_value, name: '$$$/private/testbed/LikertHasValue=Top Likert Has Value Set');
TOptional (bind: @likert_value_is_strongly_agree, placement: place_column, horizontal : align_fill)
{
TStaticText(name : '$$$/private/testbed/LikertScalesStronglyAgreeChosen=You have chosen ^{Strongly Agree^}. Nice work!');
}
likert_scale_control_t(bind: @likert_value, horizontal : align_fill);
likert_scale_control_t( name0 : '$$$/private/Controls/LikertScale/NoWay=No Way',
tooltip0 : '$$$/private/Controls/LikertScale/NoWay=No Way',
name1 : '$$$/private/Controls/LikertScale/Maybe=Maybe',
tooltip1 : '$$$/private/Controls/LikertScale/Maybe=Maybe',
name2 : '$$$/private/Controls/LikertScale/MostDef=Most Definitely',
tooltip2 : '$$$/private/Controls/LikertScale/MostDef=Most Definitely',
horizontal : align_fill);
}
}
}
TContainerButton(margin: 10)
{
row() {
TIconImageView(iconRootName: 'CCLogoWithLabel');
column() {
TStaticText(name: '$$$/private/testbed/containerbutton/enabledTitle=Enabled', wincontrol: false, eraseFirst: false, isLabel: false);
TStaticText(name: '$$$/private/testbed/containerbutton/enabledSubtitle=This one should highlight', eraseFirst: false, wincontrol: false, icsLabel: false);
}
TIconImageView(horizontal: align_right, iconRootName: 'GreenCheckmark');
}
}
TContainerButton(margin: 10, enabled: false)
{
row() {
TIconImageView(iconRootName: 'CCLogoWithLabel');
column() {
TStaticText(name: '$$$/private/testbed/containerbutton/disabledTitle=Disabled', isLabel: false);
TStaticText(name: '$$$/private/testbed/containerbutton/disabledSubtitle=No hover', isLabel: false);
}
TIconImageView(horizontal: align_right, iconRootName: 'GreenCheckmark');
}
}
}
}