Implements the wrapper class for platform-specific window.

This commit implements the new Window class as a wrapper for platform-specific window. The main window of the app can be retrieved through the GetMainWindow() method. For iOS and Android, the default main window can be retrieved out of the box. However, for Mac, the BaseWindow::RegisterMainWindow() method must be called before the first time calling GetMainWindow().

Signed-off-by: Olli Wang <olliwang@ollix.com>
Allows to redraw the entire widget view directly through a widget instance.

This commit implements the Redraw() method in the Widget class. Internally, it keeps the reference to the WidgetView containing the widget. The Widget::Redraw() method simply forwards the call to WidgetView::Redraw().

This commit also fixes the implementation of the View::Redraw() method for Mac.

Signed-off-by: Olli Wang <olliwang@ollix.com>
Creates cross-platform macro function for logging.

Implements the MO_LOG macro function for cross-platform logging.

In iOS and Mac, it simply redirects the arguments to the printf function. In Android, it redirects the arguments to __android_log_print defined in the `android/log.h` header.

Signed-off-by: Olli Wang <olliwang@ollix.com>
Creates managed widget for WidgetView.

The WidgetView class originally could have several widgets. Now it comes with one managed widget and will be instantiated automatically. Child widgets should be added to the managed widget directly.

The managed widget should never set bounds directly. Instead, set the bounds for its WidgetView and the managed widget will have the same size matched to the WidgetView.

Signed-off-by: Olli Wang <olliwang@ollix.com>