6#ifndef _ZFI_ZFUIRootWindow_h_
7#define _ZFI_ZFUIRootWindow_h_
130 ,
ZFMP_IN(
void *, nativeParent)
147 ,
ZFMP_IN(
void *, nativeParent)
170 ,
ZFMP_IN(ZFUIRootWindow *, window)
192 ,
ZFMP_IN(ZFUIRootWindow *, window)
338 zffinal void _ZFP_ZFUIRootWindow_onDestroy(
void);
339 zffinal void _ZFP_ZFUIRootWindow_onResume(
void);
340 zffinal void _ZFP_ZFUIRootWindow_onPause(
void);
341 zffinal void _ZFP_ZFUIRootWindow_onRotate(
void);
342 zffinal void _ZFP_ZFUIRootWindow_layoutUpdate(
void);
348 _ZFP_ZFUIRootWindowPrivate *d;
364 return this->_ZFP_ownerZFUIRootWindow;
450 rootWindow->_ZFP_ZFUIRootWindow_windowMargin(windowMargin);
451 return rootWindow->_ZFP_ZFUIRootWindow_measureWindow(rootRefRect);
458 ,
ZF_IN void *nativeWindow
460 rootWindow->_ZFP_ZFUIRootWindow_onCreate(nativeWindow);
466 rootWindow->_ZFP_ZFUIRootWindow_onDestroy();
473 rootWindow->_ZFP_ZFUIRootWindow_onResume();
480 rootWindow->_ZFP_ZFUIRootWindow_onPause();
486 rootWindow->_ZFP_ZFUIRootWindow_onRotate();
495 rootWindow->_ZFP_ZFUIRootWindow_keyEvent(event);
#define ZF_OUT_OPT
dummy macro that shows the param used as optional output
Definition ZFCoreTypeDef_ClassType.h:196
#define zffinal
dummy macro shows that a method or class is designed must not to be overrided
Definition ZFCoreTypeDef_ClassType.h:63
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfpurevirtual
dummy macro shows that a method is pure virtual method
Definition ZFCoreTypeDef_ClassType.h:68
#define zfoverride
dummy macro shows that method override parent's method
Definition ZFCoreTypeDef_ClassType.h:58
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:184
#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 zffalse
bool false type
Definition ZFCoreTypeDef_CoreType.h:111
#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 ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_DECLARE_0(ReturnType, MethodName)
see ZFMethod
Definition ZFMethodDeclare.h:693
#define ZFMETHOD_DECLARE_STATIC_0(ReturnType, MethodName)
see ZFMethod
Definition ZFMethodDeclare.h:708
#define ZFMETHOD_DECLARE_STATIC_2(ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMethod
Definition ZFMethodDeclare.h:1042
#define ZFMETHOD_DECLARE_STATIC_1(ReturnType, MethodName, ZFMP_0)
see ZFMethod
Definition ZFMethodDeclare.h:870
#define ZFMETHOD_DECLARE_1(ReturnType, MethodName, ZFMP_0)
see ZFMethod
Definition ZFMethodDeclare.h:854
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_END(NameSpace)
end namespace
Definition ZFNamespace.h:60
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define ZF_NAMESPACE_BEGIN(NameSpace)
begin namespace
Definition ZFNamespace.h:40
#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 ZFOBJECT_PRIVATE_ALLOC(...)
mark this object can not be allocated directly
Definition ZFObjectDeclare.h:245
#define ZFINTERFACE_DECLARE_WITH_CUSTOM_CTOR(InterfaceName, ParentInterface,...)
see ZFINTERFACE_DECLARE
Definition ZFObjectInterface.h:94
#define zfinterface
shows the type is an interface, see ZFInterface
Definition ZFObjectInterface.h:20
#define ZFEVENT(YourEvent)
see ZFObject::observerNotify
Definition ZFObjectObserver.h:310
#define ZFEVENT_GLOBAL(ZFLIB_, YourEvent)
declare a observer event in global scope, see ZFEVENT
Definition ZFObjectObserver.h:351
#define ZFPROPERTY_ASSIGN(Type, Name,...)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:128
#define ZFPROPERTY_ON_UPDATE_DECLARE(Type, Name)
see ZFPROPERTY_ON_INIT_DECLARE
Definition ZFPropertyDeclare.h:238
#define ZFLIB_ZFUIKit
used to export symbols
Definition ZFUIKitDef.h:16
root view for holding a ZFUIView's tree
v_ZFUIOrientation::ZFEnumType ZFUIOrientation
see v_ZFUIOrientation
Definition ZFUITypeDef.h:1145
void observerNotify(zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull)
notify the observer with eventId
key event for ui elements
Definition ZFUIKeyEvent.h:17
base class of all layout param in ZFUIView
Definition ZFUIViewType.h:123
margin
Definition ZFUITypeDef.h:147
see v_ZFUIOrientation, ZFUIOrientationFlagsToString, ZFUIOrientationFlagsFromString
Definition ZFUITypeDef.h:1145
2D rectangle
Definition ZFUITypeDef.h:636
root view for holding a ZFUIView's tree
Definition ZFUIRootView.h:20
impl for ZFUIRootWindow::nativeWindowEmbed
Definition ZFUIRootWindow.h:355
virtual void nativeWindowRootViewOnAdd(ZFUIRootWindow *rootWindow, void *&nativeParentView)=0
called to add root view to native window container
virtual void layoutParamOnInit(ZFUIRootWindow *rootWindow)
called to update suggested window layout param, fill with no margin by default
Definition ZFUIRootWindow.h:411
void notifyOnRotate(ZFUIRootWindow *rootWindow)
implementation must call this to notify when window rotate
Definition ZFUIRootWindow.h:485
virtual zfautoT< ZFUIRootWindow > modalWindowShow(ZFUIRootWindow *owner)=0
see ZFUIRootWindow::modalWindowShow
ZFUIRect notifyMeasureWindow(ZFUIRootWindow *rootWindow, const ZFUIRect &rootRefRect, const ZFUIMargin &windowMargin)
implementation must call this method to measure window's frame, and layout window using the result fr...
Definition ZFUIRootWindow.h:445
virtual ZFUIOrientation windowOrientation(ZFUIRootWindow *rootWindow)
see ZFUIRootWindow::windowOrientation
Definition ZFUIRootWindow.h:422
void notifyOnDestroy(ZFUIRootWindow *rootWindow)
implementation must call this to notify before window destroy
Definition ZFUIRootWindow.h:465
virtual void nativeWindowOnCleanup(ZFUIRootWindow *rootWindow)
called when owner ZFUIRootWindow is about to destroy
Definition ZFUIRootWindow.h:377
virtual void nativeWindowRootViewOnRemove(ZFUIRootWindow *rootWindow)=0
called to remove root view to native window container
void notifyOnCreate(ZFUIRootWindow *rootWindow, void *nativeWindow)
implementation must call this to notify after window create
Definition ZFUIRootWindow.h:456
void notifyKeyEvent(ZFUIRootWindow *rootWindow, ZFUIKeyEvent *event)
implementation must call this to notify key event
Definition ZFUIRootWindow.h:491
zfanyT< ZFUIRootWindow > const & ownerZFUIRootWindow(void)
the attached ZFUIRootWindow
Definition ZFUIRootWindow.h:363
void notifyOnPause(ZFUIRootWindow *rootWindow)
implementation must call this to notify before window pause, note that rotate a window should not not...
Definition ZFUIRootWindow.h:479
virtual void layoutParamOnUpdate(ZFUIRootWindow *rootWindow)
called when window layout param changed
Definition ZFUIRootWindow.h:416
virtual void windowOrientationFlags(ZFUIRootWindow *rootWindow, const ZFUIOrientationFlags &flags)
see ZFUIRootWindow::windowOrientationFlags, impl should have v_ZFUIOrientation::e_Top as init value
Definition ZFUIRootWindow.h:429
void notifyOnResume(ZFUIRootWindow *rootWindow)
implementation must call this to notify after window resume, note that rotate a window should not not...
Definition ZFUIRootWindow.h:472
virtual void modalWindowHide(ZFUIRootWindow *owner, ZFUIRootWindow *toHide)=0
see ZFUIRootWindow::modalWindowHide
root native window
Definition ZFUIRootWindow.h:34
static void keyWindow(ZFUIRootWindow *window)
default window that ZFUIWindow would attach to, set null to use mainWindow
virtual void windowMarginOnUpdate(const ZFUIMargin &windowMarginOld)
see E_WindowMarginOnUpdate
virtual void * nativeWindow()
access the internal native window
virtual void modalWindowHide()
finish and destroy self as a modal window
virtual void objectOnInitFinish(void)
called after objectOnInit, safe to call virtual functions here
virtual zfbool nativeWindowIsCreated()
true if sys window created
virtual void objectOnDeallocPrepare(void)
called before objectOnDealloc, safe to call virtual functions here
static zfautoT< ZFUIRootWindow > nativeWindowEmbedNativeView(void *nativeParent)
default impl to attach window to native view
virtual void objectOnDealloc(void)
override this to destroy your object
static zfbool mainWindowAttached()
whether mainWindow has attached
virtual zfanyT< ZFUIRootWindow > modalWindowOwner()
get self's owner if self is a showing modal window
virtual ZFUIOrientation windowOrientation()
get current orientation
static zfanyT< ZFUIRootWindow > mainWindow()
get application's main window
static zfidentity E_WindowOnKeyEvent(void)
see ZFObject::observerNotify
virtual zfanyT< ZFUIRootView > rootView()
access the root view of the window
static void nativeWindowEmbedNativeViewCleanup(const zfstring &rootWindowName)
remove window attached by nativeWindowEmbedNativeView
virtual zfbool nativeWindowIsResumed()
true if sys window resumed
virtual void nativeWindowEmbedImplDestroy()
util to destroy the window created by nativeWindowEmbed
virtual zfautoT< ZFUIRootWindow > modalWindowShow()
show a new modal window, may or may not show immediately, may have different behavior on different im...
virtual void objectOnInit(void)
override this to init your object
virtual zfanyT< ZFUIRootWindow > modalWindowShowing()
get self's current showing modal window
static void mainWindowRegister(ZFUIRootWindow *window)
manually register main window, must be called before accessing mainWindow
virtual const ZFUIMargin & windowMargin()
native window margin according to impl
virtual zfbool & preferFullscreen()
whether prefer fullscreen
Definition ZFUIRootWindow.h:294
virtual ZFUIRootWindowEmbedImpl * nativeWindowEmbedImpl(void)
see nativeWindowEmbed
static zfautoT< ZFUIRootWindow > nativeWindowEmbed(ZFUIRootWindowEmbedImpl *embedImpl)
used to embed ZFUIRootWindow to existing UI framework
virtual zfanyT< ZFUILayoutParam > layoutParam()
get window's layout param, fill parent by default
virtual const ZFUISize & windowSize()
native window's size
virtual void windowOrientationFlags(const ZFUIOrientationFlags &windowOrientationFlags)
set supported orientation, orientation may or may not change immediately
2D size
Definition ZFUITypeDef.h:397
@ e_Top
Top(1 << 1)
Definition ZFUITypeDef.h:1137
see zfany
Definition zfany.h:109
type restrict version of zfauto
Definition zfautoFwd.h:113