ZFFramework
Loading...
Searching...
No Matches
Tutorial
Hello world with UI
time to start a quick hello world with UI elements:
// include ZFUIKit.h for UI module of ZFFramework
// you may need to setup your project's include path first
#include "
ZFUIKit.h
"
ZFMAIN_ENTRY
() {
// typically we will start UI by creating a ZFUIWindow
zfobj<ZFUIWindow>
window;
// show the window
window->windowShow();
// create a text view and set text content
zfobj<ZFUITextView>
textView;
textView->text(
"hello world"
);
// add to window
window->childAdd(textView);
// make it center in window
textView->layoutParam()->layoutAlign(
ZFUIAlign::e_Center
);
}
ZFMAIN_ENTRY
#define ZFMAIN_ENTRY()
app's main entry wrapper
Definition
ZFMainEntry.h:38
ZFUIKit.h
header file for ZFUIKit module
ZFUIAlign::e_Center
@ e_Center
Center ( 0 )
Definition
ZFUITypeDef.h:968
zfobj
util class to alloc and hold ZFObject type
Definition
ZFObjectAutoPtr.h:163
Generated on Sun May 5 2024 05:49:46 for ZFFramework by
1.10.0