[view] rename from gui
This commit is contained in:
@@ -3,11 +3,11 @@ package demo;
|
||||
import haxework.net.JsonLoader;
|
||||
import demo.popup.ColorPopup;
|
||||
import haxework.App;
|
||||
import haxework.gui.frame.FrameSwitcher;
|
||||
import haxework.gui.IGroupView;
|
||||
import haxework.gui.IView;
|
||||
import haxework.gui.ToggleButtonView;
|
||||
import haxework.gui.VGroupView;
|
||||
import haxework.view.frame.FrameSwitcher;
|
||||
import haxework.view.IGroupView;
|
||||
import haxework.view.IView;
|
||||
import haxework.view.ToggleButtonView;
|
||||
import haxework.view.VGroupView;
|
||||
import haxework.log.TraceLogger;
|
||||
|
||||
@:template class DemoView extends VGroupView {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
skinId: background
|
||||
geometry.size.stretch: true
|
||||
views:
|
||||
- $type: haxework.gui.ImageView
|
||||
- $type: haxework.view.ImageView
|
||||
geometry.padding: 10
|
||||
image: $r:image:logo
|
||||
- id: tabs
|
||||
$type: haxework.gui.HGroupView
|
||||
$type: haxework.view.HGroupView
|
||||
layout.margin: 5
|
||||
layout.hAlign: left
|
||||
geometry.size.width: 100%
|
||||
@@ -14,25 +14,25 @@ views:
|
||||
geometry.margin.bottom: -3
|
||||
views:
|
||||
- id: list_form
|
||||
$type: haxework.gui.ToggleButtonView
|
||||
$type: haxework.view.ToggleButtonView
|
||||
skinId: tab
|
||||
geometry.padding: [25, 8]
|
||||
text: List
|
||||
+onPress: "$code:switcher.change('list_form')"
|
||||
- id: tail_form
|
||||
$type: haxework.gui.ToggleButtonView
|
||||
$type: haxework.view.ToggleButtonView
|
||||
skinId: tab
|
||||
geometry.padding: [25, 8]
|
||||
text: Tail
|
||||
+onPress: "$code:switcher.change('tail_form')"
|
||||
- id: data_form
|
||||
$type: haxework.gui.ToggleButtonView
|
||||
$type: haxework.view.ToggleButtonView
|
||||
skinId: tab
|
||||
geometry.padding: [25, 8]
|
||||
text: Data
|
||||
+onPress: "$code:switcher.change('data_form')"
|
||||
- id: switcher
|
||||
$type: haxework.gui.frame.FrameSwitcher
|
||||
$type: haxework.view.frame.FrameSwitcher
|
||||
skinId: panel
|
||||
animateFactory: { $class: haxework.animate.SlideAnimate }
|
||||
+onSwitch: $this:onFrameSwitch
|
||||
@@ -51,28 +51,28 @@ views:
|
||||
$type: demo.form.DataForm
|
||||
skinId: background
|
||||
geometry.size.stretch: true
|
||||
- $type: haxework.gui.HGroupView
|
||||
- $type: haxework.view.HGroupView
|
||||
geometry.size.percent.width: 100
|
||||
geometry.padding: 10
|
||||
layout.margin: 10
|
||||
views:
|
||||
- $type: haxework.gui.ButtonView
|
||||
- $type: haxework.view.ButtonView
|
||||
geometry.padding: [25, 8]
|
||||
skinId: button
|
||||
text: Color
|
||||
+onPress: "$code:choiceColor()"
|
||||
# separator
|
||||
- $type: haxework.gui.SpriteView
|
||||
- $type: haxework.view.SpriteView
|
||||
geometry.size.stretch: true
|
||||
- $type: haxework.gui.ButtonView
|
||||
- $type: haxework.view.ButtonView
|
||||
geometry.padding: [25, 8]
|
||||
skinId: button
|
||||
text: OK
|
||||
- $type: haxework.gui.ButtonView
|
||||
- $type: haxework.view.ButtonView
|
||||
geometry.padding: [25, 8]
|
||||
skinId: button
|
||||
text: Apply
|
||||
- $type: haxework.gui.ButtonView
|
||||
- $type: haxework.view.ButtonView
|
||||
geometry.padding: [25, 8]
|
||||
skinId: button
|
||||
text: Cancel
|
||||
|
||||
@@ -2,8 +2,8 @@ package demo;
|
||||
|
||||
import haxework.color.ColorUtil;
|
||||
import haxework.resources.IResources;
|
||||
import haxework.gui.skin.Skin;
|
||||
import haxework.gui.skin.TextSkin;
|
||||
import haxework.view.skin.Skin;
|
||||
import haxework.view.skin.TextSkin;
|
||||
|
||||
class Theme {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package demo.form;
|
||||
|
||||
import haxework.gui.TextView;
|
||||
import haxework.gui.VGroupView;
|
||||
import haxework.view.TextView;
|
||||
import haxework.view.VGroupView;
|
||||
|
||||
@:template class DataForm extends VGroupView {
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
views:
|
||||
- $type: haxework.gui.ScrollView
|
||||
- $type: haxework.view.ScrollView
|
||||
geometry.size.stretch: true
|
||||
view:
|
||||
id: data
|
||||
$type: haxework.gui.DataView
|
||||
$type: haxework.view.DataView
|
||||
layout:
|
||||
$type: haxework.gui.layout.VerticalLayout
|
||||
$type: haxework.view.layout.VerticalLayout
|
||||
factory: $this:factory
|
||||
geometry.size.width: 100%
|
||||
data: $r:any:data
|
||||
scroll:
|
||||
$type: haxework.gui.list.VScrollBarView
|
||||
$type: haxework.view.list.VScrollBarView
|
||||
skinId: scroll
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package demo.form;
|
||||
|
||||
import haxework.gui.list.LabelListItem;
|
||||
import haxework.gui.list.ListView.IListItemView;
|
||||
import haxework.gui.list.VListView;
|
||||
import haxework.gui.VGroupView;
|
||||
import haxework.view.list.LabelListItem;
|
||||
import haxework.view.list.ListView.IListItemView;
|
||||
import haxework.view.list.VListView;
|
||||
import haxework.view.VGroupView;
|
||||
|
||||
@:template class ListForm extends VGroupView {
|
||||
@:view public var list(default, null):VListView<Model>;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
views:
|
||||
- id: list
|
||||
$type: haxework.gui.list.VListView
|
||||
$type: haxework.view.list.VListView
|
||||
+onItemSelect: $this:onItemSelect
|
||||
factory: $this:factory
|
||||
geometry.size.stretch: true
|
||||
scroll:
|
||||
$type: haxework.gui.list.VScrollBarView
|
||||
$type: haxework.view.list.VScrollBarView
|
||||
skinId: scroll
|
||||
data: $r:any:data50
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package demo.form;
|
||||
|
||||
import haxework.gui.HGroupView;
|
||||
import haxework.gui.ImageView;
|
||||
import haxework.gui.IView;
|
||||
import haxework.gui.TextView;
|
||||
import haxework.gui.utils.DrawUtil.FillType;
|
||||
import haxework.view.HGroupView;
|
||||
import haxework.view.ImageView;
|
||||
import haxework.view.IView;
|
||||
import haxework.view.TextView;
|
||||
import haxework.view.utils.DrawUtil.FillType;
|
||||
|
||||
@:template class TailForm extends HGroupView {
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
---
|
||||
views:
|
||||
- $type: haxework.gui.ScrollView
|
||||
- $type: haxework.view.ScrollView
|
||||
geometry.size.stretch: true
|
||||
view:
|
||||
id: data
|
||||
$type: haxework.gui.DataView
|
||||
$type: haxework.view.DataView
|
||||
layout:
|
||||
$type: haxework.gui.layout.TailLayout
|
||||
$type: haxework.view.layout.TailLayout
|
||||
margin: 2
|
||||
factory: $this:factory
|
||||
geometry.size.width: 100%
|
||||
data: $r:any:data
|
||||
scroll:
|
||||
$type: haxework.gui.list.VScrollBarView
|
||||
$type: haxework.view.list.VScrollBarView
|
||||
skinId: scroll
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package demo.popup;
|
||||
|
||||
import haxework.gui.ButtonView;
|
||||
import haxework.gui.popup.PopupView;
|
||||
import haxework.gui.skin.Skin;
|
||||
import haxework.view.ButtonView;
|
||||
import haxework.view.popup.PopupView;
|
||||
import haxework.view.skin.Skin;
|
||||
|
||||
@:template class ColorPopup extends PopupView<Int> {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
view:
|
||||
$type: haxework.gui.VGroupView
|
||||
$type: haxework.view.VGroupView
|
||||
geometry.size.width: 400
|
||||
geometry.size.height: 200
|
||||
geometry.padding: 10
|
||||
@@ -9,10 +9,10 @@ view:
|
||||
skinId: panel
|
||||
views:
|
||||
- id: colors
|
||||
$type: haxework.gui.DataView
|
||||
$type: haxework.view.DataView
|
||||
geometry.size.stretch: true
|
||||
layout:
|
||||
$type: haxework.gui.layout.TailLayout
|
||||
$type: haxework.view.layout.TailLayout
|
||||
vAlign: middle
|
||||
margin: 5
|
||||
factory: $this:colorViewFactory
|
||||
@@ -23,12 +23,12 @@ view:
|
||||
- 0xCC33AA
|
||||
- 0x3333AA
|
||||
+onDataSelect: $this:close
|
||||
- $type: haxework.gui.HGroupView
|
||||
- $type: haxework.view.HGroupView
|
||||
geometry.size.width: 100%
|
||||
layout.hAlign: right
|
||||
layout.margin: 10
|
||||
views:
|
||||
- $type: haxework.gui.ButtonView
|
||||
- $type: haxework.view.ButtonView
|
||||
geometry.padding: [25, 8]
|
||||
skinId: button
|
||||
text: Cancel
|
||||
|
||||
Reference in New Issue
Block a user