Package kernel

Class MacaoPage

Fields   Methods

The class MacaoPage is not a class itself, but it is used to document the global properties and methods of the package core/kernel.js.

Field Summary
boolean _isInternetExplorer
     This field is true, if the browser uses the Microsoft Internet Explorer rendering engine.
boolean _isOpera
     This field is true, if the browser uses the Opera rendering engine.
integer _pageHeight
     The height of the page in pixels.
integer _pageWidth
     The width of the page in pixels.
String basePath
     This field keeps the path from the current page to the Macao base directory. It is strongly recommended to set this field before loading the JavaScript libraries.

Method Summary
Element appendTableCell(Element tableRow, optional integer colspan)
     Call this method to append a cell to a table row.
Element appendTableRow(Element table)
     Call this method to append a row to a table.
void broadcastEvent(String eventType, optional Array params, optional boolean toAllFrames)
     Call this method to send an event to all objects.
void clearGameEvent(String eventName)
     Use this method to clear a game event.
void defResource(String resourceName, String language1Text, optional String language2Text)
     Use this method to define the texts of a text resource in one or more languages.
String getBasePath()
     Use this method to get the base path.
integer getClientHeight()
     Provides the height of the current window.
integer getClientWidth()
     Provides the width of the current window.
Window getFrame(String frameName)
     Use this method to get a frame or an iframe by name.
String getFrameName()
     Use this method to get the name of the actual frame.
String getLanguage()
     Use this method to get the name of the language, which is used to actually display this page.
String getOpenerPageName()
     Use this method to get the name of the page, which opened this page.
String getPageName()
     This method calculates the name of the page from the page's filename by removing the extension.
String getParameter(String parameterName)
     This method gets the value of a parameter of the URL, which was used to open the page.
String getResource(String resourceName, optional String defaultLanguageText, optional boolean nullIfUndefined)
     Use this method to get the content of a text resource for the actual language.
variant getStorageValue(String valueName)
     Use this method to get a value from the storage manager.
Window getStorageWindow()
     Use this method to get the window, where the storage manager is loaded.
void hidePopup()
     Use this method to close a popup, which is opened by showPopup().
void inheritPrototype(Function fromClass, Function toClass)
     This method inherits all methods and properties from one prototype to another prototype.
boolean isBetweenGameEvents(String eventBefore, String eventAfter)
     Use this method to test, if one game event is already set and another game event is not set.
boolean isDesignMode()
     Call this method to check, if the design mode is active.
boolean isGameEvent(String eventName)
     Use this method to test, if a game event is set.
boolean isStorageBlocked()
     Call this method to check, if this page may write to the Storage Manager.
void logError(String message, optional integer errorNumber)
     Call this method to display and log an error.
void openPage(String pageURL, optional String frameName, optional boolean forceReload, optional String basePath)
     Opens a page in the defined frame.
void openResourceExportWindow()
     This method opens a dialog window to export the text resources.
void preloadImage(String imageSource)
     This method is called internally to preload an image.
String replaceSubString(String sourceString, String find, String replace)
     This method replaces all occurrences of one string in a source string with another string and returns the result.
void restoreObjects()
     This method calls the method MacaoObject.restore() of all objects to let them restore their values from the Storage Manger.
variant sendEvent(String eventType, optional Array params, optional String recipientName, optional String frameName)
     Call this method to send an event by a global method.
void setBasePath(String path)
     You may use this method to set the base path.
void setDragThreshold(integer threshold)
     Use this method to set the threshold value for all drag operations in this window.
void setGameEvent(String eventName)
     Use this method to set a game event.
void setLanguage(String language)
     Use this method to set the actual language of the page.
void setPageSize(optional integer width, optional integer height)
     Call this method to set the page size for drag operations.
void setResourceDefaultLanguage(String language)
     This method sets the language, which is used by the parameter defaultLanguageText of the method getResource().
void setResourceDefinitionLanguages(Array languagesArray)
     This method sets the languages, which are used by the method defResource() to define resource texts.
void setStorageValue(String valueName, variant value)
     Use this method to set a value to the storage manager.
void showPopup(String text, optional String html, optional String imageSource, optional integer imageWidth, optional integer imageHeight, optional String cssClassName, optional integer duration)
     Use this method to display a popup in on page.
void storeObjects()
     This method calls the method MacaoObject.store() of all objects to let them store their values to the storage manger.

Field Details
boolean _isInternetExplorer

boolean _isOpera

integer _pageHeight

integer _pageWidth

String basePath

Method Details
Element appendTableCell(Element tableRow, optional integer colspan)

Element appendTableRow(Element table)

void broadcastEvent(String eventType, optional Array params, optional boolean toAllFrames)

void clearGameEvent(String eventName)

void defResource(String resourceName, String language1Text, optional String language2Text)

String getBasePath()

integer getClientHeight()

integer getClientWidth()

Window getFrame(String frameName)

String getFrameName()

String getLanguage()

String getOpenerPageName()

String getPageName()

String getParameter(String parameterName)

String getResource(String resourceName, optional String defaultLanguageText, optional boolean nullIfUndefined)

variant getStorageValue(String valueName)

Window getStorageWindow()

void hidePopup()

void inheritPrototype(Function fromClass, Function toClass)

boolean isBetweenGameEvents(String eventBefore, String eventAfter)

boolean isDesignMode()

boolean isGameEvent(String eventName)

boolean isStorageBlocked()

void logError(String message, optional integer errorNumber)

void openPage(String pageURL, optional String frameName, optional boolean forceReload, optional String basePath)

void openResourceExportWindow()

void preloadImage(String imageSource)

String replaceSubString(String sourceString, String find, String replace)

void restoreObjects()

variant sendEvent(String eventType, optional Array params, optional String recipientName, optional String frameName)

void setBasePath(String path)

void setDragThreshold(integer threshold)

void setGameEvent(String eventName)

void setLanguage(String language)

void setPageSize(optional integer width, optional integer height)

void setResourceDefaultLanguage(String language)

void setResourceDefinitionLanguages(Array languagesArray)

void setStorageValue(String valueName, variant value)

void showPopup(String text, optional String html, optional String imageSource, optional integer imageWidth, optional integer imageHeight, optional String cssClassName, optional integer duration)

void storeObjects()