refactor Layout and Widget

This commit is contained in:
andyque 2014-05-27 13:49:00 +08:00
parent 02e2957bf6
commit df13d4033c
3 changed files with 7 additions and 3 deletions

View File

@ -932,7 +932,7 @@ void Layout::requestDoLayout()
_doLayoutDirty = true;
}
const Size Layout::getLayoutContentSize()const
Size Layout::getLayoutContentSize()const
{
return this->getSize();
}

View File

@ -40,7 +40,7 @@ public:
virtual ~LayoutProtocol(){}
virtual LayoutExecutant* createLayoutExecutant() = 0;
virtual const Size getLayoutContentSize()const = 0;
virtual Size getLayoutContentSize()const = 0;
virtual const Vector<Node*>& getLayoutElements()const = 0;
virtual void doLayout() = 0;
};
@ -329,7 +329,7 @@ protected:
virtual void doLayout()override;
virtual LayoutExecutant* createLayoutExecutant()override;
virtual const Size getLayoutContentSize()const override;
virtual Size getLayoutContentSize()const override;
virtual const Vector<Node*>& getLayoutElements()const override;
//clipping

View File

@ -596,6 +596,10 @@ public:
}
Widget* getCurrentFocusedWidget()const;
/*
* call this method with parameter true to enable the Android Dpad focus navigation feature
*@param enable set true to enable dpad focus navigation, otherwise disenable dpad focus navigation
*/
static void enableDpadNavigation(bool enable);
std::function<void(Widget*,Widget*)> onFocusChanged;