[view] rename from gui
This commit is contained in:
@@ -3,11 +3,11 @@ package demo;
|
|||||||
import haxework.net.JsonLoader;
|
import haxework.net.JsonLoader;
|
||||||
import demo.popup.ColorPopup;
|
import demo.popup.ColorPopup;
|
||||||
import haxework.App;
|
import haxework.App;
|
||||||
import haxework.gui.frame.FrameSwitcher;
|
import haxework.view.frame.FrameSwitcher;
|
||||||
import haxework.gui.IGroupView;
|
import haxework.view.IGroupView;
|
||||||
import haxework.gui.IView;
|
import haxework.view.IView;
|
||||||
import haxework.gui.ToggleButtonView;
|
import haxework.view.ToggleButtonView;
|
||||||
import haxework.gui.VGroupView;
|
import haxework.view.VGroupView;
|
||||||
import haxework.log.TraceLogger;
|
import haxework.log.TraceLogger;
|
||||||
|
|
||||||
@:template class DemoView extends VGroupView {
|
@:template class DemoView extends VGroupView {
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
skinId: background
|
skinId: background
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
views:
|
views:
|
||||||
- $type: haxework.gui.ImageView
|
- $type: haxework.view.ImageView
|
||||||
geometry.padding: 10
|
geometry.padding: 10
|
||||||
image: $r:image:logo
|
image: $r:image:logo
|
||||||
- id: tabs
|
- id: tabs
|
||||||
$type: haxework.gui.HGroupView
|
$type: haxework.view.HGroupView
|
||||||
layout.margin: 5
|
layout.margin: 5
|
||||||
layout.hAlign: left
|
layout.hAlign: left
|
||||||
geometry.size.width: 100%
|
geometry.size.width: 100%
|
||||||
@@ -14,25 +14,25 @@ views:
|
|||||||
geometry.margin.bottom: -3
|
geometry.margin.bottom: -3
|
||||||
views:
|
views:
|
||||||
- id: list_form
|
- id: list_form
|
||||||
$type: haxework.gui.ToggleButtonView
|
$type: haxework.view.ToggleButtonView
|
||||||
skinId: tab
|
skinId: tab
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
text: List
|
text: List
|
||||||
+onPress: "$code:switcher.change('list_form')"
|
+onPress: "$code:switcher.change('list_form')"
|
||||||
- id: tail_form
|
- id: tail_form
|
||||||
$type: haxework.gui.ToggleButtonView
|
$type: haxework.view.ToggleButtonView
|
||||||
skinId: tab
|
skinId: tab
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
text: Tail
|
text: Tail
|
||||||
+onPress: "$code:switcher.change('tail_form')"
|
+onPress: "$code:switcher.change('tail_form')"
|
||||||
- id: data_form
|
- id: data_form
|
||||||
$type: haxework.gui.ToggleButtonView
|
$type: haxework.view.ToggleButtonView
|
||||||
skinId: tab
|
skinId: tab
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
text: Data
|
text: Data
|
||||||
+onPress: "$code:switcher.change('data_form')"
|
+onPress: "$code:switcher.change('data_form')"
|
||||||
- id: switcher
|
- id: switcher
|
||||||
$type: haxework.gui.frame.FrameSwitcher
|
$type: haxework.view.frame.FrameSwitcher
|
||||||
skinId: panel
|
skinId: panel
|
||||||
animateFactory: { $class: haxework.animate.SlideAnimate }
|
animateFactory: { $class: haxework.animate.SlideAnimate }
|
||||||
+onSwitch: $this:onFrameSwitch
|
+onSwitch: $this:onFrameSwitch
|
||||||
@@ -51,28 +51,28 @@ views:
|
|||||||
$type: demo.form.DataForm
|
$type: demo.form.DataForm
|
||||||
skinId: background
|
skinId: background
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
- $type: haxework.gui.HGroupView
|
- $type: haxework.view.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.gui.ButtonView
|
- $type: haxework.view.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: Color
|
text: Color
|
||||||
+onPress: "$code:choiceColor()"
|
+onPress: "$code:choiceColor()"
|
||||||
# separator
|
# separator
|
||||||
- $type: haxework.gui.SpriteView
|
- $type: haxework.view.SpriteView
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
- $type: haxework.gui.ButtonView
|
- $type: haxework.view.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: OK
|
text: OK
|
||||||
- $type: haxework.gui.ButtonView
|
- $type: haxework.view.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: Apply
|
text: Apply
|
||||||
- $type: haxework.gui.ButtonView
|
- $type: haxework.view.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: Cancel
|
text: Cancel
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package demo;
|
|||||||
|
|
||||||
import haxework.color.ColorUtil;
|
import haxework.color.ColorUtil;
|
||||||
import haxework.resources.IResources;
|
import haxework.resources.IResources;
|
||||||
import haxework.gui.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
import haxework.gui.skin.TextSkin;
|
import haxework.view.skin.TextSkin;
|
||||||
|
|
||||||
class Theme {
|
class Theme {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package demo.form;
|
package demo.form;
|
||||||
|
|
||||||
import haxework.gui.TextView;
|
import haxework.view.TextView;
|
||||||
import haxework.gui.VGroupView;
|
import haxework.view.VGroupView;
|
||||||
|
|
||||||
@:template class DataForm extends VGroupView {
|
@:template class DataForm extends VGroupView {
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
---
|
---
|
||||||
views:
|
views:
|
||||||
- $type: haxework.gui.ScrollView
|
- $type: haxework.view.ScrollView
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
view:
|
view:
|
||||||
id: data
|
id: data
|
||||||
$type: haxework.gui.DataView
|
$type: haxework.view.DataView
|
||||||
layout:
|
layout:
|
||||||
$type: haxework.gui.layout.VerticalLayout
|
$type: haxework.view.layout.VerticalLayout
|
||||||
factory: $this:factory
|
factory: $this:factory
|
||||||
geometry.size.width: 100%
|
geometry.size.width: 100%
|
||||||
data: $r:any:data
|
data: $r:any:data
|
||||||
scroll:
|
scroll:
|
||||||
$type: haxework.gui.list.VScrollBarView
|
$type: haxework.view.list.VScrollBarView
|
||||||
skinId: scroll
|
skinId: scroll
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package demo.form;
|
package demo.form;
|
||||||
|
|
||||||
import haxework.gui.list.LabelListItem;
|
import haxework.view.list.LabelListItem;
|
||||||
import haxework.gui.list.ListView.IListItemView;
|
import haxework.view.list.ListView.IListItemView;
|
||||||
import haxework.gui.list.VListView;
|
import haxework.view.list.VListView;
|
||||||
import haxework.gui.VGroupView;
|
import haxework.view.VGroupView;
|
||||||
|
|
||||||
@:template class ListForm extends VGroupView {
|
@:template class ListForm extends VGroupView {
|
||||||
@:view public var list(default, null):VListView<Model>;
|
@:view public var list(default, null):VListView<Model>;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
views:
|
views:
|
||||||
- id: list
|
- id: list
|
||||||
$type: haxework.gui.list.VListView
|
$type: haxework.view.list.VListView
|
||||||
+onItemSelect: $this:onItemSelect
|
+onItemSelect: $this:onItemSelect
|
||||||
factory: $this:factory
|
factory: $this:factory
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
scroll:
|
scroll:
|
||||||
$type: haxework.gui.list.VScrollBarView
|
$type: haxework.view.list.VScrollBarView
|
||||||
skinId: scroll
|
skinId: scroll
|
||||||
data: $r:any:data50
|
data: $r:any:data50
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package demo.form;
|
package demo.form;
|
||||||
|
|
||||||
import haxework.gui.HGroupView;
|
import haxework.view.HGroupView;
|
||||||
import haxework.gui.ImageView;
|
import haxework.view.ImageView;
|
||||||
import haxework.gui.IView;
|
import haxework.view.IView;
|
||||||
import haxework.gui.TextView;
|
import haxework.view.TextView;
|
||||||
import haxework.gui.utils.DrawUtil.FillType;
|
import haxework.view.utils.DrawUtil.FillType;
|
||||||
|
|
||||||
@:template class TailForm extends HGroupView {
|
@:template class TailForm extends HGroupView {
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
views:
|
views:
|
||||||
- $type: haxework.gui.ScrollView
|
- $type: haxework.view.ScrollView
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
view:
|
view:
|
||||||
id: data
|
id: data
|
||||||
$type: haxework.gui.DataView
|
$type: haxework.view.DataView
|
||||||
layout:
|
layout:
|
||||||
$type: haxework.gui.layout.TailLayout
|
$type: haxework.view.layout.TailLayout
|
||||||
margin: 2
|
margin: 2
|
||||||
factory: $this:factory
|
factory: $this:factory
|
||||||
geometry.size.width: 100%
|
geometry.size.width: 100%
|
||||||
data: $r:any:data
|
data: $r:any:data
|
||||||
scroll:
|
scroll:
|
||||||
$type: haxework.gui.list.VScrollBarView
|
$type: haxework.view.list.VScrollBarView
|
||||||
skinId: scroll
|
skinId: scroll
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package demo.popup;
|
package demo.popup;
|
||||||
|
|
||||||
import haxework.gui.ButtonView;
|
import haxework.view.ButtonView;
|
||||||
import haxework.gui.popup.PopupView;
|
import haxework.view.popup.PopupView;
|
||||||
import haxework.gui.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
|
|
||||||
@:template class ColorPopup extends PopupView<Int> {
|
@:template class ColorPopup extends PopupView<Int> {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
view:
|
view:
|
||||||
$type: haxework.gui.VGroupView
|
$type: haxework.view.VGroupView
|
||||||
geometry.size.width: 400
|
geometry.size.width: 400
|
||||||
geometry.size.height: 200
|
geometry.size.height: 200
|
||||||
geometry.padding: 10
|
geometry.padding: 10
|
||||||
@@ -9,10 +9,10 @@ view:
|
|||||||
skinId: panel
|
skinId: panel
|
||||||
views:
|
views:
|
||||||
- id: colors
|
- id: colors
|
||||||
$type: haxework.gui.DataView
|
$type: haxework.view.DataView
|
||||||
geometry.size.stretch: true
|
geometry.size.stretch: true
|
||||||
layout:
|
layout:
|
||||||
$type: haxework.gui.layout.TailLayout
|
$type: haxework.view.layout.TailLayout
|
||||||
vAlign: middle
|
vAlign: middle
|
||||||
margin: 5
|
margin: 5
|
||||||
factory: $this:colorViewFactory
|
factory: $this:colorViewFactory
|
||||||
@@ -23,12 +23,12 @@ view:
|
|||||||
- 0xCC33AA
|
- 0xCC33AA
|
||||||
- 0x3333AA
|
- 0x3333AA
|
||||||
+onDataSelect: $this:close
|
+onDataSelect: $this:close
|
||||||
- $type: haxework.gui.HGroupView
|
- $type: haxework.view.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.gui.ButtonView
|
- $type: haxework.view.ButtonView
|
||||||
geometry.padding: [25, 8]
|
geometry.padding: [25, 8]
|
||||||
skinId: button
|
skinId: button
|
||||||
text: Cancel
|
text: Cancel
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
"url": "https://bitbucket.org/shmyga/haxework",
|
"url": "https://bitbucket.org/shmyga/haxework",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"tags": [
|
"tags": [
|
||||||
"gui",
|
"view",
|
||||||
"layout",
|
"layout",
|
||||||
"template"
|
"template"
|
||||||
],
|
],
|
||||||
"description": "Framework.",
|
"description": "View framework.",
|
||||||
"version": "0.9.0",
|
"version": "1.0.0",
|
||||||
"releasenote": "Update.",
|
"releasenote": "Update.",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"shmyga"
|
"shmyga"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package haxework;
|
package haxework;
|
||||||
|
|
||||||
import haxework.gui.Root;
|
import haxework.view.Root;
|
||||||
import haxework.gui.IView;
|
import haxework.view.IView;
|
||||||
import flash.Lib;
|
import flash.Lib;
|
||||||
import haxework.animate.Animate;
|
import haxework.animate.Animate;
|
||||||
import haxework.animate.FadeAnimate;
|
import haxework.animate.FadeAnimate;
|
||||||
import haxework.animate.UnFadeAnimate;
|
import haxework.animate.UnFadeAnimate;
|
||||||
import haxework.gui.popup.PopupManager;
|
import haxework.view.popup.PopupManager;
|
||||||
import haxework.net.manage.ILoaderManager;
|
import haxework.net.manage.ILoaderManager;
|
||||||
import haxework.net.manage.LoaderManager;
|
import haxework.net.manage.LoaderManager;
|
||||||
import haxework.resources.IResources;
|
import haxework.resources.IResources;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import flash.display.DisplayObject;
|
|||||||
import flash.display.Sprite;
|
import flash.display.Sprite;
|
||||||
import haxework.animate.Animate;
|
import haxework.animate.Animate;
|
||||||
import haxework.animate.IAnimate;
|
import haxework.animate.IAnimate;
|
||||||
import haxework.gui.IView;
|
import haxework.view.IView;
|
||||||
|
|
||||||
class CircleMaskAnimate extends Animate {
|
class CircleMaskAnimate extends Animate {
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package haxework.animate;
|
|||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import haxework.animate.IAnimate;
|
import haxework.animate.IAnimate;
|
||||||
import haxework.gui.IView;
|
import haxework.view.IView;
|
||||||
import haxework.animate.Animate;
|
import haxework.animate.Animate;
|
||||||
|
|
||||||
class FadeAnimate extends Animate {
|
class FadeAnimate extends Animate {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.animate;
|
package haxework.animate;
|
||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import haxework.gui.IView;
|
import haxework.view.IView;
|
||||||
|
|
||||||
class SlideAnimate extends Animate {
|
class SlideAnimate extends Animate {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.animate;
|
package haxework.animate;
|
||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import haxework.gui.IView;
|
import haxework.view.IView;
|
||||||
import haxework.animate.Animate;
|
import haxework.animate.Animate;
|
||||||
|
|
||||||
class UnFadeAnimate extends Animate {
|
class UnFadeAnimate extends Animate {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package haxework.resources;
|
|||||||
|
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import flash.display.MovieClip;
|
import flash.display.MovieClip;
|
||||||
import haxework.gui.skin.ISkin.SkinSet;
|
import haxework.view.skin.ISkin.SkinSet;
|
||||||
import haxework.resources.Resources.ResMap;
|
import haxework.resources.Resources.ResMap;
|
||||||
|
|
||||||
interface IResources {
|
interface IResources {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package haxework.resources;
|
|||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import flash.display.MovieClip;
|
import flash.display.MovieClip;
|
||||||
import haxe.ds.StringMap;
|
import haxe.ds.StringMap;
|
||||||
import haxework.gui.skin.ISkin;
|
import haxework.view.skin.ISkin;
|
||||||
|
|
||||||
private typedef Listener = {object:Dynamic, field:String};
|
private typedef Listener = {object:Dynamic, field:String};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.display.DisplayObjectContainer;
|
import flash.display.DisplayObjectContainer;
|
||||||
import haxework.gui.layout.DefaultLayout;
|
import haxework.view.layout.DefaultLayout;
|
||||||
import haxework.gui.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
|
|
||||||
class GroupView extends SpriteView implements IGroupView {
|
class GroupView extends SpriteView implements IGroupView {
|
||||||
public var container(get, null):DisplayObjectContainer;
|
public var container(get, null):DisplayObjectContainer;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import haxework.gui.layout.HorizontalLayout;
|
import haxework.view.layout.HorizontalLayout;
|
||||||
|
|
||||||
class HGroupView extends GroupView {
|
class HGroupView extends GroupView {
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.display.DisplayObjectContainer;
|
import flash.display.DisplayObjectContainer;
|
||||||
import haxework.gui.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
|
|
||||||
interface IGroupView extends IView<Dynamic> {
|
interface IGroupView extends IView<Dynamic> {
|
||||||
public var container(get, null):DisplayObjectContainer;
|
public var container(get, null):DisplayObjectContainer;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.text.TextField;
|
import flash.text.TextField;
|
||||||
import haxework.gui.IView;
|
import haxework.view.IView;
|
||||||
import flash.text.TextFormatAlign;
|
import flash.text.TextFormatAlign;
|
||||||
|
|
||||||
interface ITextView extends IView<Dynamic> {
|
interface ITextView extends IView<Dynamic> {
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import haxework.gui.core.Geometry;
|
import haxework.view.core.Geometry;
|
||||||
import haxework.gui.skin.ISkin.SkinSet;
|
import haxework.view.skin.ISkin.SkinSet;
|
||||||
|
|
||||||
interface IView<C:DisplayObject> {
|
interface IView<C:DisplayObject> {
|
||||||
public var id(default, default):String;
|
public var id(default, default):String;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import haxework.gui.skin.BitmapSkin;
|
import haxework.view.skin.BitmapSkin;
|
||||||
import haxework.gui.skin.ISkin;
|
import haxework.view.skin.ISkin;
|
||||||
import haxework.gui.utils.BitmapUtil;
|
import haxework.view.utils.BitmapUtil;
|
||||||
import haxework.gui.utils.DrawUtil.FillType;
|
import haxework.view.utils.DrawUtil.FillType;
|
||||||
import haxework.net.ImageLoader;
|
import haxework.net.ImageLoader;
|
||||||
|
|
||||||
class ImageView extends SpriteView {
|
class ImageView extends SpriteView {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.events.Event;
|
import flash.events.Event;
|
||||||
import flash.ui.Keyboard;
|
import flash.ui.Keyboard;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.events.Event;
|
import flash.events.Event;
|
||||||
import flash.events.KeyboardEvent;
|
import flash.events.KeyboardEvent;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
|
||||||
class LabelView extends TextView {
|
class LabelView extends TextView {
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import haxework.net.SwfLoader;
|
import haxework.net.SwfLoader;
|
||||||
import flash.display.MovieClip;
|
import flash.display.MovieClip;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
class ProgressView extends SpriteView {
|
class ProgressView extends SpriteView {
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import flash.display.StageAlign;
|
import flash.display.StageAlign;
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import flash.display.Sprite;
|
import flash.display.Sprite;
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
import haxework.gui.core.Geometry.Position;
|
import haxework.view.core.Geometry.Position;
|
||||||
import haxework.gui.list.ScrollBarView;
|
import haxework.view.list.ScrollBarView;
|
||||||
import haxework.gui.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
|
|
||||||
class ScrollView extends HGroupView {
|
class ScrollView extends HGroupView {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.display.Sprite;
|
import flash.display.Sprite;
|
||||||
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import haxework.gui.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
import haxework.gui.layout.Layout;
|
import haxework.view.layout.Layout;
|
||||||
import flash.text.TextField;
|
import flash.text.TextField;
|
||||||
import flash.text.TextFieldAutoSize;
|
import flash.text.TextFieldAutoSize;
|
||||||
import flash.text.TextFormat;
|
import flash.text.TextFormat;
|
||||||
import flash.text.TextFormatAlign;
|
import flash.text.TextFormatAlign;
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.text.BitmapTextField;
|
import haxework.text.BitmapTextField;
|
||||||
import haxework.text.TextUtil;
|
import haxework.text.TextUtil;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
class ToggleButtonView extends ButtonView {
|
class ToggleButtonView extends ButtonView {
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import haxework.gui.layout.VerticalLayout;
|
import haxework.view.layout.VerticalLayout;
|
||||||
|
|
||||||
class VGroupView extends GroupView {
|
class VGroupView extends GroupView {
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.display.DisplayObject;
|
import flash.display.DisplayObject;
|
||||||
import flash.display.InteractiveObject;
|
import flash.display.InteractiveObject;
|
||||||
import haxework.gui.core.Geometry;
|
import haxework.view.core.Geometry;
|
||||||
import haxework.gui.skin.ISkin.ISizeSkin;
|
import haxework.view.skin.ISkin.ISizeSkin;
|
||||||
import haxework.gui.skin.ISkin.SkinSet;
|
import haxework.view.skin.ISkin.SkinSet;
|
||||||
import haxework.resources.IResources;
|
import haxework.resources.IResources;
|
||||||
|
|
||||||
class View<C:DisplayObject> implements IView<C> {
|
class View<C:DisplayObject> implements IView<C> {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui;
|
package haxework.view;
|
||||||
|
|
||||||
import flash.events.Event;
|
import flash.events.Event;
|
||||||
import flash.display.Stage;
|
import flash.display.Stage;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.core;
|
package haxework.view.core;
|
||||||
|
|
||||||
abstract Box(Array<Float>) {
|
abstract Box(Array<Float>) {
|
||||||
public var left(get, set):Float;
|
public var left(get, set):Float;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.core;
|
package haxework.view.core;
|
||||||
|
|
||||||
enum SizeValue {
|
enum SizeValue {
|
||||||
FIXED(value:Float);
|
FIXED(value:Float);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.core;
|
package haxework.view.core;
|
||||||
|
|
||||||
@:enum abstract HAlign(String) from String to String {
|
@:enum abstract HAlign(String) from String to String {
|
||||||
var NONE = "none";
|
var NONE = "none";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.core;
|
package haxework.view.core;
|
||||||
|
|
||||||
abstract Size(Array<Float>) {
|
abstract Size(Array<Float>) {
|
||||||
public var width(get, set):Float;
|
public var width(get, set):Float;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.core;
|
package haxework.view.core;
|
||||||
|
|
||||||
@:enum abstract VAlign(String) from String to String {
|
@:enum abstract VAlign(String) from String to String {
|
||||||
var NONE = "none";
|
var NONE = "none";
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package haxework.gui.frame;
|
package haxework.view.frame;
|
||||||
|
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
import haxework.animate.IAnimate;
|
import haxework.animate.IAnimate;
|
||||||
import haxework.gui.IView;
|
import haxework.view.IView;
|
||||||
import haxework.gui.GroupView;
|
import haxework.view.GroupView;
|
||||||
|
|
||||||
class FrameSwitcher extends GroupView {
|
class FrameSwitcher extends GroupView {
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package haxework.gui.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
import haxework.gui.core.Geometry;
|
import haxework.view.core.Geometry;
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
|
||||||
class DefaultLayout extends Layout {
|
class DefaultLayout extends Layout {
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
import haxework.gui.core.Geometry.SizeValue;
|
import haxework.view.core.Geometry.SizeValue;
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
|
||||||
class HorizontalLayout extends DefaultLayout {
|
class HorizontalLayout extends DefaultLayout {
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
|
||||||
interface ILayout {
|
interface ILayout {
|
||||||
public var hAlign(default, default):HAlign;
|
public var hAlign(default, default):HAlign;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package haxework.gui.layout;
|
package haxework.view.layout;
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
|
|
||||||
class Layout implements ILayout {
|
class Layout implements ILayout {
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package haxework.gui.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
typedef Row = {
|
typedef Row = {
|
||||||
var width:Float;
|
var width:Float;
|
||||||
var height:Float;
|
var height:Float;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui.layout;
|
package haxework.view.layout;
|
||||||
|
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.core.Geometry.SizeValue;
|
import haxework.view.core.Geometry.SizeValue;
|
||||||
|
|
||||||
class VerticalLayout extends DefaultLayout {
|
class VerticalLayout extends DefaultLayout {
|
||||||
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package haxework.gui.list;
|
package haxework.view.list;
|
||||||
|
|
||||||
import haxework.gui.core.Geometry.SizeValue;
|
import haxework.view.core.Geometry.SizeValue;
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.layout.HorizontalLayout;
|
import haxework.view.layout.HorizontalLayout;
|
||||||
import haxework.gui.layout.VerticalLayout;
|
import haxework.view.layout.VerticalLayout;
|
||||||
import haxework.gui.list.ListView.IListItemView;
|
import haxework.view.list.ListView.IListItemView;
|
||||||
|
|
||||||
class HListView<D> extends ListView<D> {
|
class HListView<D> extends ListView<D> {
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.list;
|
package haxework.view.list;
|
||||||
|
|
||||||
import flash.geom.Point;
|
import flash.geom.Point;
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui.list;
|
package haxework.view.list;
|
||||||
|
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
import haxework.gui.list.ListView.IListItemView;
|
import haxework.view.list.ListView.IListItemView;
|
||||||
|
|
||||||
private typedef Formatter<T> = Int -> T -> String;
|
private typedef Formatter<T> = Int -> T -> String;
|
||||||
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package haxework.gui.list;
|
package haxework.view.list;
|
||||||
|
|
||||||
import flash.events.MouseEvent;
|
import flash.events.MouseEvent;
|
||||||
import haxework.gui.core.Geometry.Position;
|
import haxework.view.core.Geometry.Position;
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
import haxework.gui.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
import haxework.utils.NumberUtil;
|
import haxework.utils.NumberUtil;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.list;
|
package haxework.view.list;
|
||||||
|
|
||||||
import haxework.signal.Signal;
|
import haxework.signal.Signal;
|
||||||
import haxework.utils.NumberUtil;
|
import haxework.utils.NumberUtil;
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package haxework.gui.list;
|
package haxework.view.list;
|
||||||
|
|
||||||
import haxework.gui.core.Geometry.SizeValue;
|
import haxework.view.core.Geometry.SizeValue;
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.layout.HorizontalLayout;
|
import haxework.view.layout.HorizontalLayout;
|
||||||
import haxework.gui.layout.VerticalLayout;
|
import haxework.view.layout.VerticalLayout;
|
||||||
import haxework.gui.list.ListView.IListItemView;
|
import haxework.view.list.ListView.IListItemView;
|
||||||
|
|
||||||
class VListView<D> extends ListView<D> {
|
class VListView<D> extends ListView<D> {
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.list;
|
package haxework.view.list;
|
||||||
|
|
||||||
import flash.geom.Point;
|
import flash.geom.Point;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package haxework.gui.popup;
|
package haxework.view.popup;
|
||||||
|
|
||||||
import haxework.animate.IAnimate;
|
import haxework.animate.IAnimate;
|
||||||
import haxework.gui.Root;
|
import haxework.view.Root;
|
||||||
import haxework.gui.IGroupView;
|
import haxework.view.IGroupView;
|
||||||
|
|
||||||
typedef P = PopupView<Dynamic>;
|
typedef P = PopupView<Dynamic>;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package haxework.gui.popup;
|
package haxework.view.popup;
|
||||||
|
|
||||||
import haxework.gui.core.Geometry.Position;
|
import haxework.view.core.Geometry.Position;
|
||||||
import haxework.gui.GroupView;
|
import haxework.view.GroupView;
|
||||||
import haxework.gui.skin.Skin;
|
import haxework.view.skin.Skin;
|
||||||
import promhx.Deferred;
|
import promhx.Deferred;
|
||||||
import promhx.Promise;
|
import promhx.Promise;
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import flash.geom.Rectangle;
|
import flash.geom.Rectangle;
|
||||||
import haxework.gui.skin.ISkin.ISizeSkin;
|
import haxework.view.skin.ISkin.ISizeSkin;
|
||||||
import haxework.gui.utils.DrawUtil;
|
import haxework.view.utils.DrawUtil;
|
||||||
|
|
||||||
class BitmapSkin implements ISkin<SpriteView> implements ISizeSkin {
|
class BitmapSkin implements ISkin<SpriteView> implements ISizeSkin {
|
||||||
public var width(default, null):Float;
|
public var width(default, null):Float;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
class BorderSkin implements ISkin<SpriteView> {
|
class BorderSkin implements ISkin<SpriteView> {
|
||||||
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import flash.geom.Rectangle;
|
import flash.geom.Rectangle;
|
||||||
import haxework.gui.ButtonView.ButtonState;
|
import haxework.view.ButtonView.ButtonState;
|
||||||
import haxework.gui.skin.ISkin.ISizeSkin;
|
import haxework.view.skin.ISkin.ISizeSkin;
|
||||||
import haxework.gui.utils.BitmapUtil;
|
import haxework.view.utils.BitmapUtil;
|
||||||
import haxework.gui.utils.DrawUtil;
|
import haxework.view.utils.DrawUtil;
|
||||||
|
|
||||||
class ButtonBitmapSkin implements ISkin<ButtonView> implements ISizeSkin {
|
class ButtonBitmapSkin implements ISkin<ButtonView> implements ISizeSkin {
|
||||||
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import flash.display.LineScaleMode;
|
import flash.display.LineScaleMode;
|
||||||
import flash.display.JointStyle;
|
import flash.display.JointStyle;
|
||||||
import flash.display.CapsStyle;
|
import flash.display.CapsStyle;
|
||||||
import flash.display.Graphics;
|
import flash.display.Graphics;
|
||||||
import haxework.color.ColorUtil;
|
import haxework.color.ColorUtil;
|
||||||
import haxework.gui.ButtonView.ButtonState;
|
import haxework.view.ButtonView.ButtonState;
|
||||||
|
|
||||||
class ButtonColorSkin implements ISkin<ButtonView> {
|
class ButtonColorSkin implements ISkin<ButtonView> {
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
class ColorSkin implements ISkin<SpriteView> {
|
class ColorSkin implements ISkin<SpriteView> {
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.core.Geometry;
|
import haxework.view.core.Geometry;
|
||||||
|
|
||||||
class GeometrySkin implements ISkin<IView<Dynamic>> {
|
class GeometrySkin implements ISkin<IView<Dynamic>> {
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import haxework.color.ColorUtil;
|
import haxework.color.ColorUtil;
|
||||||
import haxework.gui.list.ScrollBarView;
|
import haxework.view.list.ScrollBarView;
|
||||||
|
|
||||||
class HScrollBarSkin implements ISkin<ScrollBarView> {
|
class HScrollBarSkin implements ISkin<ScrollBarView> {
|
||||||
public var foreColor(default, default):Int;
|
public var foreColor(default, default):Int;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
interface ISkin<V:IView<Dynamic>> {
|
interface ISkin<V:IView<Dynamic>> {
|
||||||
public function draw(view: V): Void;
|
public function draw(view: V): Void;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import haxework.gui.core.HAlign;
|
import haxework.view.core.HAlign;
|
||||||
import haxework.gui.core.VAlign;
|
import haxework.view.core.VAlign;
|
||||||
import haxework.gui.layout.ILayout;
|
import haxework.view.layout.ILayout;
|
||||||
|
|
||||||
class LayoutSkin implements ISkin<IGroupView> {
|
class LayoutSkin implements ISkin<IGroupView> {
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import flash.display.Graphics;
|
import flash.display.Graphics;
|
||||||
import haxework.gui.skin.ISkin;
|
import haxework.view.skin.ISkin;
|
||||||
|
|
||||||
class ProgressSkin implements ISkin<ProgressView> {
|
class ProgressSkin implements ISkin<ProgressView> {
|
||||||
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import ru.m.tankz.bot.BotHelper;
|
import haxework.view.layout.ILayout;
|
||||||
import haxework.gui.layout.ILayout;
|
import haxework.view.core.Geometry;
|
||||||
import haxework.gui.core.Geometry;
|
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
|
|
||||||
class Skin {
|
class Skin {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import flash.display.Graphics;
|
import flash.display.Graphics;
|
||||||
import haxework.color.ColorUtil;
|
import haxework.color.ColorUtil;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
class TextSkin implements ISkin<ITextView> {
|
class TextSkin implements ISkin<ITextView> {
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ class TextSkin implements ISkin<ITextView> {
|
|||||||
public var fontFamily(default, default):String;
|
public var fontFamily(default, default):String;
|
||||||
public var fontEmbed(default, default):Bool;
|
public var fontEmbed(default, default):Bool;
|
||||||
|
|
||||||
public function new(fontColor:Int, fontSize:Int, fontFamily:String, fontEmbed:Bool) {
|
public function new(fontColor:Int, fontSize:Int, fontFamily:String, fontEmbed:Bool=false) {
|
||||||
this.fontColor = fontColor;
|
this.fontColor = fontColor;
|
||||||
this.fontSize = fontSize;
|
this.fontSize = fontSize;
|
||||||
this.fontFamily = fontFamily;
|
this.fontFamily = fontFamily;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package haxework.gui.skin;
|
package haxework.view.skin;
|
||||||
|
|
||||||
import haxework.color.ColorUtil;
|
import haxework.color.ColorUtil;
|
||||||
import haxework.gui.list.ScrollBarView;
|
import haxework.view.list.ScrollBarView;
|
||||||
|
|
||||||
class VScrollBarSkin implements ISkin<ScrollBarView> {
|
class VScrollBarSkin implements ISkin<ScrollBarView> {
|
||||||
public var foreColor(default, default):Int;
|
public var foreColor(default, default):Int;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.utils;
|
package haxework.view.utils;
|
||||||
|
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
import flash.filters.ColorMatrixFilter;
|
import flash.filters.ColorMatrixFilter;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package haxework.gui.utils;
|
package haxework.view.utils;
|
||||||
|
|
||||||
import flash.display.Bitmap;
|
import flash.display.Bitmap;
|
||||||
import flash.Lib;
|
import flash.Lib;
|
||||||
Reference in New Issue
Block a user