ccdui.h

Provide easy UI operations

Article - About this type


Type

  typedef builtin UIContainer;
    Representation a window that support add components on it

  typedef builtin UIShowType;
    Description how to show a window


Function

  UIContainer ccd_ui_create();
    Create a window

  void ccd_ui_attach(UIContainer view, AutoTree window);
    Add components tree to window. Specially, If current code running in desktop widget mode, calling this method will render the widget directly and Never Return

  void ccd_ui_show(UIContainer window, UIShowType type);
    Display the window

  void ccd_ui_close(UIContainer window);
    Dismiss the window

  void ccd_ui_destroy(UIContainer window);
    Destroy the window

  AutoTree ccd_ui_id(AutoTree arg1, char *id);
    Search recursively, return the first node where id equals to given id

  Never ccd_ui_start();
    Hands over program control to the event dispatch loop, which drives event reception. Note: This function needs be called at the end of the program, it never returns until the windowed project ends, there should be no code after the function.


Variable

  UIShowType UIShowTypeNewWindow;
    Open in new OS window if system supported, or open by an alert dialog

  UIShowType UIShowTypeEditorTab;
    Open in new editor tab

头文件

ccdui.h

提供与简单UI有关的操作

关于此类型的介绍文章


类型

  typedef builtin UIContainer;
    表示一个可以添加组件的窗口区域

  typedef builtin UIShowType;
    表示窗口显示的方法


函数

  UIContainer ccd_ui_create();
    创建一个窗口区域

  void ccd_ui_attach(UIContainer view, AutoTree window);
    将组件树附加到窗口区域,特别的,如果当前以桌面小组件形式运行代码,则不论view参数如何,使用给定的window参数渲染组件树,并且当前进程在此函数永不返回

  void ccd_ui_show(UIContainer window, UIShowType type);
    展示窗口

  void ccd_ui_close(UIContainer window);
    关闭窗口

  void ccd_ui_destroy(UIContainer window);
    销毁窗口

  AutoTree ccd_ui_id(AutoTree arg1, char *id);
    以先序递归向下查找第一个id字段为给定值的节点

  Never ccd_ui_start();
    将程序控制权移交给事件分发循环,从而驱动事件接收。注意:此函数需要且必须在程序末尾调用,它在窗口项目结束前永不返回,函数后边不应该有代码。


变量

  UIShowType UIShowTypeNewWindow;
    在支持的设备上以新系统窗口打开,否则以弹出对话框打开

  UIShowType UIShowTypeEditorTab;
    在编辑器Tab上打开