Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- improve Assertion trace

- improve IntMatrix2D.toString
- make MouseState clonable
  • Loading branch information...
commit be07f4d5f03006d817fa02827359f380c1b6be77 1 parent f35a835
@freakinruben freakinruben authored
View
2  docs/Todo.txt
@@ -4,7 +4,7 @@
* benchmarken van compilen van grote stylesheets
* testen met c++ parser ipv neko parser
- * nicolas' css-parser gebruiken en uitbreiden
+ * nicolas' css-parser gebruiken en uitbreiden (HSS, http://ncannasse.fr/blog/)
* dit vereist een tussen parser output waarna een 2e parser dit kan
omzetten naar code voor PrimeVC maar ook eventueel naar een ander
framework.
View
3  src/Assert.hx
@@ -64,7 +64,8 @@ class Assert
static inline private function sendError (error:String, msg:String, pos:haxe.PosInfos)
{
#if debug
- msg = pos.className + "::" + pos.lineNumber + ": "+error + "; msg: " + msg + " in " + pos.className + "::" + pos.methodName + " @ " + pos.fileName + ":" + pos.lineNumber;
+ var className = pos.className.split(".").pop();
+ msg = className + "." + pos.methodName + "()::" + pos.lineNumber + ": "+error + "; msg: " + msg;
trace(msg);
#if flash9
throw new Error( msg );
View
2  src/primevc/core/geom/IntMatrix2D.hx
@@ -191,7 +191,7 @@ class IntMatrix2D implements IClonable < IntMatrix2D >
#if debug
public function toString()
{
- return "[Matrix2D a=" + a + ", b=" + b + ", c=" + c + ", d=" + d + ", tx=" + tx + ", ty=" + ty + ", " + tw + ", " + th + "]";
+ return "[Matrix2D a=" + a + ", b=" + b + ", c=" + c + ", d=" + d + ", tx=" + tx + ", ty=" + ty + ", tw=" + tw + ", th=" + th + "]";
}
#end
}
View
4 src/primevc/gui/behaviours/drag/DragHelper.hx
@@ -85,8 +85,8 @@ class DragHelper implements IDisposable
public inline function init ()
{
- mouseUpBinding = stopDrag .on( target.window.mouse.events.up, this );
- mouseMoveBinding = preStartDrag .on( target.window.mouse.events.move, this );
+ mouseUpBinding = stopDrag .on( target.window.userEvents.mouse.up, this );
+ mouseMoveBinding = preStartDrag .on( target.window.userEvents.mouse.move, this );
keyDownBinding = checkCancel .on( target.window.userEvents.key.down, this );
mouseUpBinding .disable();
View
12 src/primevc/gui/events/MouseEvents.hx
@@ -29,9 +29,10 @@
package primevc.gui.events;
import primevc.core.dispatcher.Signals;
import primevc.core.geom.Point;
- import primevc.gui.display.ISprite;
+ import primevc.core.traits.IClonable;
import primevc.gui.events.KeyModState;
+
typedef MouseEvents =
#if flash9 primevc.avm2.events.MouseEvents;
#elseif flash8 primevc.avm1.events.MouseEvents;
@@ -47,6 +48,7 @@ typedef MouseSignal = primevc.core.dispatcher.Signal1<MouseState>;
* Cross-platform mouse events.
*
* @author Danny Wilson
+ * @author Ruben Weijers
* @creation-date jun 14, 2010
*/
class MouseSignals extends Signals
@@ -124,7 +126,7 @@ class MouseSignals extends Signals
* @author Danny Wilson
* @creation-date jun 14, 2010
*/
-class MouseState extends KeyModState
+class MouseState extends KeyModState, implements IClonable<MouseState>
{
public static inline var fake = new MouseState( 0, null, null, null, null );
@@ -193,6 +195,12 @@ class MouseState extends KeyModState
#end
+ public inline function clone () : MouseState
+ {
+ return new MouseState( flags, target, local, stage #if flash9, related #end);
+ }
+
+
#if debug
public var owner : MouseSignal;
View
2  src/primevc/tools/CSSParser.hx
@@ -1188,7 +1188,7 @@ class CSSParser
case "opacity": parseAndSetOpacity( val ); // alpha value of entire element
// case "resize": // horizontal / vertical / both / none; /* makes a textfield resizable in the right bottom corner */
- // case "clip": // auto, rect([t],[r],[b],[l]) --> specifies the area of an absolutly positioned box that should be visible == scrollrect size?
+ // case "clip": // auto, rect([t],[r],[b],[l]) --> specifies the area of an absolutly positioned box that should be visible == scrollrect size?
case "overflow": parseAndSetOverflow( val ); // visible, hidden, scroll-mouse-move, drag-scroll, corner-scroll, scrollbars
View
2  src/primevc/utils/BitUtil.hx
@@ -98,6 +98,8 @@ class BitUtil
/**
* method will return bits with the flags in bitsToFlip flipped
+ * If one the bits is set it will be unset, if one of the bits isn't set
+ * it will be set.
*/
public static inline function flip (bits:UInt, bitsToFlip:UInt) : UInt
{
View
2  src/primevc/utils/DebugTrace.hx
@@ -21,7 +21,7 @@ package primevc.utils;
class DebugTrace
{
#if (flash9 && debug)
- private static inline function getClassName (infos : haxe.PosInfos) : String
+ public static inline function getClassName (infos : haxe.PosInfos) : String
{
return infos.className.split(".").pop(); //infos.fileName;
}
Please sign in to comment.
Something went wrong with that request. Please try again.