ZFFramework
 
Loading...
Searching...
No Matches
ZFProtocolZFUIDraw.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFProtocolZFUIDraw_h_
7#define _ZFI_ZFProtocolZFUIDraw_h_
8
9#include "ZFCore/ZFProtocol.h"
10#include "../ZFUIDraw.h"
12
40
41// ============================================================
46public:
55
57 virtual void drawRequest(ZF_IN ZFUIDrawableView *drawableView) zfpurevirtual;
58
59public:
64
65public:
70 drawableView->_ZFP_ZFUIDrawableView_onDraw();
71 }
72ZFPROTOCOL_INTERFACE_END(ZFUIDrawForView)
73
74// ============================================================
79public:
83 , ZF_IN const ZFUISize &imageSizePixel
87ZFPROTOCOL_INTERFACE_END(ZFUIDrawForImage)
88
89// ============================================================
94public:
97 ZF_IN ZFUIDrawToken &token
98 , ZF_IN const ZFUIRect &targetFramePixel
99 ) {
100 return zffalse;
101 }
102
104 ZF_IN ZFUIDrawToken &token
105 , ZF_IN const ZFUIColor &color
106 , ZF_IN const ZFUIRect &targetFramePixel
107 ) {
108 return zffalse;
109 }
110
112 ZF_IN ZFUIDrawToken &token
113 , ZF_IN ZFUIImage *image
114 , ZF_IN const ZFUIRect &imageFramePixel
115 , ZF_IN const ZFUIRect &targetFramePixel
116 ) {
117 return zffalse;
118 }
119
121 ZF_IN ZFUIDrawToken &token
122 , ZF_IN const zfstring &text
123 , ZF_IN ZFUITextConfig *config
124 , ZF_IN const ZFUIRect &targetFramePixel
125 ) {
126 return zffalse;
127 }
129
131#endif // #ifndef _ZFI_ZFProtocolZFUIDraw_h_
132
#define zffinal
dummy macro shows that a method or class is designed must not to be overrided
Definition ZFCoreTypeDef_ClassType.h:63
#define zfpurevirtual
dummy macro shows that a method is pure virtual method
Definition ZFCoreTypeDef_ClassType.h:68
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:184
#define zfclassNotPOD
shows the class is not a POD type, you should not memset it or declare it in stack or copy value by c...
Definition ZFCoreTypeDef_ClassType.h:48
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:200
_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 ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
protocol definitions for ZFFramework
#define ZFPROTOCOL_INTERFACE_END(ModuleName)
for more information, please refer to ZFPROTOCOL_INTERFACE_BEGIN
Definition ZFProtocol.h:412
#define ZFPROTOCOL_INTERFACE_BEGIN(ZFLIB_, ModuleName)
declare a protocol interface for ZFFramework
Definition ZFProtocol.h:406
global style for ui elements
#define ZFLIB_ZFUIKit
used to export symbols
Definition ZFUIKitDef.h:16
_zft_ZFUIColor ZFUIColor
color with AARRGGBB format
Definition ZFUITypeDef.h:1184
base class of all objects
Definition ZFObjectCore.h:205
virtual zfbool beginForImage(ZFUIDrawToken &token, const ZFUISize &imageSizePixel)=0
see ZFUIDraw::beginForImage
virtual void * endForImage(ZFUIDrawToken &token)=0
see ZFUIDraw::beginForImage
void notifyOnDraw(ZFUIDrawableView *drawableView)
implementations must notify when need to draw the view
Definition ZFProtocolZFUIDraw.h:69
virtual void * nativeDrawableViewCreate(ZFUIDrawableView *drawableView)=0
create native drawable view
virtual void drawRequest(ZFUIDrawableView *drawableView)=0
see ZFUIDrawableView::drawRequest
virtual void endForView(ZFUIDrawToken &token)=0
see ZFUIDraw::beginForView
virtual void nativeDrawableViewDestroy(ZFUIDrawableView *drawableView)=0
destroy native text view
virtual zfbool beginForView(ZFUIDrawToken &token)=0
see ZFUIDraw::beginForView
virtual zfbool drawColor(ZFUIDrawToken &token, const ZFUIColor &color, const ZFUIRect &targetFramePixel)
see ZFUIDraw::beginForView
Definition ZFProtocolZFUIDraw.h:103
virtual zfbool drawText(ZFUIDrawToken &token, const zfstring &text, ZFUITextConfig *config, const ZFUIRect &targetFramePixel)
see ZFUIDraw::beginForView
Definition ZFProtocolZFUIDraw.h:120
virtual zfbool drawClear(ZFUIDrawToken &token, const ZFUIRect &targetFramePixel)
see ZFUIDraw::beginForView
Definition ZFProtocolZFUIDraw.h:96
virtual zfbool drawImage(ZFUIDrawToken &token, ZFUIImage *image, const ZFUIRect &imageFramePixel, const ZFUIRect &targetFramePixel)
see ZFUIDraw::beginForView
Definition ZFProtocolZFUIDraw.h:111
token for impl
Definition ZFProtocolZFUIDraw.h:14
ZFUIDrawToken(ZFUIDrawToken::Type type, ZFObject *target, ZFUISize targetSizePixel)
main constructor
Definition ZFProtocolZFUIDraw.h:28
void * impl
impl
Definition ZFProtocolZFUIDraw.h:24
ZFUISize targetSizePixel
target size in pixel
Definition ZFProtocolZFUIDraw.h:23
zfauto target
target
Definition ZFProtocolZFUIDraw.h:22
Type type
type
Definition ZFProtocolZFUIDraw.h:21
Type
type
Definition ZFProtocolZFUIDraw.h:17
@ TypeView
target is ZFUIDrawableView
Definition ZFProtocolZFUIDraw.h:18
@ TypeImage
target is ZFUIImage
Definition ZFProtocolZFUIDraw.h:19
abstract view that can draw user content
Definition ZFUIDraw.h:19
image storage
Definition ZFUIImage.h:30
2D rectangle
Definition ZFUITypeDef.h:636
2D size
Definition ZFUITypeDef.h:397
text config
Definition ZFUIText.h:52
a ZFObject holder which would release content object automatically when destroyed
Definition zfautoFwd.h:34
Definition ZFUIDraw.h:61