amarullz

API Squirrel

Jul 23rd, 2015
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Control{
  2.   constructor(control_data);
  3.   function getId();
  4.   function getText();
  5.   function getType();
  6.   ...
  7.  
  8.   /* abstract */
  9.   function onClick(event);
  10.   function onMessage(event); /* can be used for hooking message */
  11.   function onDraw(drawEvent); /* can be used for custom control */
  12.   ...
  13. }
  14.  
  15. class ListItem extends Control{
  16.   constructor(control_data);
  17.   function clearItem();
  18.   function addItem(itemdata);
  19.   function delItem(id);
  20.   ...
  21.  
  22.   /* abstract */
  23.   function onItemClick(event);
  24.   ...
  25. }
  26.  
  27. class Layout{
  28.   constructor(layout_data);
  29.   function addControl(controlData);
  30.   function getApplication();
  31.   function close();
  32.   function findControlId(id);
  33.   ...
  34.  
  35.   /* abstract */
  36.   function onShow();
  37.   function onClose(); /* can return something into caller/prev layout */
  38.   function onReturnEvent(event); /* dialog/layout onclose return */
  39.   ...
  40. }
  41.  
  42. class Application{
  43.   constructor();
  44.   function setNavigationItems(navigation_items_data);
  45.   function setCurrentLayout(LayoutObject);
  46.   function getCurrentLayout();
  47.   function setTitle(title);
  48.   function setPrimaryColor(color);
  49.   function setPrimaryTextColor(color);
  50.   function setPrimaryIconColor(color);
  51.   function setIcon(icon);
  52.   function setTools(tools_table);
  53.   function clearTools();
  54.   function addTools(id,title,icon,switch);
  55.   function getTool(id);
  56.   function setMenu(menu_table);
  57.   function clearMenu();
  58.   function addMenu(title,index);
  59.   function getMenu(index);
  60.   ...
  61.  
  62.   /* abstract */
  63.   function navigationItemClick(id,holded);
  64.   function onPause();
  65.   function onResume();
  66.   function onShow();
  67.   function onDestroy();
  68.   function onMessage(event); /* can be used for global message hook */
  69. }
Advertisement
Add Comment
Please, Sign In to add comment