Permalink
Browse files

[DisplayObjectContainer] Add tabChildren property

  • Loading branch information...
1 parent 5f9793b commit 521418d07248c539e08cdfde90e1bd954cce4eee @aajanki aajanki committed Feb 28, 2013
Showing with 16 additions and 1 deletion.
  1. +14 −1 src/scripting/flash/display/flashdisplay.cpp
  2. +2 −0 src/scripting/flash/display/flashdisplay.h
@@ -1350,13 +1350,16 @@ void DisplayObjectContainer::sinit(Class_base* c)
c->setDeclaredMethodByQName("contains","",Class<IFunction>::getFunction(contains),NORMAL_METHOD,true);
c->setDeclaredMethodByQName("mouseChildren","",Class<IFunction>::getFunction(_setMouseChildren),SETTER_METHOD,true);
c->setDeclaredMethodByQName("mouseChildren","",Class<IFunction>::getFunction(_getMouseChildren),GETTER_METHOD,true);
+ REGISTER_GETTER_SETTER(c, tabChildren);
}
+ASFUNCTIONBODY_GETTER_SETTER(DisplayObjectContainer, tabChildren);
+
void DisplayObjectContainer::buildTraits(ASObject* o)
{
}
-DisplayObjectContainer::DisplayObjectContainer(Class_base* c):InteractiveObject(c),mouseChildren(true)
+DisplayObjectContainer::DisplayObjectContainer(Class_base* c):InteractiveObject(c),mouseChildren(true),tabChildren(true)
{
}
@@ -2013,6 +2016,8 @@ void Stage::sinit(Class_base* c)
c->setDeclaredMethodByQName("stageVideos","",Class<IFunction>::getFunction(_getStageVideos),GETTER_METHOD,true);
c->setDeclaredMethodByQName("focus","",Class<IFunction>::getFunction(_getFocus),GETTER_METHOD,true);
c->setDeclaredMethodByQName("focus","",Class<IFunction>::getFunction(_setFocus),SETTER_METHOD,true);
+ // override the setter from DisplayObjectContainer
+ c->setDeclaredMethodByQName("tabChildren","",Class<IFunction>::getFunction(_setTabChildren),SETTER_METHOD,true);
REGISTER_GETTER_SETTER(c,displayState);
}
@@ -2184,6 +2189,14 @@ ASFUNCTIONBODY(Stage,_setFocus)
return NULL;
}
+ASFUNCTIONBODY(Stage,_setTabChildren)
+{
+ // The specs says that Stage.tabChildren should throw
+ // IllegalOperationError, but testing shows that instead of
+ // throwing this simply ignores the value.
+ return NULL;
+}
+
void Graphics::sinit(Class_base* c)
{
c->setConstructor(Class<IFunction>::getFunction(_constructor));
@@ -91,6 +91,7 @@ class DisplayObjectContainer: public InteractiveObject
_NR<DisplayObject> hitTestImpl(_NR<DisplayObject> last, number_t x, number_t y, DisplayObject::HIT_TYPE type);
bool boundsRect(number_t& xmin, number_t& xmax, number_t& ymin, number_t& ymax) const;
void renderImpl(RenderContext& ctxt) const;
+ ASPROPERTY_GETTER_SETTER(bool, tabChildren);
public:
void _addChildAt(_R<DisplayObject> child, unsigned int index);
void dumpDisplayList(unsigned int level=0);
@@ -570,6 +571,7 @@ class Stage: public DisplayObjectContainer
ASFUNCTION(_getStageVideos);
ASFUNCTION(_getFocus);
ASFUNCTION(_setFocus);
+ ASFUNCTION(_setTabChildren);
ASPROPERTY_GETTER_SETTER(tiny_string,displayState);
};

0 comments on commit 521418d

Please sign in to comment.