MyGUI 3.0.1
|
00001 00007 /* 00008 This file is part of MyGUI. 00009 00010 MyGUI is free software: you can redistribute it and/or modify 00011 it under the terms of the GNU Lesser General Public License as published by 00012 the Free Software Foundation, either version 3 of the License, or 00013 (at your option) any later version. 00014 00015 MyGUI is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU Lesser General Public License for more details. 00019 00020 You should have received a copy of the GNU Lesser General Public License 00021 along with MyGUI. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 #ifndef __MYGUI_CONTROLLER_EDGE_HIDE_H__ 00024 #define __MYGUI_CONTROLLER_EDGE_HIDE_H__ 00025 00026 #include "MyGUI_Prerequest.h" 00027 #include "MyGUI_WidgetDefines.h" 00028 #include "MyGUI_ControllerItem.h" 00029 #include "MyGUI_Types.h" 00030 00031 namespace MyGUI 00032 { 00033 00040 class MYGUI_EXPORT ControllerEdgeHide : 00041 public ControllerItem 00042 { 00043 MYGUI_RTTI_DERIVED( ControllerEdgeHide ) 00044 00045 public: 00046 ControllerEdgeHide(); 00047 virtual ~ControllerEdgeHide() { } 00048 00052 void setTime(float _value) { mTime = _value; } 00053 00057 void setRemainPixels(int _value) { mRemainPixels = _value; } 00058 00062 void setShadowSize(int _value) { mShadowSize = _value; } 00063 00064 virtual void setProperty(const std::string& _key, const std::string& _value); 00065 00066 private: 00067 bool addTime(Widget* _widget, float _time); 00068 void prepareItem(Widget* _widget); 00069 00070 void recalculateTime(Widget* _widget); 00071 00072 delegates::CDelegate1<Widget*> eventPostAction; 00073 00074 float mTime; 00075 int mRemainPixels; 00076 int mShadowSize; 00077 float mElapsedTime; 00078 // for checking if widget was moved 00079 MyGUI::IntCoord mLastCoord; 00080 }; 00081 00082 } 00083 00084 #endif // __MYGUI_CONTROLLER_EDGE_HIDE_H__