Skip to content

Commit

Permalink
remove old "scriptAccess" property
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Oct 8, 2024
1 parent 959f4bc commit 510f258
Show file tree
Hide file tree
Showing 31 changed files with 5 additions and 114 deletions.
7 changes: 0 additions & 7 deletions haxe/ui/backend/DialogBase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -38,46 +38,39 @@ class DialogBase extends Box implements Draggable {
dialogContainer = new haxe.ui.containers.VBox();
dialogContainer.id = "dialog-container";
dialogContainer.styleNames = "dialog-container";
dialogContainer.scriptAccess = false;
addComponent(dialogContainer);

dialogTitle = new haxe.ui.containers.HBox();
dialogTitle.id = "dialog-title";
dialogTitle.styleNames = "dialog-title";
dialogTitle.scriptAccess = false;
dragInitiator = dialogTitle;
dialogContainer.addComponent(dialogTitle);

dialogTitleLabel = new haxe.ui.components.Label();
dialogTitleLabel.id = "dialog-title-label";
dialogTitleLabel.styleNames = "dialog-title-label";
dialogTitleLabel.text = "HaxeUI";
dialogTitleLabel.scriptAccess = false;
dialogTitle.addComponent(dialogTitleLabel);

dialogCloseButton = new haxe.ui.components.Image();
dialogCloseButton.id = "dialog-close-button";
dialogCloseButton.styleNames = "dialog-close-button";
dialogCloseButton.scriptAccess = false;
dialogTitle.addComponent(dialogCloseButton);

dialogContent = new haxe.ui.containers.VBox();
dialogContent.id = "dialog-content";
dialogContent.styleNames = "dialog-content";
dialogContent.scriptAccess = false;
dialogContent.registerEvent(UIEvent.RESIZE, onContentResize);
dialogContainer.addComponent(dialogContent);

dialogFooterContainer = new haxe.ui.containers.Box();
dialogFooterContainer.id = "dialog-footer-container";
dialogFooterContainer.styleNames = "dialog-footer-container";
dialogFooterContainer.scriptAccess = false;
dialogContainer.addComponent(dialogFooterContainer);

dialogFooter = new haxe.ui.containers.HBox();
dialogFooter.id = "dialog-footer";
dialogFooter.styleNames = "dialog-footer";
dialogFooter.scriptAccess = false;
dialogFooter.registerEvent(UIEvent.RESIZE, onFooterResize);
dialogFooterContainer.addComponent(dialogFooter);

Expand Down
2 changes: 0 additions & 2 deletions haxe/ui/components/Button.hx
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ private class TextBehaviour extends DataBehaviour {
if (label == null) {
label = new Label();
label.id = "button-label";
label.scriptAccess = false;
_component.addComponent(label);
_component.invalidateComponentStyle(true);
}
Expand All @@ -487,7 +486,6 @@ private class IconBehaviour extends DataBehaviour {
icon = new Image();
icon.addClass("icon");
icon.id = "button-icon";
icon.scriptAccess = false;
_component.addComponentAt(icon, 0);
_component.invalidateComponentStyle(true);
}
Expand Down
1 change: 0 additions & 1 deletion haxe/ui/components/Calendar.hx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ private class Builder extends CompositeBuilder {
for (_ in 0...6) {
for (_ in 0...7) {
var item = new Button();
item.scriptAccess = false;
_calendar.addComponent(item);
}
}
Expand Down
2 changes: 0 additions & 2 deletions haxe/ui/components/CheckBox.hx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ private class TextBehaviour extends DataBehaviour {
label = new Label();
label.id = '${_component.cssName}-label';
label.addClass('${_component.cssName}-label');
label.scriptAccess = false;
_component.addComponent(label);
_component.invalidateComponentStyle(true);
}
Expand Down Expand Up @@ -241,7 +240,6 @@ class CheckBoxBuilder extends CompositeBuilder {
var value = new CheckBoxValue();
value.id = '${_checkbox.cssName}-value';
value.addClass('${_checkbox.cssName}-value');
value.scriptAccess = false;
_checkbox.addComponent(value);
}
}
Expand Down
4 changes: 0 additions & 4 deletions haxe/ui/components/DropDown.hx
Original file line number Diff line number Diff line change
Expand Up @@ -726,18 +726,15 @@ class DropDownEvents extends ButtonEvents {
var searchContainer = new VBox();
searchContainer.id = "dropdown-search-container";
searchContainer.addClass("dropdown-search-container");
searchContainer.scriptAccess = false;

var searchFieldContainer = new HBox();
searchFieldContainer.id = "dropdown-search-field-container";
searchFieldContainer.addClass("dropdown-search-field-container");
searchFieldContainer.scriptAccess = false;
searchFieldContainer.addComponent(searchField);

var searchFieldSeparator = new Component();
searchFieldSeparator.id = "dropdown-search-field-separator";
searchFieldSeparator.addClass("dropdown-search-field-separator");
searchFieldSeparator.scriptAccess = false;

searchContainer.addComponent(searchFieldContainer);
searchContainer.addComponent(searchFieldSeparator);
Expand Down Expand Up @@ -883,7 +880,6 @@ class DropDownEvents extends ButtonEvents {
searchField.id = "dropdown-search-field";
searchField.addClass("dropdown-search-field");
searchField.placeholder = _dropdown.searchPrompt;
searchField.scriptAccess = false;
searchField.registerEvent(UIEvent.CHANGE, onSearchChange);
return searchField;
}
Expand Down
3 changes: 0 additions & 3 deletions haxe/ui/components/NumberStepper.hx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ private class Builder extends CompositeBuilder {
var value = new TextField();
value.id = "value";
value.addClass("stepper-value");
value.scriptAccess = false;
value.allowFocus = false;
value.restrictChars = "0-9\\-\\.\\,";
_stepper.addComponent(value);
Expand All @@ -164,15 +163,13 @@ private class Builder extends CompositeBuilder {
deinc.id = "deinc";
deinc.addClass("stepper-deinc");
deinc.allowFocus = false;
deinc.scriptAccess = false;
deinc.repeater = true;
_stepper.addComponent(deinc);

var inc = new Button();
inc.id = "inc";
inc.addClass("stepper-inc");
inc.allowFocus = false;
inc.scriptAccess = false;
inc.repeater = true;
_stepper.addComponent(inc);
}
Expand Down
3 changes: 0 additions & 3 deletions haxe/ui/components/OptionStepper.hx
Original file line number Diff line number Diff line change
Expand Up @@ -205,22 +205,19 @@ private class Builder extends CompositeBuilder {
var value = new Label();
value.id = "value";
value.addClass("stepper-value");
value.scriptAccess = false;
_stepper.addComponent(value);

var deinc = new Button();
deinc.id = "deinc";
deinc.addClass("stepper-deinc");
deinc.allowFocus = false;
deinc.scriptAccess = false;
deinc.repeater = true;
_stepper.addComponent(deinc);

var inc = new Button();
inc.id = "inc";
inc.addClass("stepper-inc");
inc.allowFocus = false;
inc.scriptAccess = false;
inc.repeater = true;
_stepper.addComponent(inc);
}
Expand Down
1 change: 0 additions & 1 deletion haxe/ui/components/Scroll.hx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class Scroll extends InteractiveComponent implements IDirectionalComponent imple
if (b == null) {
b = new Button();
b.hidden = hidden;
b.scriptAccess = false;
b.customStyle.native = false;
b.id = 'scroll-${type}-button';
b.addClass(type);
Expand Down
2 changes: 0 additions & 2 deletions haxe/ui/components/SectionHeader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ private class Builder extends CompositeBuilder {

var label = new Label();
label.text = "Section Header";
label.scriptAccess = false;
_component.addComponent(label);

var line = new HorizontalRule();
line.addClasses(["section-line", "line"]);
line.scriptAccess = false;
_component.addComponent(line);
}

Expand Down
4 changes: 0 additions & 4 deletions haxe/ui/components/Slider.hx
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ private class MinorTicks extends DataBehaviour {
for (_ in 0...addN) {
var tick = new Component();
tick.addClass("minor-tick");
tick.scriptAccess = false;
slider.addComponent(tick);
slider.setComponentIndex(tick, index + 1);
}
Expand Down Expand Up @@ -389,7 +388,6 @@ private class MajorTicks extends DataBehaviour {
for (_ in 0...addN) {
var tick = new Component();
tick.addClass("major-tick");
tick.scriptAccess = false;
slider.addComponent(tick);
slider.setComponentIndex(tick, index + 1);
}
Expand Down Expand Up @@ -641,7 +639,6 @@ class SliderBuilder extends CompositeBuilder {
if (_component.findComponent("range") == null) {
var v = createValueComponent();
if (v != null) {
v.scriptAccess = false;
v.allowFocus = false;
v.id = "range";
v.addClass("slider-value");
Expand Down Expand Up @@ -671,7 +668,6 @@ class SliderBuilder extends CompositeBuilder {
}

var b = new Button();
b.scriptAccess = false;
b.allowFocus = false;
b.id = id;
b.addClass(id);
Expand Down
1 change: 0 additions & 1 deletion haxe/ui/components/Switch.hx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ private class TextBehaviour extends DataBehaviour {
label = new Label();
label.styleNames = "switch-label";
label.id = "switch-label";
label.scriptAccess = false;
_component.addComponentAt(label, 0);

var spacer = new Spacer(); // TODO: ugly
Expand Down
4 changes: 0 additions & 4 deletions haxe/ui/components/TabBar.hx
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ private class Builder extends CompositeBuilder {
_filler = new Box();
_filler.id = "tabbar-filler";
_filler.addClass("tabbar-filler");
_filler.scriptAccess = false;
_filler.includeInLayout = false;
_tabbar.addComponent(_filler);
}
Expand Down Expand Up @@ -642,7 +641,6 @@ private class Builder extends CompositeBuilder {
leftFiller = new Box();
leftFiller.id = "tabbar-filler-left";
leftFiller.addClass("tabbar-filler-left");
leftFiller.scriptAccess = false;
leftFiller.includeInLayout = false;
_tabbar.addComponent(leftFiller);
}
Expand All @@ -658,7 +656,6 @@ private class Builder extends CompositeBuilder {
rightFiller = new Box();
rightFiller.id = "tabbar-filler-right";
rightFiller.addClass("tabbar-filler-right");
rightFiller.scriptAccess = false;
rightFiller.includeInLayout = false;
_tabbar.addComponent(rightFiller);
}
Expand Down Expand Up @@ -737,7 +734,6 @@ private class TabBarButton extends Button {
image.id = "tab-close-button";
image.addClass("tab-close-button");
image.includeInLayout = false;
image.scriptAccess = false;
image.onClick = onCloseClicked;
addComponent(image);
} else if (existing != null) {
Expand Down
3 changes: 0 additions & 3 deletions haxe/ui/components/TextArea.hx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ private class IconBehaviour extends DataBehaviour {
icon = new Image();
icon.id = "textarea-icon";
icon.addClass("icon");
icon.scriptAccess = false;
textarea.addComponentAt(icon, 0);
}
icon.resource = _value.toString();
Expand Down Expand Up @@ -603,7 +602,6 @@ private class TextAreaBuilder extends CompositeBuilder {
hscroll.percentWidth = 100;
hscroll.id = "textarea-hscroll";
hscroll.allowFocus = false;
hscroll.scriptAccess = false;
_component.addComponent(hscroll);
_component.registerInternalEvents(true);
return hscroll;
Expand All @@ -617,7 +615,6 @@ private class TextAreaBuilder extends CompositeBuilder {
vscroll.percentHeight = 100;
vscroll.id = "textarea-vscroll";
vscroll.allowFocus = false;
vscroll.scriptAccess = false;
_component.addComponent(vscroll);
_component.registerInternalEvents(true);
return vscroll;
Expand Down
1 change: 0 additions & 1 deletion haxe/ui/components/TextField.hx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ private class IconBehaviour extends DataBehaviour {
icon = new Image();
icon.id = "textfield-icon";
icon.addClass("icon");
icon.scriptAccess = false;
textfield.addComponentAt(icon, 0);
}
icon.resource = _value.toString();
Expand Down
1 change: 0 additions & 1 deletion haxe/ui/components/pickers/ItemPicker.hx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ private class DefaultItemPickerRenderer extends HBox {
super();

addComponent(_renderer);
_triggerIcon.scriptAccess = false;
_triggerIcon.id = "itemPickerTriggerIcon";
_triggerIcon.addClass("item-picker-trigger-icon");
addComponent(_triggerIcon);
Expand Down
1 change: 0 additions & 1 deletion haxe/ui/containers/Accordion.hx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ private class Builder extends CompositeBuilder {
button.text = child.text;
button.addClass("accordion-button");
button.toggle = true;
button.scriptAccess = false;
if (child.id != null) {
button.id = child.id + "Button";
}
Expand Down
1 change: 0 additions & 1 deletion haxe/ui/containers/ButtonBar.hx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ class ButtonBarBuilder extends CompositeBuilder {
if (_bar.numComponents > 0) {
var divider = new Component();
divider.addClass("button-bar-divider");
divider.scriptAccess = false;
_bar.addComponent(divider);

}
Expand Down
6 changes: 1 addition & 5 deletions haxe/ui/containers/Card.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package haxe.ui.containers;

import haxe.ui.behaviours.DataBehaviour;
import haxe.ui.components.Label;
import haxe.ui.containers.HBox;
import haxe.ui.containers.Box;
import haxe.ui.containers.HBox;
import haxe.ui.core.Component;
import haxe.ui.core.CompositeBuilder;

Expand Down Expand Up @@ -52,22 +52,19 @@ private class Builder extends CompositeBuilder {
hbox = new HBox();
hbox.addClass("card-title-box");
hbox.id = "card-title-box";
hbox.scriptAccess = false;
titleContainer.addComponent(hbox);
}

titleLabel = new Label();
titleLabel.addClass("card-title-label");
titleLabel.id = "card-title-label";
titleLabel.scriptAccess = false;
hbox.addComponentAt(titleLabel, 0);

var line = titleContainer.findComponent("card-title-line", Component);
if (line == null) {
line = new Component();
line.id = "card-title-line";
line.addClass("card-title-line");
line.scriptAccess = false;
titleContainer.addComponent(line);
}
}
Expand All @@ -81,7 +78,6 @@ private class Builder extends CompositeBuilder {
titleContainer = new VBox();
titleContainer.addClass("card-title-container");
titleContainer.id = "card-title-container";
titleContainer.scriptAccess = false;
_card.addComponentAt(titleContainer, 0);
}

Expand Down
1 change: 0 additions & 1 deletion haxe/ui/containers/Collapsible.hx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ class CollapsibleBuilder extends CompositeBuilder {
_content = new VBox();
_content.addClass("collapsible-content");
_content.id = "collapsible-content";
_content.scriptAccess = false;
_content.hide();
_collapsible.addComponent(_content);

Expand Down
Loading

0 comments on commit 510f258

Please sign in to comment.