[view] reorganize packages
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
package demo;
|
package demo;
|
||||||
|
|
||||||
import demo.dispatch.DemoDispatcher;
|
import demo.dispatch.DemoDispatcher;
|
||||||
import haxework.net.JsonLoader;
|
|
||||||
import demo.popup.ColorPopup;
|
import demo.popup.ColorPopup;
|
||||||
import haxework.App;
|
import haxework.App;
|
||||||
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;
|
import haxework.log.TraceLogger;
|
||||||
|
import haxework.net.JsonLoader;
|
||||||
|
import haxework.view.form.ToggleButtonView;
|
||||||
|
import haxework.view.frame.FrameSwitcher;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
|
import haxework.view.group.VGroupView;
|
||||||
|
import haxework.view.IView;
|
||||||
|
|
||||||
@:template class DemoView extends VGroupView {
|
@:template class DemoView extends VGroupView {
|
||||||
@:view var switcher:FrameSwitcher;
|
@:view var switcher:FrameSwitcher;
|
||||||
@@ -25,9 +25,9 @@ import haxework.log.TraceLogger;
|
|||||||
|
|
||||||
private function choiceColor():Void {
|
private function choiceColor():Void {
|
||||||
// ToDo: update Theme
|
// ToDo: update Theme
|
||||||
/*new ColorPopup()
|
new ColorPopup()
|
||||||
.show()
|
.show();
|
||||||
.then(function(color) AppTheme.setColor(color))
|
/*.then(function(color) AppTheme.setColor(color))
|
||||||
.catchError(function(e) {});*/
|
.catchError(function(e) {});*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ views:
|
|||||||
geometry.padding: 10
|
geometry.padding: 10
|
||||||
image: $r:image:logo
|
image: $r:image:logo
|
||||||
- id: tabs
|
- id: tabs
|
||||||
$type: haxework.view.ButtonGroup<String>
|
$type: haxework.view.data.ButtonGroup<String>
|
||||||
layout.margin: 5
|
layout.margin: 5
|
||||||
layout.hAlign: left
|
layout.hAlign: left
|
||||||
geometry.size.width: 100%
|
geometry.size.width: 100%
|
||||||
@@ -34,12 +34,12 @@ views:
|
|||||||
_data_: {$class: demo.form.DataForm}
|
_data_: {$class: demo.form.DataForm}
|
||||||
_test_layout_: {$class: demo.form.TestLayoutForm}
|
_test_layout_: {$class: demo.form.TestLayoutForm}
|
||||||
_select_: {$class: demo.form.SelectForm}
|
_select_: {$class: demo.form.SelectForm}
|
||||||
- $type: haxework.view.HGroupView
|
- $type: haxework.view.group.HGroupView
|
||||||
geometry.size.percent.width: 100
|
geometry.size.percent.width: 100
|
||||||
geometry.padding: 10
|
geometry.padding: 10
|
||||||
layout.margin: 10
|
layout.margin: 10
|
||||||
views:
|
views:
|
||||||
- $type: haxework.view.ButtonView
|
- $type: haxework.view.form.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: Color
|
text: Color
|
||||||
@@ -47,15 +47,15 @@ views:
|
|||||||
# separator
|
# separator
|
||||||
- $type: haxework.view.SpriteView
|
- $type: haxework.view.SpriteView
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
- $type: haxework.view.ButtonView
|
- $type: haxework.view.form.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: OK
|
text: OK
|
||||||
- $type: haxework.view.ButtonView
|
- $type: haxework.view.form.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: Apply
|
text: Apply
|
||||||
- $type: haxework.view.ButtonView
|
- $type: haxework.view.form.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: Cancel
|
text: Cancel
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package demo.form;
|
package demo.form;
|
||||||
|
|
||||||
import haxework.view.frame.FrameView;
|
import haxework.view.frame.FrameView;
|
||||||
import haxework.view.TextView;
|
import haxework.view.text.TextView;
|
||||||
|
|
||||||
|
|
||||||
@:template class DataForm extends FrameView<Dynamic> {
|
@:template class DataForm extends FrameView<Dynamic> {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ views:
|
|||||||
scroll.skinId: scroll
|
scroll.skinId: scroll
|
||||||
view:
|
view:
|
||||||
id: data
|
id: data
|
||||||
$type: haxework.view.DataView
|
$type: haxework.view.data.DataView
|
||||||
layout:
|
layout:
|
||||||
$type: haxework.view.layout.VerticalLayout
|
$type: haxework.view.layout.VerticalLayout
|
||||||
factory: ~factory
|
factory: ~factory
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
geometry.padding: 10
|
geometry.padding: 10
|
||||||
layout.margin: 5
|
layout.margin: 5
|
||||||
views:
|
views:
|
||||||
- $type: haxework.view.SelectView<String>
|
- $type: haxework.view.form.SelectView<String>
|
||||||
layout.margin: 2
|
layout.margin: 2
|
||||||
dataView.layout.margin: 1
|
dataView.layout.margin: 1
|
||||||
labelSkinId: text
|
labelSkinId: text
|
||||||
@@ -14,7 +14,7 @@ views:
|
|||||||
selected: "value 1"
|
selected: "value 1"
|
||||||
+onSelect: ~function(value) trace('select', value)
|
+onSelect: ~function(value) trace('select', value)
|
||||||
|
|
||||||
- $type: haxework.view.SelectView.SelectIdView<{id:Int,label:String}, Int>
|
- $type: haxework.view.form.SelectView.SelectIdView<{id:Int,label:String}, Int>
|
||||||
layout.margin: 2
|
layout.margin: 2
|
||||||
dataView.layout.margin: 1
|
dataView.layout.margin: 1
|
||||||
labelSkinId: text
|
labelSkinId: text
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package demo.form;
|
|||||||
import haxework.view.frame.FrameView;
|
import haxework.view.frame.FrameView;
|
||||||
import haxework.view.ImageView;
|
import haxework.view.ImageView;
|
||||||
import haxework.view.IView;
|
import haxework.view.IView;
|
||||||
import haxework.view.TextView;
|
import haxework.view.text.TextView;
|
||||||
import haxework.view.utils.DrawUtil;
|
import haxework.view.utils.DrawUtil;
|
||||||
|
|
||||||
@:template class TailForm extends FrameView<Dynamic> {
|
@:template class TailForm extends FrameView<Dynamic> {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ views:
|
|||||||
scroll.skinId: scroll
|
scroll.skinId: scroll
|
||||||
view:
|
view:
|
||||||
id: data
|
id: data
|
||||||
$type: haxework.view.DataView
|
$type: haxework.view.data.DataView
|
||||||
layout:
|
layout:
|
||||||
$type: haxework.view.layout.TailLayout
|
$type: haxework.view.layout.TailLayout
|
||||||
margin: 2
|
margin: 2
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
---
|
---
|
||||||
views:
|
views:
|
||||||
- id: main
|
- id: main
|
||||||
$type: haxework.view.VGroupView
|
$type: haxework.view.group.VGroupView
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
layout.hAlign: center
|
layout.hAlign: center
|
||||||
layout.vAlign: middle
|
layout.vAlign: middle
|
||||||
views:
|
views:
|
||||||
- id: container
|
- id: container
|
||||||
$type: haxework.view.VGroupView
|
$type: haxework.view.group.VGroupView
|
||||||
layout.margin: 10
|
layout.margin: 10
|
||||||
skin:
|
skin:
|
||||||
- $type: [haxework.view.skin.Skin.color, 0xffff00]
|
- $type: [haxework.view.skin.Skin.color, 0xffff00]
|
||||||
views:
|
views:
|
||||||
- id: top
|
- id: top
|
||||||
$type: haxework.view.GroupView
|
$type: haxework.view.group.GroupView
|
||||||
layout.hAlign: center
|
layout.hAlign: center
|
||||||
geometry.size.width: 100%
|
geometry.size.width: 100%
|
||||||
geometry.size.height: 20
|
geometry.size.height: 20
|
||||||
skinId: test
|
skinId: test
|
||||||
- id: middle
|
- id: middle
|
||||||
$type: haxework.view.HGroupView
|
$type: haxework.view.group.HGroupView
|
||||||
layout.margin: 10
|
layout.margin: 10
|
||||||
views:
|
views:
|
||||||
- id: left
|
- id: left
|
||||||
$type: haxework.view.GroupView
|
$type: haxework.view.group.GroupView
|
||||||
layout.vAlign: middle
|
layout.vAlign: middle
|
||||||
geometry.size.width: 20
|
geometry.size.width: 20
|
||||||
geometry.size.height: 100%
|
geometry.size.height: 100%
|
||||||
@@ -34,7 +34,7 @@ views:
|
|||||||
#geometry.size.height: 200
|
#geometry.size.height: 200
|
||||||
skinId: test
|
skinId: test
|
||||||
- id: right
|
- id: right
|
||||||
$type: haxework.view.GroupView
|
$type: haxework.view.group.GroupView
|
||||||
layout.vAlign: middle
|
layout.vAlign: middle
|
||||||
geometry.size.width: 20
|
geometry.size.width: 20
|
||||||
geometry.size.height: 100%
|
geometry.size.height: 100%
|
||||||
@@ -46,7 +46,7 @@ views:
|
|||||||
skin:
|
skin:
|
||||||
- $type: [haxework.view.skin.Skin.color, 0xff0000]
|
- $type: [haxework.view.skin.Skin.color, 0xff0000]
|
||||||
- id: bottom
|
- id: bottom
|
||||||
$type: haxework.view.GroupView
|
$type: haxework.view.group.GroupView
|
||||||
layout.hAlign: center
|
layout.hAlign: center
|
||||||
skinId: test
|
skinId: test
|
||||||
geometry.size.width: 100%
|
geometry.size.width: 100%
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package demo.popup;
|
package demo.popup;
|
||||||
|
|
||||||
import haxework.view.ButtonView;
|
import haxework.view.form.ButtonView;
|
||||||
import haxework.view.popup.PopupView;
|
import haxework.view.popup.PopupView;
|
||||||
import haxework.view.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
view:
|
view:
|
||||||
$type: haxework.view.VGroupView
|
$type: haxework.view.group.VGroupView
|
||||||
geometry.size.width: 400
|
geometry.size.width: 400
|
||||||
geometry.size.height: 200
|
geometry.size.height: 200
|
||||||
geometry.padding: 10
|
geometry.padding: 10
|
||||||
@@ -9,7 +9,7 @@ view:
|
|||||||
skinId: panel
|
skinId: panel
|
||||||
views:
|
views:
|
||||||
- id: colors
|
- id: colors
|
||||||
$type: haxework.view.DataView
|
$type: haxework.view.data.DataView
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
layout:
|
layout:
|
||||||
$type: haxework.view.layout.TailLayout
|
$type: haxework.view.layout.TailLayout
|
||||||
@@ -23,12 +23,12 @@ view:
|
|||||||
- 0xCC33AA
|
- 0xCC33AA
|
||||||
- 0x3333AA
|
- 0x3333AA
|
||||||
+onDataSelect: ~close
|
+onDataSelect: ~close
|
||||||
- $type: haxework.view.HGroupView
|
- $type: haxework.view.group.HGroupView
|
||||||
geometry.size.width: 100%
|
geometry.size.width: 100%
|
||||||
layout.hAlign: right
|
layout.hAlign: right
|
||||||
layout.margin: 10
|
layout.margin: 10
|
||||||
views:
|
views:
|
||||||
- $type: haxework.view.ButtonView
|
- $type: haxework.view.form.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: Cancel
|
text: Cancel
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ package haxework.view;
|
|||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import flash.geom.Rectangle;
|
import flash.geom.Rectangle;
|
||||||
import haxework.view.core.Geometry;
|
import haxework.view.core.Geometry;
|
||||||
import haxework.view.skin.ISkin.SkinSet;
|
import haxework.view.group.IGroupView;
|
||||||
|
import haxework.view.skin.ISkin;
|
||||||
|
|
||||||
interface IView<C:DisplayObject> {
|
interface IView<C:DisplayObject> {
|
||||||
public var id(default, default):String;
|
public var id(default, default):String;
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
package haxework.view;
|
|
||||||
|
|
||||||
class ProgressView extends SpriteView {
|
|
||||||
|
|
||||||
public var value(default, set):Int;
|
|
||||||
public var max(default, set):Int;
|
|
||||||
|
|
||||||
public function new() {
|
|
||||||
super();
|
|
||||||
value = 0;
|
|
||||||
max = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function set_value(value:Int):Int {
|
|
||||||
if (this.value != value) {
|
|
||||||
this.value = value;
|
|
||||||
invalidate();
|
|
||||||
}
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function set_max(value:Int):Int {
|
|
||||||
if (max != value) {
|
|
||||||
max = value;
|
|
||||||
invalidate();
|
|
||||||
}
|
|
||||||
return max;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package haxework.view;
|
package haxework.view;
|
||||||
|
|
||||||
import haxework.provider.Provider;
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import flash.display.StageAlign;
|
import flash.display.StageAlign;
|
||||||
import flash.display.StageScaleMode;
|
import flash.display.StageScaleMode;
|
||||||
@@ -8,7 +7,9 @@ import flash.errors.Error;
|
|||||||
import flash.events.Event;
|
import flash.events.Event;
|
||||||
import flash.geom.Rectangle;
|
import flash.geom.Rectangle;
|
||||||
import flash.Lib;
|
import flash.Lib;
|
||||||
|
import haxework.provider.Provider;
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
|
|
||||||
class Root {
|
class Root {
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import flash.display.Sprite;
|
|||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
import haxework.view.core.Geometry.Position;
|
import haxework.view.core.Geometry.Position;
|
||||||
|
import haxework.view.group.HGroupView;
|
||||||
import haxework.view.list.ScrollBarView;
|
import haxework.view.list.ScrollBarView;
|
||||||
import haxework.view.list.VScrollBarView;
|
import haxework.view.list.VScrollBarView;
|
||||||
import haxework.view.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import flash.display.DisplayObject;
|
|||||||
import flash.display.InteractiveObject;
|
import flash.display.InteractiveObject;
|
||||||
import flash.geom.Rectangle;
|
import flash.geom.Rectangle;
|
||||||
import haxework.view.core.Geometry;
|
import haxework.view.core.Geometry;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
import haxework.view.skin.ISkin;
|
import haxework.view.skin.ISkin;
|
||||||
import haxework.view.theme.ITheme;
|
import haxework.view.theme.ITheme;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package haxework.view;
|
package haxework.view.data;
|
||||||
|
|
||||||
using haxework.utils.StringUtil;
|
import haxework.view.form.ToggleButtonView;
|
||||||
import haxework.view.DataView.Factory;
|
import haxework.view.data.DataView.Factory;
|
||||||
import haxe.EnumTools;
|
import haxe.EnumTools;
|
||||||
import haxework.view.layout.HorizontalLayout;
|
import haxework.view.layout.HorizontalLayout;
|
||||||
import haxework.view.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
|
|
||||||
|
using haxework.utils.StringUtil;
|
||||||
|
|
||||||
class ButtonGroup<D> extends DataView<D, ToggleButtonView> {
|
class ButtonGroup<D> extends DataView<D, ToggleButtonView> {
|
||||||
|
|
||||||
public var selected(default, set):D;
|
public var selected(default, set):D;
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
package haxework.view;
|
package haxework.view.data;
|
||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
|
import haxework.view.group.GroupView;
|
||||||
import haxework.view.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
import haxework.view.layout.VerticalLayout;
|
import haxework.view.layout.VerticalLayout;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.form;
|
||||||
|
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import haxework.view.skin.ButtonBitmapSkin;
|
import haxework.view.skin.ButtonBitmapSkin;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.form;
|
||||||
|
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.form;
|
||||||
|
|
||||||
import flash.events.Event;
|
import flash.events.Event;
|
||||||
import flash.events.KeyboardEvent;
|
import flash.events.KeyboardEvent;
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package haxework.view;
|
package haxework.view.form;
|
||||||
|
|
||||||
import haxework.view.core.VAlign;
|
|
||||||
import haxework.view.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
import haxework.view.core.VAlign;
|
||||||
|
import haxework.view.text.TextView;
|
||||||
|
|
||||||
class LabelView extends TextView {
|
class LabelView extends TextView {
|
||||||
|
|
||||||
@@ -1,10 +1,13 @@
|
|||||||
package haxework.view;
|
package haxework.view.form;
|
||||||
|
|
||||||
import haxework.view.core.HAlign;
|
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
import flash.geom.Point;
|
import flash.geom.Point;
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
import haxework.view.core.Geometry.Position;
|
import haxework.view.core.Geometry.Position;
|
||||||
|
import haxework.view.core.HAlign;
|
||||||
|
import haxework.view.data.DataView;
|
||||||
|
import haxework.view.group.GroupView;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
import haxework.view.layout.VerticalLayout;
|
import haxework.view.layout.VerticalLayout;
|
||||||
import haxework.view.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
using haxework.utils.StringUtil;
|
using haxework.utils.StringUtil;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.form;
|
||||||
|
|
||||||
class ToggleButtonView extends ButtonView {
|
class ToggleButtonView extends ButtonView {
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@ package haxework.view.frame;
|
|||||||
|
|
||||||
import haxework.animate.IAnimate;
|
import haxework.animate.IAnimate;
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
import haxework.view.GroupView;
|
import haxework.view.group.GroupView;
|
||||||
import haxework.view.IView;
|
import haxework.view.IView;
|
||||||
|
|
||||||
class FrameSwitcher extends GroupView {
|
class FrameSwitcher extends GroupView {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package haxework.view.frame;
|
package haxework.view.frame;
|
||||||
|
|
||||||
|
import haxework.view.group.GroupView;
|
||||||
import haxework.view.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
import haxework.view.layout.VerticalLayout;
|
import haxework.view.layout.VerticalLayout;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.group;
|
||||||
|
|
||||||
import flash.display.DisplayObjectContainer;
|
import flash.display.DisplayObjectContainer;
|
||||||
import haxework.view.layout.DefaultLayout;
|
import haxework.view.layout.DefaultLayout;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.group;
|
||||||
|
|
||||||
import haxework.view.layout.HorizontalLayout;
|
import haxework.view.layout.HorizontalLayout;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.group;
|
||||||
|
|
||||||
import flash.display.DisplayObjectContainer;
|
import flash.display.DisplayObjectContainer;
|
||||||
import haxework.view.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.group;
|
||||||
|
|
||||||
import haxework.view.layout.VerticalLayout;
|
import haxework.view.layout.VerticalLayout;
|
||||||
|
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
package haxework.view.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
import haxework.view.core.Geometry;
|
import haxework.view.core.Geometry;
|
||||||
import haxework.view.core.VAlign;
|
|
||||||
import haxework.view.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
import haxework.view.core.VAlign;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
|
|
||||||
class DefaultLayout extends Layout {
|
class DefaultLayout extends Layout {
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package haxework.view.layout;
|
|||||||
|
|
||||||
import haxework.view.core.Geometry.SizeValue;
|
import haxework.view.core.Geometry.SizeValue;
|
||||||
import haxework.view.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
|
|
||||||
class HorizontalLayout extends DefaultLayout {
|
class HorizontalLayout extends DefaultLayout {
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package haxework.view.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
import haxework.view.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.view.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package haxework.view.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
import haxework.view.core.VAlign;
|
|
||||||
import haxework.view.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
import haxework.view.core.VAlign;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
|
|
||||||
class Layout implements ILayout {
|
class Layout implements ILayout {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package haxework.view.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
import haxework.view.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
|
|
||||||
typedef Row = {
|
typedef Row = {
|
||||||
var width:Float;
|
var width:Float;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package haxework.view.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
import haxework.view.core.VAlign;
|
|
||||||
import haxework.view.core.Geometry.SizeValue;
|
import haxework.view.core.Geometry.SizeValue;
|
||||||
|
import haxework.view.core.VAlign;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
|
|
||||||
class VerticalLayout extends DefaultLayout {
|
class VerticalLayout extends DefaultLayout {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package haxework.view.list;
|
package haxework.view.list;
|
||||||
|
|
||||||
import haxework.view.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
import haxework.view.form.LabelView;
|
||||||
import haxework.view.list.ListView.IListItemView;
|
import haxework.view.list.ListView.IListItemView;
|
||||||
|
|
||||||
private typedef Formatter<T> = Int -> T -> String;
|
private typedef Formatter<T> = Int -> T -> String;
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
package haxework.view.list;
|
package haxework.view.list;
|
||||||
|
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
|
import haxework.signal.Signal;
|
||||||
|
import haxework.utils.NumberUtil;
|
||||||
import haxework.view.core.Geometry.Position;
|
import haxework.view.core.Geometry.Position;
|
||||||
import haxework.view.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
import haxework.view.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
|
import haxework.view.form.ButtonView;
|
||||||
|
import haxework.view.group.GroupView;
|
||||||
import haxework.view.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
import haxework.view.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
import haxework.signal.Signal;
|
|
||||||
import haxework.utils.NumberUtil;
|
|
||||||
|
|
||||||
class ListView<D> extends GroupView {
|
class ListView<D> extends GroupView {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.view.popup;
|
package haxework.view.popup;
|
||||||
|
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
import haxework.animate.IAnimate;
|
import haxework.animate.IAnimate;
|
||||||
import haxework.view.IGroupView;
|
|
||||||
|
|
||||||
typedef P = PopupView<Dynamic>;
|
typedef P = PopupView<Dynamic>;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package haxework.view.popup;
|
|||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
import haxework.view.core.Geometry.Position;
|
import haxework.view.core.Geometry.Position;
|
||||||
import haxework.view.GroupView;
|
import haxework.view.group.GroupView;
|
||||||
import haxework.view.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
import promhx.Deferred;
|
import promhx.Deferred;
|
||||||
import promhx.Promise;
|
import promhx.Promise;
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ package haxework.view.skin;
|
|||||||
|
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import flash.geom.Rectangle;
|
import flash.geom.Rectangle;
|
||||||
import haxework.view.ButtonView.ButtonState;
|
import haxework.view.form.ButtonView.ButtonState;
|
||||||
|
import haxework.view.form.ButtonView;
|
||||||
import haxework.view.utils.BitmapUtil;
|
import haxework.view.utils.BitmapUtil;
|
||||||
import haxework.view.utils.DrawUtil;
|
import haxework.view.utils.DrawUtil;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import flash.display.Graphics;
|
|||||||
import flash.display.JointStyle;
|
import flash.display.JointStyle;
|
||||||
import flash.display.LineScaleMode;
|
import flash.display.LineScaleMode;
|
||||||
import haxework.color.ColorUtil;
|
import haxework.color.ColorUtil;
|
||||||
import haxework.view.ButtonView;
|
import haxework.view.form.ButtonView;
|
||||||
|
import haxework.view.form.ToggleButtonView;
|
||||||
|
|
||||||
class ButtonColorSkin implements ISkin<ButtonView> {
|
class ButtonColorSkin implements ISkin<ButtonView> {
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package haxework.view.skin;
|
|||||||
|
|
||||||
import haxework.view.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
import haxework.view.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
|
import haxework.view.group.IGroupView;
|
||||||
import haxework.view.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
|
|
||||||
class LayoutSkin implements ISkin<IGroupView> {
|
class LayoutSkin implements ISkin<IGroupView> {
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package haxework.view.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import haxework.view.utils.DrawUtil.FillType;
|
|
||||||
import haxework.view.layout.ILayout;
|
|
||||||
import haxework.view.core.Geometry;
|
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
|
import haxework.view.core.Geometry;
|
||||||
|
import haxework.view.form.ButtonView;
|
||||||
|
import haxework.view.layout.ILayout;
|
||||||
|
import haxework.view.text.ITextView;
|
||||||
|
import haxework.view.utils.DrawUtil;
|
||||||
|
|
||||||
class Skin {
|
class Skin {
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package haxework.view.skin;
|
|||||||
|
|
||||||
import flash.display.Graphics;
|
import flash.display.Graphics;
|
||||||
import haxework.color.ColorUtil;
|
import haxework.color.ColorUtil;
|
||||||
|
import haxework.view.form.ButtonView;
|
||||||
|
import haxework.view.form.ToggleButtonView;
|
||||||
|
|
||||||
class TabColorSkin extends ButtonColorSkin {
|
class TabColorSkin extends ButtonColorSkin {
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package haxework.view.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
|
import haxework.view.text.ITextView;
|
||||||
|
|
||||||
class TextSkin implements ISkin<ITextView> {
|
class TextSkin implements ISkin<ITextView> {
|
||||||
|
|
||||||
public var fontColor(default, default):Int;
|
public var fontColor(default, default):Int;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.text;
|
||||||
|
|
||||||
import flash.text.TextField;
|
import flash.text.TextField;
|
||||||
import haxework.view.IView;
|
import haxework.view.IView;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.view;
|
package haxework.view.text;
|
||||||
|
|
||||||
import haxework.view.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
import haxework.view.layout.Layout;
|
import haxework.view.layout.Layout;
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package haxework.view.theme;
|
package haxework.view.theme;
|
||||||
|
|
||||||
|
import haxework.view.text.ITextView;
|
||||||
import haxework.color.Color;
|
import haxework.color.Color;
|
||||||
import haxework.view.skin.ISkin;
|
import haxework.view.skin.ISkin;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package haxework.view.theme;
|
package haxework.view.theme;
|
||||||
|
|
||||||
import flash.text.FontType;
|
|
||||||
import flash.text.Font;
|
import flash.text.Font;
|
||||||
|
import flash.text.FontType;
|
||||||
import haxework.color.Color;
|
import haxework.color.Color;
|
||||||
import haxework.view.skin.ISkin;
|
import haxework.view.skin.ISkin;
|
||||||
import haxework.view.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
|
import haxework.view.text.ITextView;
|
||||||
import haxework.view.theme.ITheme;
|
import haxework.view.theme.ITheme;
|
||||||
|
|
||||||
using haxework.color.ColorUtil;
|
using haxework.color.ColorUtil;
|
||||||
|
|||||||
Reference in New Issue
Block a user