public static cave.ui.LabelWidget forText(cave.GuiApplicationContext context, string text) { var v = new cave.ui.LabelWidget(context); v.setWidgetText(text); return(v); }
public MyRadioButtonWidget(cave.GuiApplicationContext context) : base(context) { var thisWidget = (dynamic)this; setWidgetSpacing(context.getHeightValue("2000um")); var widget = new cave.ui.AlignWidget(context); var widget2 = new cave.ui.LayerWidget(context); widget2.setWidgetHeightRequest(context.getHeightValue("4000um")); widget2.setWidgetWidthRequest(context.getHeightValue("4000um")); outline = new cave.ui.CanvasWidget(context); outline.setWidgetColor(cave.Color.black()); outline.setWidgetRoundingRadius((double)context.getHeightValue("2000um")); widget2.addWidget((Windows.UI.Xaml.UIElement)outline); var widget3 = new cave.ui.LayerWidget(context); widget3.setWidgetMargin(context.getHeightValue("500um")); canvas = new cave.ui.CanvasWidget(context); widget3.addWidget((Windows.UI.Xaml.UIElement)canvas); widget2.addWidget((Windows.UI.Xaml.UIElement)widget3); widget.addWidget((Windows.UI.Xaml.UIElement)widget2); addWidget((Windows.UI.Xaml.UIElement)widget); label = new cave.ui.LabelWidget(context); addWidget((Windows.UI.Xaml.UIElement)label, 1.00); }
public TabHeaderWidget(cave.GuiApplicationContext context) : base(context) { var thisWidget = (dynamic)this; headerBackground = new cave.ui.CanvasWidget(context); addWidget((Windows.UI.Xaml.UIElement)headerBackground); headerPadding = new cave.ui.LayerWidget(context); headerTitle = new cave.ui.LabelWidget(context); headerTitle.setWidgetText("Tab Header"); headerPadding.addWidget((Windows.UI.Xaml.UIElement)headerTitle); addWidget((Windows.UI.Xaml.UIElement)headerPadding); }
public override void initializeWidget() { base.initializeWidget(); var bgc = widgetBackgroundColor; if (bgc != null) { canvas = cave.ui.CanvasWidget.forColor(context, bgc); addWidget((Windows.UI.Xaml.UIElement)canvas); } var tml = new cave.ui.TopMarginLayerWidget(context); label = cave.ui.LabelWidget.forText(context, widgetTitle); label.setWidgetFontFamily("Arial"); var wtc = getWidgetTextColor(); label.setWidgetTextColor(wtc); box = cave.ui.HorizontalBoxWidget.forContext(context); box.setWidgetMargin(context.getWidthValue("1mm")); box.setWidgetSpacing(context.getWidthValue("1mm")); leftButton = new cave.ui.ImageButtonWidget(context); leftButton.setWidgetButtonHeight(context.getHeightValue("6mm")); box.addWidget((Windows.UI.Xaml.UIElement)leftButton); updateLeftButton(); widgetTitleContainer = cave.ui.AlignWidget.forWidget(context, (Windows.UI.Xaml.UIElement)label, 0.50, 0.50); box.addWidget((Windows.UI.Xaml.UIElement)widgetTitleContainer, 1.00); var spacing = widgetMenuItemSpacing; if (spacing < 0) { spacing = context.getWidthValue("1mm"); } menuItems = cave.ui.HorizontalBoxWidget.forContext(context, context.getWidthValue("1mm"), spacing); box.addWidget((Windows.UI.Xaml.UIElement)menuItems); rightButton = new cave.ui.ImageButtonWidget(context); rightButton.setWidgetButtonHeight(context.getHeightValue("6mm")); box.addWidget((Windows.UI.Xaml.UIElement)rightButton); updateRightButton(); tml.addWidget((Windows.UI.Xaml.UIElement)box); overlayWidget = new cave.ui.LayerWidget(context); tml.addWidget((Windows.UI.Xaml.UIElement)overlayWidget); addWidget((Windows.UI.Xaml.UIElement)tml); }
public override void initializeWidget() { base.initializeWidget(); label = cave.ui.LabelWidget.forText(context, labeltext); var color = textColor; if (color == null) { if (backgroundColor.isLightColor()) { color = cave.Color.forRGB(0, 0, 0); } else { color = cave.Color.forRGB(255, 255, 255); } } label.setWidgetTextColor(color); addWidget((Windows.UI.Xaml.UIElement)cave.ui.CanvasWidget.forColor(context, backgroundColor)); addWidget((Windows.UI.Xaml.UIElement)cave.ui.LayerWidget.forWidget(context, (Windows.UI.Xaml.UIElement)label, context.getHeightValue("1500um"))); }