Skip to content

Instantly share code, notes, and snippets.

@ryzed
Created March 9, 2013 04:00
Show Gist options
  • Save ryzed/5122457 to your computer and use it in GitHub Desktop.
Save ryzed/5122457 to your computer and use it in GitHub Desktop.
minimalCompsHX haxe3 fixes
Source/com/bit101/components/ColorChooser.hx | 28 +++----
Source/com/bit101/components/Component.hx | 106 +++++++++++++--------------
Source/com/bit101/components/InputText.hx | 32 ++++----
Source/com/bit101/components/Label.hx | 28 +++----
Source/com/bit101/components/Panel.hx | 30 ++++----
Source/com/bit101/components/PushButton.hx | 20 ++---
Source/com/bit101/components/Style.hx | 9 ++-
Source/com/bit101/components/VBox.hx | 16 ++--
Source/com/bit101/components/Window.hx | 58 +++++++--------
9 files changed, 165 insertions(+), 162 deletions(-)
diff --git a/Source/com/bit101/components/ColorChooser.hx b/Source/com/bit101/components/ColorChooser.hx
index dd5e928..87dd9e8 100644
--- a/Source/com/bit101/components/ColorChooser.hx
+++ b/Source/com/bit101/components/ColorChooser.hx
@@ -48,17 +48,17 @@ import flash.geom.Point;
class ColorChooser extends Component
{
- public var value(getValue, setValue):Int;
- public var model(getModel, setModel):DisplayObject;
- public var popupAlign(getPopupAlign, setPopupAlign):String;
- public var usePopup(getUsePopup, setUsePopup):Bool;
+ public var value(get_value, set_value):Int;
+ public var model(get_model, set_model):DisplayObject;
+ public var popupAlign(get_popupAlign, set_popupAlign):String;
+ public var usePopup(get_usePopup, set_usePopup):Bool;
public static inline var TOP:String = "top";
public static inline var BOTTOM:String = "bottom";
var _colors:BitmapData;
var _colorsContainer:Sprite;
- var _defaultModelColors:Array<Int>;
+ var _defaultModelColors:Array<UInt>;
var _input:InputText;
var _model:DisplayObject;
var _oldColorChoice:Int;
@@ -184,7 +184,7 @@ class ColorChooser extends Component
/**
* Gets / sets the color value of this ColorChooser.
*/
- public function setValue(n:Int):Int
+ public function set_value(n:Int):Int
{
if (value >= 0)
{
@@ -200,7 +200,7 @@ class ColorChooser extends Component
return n;
}
- public function getValue():Int
+ public function get_value():Int
{
return _value;
}
@@ -210,12 +210,12 @@ class ColorChooser extends Component
///////////////////////////////////}
- public function getModel():DisplayObject
+ public function get_model():DisplayObject
{
return _model;
}
- public function setModel(value:DisplayObject):DisplayObject
+ public function set_model(value:DisplayObject):DisplayObject
{
_model = value;
if (_model != null)
@@ -241,16 +241,16 @@ class ColorChooser extends Component
placeColors();
}
- public function getPopupAlign():String { return _popupAlign; }
- public function setPopupAlign(value:String):String
+ public function get_popupAlign():String { return _popupAlign; }
+ public function set_popupAlign(value:String):String
{
_popupAlign = value;
placeColors();
return value;
}
- public function getUsePopup():Bool { return _usePopup; }
- public function setUsePopup(value:Bool):Bool
+ public function get_usePopup():Bool { return _usePopup; }
+ public function set_usePopup(value:Bool):Bool
{
_usePopup = value;
@@ -410,7 +410,7 @@ class ColorChooser extends Component
return s;
}
- function getGradientSprite(w:Float, h:Float, gc:Array<Int>):Sprite
+ function getGradientSprite(w:Float, h:Float, gc:Array<UInt>):Sprite
{
var gs:Sprite = new Sprite();
var g:Graphics = gs.graphics;
diff --git a/Source/com/bit101/components/Component.hx b/Source/com/bit101/components/Component.hx
index 089262e..41bd3ca 100644
--- a/Source/com/bit101/components/Component.hx
+++ b/Source/com/bit101/components/Component.hx
@@ -46,7 +46,7 @@ import flash.display.Graphics;
import flash.geom.Point;
import flash.Lib;
import flash.text.Font;
-import nme.filters.BitmapFilter;
+import flash.filters.BitmapFilter;
class PFRondaSeven extends flash.text.Font {}
@@ -55,31 +55,31 @@ class Component implements IEventDispatcher
//protected var Ronda:Class;
- public var height(getHeight, setHeight):Float;
- public var width(getWidth, setWidth):Float;
- public var x(default, setX):Float;
- public var y(default, setY):Float;
- public var mouseX(getMouseX, null):Float;
- public var mouseY(getMouseY, null):Float;
- public var mouseEnabled(getMouseEnabled, setMouseEnabled):Bool;
- public var mouseChildren(getMouseChildren, null):Bool;
+ public var height(get_height, set_height):Float;
+ public var width(get_width, set_width):Float;
+ public var x(default, set_x):Float;
+ public var y(default, set_y):Float;
+ public var mouseX(get_mouseX, null):Float;
+ public var mouseY(get_mouseY, null):Float;
+ public var mouseEnabled(get_mouseEnabled, set_mouseEnabled):Bool;
+ public var mouseChildren(get_mouseChildren, null):Bool;
#if flash
- public var filters(getFilters, setFilters):Array<BitmapFilter>;
+ public var filters(get_filters, set_filters):Array<BitmapFilter>;
#else
- public var filters(getFilters, setFilters):Array<Dynamic>;
+ public var filters(get_filters, set_filters):Array<Dynamic>;
#end
- public var useHandCursor(getUseHandCursor, setUseHandCursor):Bool;
- public var buttonMode(getButtonMode, setButtonMode):Bool;
- public var stage(getStage, null):Stage;
- public var numChildren(getNumChildren, null):Int;
- public var visible(getVisible, setVisible):Bool;
- public var graphics(getGraphics, null):Graphics;
+ public var useHandCursor(get_useHandCursor, set_useHandCursor):Bool;
+ public var buttonMode(get_buttonMode, set_buttonMode):Bool;
+ public var stage(get_stage, null):Stage;
+ public var numChildren(get_numChildren, null):Int;
+ public var visible(get_visible, set_visible):Bool;
+ public var graphics(get_graphics, null):Graphics;
public var parent(default, null):Dynamic;
- public var component (getComponent, null) : Sprite;
- public var alpha(getAlpha, setAlpha):Float;
+ public var component (get_component, null) : Sprite;
+ public var alpha(get_alpha, set_alpha):Float;
- public var tag(getTag, setTag):Int;
- public var enabled(getEnabled, setEnabled):Bool;
+ public var tag(get_tag, set_tag):Int;
+ public var enabled(get_enabled, set_enabled):Bool;
// Composition instead of inheritence because of haxe getter/setter handicap
var _comp:Sprite;
@@ -325,7 +325,7 @@ class Component implements IEventDispatcher
/**
* Sets/gets the width of the component.
*/
- public function setWidth(w:Float):Float
+ public function set_width(w:Float):Float
{
_width = w;
invalidate();
@@ -333,7 +333,7 @@ class Component implements IEventDispatcher
return w;
}
- public function getWidth():Float
+ public function get_width():Float
{
return _width;
}
@@ -341,7 +341,7 @@ class Component implements IEventDispatcher
/**
* Sets/gets the height of the component.
*/
- public function setHeight(h:Float):Float
+ public function set_height(h:Float):Float
{
_height = h;
invalidate();
@@ -349,7 +349,7 @@ class Component implements IEventDispatcher
return h;
}
- public function getHeight():Float
+ public function get_height():Float
{
return _height;
}
@@ -357,13 +357,13 @@ class Component implements IEventDispatcher
/**
* Sets/gets in integer that can identify the component.
*/
- public function setTag(value:Int):Int
+ public function set_tag(value:Int):Int
{
_tag = value;
return value;
}
- public function getTag():Int
+ public function get_tag():Int
{
return _tag;
}
@@ -371,7 +371,7 @@ class Component implements IEventDispatcher
/**
* Overrides the setter for x to always place the component on a whole pixel.
*/
- public function setX(value:Float):Float
+ public function set_x(value:Float):Float
{
return x = _comp.x = Math.round(value);
}
@@ -379,7 +379,7 @@ class Component implements IEventDispatcher
/**
* Overrides the setter for y to always place the component on a whole pixel.
*/
- public function setY(value:Float):Float
+ public function set_y(value:Float):Float
{
return y = _comp.y = Math.round(value);
}
@@ -387,7 +387,7 @@ class Component implements IEventDispatcher
/**
* Sets/gets whether this component is enabled or not.
*/
- public function setEnabled(value:Bool):Bool
+ public function set_enabled(value:Bool):Bool
{
_enabled = value;
mouseEnabled = mouseChildren = _enabled;
@@ -398,95 +398,95 @@ class Component implements IEventDispatcher
return value;
}
- public function getEnabled():Bool
+ public function get_enabled():Bool
{
return _enabled;
}
- public function getMouseX():Float
+ public function get_mouseX():Float
{
return _comp.mouseX;
}
- public function getMouseY():Float
+ public function get_mouseY():Float
{
return _comp.mouseY;
}
- public function getMouseEnabled():Bool
+ public function get_mouseEnabled():Bool
{
return _comp.mouseEnabled;
}
- public function setMouseEnabled(val:Bool):Bool
+ public function set_mouseEnabled(val:Bool):Bool
{
_comp.mouseEnabled = val;
return val;
}
- public function getMouseChildren():Bool
+ public function get_mouseChildren():Bool
{
return _comp.mouseChildren;
}
- public function setMouseChildren(val:Bool):Bool
+ public function set_mouseChildren(val:Bool):Bool
{
_comp.mouseChildren = val;
return val;
}
- public function getButtonMode():Bool
+ public function get_buttonMode():Bool
{
return _comp.buttonMode;
}
- public function setButtonMode(b:Bool):Bool
+ public function set_buttonMode(b:Bool):Bool
{
_comp.buttonMode = b;
return b;
}
- public function getUseHandCursor():Bool
+ public function get_useHandCursor():Bool
{
return _comp.useHandCursor;
}
- public function setUseHandCursor(b:Bool):Bool
+ public function set_useHandCursor(b:Bool):Bool
{
_comp.useHandCursor = b;
return b;
}
#if flash
- public function getFilters():Array<BitmapFilter>
+ public function get_filters():Array<BitmapFilter>
{
return _comp.filters;
}
- public function setFilters(filterArr:Array<BitmapFilter>):Array<BitmapFilter>
+ public function set_filters(filterArr:Array<BitmapFilter>):Array<BitmapFilter>
{
_comp.filters = filterArr;
return filterArr;
}
#else
- public function getFilters():Array<Dynamic>
+ public function get_filters():Array<Dynamic>
{
return _comp.filters;
}
- public function setFilters(filterArr:Array<Dynamic>):Array<Dynamic>
+ public function set_filters(filterArr:Array<Dynamic>):Array<Dynamic>
{
_comp.filters = filterArr;
return filterArr;
}
#end
- public function getStage():Stage
+ public function get_stage():Stage
{
return _comp.stage;
}
- public function getNumChildren():Int
+ public function get_numChildren():Int
{
return _comp.numChildren;
}
@@ -496,29 +496,29 @@ class Component implements IEventDispatcher
return _comp.getChildAt(n);
}
- public function getVisible():Bool
+ public function get_visible():Bool
{
return _comp.visible;
}
- public function setVisible(visible:Bool):Bool
+ public function set_visible(visible:Bool):Bool
{
_comp.visible = visible;
dispatchEvent(new Event(Event.RESIZE));
return visible;
}
- public function getGraphics():Graphics
+ public function get_graphics():Graphics
{
return _comp.graphics;
}
- public function getAlpha():Float
+ public function get_alpha():Float
{
return _comp.alpha;
}
- public function setAlpha(val:Float):Float
+ public function set_alpha(val:Float):Float
{
_comp.alpha = val;
return val;
@@ -534,7 +534,7 @@ class Component implements IEventDispatcher
_comp.visible = true;
}
- public function getComponent () : Sprite
+ public function get_component () : Sprite
{
return _comp;
}
diff --git a/Source/com/bit101/components/InputText.hx b/Source/com/bit101/components/InputText.hx
index 7d9ec69..9f65c16 100644
--- a/Source/com/bit101/components/InputText.hx
+++ b/Source/com/bit101/components/InputText.hx
@@ -35,11 +35,11 @@ import flash.text.TextFormat;
class InputText extends Component
{
- public var maxChars(getMaxChars, setMaxChars):Int;
- public var password(getPassword, setPassword):Bool;
- public var restrict(getRestrict, setRestrict):String;
- public var text(getText, setText):String;
- public var textField(getTextField, null):TextField;
+ public var maxChars(get_maxChars, set_maxChars):Int;
+ public var password(get_password, set_password):Bool;
+ public var restrict(get_restrict, set_restrict):String;
+ public var text(get_text, set_text):String;
+ public var textField(get_textField, null):TextField;
var _back:Sprite;
var _password:Bool;
@@ -172,14 +172,14 @@ class InputText extends Component
/**
* Gets / sets the text shown in this InputText.
*/
- public function setText(t:String):String
+ public function set_text(t:String):String
{
_text = t;
invalidate();
return t;
}
- public function getText():String
+ public function get_text():String
{
return _text;
}
@@ -187,7 +187,7 @@ class InputText extends Component
/**
* Returns a reference to the internal text field in the component.
*/
- public function getTextField():TextField
+ public function get_textField():TextField
{
return _tf;
}
@@ -195,7 +195,7 @@ class InputText extends Component
/**
* Gets / sets the list of characters that are allowed in this TextInput.
*/
- public function setRestrict(str:String):String
+ public function set_restrict(str:String):String
{
#if flash
_tf.restrict = str;
@@ -203,7 +203,7 @@ class InputText extends Component
return str;
}
- public function getRestrict():String
+ public function get_restrict():String
{
#if flash
return _tf.restrict;
@@ -215,13 +215,13 @@ class InputText extends Component
/**
* Gets / sets the maximum number of characters that can be shown in this InputText.
*/
- public function setMaxChars(max:Int):Int
+ public function set_maxChars(max:Int):Int
{
_tf.maxChars = max;
return max;
}
- public function getMaxChars():Int
+ public function get_maxChars():Int
{
return _tf.maxChars;
}
@@ -229,13 +229,13 @@ class InputText extends Component
/**
* Gets / sets whether or not this input text will show up as password (asterisks).
*/
- public function setPassword(b:Bool):Bool
+ public function set_password(b:Bool):Bool
{
_password = b;
invalidate();
return b;
}
- public function getPassword():Bool
+ public function get_password():Bool
{
return _password;
}
@@ -243,9 +243,9 @@ class InputText extends Component
/**
* Sets/gets whether this component is enabled or not.
*/
- override public function setEnabled(value:Bool):Bool
+ override public function set_enabled(value:Bool):Bool
{
- super.setEnabled(value);
+ super.set_enabled(value);
#if flash
_tf.tabEnabled = value;
#end
diff --git a/Source/com/bit101/components/Label.hx b/Source/com/bit101/components/Label.hx
index 02c10a9..ff87ad7 100644
--- a/Source/com/bit101/components/Label.hx
+++ b/Source/com/bit101/components/Label.hx
@@ -37,10 +37,10 @@ import flash.display.Sprite;
class Label extends Component
{
- public var autoSize(getAutoSize, setAutoSize):Bool;
- public var text(getText, setText):String;
- public var align(getAlign, setAlign):String;
- public var textField(getTextField, null):TextField;
+ public var autoSize(get_autoSize, set_autoSize):Bool;
+ public var text(get_text, set_text):String;
+ public var align(get_align, set_align):String;
+ public var textField(get_textField, null):TextField;
var _autoSize:Bool;
var _text:String;
@@ -152,7 +152,7 @@ class Label extends Component
bold = Reflect.field (format, "bold");
}
- var f:TextFormat = new TextFormat (name, size, color, bold, null, null, null, null, align);
+ var f:TextFormat = new TextFormat (name, size, color, bold, null, null, null, null, align);
_tf.defaultTextFormat = f;
return f;
}
@@ -197,7 +197,7 @@ class Label extends Component
/**
* Gets / sets the text of this Label.
*/
- public function setText(t:String):String
+ public function set_text(t:String):String
{
_text = t;
if(_text == null) _text = "";
@@ -205,7 +205,7 @@ class Label extends Component
return t;
}
- public function getText():String
+ public function get_text():String
{
return _text;
}
@@ -213,13 +213,13 @@ class Label extends Component
/**
* Gets / sets whether or not this Label will autosize.
*/
- public function setAutoSize(b:Bool):Bool
+ public function set_autoSize(b:Bool):Bool
{
_autoSize = b;
return b;
}
- public function getAutoSize():Bool
+ public function get_autoSize():Bool
{
return _autoSize;
}
@@ -227,24 +227,24 @@ class Label extends Component
/**
* Gets the internal TextField of the label if you need to do further customization of it.
*/
- public function getTextField():TextField
+ public function get_textField():TextField
{
return _tf;
}
- override public function setWidth(value:Float):Float
+ override public function set_width(value:Float):Float
{
_autoSize = false;
- super.setWidth(value);
+ super.set_width(value);
return value;
}
- public function getAlign():String
+ public function get_align():String
{
return _align;
}
- public function setAlign(value:String):String
+ public function set_align(value:String):String
{
_align = value;
var fmt:TextFormat = _tf.defaultTextFormat;
diff --git a/Source/com/bit101/components/Panel.hx b/Source/com/bit101/components/Panel.hx
index 4e52145..2fb7a83 100644
--- a/Source/com/bit101/components/Panel.hx
+++ b/Source/com/bit101/components/Panel.hx
@@ -35,11 +35,11 @@ import flash.events.Event;
class Panel extends Component
{
- public var color(getColor, setColor):Int;
- public var shadow(getShadowBool, setShadowBool):Bool;
- public var gridSize(getGridSize, setGridSize):Int;
- public var showGrid(getShowGrid, setShowGrid):Bool;
- public var gridColor(getGridColor, setGridColor):Int;
+ public var color(get_color, set_color):Int;
+ public var shadow(get_shadow, set_shadow):Bool;
+ public var gridSize(get_gridSize, set_gridSize):Int;
+ public var showGrid(get_showGrid, set_showGrid):Bool;
+ public var gridColor(get_gridColor, set_gridColor):Int;
var _mask:Sprite;
var _background:Sprite;
@@ -228,7 +228,7 @@ class Panel extends Component
/**
* Gets / sets whether or not this Panel will have an inner shadow.
*/
- public function setShadowBool(b:Bool):Bool
+ public function set_shadow(b:Bool):Bool
{
_shadow = b;
#if flash
@@ -245,7 +245,7 @@ class Panel extends Component
return b;
}
- public function getShadowBool():Bool
+ public function get_shadow():Bool
{
return _shadow;
}
@@ -253,14 +253,14 @@ class Panel extends Component
/**
* Gets / sets the backgrond color of this panel.
*/
- public function setColor(c:Int):Int
+ public function set_color(c:Int):Int
{
_color = c;
invalidate();
return c;
}
- public function getColor():Int
+ public function get_color():Int
{
return _color;
}
@@ -268,14 +268,14 @@ class Panel extends Component
/**
* Sets / gets the size of the grid.
*/
- public function setGridSize(value:Int):Int
+ public function set_gridSize(value:Int):Int
{
_gridSize = value;
invalidate();
return value;
}
- public function getGridSize():Int
+ public function get_gridSize():Int
{
return _gridSize;
}
@@ -283,14 +283,14 @@ class Panel extends Component
/**
* Sets / gets whether or not the grid will be shown.
*/
- public function setShowGrid(value:Bool):Bool
+ public function set_showGrid(value:Bool):Bool
{
_showGrid = value;
invalidate();
return value;
}
- public function getShowGrid():Bool
+ public function get_showGrid():Bool
{
return _showGrid;
}
@@ -298,7 +298,7 @@ class Panel extends Component
/**
* Sets / gets the color of the grid lines.
*/
- public function setGridColor(value:Int):Int
+ public function set_gridColor(value:Int):Int
{
if (value >= 0)
{
@@ -308,7 +308,7 @@ class Panel extends Component
return value;
}
- public function getGridColor():Int
+ public function get_gridColor():Int
{
return _gridColor;
}
diff --git a/Source/com/bit101/components/PushButton.hx b/Source/com/bit101/components/PushButton.hx
index 5e78043..1b85bfa 100644
--- a/Source/com/bit101/components/PushButton.hx
+++ b/Source/com/bit101/components/PushButton.hx
@@ -34,9 +34,9 @@ import flash.events.MouseEvent;
class PushButton extends Component
{
- public var label(getLabel, setLabel):String;
- public var selected(getSelected, setSelected):Bool;
- public var toggle(getToggle, setToggle):Bool;
+ public var label(get_label, set_label):String;
+ public var selected(get_selected, set_selected):Bool;
+ public var toggle(get_toggle, set_toggle):Bool;
var _back:Sprite;
var _face:Sprite;
@@ -254,24 +254,24 @@ class PushButton extends Component
/**
* Sets / gets the label text shown on this Pushbutton.
*/
- public function setLabel(str:String):String
+ public function set_label(str:String):String
{
_labelText = str;
draw();
return str;
}
- public function getLabel():String
+ public function get_label():String
{
return _labelText;
}
- public function setLabelFormat (format : Dynamic) : Void
+ public function set_labelFormat (format : Dynamic) : Void
{
_label.setFormat (format);
invalidate ();
}
- public function setSelected(value:Bool):Bool
+ public function set_selected(value:Bool):Bool
{
if(!_toggle)
{
@@ -286,17 +286,17 @@ class PushButton extends Component
drawFace();
return value;
}
- public function getSelected():Bool
+ public function get_selected():Bool
{
return _selected;
}
- public function setToggle(value:Bool):Bool
+ public function set_toggle(value:Bool):Bool
{
_toggle = value;
return value;
}
- public function getToggle():Bool
+ public function get_toggle():Bool
{
return _toggle;
}
diff --git a/Source/com/bit101/components/Style.hx b/Source/com/bit101/components/Style.hx
index b68c84d..246d7d8 100644
--- a/Source/com/bit101/components/Style.hx
+++ b/Source/com/bit101/components/Style.hx
@@ -45,10 +45,13 @@ class Style
public static var LIST_SELECTED:Int = 0xCCCCCC;
public static var LIST_ROLLOVER:Int = 0xDDDDDD;
- public static var embedFonts:Bool = true;
+ //public static var embedFonts:Bool = true;
+ public static var embedFonts:Bool = false;
#if flash
- public static var fontName:String = "assets/pf_ronda_seven";
- public static var fontSize:Float = 8;
+ //public static var fontName:String = "assets/pf_ronda_seven";
+ public static var fontName:String = "_sans";
+ //public static var fontSize:Float = 8;
+ public static var fontSize:Float = 9;
#else
public static var fontName:String = "_sans";
public static var fontSize:Float = 11;
diff --git a/Source/com/bit101/components/VBox.hx b/Source/com/bit101/components/VBox.hx
index f89b5fe..3f6c925 100644
--- a/Source/com/bit101/components/VBox.hx
+++ b/Source/com/bit101/components/VBox.hx
@@ -34,8 +34,8 @@ import flash.events.Event;
class VBox extends Component
{
- public var spacing(getSpacing, setSpacing):Float;
- public var alignment(getAlignment, setAlignment):String;
+ public var spacing(get_spacing, set_spacing):Float;
+ public var alignment(get_alignment, set_alignment):String;
var _spacing:Float;
private var _alignment:String;
@@ -164,14 +164,14 @@ class VBox extends Component
/**
* Gets / sets the spacing between each sub component.
*/
- public function setSpacing(s:Float):Float
+ public function set_spacing(s:Float):Float
{
_spacing = s;
invalidate();
return s;
}
- public function getSpacing():Float
+ public function get_spacing():Float
{
return _spacing;
}
@@ -179,21 +179,21 @@ class VBox extends Component
/**
* Gets / sets the horizontal alignment of components in the box.
*/
- public function setAlignment(value:String):String
+ public function set_alignment(value:String):String
{
_alignment = value;
invalidate();
return value;
}
- public function getAlignment():String
+ public function get_alignment():String
{
return _alignment;
}
- override public function setVisible(value:Bool):Bool
+ override public function set_visible(value:Bool):Bool
{
- super.setVisible(value);
+ super.set_visible(value);
dispatchEvent(new Event(Event.RESIZE, true));
return value;
}
diff --git a/Source/com/bit101/components/Window.hx b/Source/com/bit101/components/Window.hx
index 72abd2c..842310e 100644
--- a/Source/com/bit101/components/Window.hx
+++ b/Source/com/bit101/components/Window.hx
@@ -39,17 +39,17 @@ package com.bit101.components;
class Window extends Component
{
- public var color(getColor, setColor):Int;
- public var content(getContent, null):DisplayObjectContainer;
- public var draggable(getDraggable, setDraggable):Bool;
- public var hasMinimizeButton(getHasMinimizeButton, setHasMinimizeButton):Bool;
- public var minimized(getMinimized, setMinimized):Bool;
- public var shadow(getBoolShadow, setBoolShadow):Bool;
- public var title(getTitle, setTitle):String;
+ public var color(get_color, set_color):Int;
+ public var content(get_content, null):DisplayObjectContainer;
+ public var draggable(get_draggable, set_draggable):Bool;
+ public var hasMinimizeButton(get_hasMinimizeButton, set_hasMinimizeButton):Bool;
+ public var minimized(get_minimized, set_minimized):Bool;
+ public var shadow(get_shadow, set_shadow):Bool;
+ public var title(get_title, set_title):String;
//override public var height(getHeight, setHeight):Float;
- public var hasCloseButton(getHasCloseButton, setHasCloseButton):Bool;
- public var titleBar(getTitleBar, setTitleBar):Panel;
- public var grips(getGrips, null):Shape;
+ public var hasCloseButton(get_hasCloseButton, set_hasCloseButton):Bool;
+ public var titleBar(get_titleBar, set_titleBar):Panel;
+ public var grips(get_grips, null):Shape;
var _title:String;
var _titleBar:Panel;
@@ -293,7 +293,7 @@ package com.bit101.components;
/**
* Gets / sets whether or not this Window will have a drop shadow.
*/
- public function setBoolShadow(b:Bool):Bool
+ public function set_shadow(b:Bool):Bool
{
_shadow = b;
if(_shadow)
@@ -308,7 +308,7 @@ package com.bit101.components;
return b;
}
- public function getBoolShadow():Bool
+ public function get_shadow():Bool
{
return _shadow;
}
@@ -316,14 +316,14 @@ package com.bit101.components;
/**
* Gets / sets the background color of this panel.
*/
- public function setColor(c:Int):Int
+ public function set_color(c:Int):Int
{
_color = c;
invalidate();
return c;
}
- public function getColor():Int
+ public function get_color():Int
{
return _color;
}
@@ -331,14 +331,14 @@ package com.bit101.components;
/**
* Gets / sets the title shown in the title bar.
*/
- public function setTitle(t:String):String
+ public function set_title(t:String):String
{
_title = t;
_titleLabel.text = _title;
return t;
}
- public function getTitle():String
+ public function get_title():String
{
return _title;
}
@@ -346,7 +346,7 @@ package com.bit101.components;
/**
* Container for content added to this panel. This is just a reference to the content of the internal Panel, which is masked, so best to add children to content, rather than directly to the window.
*/
- public function getContent():DisplayObjectContainer
+ public function get_content():DisplayObjectContainer
{
return _panel.content;
}
@@ -354,7 +354,7 @@ package com.bit101.components;
/**
* Sets / gets whether or not the window will be draggable by the title bar.
*/
- public function setDraggable(b:Bool):Bool
+ public function set_draggable(b:Bool):Bool
{
_draggable = b;
_titleBar.buttonMode = _draggable;
@@ -362,7 +362,7 @@ package com.bit101.components;
return b;
}
- public function getDraggable():Bool
+ public function get_draggable():Bool
{
return _draggable;
}
@@ -370,7 +370,7 @@ package com.bit101.components;
/**
* Gets / sets whether or not the window will show a minimize button that will toggle the window open and closed. A closed window will only show the title bar.
*/
- public function setHasMinimizeButton(b:Bool):Bool
+ public function set_hasMinimizeButton(b:Bool):Bool
{
_hasMinimizeButton = b;
if(_hasMinimizeButton)
@@ -385,7 +385,7 @@ package com.bit101.components;
return b;
}
- public function getHasMinimizeButton():Bool
+ public function get_hasMinimizeButton():Bool
{
return _hasMinimizeButton;
}
@@ -393,7 +393,7 @@ package com.bit101.components;
/**
* Gets / sets whether the window is closed. A closed window will only show its title bar.
*/
- public function setMinimized(value:Bool):Bool
+ public function set_minimized(value:Bool):Bool
{
_minimized = value;
// _panel.visible = !_minimized;
@@ -414,7 +414,7 @@ package com.bit101.components;
return value;
}
- public function getMinimized():Bool
+ public function get_minimized():Bool
{
return _minimized;
}
@@ -422,7 +422,7 @@ package com.bit101.components;
/**
* Gets the height of the component. A minimized window's height will only be that of its title bar.
*/
- override public function getHeight():Float
+ override public function get_height():Float
{
if(contains(_panel))
{
@@ -436,7 +436,7 @@ package com.bit101.components;
* Sets / gets whether or not the window will display a close button.
* Close button merely dispatches a CLOSE event when clicked. It is up to the developer to handle this event.
*/
- public function setHasCloseButton(value:Bool):Bool
+ public function set_hasCloseButton(value:Bool):Bool
{
_hasCloseButton = value;
if(_hasCloseButton)
@@ -454,7 +454,7 @@ package com.bit101.components;
return value;
}
- public function getHasCloseButton():Bool
+ public function get_hasCloseButton():Bool
{
return _hasCloseButton;
}
@@ -462,12 +462,12 @@ package com.bit101.components;
/**
* Returns a reference to the title bar for customization.
*/
- public function getTitleBar():Panel
+ public function get_titleBar():Panel
{
return _titleBar;
}
- public function setTitleBar(value:Panel):Panel
+ public function set_titleBar(value:Panel):Panel
{
_titleBar = value;
return value;
@@ -476,7 +476,7 @@ package com.bit101.components;
/**
* Returns a reference to the shape showing the grips on the title bar. Can be used to do custom drawing or turn them invisible.
*/
- public function getGrips():Shape
+ public function get_grips():Shape
{
return _grips;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment