From 736b80835f67c9c34657074ebcfbe0752bef1c18 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 17 Oct 2019 21:58:34 +0200 Subject: Move DSL builder functions out of the companion objects (#93) --- src/main/kotlin/pl/treksoft/kvision/core/Style.kt | 39 +++++++------- src/main/kotlin/pl/treksoft/kvision/core/Widget.kt | 22 ++++---- .../pl/treksoft/kvision/core/WidgetWrapper.kt | 31 +++++------ .../kotlin/pl/treksoft/kvision/form/FieldLabel.kt | 28 +++++----- .../kotlin/pl/treksoft/kvision/form/FormPanel.kt | 32 +++++------ .../pl/treksoft/kvision/form/check/CheckBox.kt | 28 +++++----- .../treksoft/kvision/form/check/CheckBoxInput.kt | 29 +++++----- .../kotlin/pl/treksoft/kvision/form/check/Radio.kt | 28 +++++----- .../pl/treksoft/kvision/form/check/RadioGroup.kt | 28 +++++----- .../treksoft/kvision/form/check/RadioGroupInput.kt | 28 +++++----- .../pl/treksoft/kvision/form/check/RadioInput.kt | 29 +++++----- .../treksoft/kvision/form/select/SimpleSelect.kt | 38 ++++++------- .../kvision/form/select/SimpleSelectInput.kt | 29 +++++----- .../pl/treksoft/kvision/form/text/Password.kt | 36 ++++++------- .../kotlin/pl/treksoft/kvision/form/text/Text.kt | 28 +++++----- .../pl/treksoft/kvision/form/text/TextArea.kt | 28 +++++----- .../pl/treksoft/kvision/form/text/TextAreaInput.kt | 28 +++++----- .../pl/treksoft/kvision/form/text/TextInput.kt | 28 +++++----- src/main/kotlin/pl/treksoft/kvision/html/Button.kt | 38 +++++++------ src/main/kotlin/pl/treksoft/kvision/html/Canvas.kt | 30 +++++------ src/main/kotlin/pl/treksoft/kvision/html/Div.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/Footer.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/H1.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/H2.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/H3.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/H4.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/H5.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/H6.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/Header.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/Icon.kt | 26 +++++---- src/main/kotlin/pl/treksoft/kvision/html/Iframe.kt | 32 ++++++----- src/main/kotlin/pl/treksoft/kvision/html/Image.kt | 28 +++++----- src/main/kotlin/pl/treksoft/kvision/html/Link.kt | 28 +++++----- src/main/kotlin/pl/treksoft/kvision/html/List.kt | 28 +++++----- src/main/kotlin/pl/treksoft/kvision/html/P.kt | 34 ++++++------ .../kotlin/pl/treksoft/kvision/html/Section.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/Span.kt | 34 ++++++------ src/main/kotlin/pl/treksoft/kvision/html/Tag.kt | 30 +++++------ .../kotlin/pl/treksoft/kvision/panel/DockPanel.kt | 22 ++++---- .../kotlin/pl/treksoft/kvision/panel/FlexPanel.kt | 30 +++++------ .../kotlin/pl/treksoft/kvision/panel/GridPanel.kt | 40 +++++++------- .../kotlin/pl/treksoft/kvision/panel/HPanel.kt | 36 ++++++------- src/main/kotlin/pl/treksoft/kvision/panel/Root.kt | 47 ++++++++-------- .../pl/treksoft/kvision/panel/SimplePanel.kt | 22 ++++---- .../kotlin/pl/treksoft/kvision/panel/SplitPanel.kt | 28 +++++----- .../kotlin/pl/treksoft/kvision/panel/StackPanel.kt | 26 ++++----- .../kotlin/pl/treksoft/kvision/panel/VPanel.kt | 28 +++++----- .../pl/treksoft/kvision/state/StateBinding.kt | 48 ++++++++--------- src/main/kotlin/pl/treksoft/kvision/table/Cell.kt | 63 +++++++++++----------- .../kotlin/pl/treksoft/kvision/table/HeaderCell.kt | 35 ++++++------ src/main/kotlin/pl/treksoft/kvision/table/Row.kt | 28 +++++----- src/main/kotlin/pl/treksoft/kvision/table/Table.kt | 32 ++++++----- 52 files changed, 790 insertions(+), 880 deletions(-) (limited to 'src/main/kotlin/pl/treksoft/kvision') diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Style.kt b/src/main/kotlin/pl/treksoft/kvision/core/Style.kt index ff91c429..7c650e6c 100644 --- a/src/main/kotlin/pl/treksoft/kvision/core/Style.kt +++ b/src/main/kotlin/pl/treksoft/kvision/core/Style.kt @@ -96,26 +96,25 @@ open class Style(className: String? = null, parentStyle: Style? = null, init: (S companion object { internal var counter = 0 internal var styles = mutableListOf