Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BDF0C200CC6 for ; Mon, 3 Jul 2017 15:40:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BCBAD160BF9; Mon, 3 Jul 2017 13:40:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F191160BEC for ; Mon, 3 Jul 2017 15:40:07 +0200 (CEST) Received: (qmail 76557 invoked by uid 500); 3 Jul 2017 13:39:28 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 69668 invoked by uid 99); 3 Jul 2017 13:34:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jul 2017 13:34:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9341CF54F3; Mon, 3 Jul 2017 13:34:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: harbs@apache.org To: commits@flex.apache.org Date: Mon, 03 Jul 2017 13:35:23 -0000 Message-Id: <625df16a38a94a0db175205b97c8c4cc@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [29/50] git commit: [flex-asjs] [refs/heads/develop] - lookup other cursors in ValuesManager archived-at: Mon, 03 Jul 2017 13:40:08 -0000 lookup other cursors in ValuesManager Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b9d5e8e1 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b9d5e8e1 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b9d5e8e1 Branch: refs/heads/develop Commit: b9d5e8e114e77270c30389d793024a89c43bc037 Parents: 8d5a8e6 Author: Alex Harui Authored: Thu Jun 22 11:57:04 2017 -0700 Committer: Alex Harui Committed: Thu Jun 22 11:57:29 2017 -0700 ---------------------------------------------------------------------- .../main/flex/org/apache/flex/css2/Cursors.as | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b9d5e8e1/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/Cursors.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/Cursors.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/Cursors.as index 8671ca0..96ef8f4 100644 --- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/Cursors.as +++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/Cursors.as @@ -19,14 +19,18 @@ package org.apache.flex.css2 { import org.apache.flex.core.IUIBase; + import org.apache.flex.core.ValuesManager; import org.apache.flex.events.MouseEvent; COMPILE::SWF { import flash.display.DisplayObject; + import flash.display.BitmapData; + import flash.display.Sprite; import flash.geom.Point; import flash.ui.Mouse; import flash.ui.MouseCursor; + import flash.ui.MouseCursorData; } COMPILE::JS { @@ -67,6 +71,12 @@ package org.apache.flex.css2 COMPILE::JS public static const TEXT:String = "text"; + COMPILE::SWF + private static const builtinCursors:Array = [MouseCursor.AUTO, + MouseCursor.ARROW, + MouseCursor.BUTTON, + MouseCursor.IBEAM]; + /** * Constructor. * @@ -118,6 +128,24 @@ package org.apache.flex.css2 obj.addEventListener(MouseEvent.MOUSE_OVER, overHandler); obj.addEventListener(MouseEvent.MOUSE_OUT, outHandler); } + if (builtinCursors.indexOf(cursor) == -1) + { + var c:Class = ValuesManager.valuesImpl.getValue(obj, cursor) as Class; + if (c) + { + var foo:Object = new c(); + var inst:Sprite = new c() as Sprite; + if (inst) + { + var bd:BitmapData = new BitmapData(32, 32, true, 0); + bd.draw(inst); + var mcd:MouseCursorData = new MouseCursorData(); + mcd.data = Vector.([bd]); + Mouse.registerCursor(cursor, mcd); + builtinCursors.push(cursor); + } + } + } cursorData.cursor = cursor; var displayObject:DisplayObject = obj as DisplayObject;