ZFFramework
 
Loading...
Searching...
No Matches
ZFUIHint.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFUIHint_h_
7#define _ZFI_ZFUIHint_h_
8
9#include "ZFUIWidgetDef.h"
11
16
17// ============================================================
18zfclassFwd _ZFP_ZFUIHintPrivate;
24zfclass ZFLIB_ZFUIWidget ZFUIHint : zfextend ZFObject {
25 ZFOBJECT_DECLARE(ZFUIHint, ZFObject)
26
27public:
28 // ============================================================
29 // events
37 ZFEVENT(HintOnInit)
43 ZFEVENT(HintOnUpdate)
49 ZFEVENT(HintOnShow)
55 ZFEVENT(HintOnHide)
56
57public:
62 , ZFMP_IN_OPT(ZFUISysWindow *, inSysWindow, zfnull)
63 )
64
65public:
82
83public:
90
99
108
115
116public:
144
145protected:
147 virtual inline void hintOnInit(void) {
149 }
150
151 virtual inline void hintOnUpdate(void) {
153 }
154
155 virtual inline void hintOnShow(void) {
157 }
158
159 virtual inline void hintOnHide(void) {
161 }
162
163protected:
165 virtual inline void objectInfoImplAppend(ZF_IN_OUT zfstring &ret) {
167 if(this->content() != zfnull) {
168 ret += ", content: ";
169 this->content()->objectInfoT(ret);
170 }
171 }
172
173protected:
175 virtual void objectOnInit(void);
177 virtual void objectOnInitFinish(void);
179 virtual void objectOnDeallocPrepare(void);
181 virtual void objectOnDealloc(void);
182
183private:
184 _ZFP_ZFUIHintPrivate *d;
185 friend zfclassFwd _ZFP_ZFUIHintPrivate;
186};
187
189#endif // #ifndef _ZFI_ZFUIHint_h_
190
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfoverride
dummy macro shows that method override parent's method
Definition ZFCoreTypeDef_ClassType.h:58
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
_zft_zftimet zftimet
time unit, ensured at least 64 bit, ensured signed
Definition ZFCoreTypeDef_CoreType.h:203
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZFEXPORT_VAR_DECLARE(ZFLIB_, Type, Name)
util to export global variable
Definition ZFExport.h:68
#define ZFMP_IN_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:108
#define ZFMETHOD_DECLARE_0(ReturnType, MethodName)
see ZFMethod
Definition ZFMethodDeclare.h:693
#define ZFMETHOD_DECLARE_STATIC_1(ReturnType, MethodName, ZFMP_0)
see ZFMethod
Definition ZFMethodDeclare.h:870
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
#define ZFEVENT(YourEvent)
see ZFObject::observerNotify
Definition ZFObjectObserver.h:328
#define ZFPROPERTY_RETAIN(Type, Name,...)
declare a retain property
Definition ZFPropertyDeclare.h:104
#define ZFPROPERTY_ON_DETACH_DECLARE(Type, Name)
see ZFPROPERTY_ON_INIT_DECLARE
Definition ZFPropertyDeclare.h:258
#define ZFPROPERTY_ASSIGN(Type, Name,...)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:128
#define ZFPROPERTY_ON_ATTACH_DECLARE(Type, Name)
see ZFPROPERTY_ON_INIT_DECLARE
Definition ZFPropertyDeclare.h:248
zftimet & ZFUIHintDuration(void)
default hint duration, 1500 by default
Definition ZFUIHint.h:15
global header for ZFUIWidget module
#define ZFLIB_ZFUIWidget
used to export symbols
Definition ZFUIWidgetDef.h:17
base class of all animation
Definition ZFAnimation.h:22
light weight array
Definition ZFCoreArray.h:331
virtual void objectInfoImplAppend(zfstring &ret)
see objectInfo
Definition ZFObjectCore.h:331
void observerNotify(zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull)
notify the observer with eventId
static zfidentity E_HintOnHide(void)
see ZFObject::observerNotify
virtual void hintOnInit(void)
see ZFUIHint::E_HintOnInit
Definition ZFUIHint.h:147
virtual void hide()
hide the hint with animation, do nothing if not showing, cancel show task if delaying
virtual ZFUIWindow * window()
the window to hold the content
virtual zfanyT< ZFAnimation > const & aniHide()
the animation to hide the hint, null by default
Definition ZFUIHint.h:107
virtual void objectOnInit(void)
override this to init your object
virtual void hintOnShow(void)
see ZFUIHint::E_HintOnShow
Definition ZFUIHint.h:155
static ZFCoreArray< zfautoT< ZFUIHint > > hintList(ZFUISysWindow *inSysWindow=(zft_zfnull))
get hint list in specified ZFUISysWindow
virtual zfbool delaying()
whether the hint is delaying, see showing
virtual void hintOnUpdate(void)
see ZFUIHint::E_HintOnUpdate
Definition ZFUIHint.h:151
static zfidentity E_HintOnInit(void)
see ZFObject::observerNotify
virtual ZFAnimation * started()
return the animation if animating, or null if not
virtual void objectOnDeallocPrepare(void)
called before objectOnDealloc, safe to call virtual functions here
virtual zfanyT< ZFUIView > const & content()
the actual hint view
Definition ZFUIHint.h:87
virtual void objectOnInitFinish(void)
called after objectOnInit, safe to call virtual functions here
static zfidentity E_HintOnShow(void)
see ZFObject::observerNotify
virtual zfbool & windowAutoResize()
whether automatically fix frame according to ZFUIOnScreenKeyboardAutoResizeStart, true by default
Definition ZFUIHint.h:113
virtual void hintOnHide(void)
see ZFUIHint::E_HintOnHide
Definition ZFUIHint.h:159
virtual void objectOnDealloc(void)
override this to destroy your object
virtual zfanyT< ZFAnimation > const & aniShow()
the animation to show the hint, null by default
Definition ZFUIHint.h:103
static zfidentity E_HintOnUpdate(void)
see ZFObject::observerNotify
virtual zfbool showing()
whether the hint is showing or delaying, see delaying
virtual zftimet durationFixed()
util method to duration
virtual void show()
show the hint with animation, do nothing if showing
virtual zftimet & duration()
hint duration in miliseconds, 0 to use ZFUIHintDuration, 0 by default
Definition ZFUIHint.h:96
virtual void objectInfoImplAppend(zfstring &ret)
see objectInfo
Definition ZFUIHint.h:165
root native window
Definition ZFUISysWindow.h:34
base class of all UI views
Definition ZFUIView.h:93
window as a ZFUIView
Definition ZFUIWindow.h:74
see zfany
Definition zfany.h:106
type restrict version of zfauto
Definition zfautoFwd.h:110