Qatapult API
qatapult object
// test if a query match an item bool match(string str, string query); // get the subvalues of a selected item object getArgValue(number c, string name); // get the current number of selected args number argscount(); // get the current focus number getFocus(); // get the status line for the specified arg string getStatus(number i); // get the query that was used to select the specified arg string getQuery(number i); // get the number of current results number resultscount(); // are we in text mode (enter with dot ) boolean textmode(); // [deprecated] are there visible results (always true ) boolean resultsvisible(); // show the ui menu showmenu(number x, number y); // yrmm how much is indexed number crawlprogress(); // get the subvalues of results object getResValue(number c, string name); // set how many results are visible (allows scrolling to know when to scroll ) setVisibleResults(number i); // get the current first visible result number firstResult(); // get the current focus number focusedResult(); // ask for a redraw (animations anyone ?) invalidate(); // cogetobject for some scripting needs object getObject(string); // dynamic wrapper for calling native functions : see compatible documentation object getDynWrapper(); // trace (always useful, get debugview to view the result ) trace(string str); // allocate a buffer : used to simulate memory allocation string getBuffer(number l);
collecter object
Collecter is available in the collect method in a plugin named *.collecter.js It's the way to return new objects to Qatapult.addObject(string type, string key, object o); boolean expects(string type);
painter object
Painter is available in the method draw of a skin.js file. It's the way to draw the skin.drawBitmap(string text,number x, number y, number w, number h); drawInput(number x, number y, number w, number h); drawText(string text,number x, number y, number w, number h); drawItem(number arg, number x, number y, number w, number h); drawResItem(number arg, number x, number y, number w, number h); drawEmphased(string text, string highlight, number x, number y, number w, number h, number flag=0); drawResults(number x, number y, number w, number h); fillRectangle(number x, number y, number w, number h, number color); number resultScrollbarColor; number resultBgColor; number resultFocusColor; number textcolor; number textcolor(number c); number fontsize(number f); number textalign(number c); string fontfamily(string str); number textRenderingHint(number c); number stringTrimming(number c);