diff --git a/docs/controls.html b/docs/controls.html
index b6cd4a97..aad41595 100644
--- a/docs/controls.html
+++ b/docs/controls.html
@@ -62,7 +62,7 @@ Vadim Lopatin, coolreader.org@gmail.com
set text to show
-@property Widget text(ref UIString s);
+@property Widget text(UIString s);
set text to show
diff --git a/docs/editors.html b/docs/editors.html
index b9dd1714..708d1ff4 100644
--- a/docs/editors.html
+++ b/docs/editors.html
@@ -616,7 +616,7 @@ Vadim Lopatin, coolreader.org@gmail.com
set text
-@property Widget text(ref UIString s);
+@property Widget text(UIString s);
set text
diff --git a/docs/menu.html b/docs/menu.html
index 4827b73e..e37b2f8f 100644
--- a/docs/menu.html
+++ b/docs/menu.html
@@ -26,11 +26,57 @@ Boost License 1.0
Authors:
Vadim Lopatin, coolreader.org@gmail.com
-- class MenuItem;
+
- enum MenuItemType: int;
+
+- menu item type
+
+- Normal
+- normal menu item
+
+
+- Check
+- menu item - checkbox
+
+
+- Radio
+- menu item - radio button
+
+
+- Separator
+- menu separator (horizontal line)
+
+
+- Submenu
+- submenu - contains child items
+
+
+
+
+- interface MenuItemClickHandler;
+
+- interface to handle menu item click
+
+
+- interface MenuItemActionHandler;
+
+- interface to handle menu item action
+
+
+- class MenuItem;
- menu item properties
-- @property int id();
+
- Signal!MenuItemClickHandler onMenuItemClick;
+
+- handle menu item click (parameter is MenuItem)
+
+
+- Signal!MenuItemActionHandler onMenuItemAction;
+
+- handle menu item click action (parameter is Action)
+
+
+- @property int id();
- item action id, 0 if no action
@@ -39,11 +85,36 @@ Vadim Lopatin, coolreader.org@gmail.com
- returns count of submenu items
+
+- @property int subitemIndex(MenuItem item);
+
+- returns subitem index for item, -1 if item is not direct subitem of this
+
- MenuItem subitem(int index);
- returns submenu item by index
+
+- @property MenuItem type(MenuItemType type);
+
+- set new MenuItemType
+
+
+- @property bool checked();
+
+- get check for checkbox or radio button item
+
+
+- protected void checkRadioButton(int index);
+
+- check radio button with specified index, uncheck other radio buttons in group (group consists of sequence of radio button items; other item type - end of group)
+
+
+- @property MenuItem checked(bool flg);
+
+- set check for checkbox or radio button item
+
- dchar getHotkey();
diff --git a/docs/platform.html b/docs/platform.html
index b7630d0c..2f559582 100644
--- a/docs/platform.html
+++ b/docs/platform.html
@@ -26,7 +26,157 @@ Boost License 1.0
Authors:
Vadim Lopatin, coolreader.org@gmail.com
-- @property Platform platform();
+
- abstract class Window;
+
+- Window abstraction layer. Widgets can be shown only inside window.
+
+
+- abstract @property string windowCaption();
+
+- returns window caption
+
+
+- abstract @property void windowCaption(string caption);
+
+- sets window caption
+
+
+- void requestLayout();
+
+- requests layout for main widget and popups
+
+
+- PopupWidget showPopup(Widget content, Widget anchor = null, uint alignment = PopupAlign.Center, int x = 0, int y = 0);
+
+- show new popup
+
+
+- bool removePopup(PopupWidget popup);
+
+- remove popup
+
+
+- bool isChild(Widget w);
+
+- returns true if widget is child of either main widget or one of popups
+
+
+- void scheduleAnimation();
+
+- after drawing, call to schedule redraw if animation is active
+
+
+- @property Widget focusedWidget();
+
+- returns current focused widget
+
+
+- Widget setFocus(Widget newFocus);
+
+- change focus to widget
+
+
+- bool dispatchKeyEvent(KeyEvent event);
+
+- dispatch keyboard event
+
+
+- protected Widget[] _mouseTrackingWidgets;
+
+- widget which tracks Move events
+
+
+- protected Widget _mouseCaptureWidget;
+
+- widget which tracks all events after processed ButtonDown
+
+
+- protected bool _mouseCaptureFocusedOutTrackMovements;
+
+- does current capture widget want to receive move events even if pointer left it
+
+
+- bool dispatchMouseEvent(MouseEvent event);
+
+- dispatch mouse event to window content widgets
+
+
+- protected void checkUpdateNeeded(Widget root, ref bool needDraw, ref bool needLayout, ref bool animationActive);
+
+- checks content widgets for necessary redraw and/or layout
+
+
+- protected void setCursorType(uint cursorType);
+
+- sets cursor type for window
+
+
+- bool checkUpdateNeeded(ref bool needDraw, ref bool needLayout, ref bool animationActive);
+
+- checks content widgets for necessary redraw and/or layout
+
+
+- void update(bool force = false);
+
+- requests update for window (unless force is true, update will be performed only if layout, redraw or animation is required).
+
+
+- abstract void invalidate();
+
+- request window redraw
+
+
+
+
+- abstract class Platform;
+
+- Platform abstraction layer.
+
+Represents application.
+
+- abstract dstring getClipboardText(bool mouseBuffer = false);
+
+- retrieves text from clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)
+
+
+- abstract void setClipboardText(dstring text, bool mouseBuffer = false);
+
+- sets text to clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)
+
+
+- abstract void requestLayout();
+
+- calls request layout for all windows
+
+
+- @property string uiLanguage();
+
+- returns currently selected UI language code
+
+
+- @property Platform uiLanguage(string langCode);
+
+- set UI language (e.g. "en", "fr", "ru")
+
+
+- @property Platform uiTheme(string themeResourceId);
+
+- sets application UI theme
+
+
+- @property string[] resourceDirs();
+
+- returns list of resource directories
+
+
+- @property Platform resourceDirs(string[] dirs);
+
+- set list of directories to load resources from
+
+
+
+
+- @property Platform platform();
- get current platform object instance
diff --git a/docs/styles.html b/docs/styles.html
index d1c923cd..76fef520 100644
--- a/docs/styles.html
+++ b/docs/styles.html
@@ -388,7 +388,7 @@ Vadim Lopatin, coolreader.org@gmail.com
- Style createSubstyle(string id);
-- create new named style
+- create new named style or get existing
- @property Style get(string id);
@@ -412,6 +412,62 @@ Vadim Lopatin, coolreader.org@gmail.com
- set new current theme
+
+- Rect decodeRect(string s);
+
+- decode comma delimited dimension list or single value - and put to Rect
+
+
+- ubyte decodeAlignment(string s);
+
+- parses string like "Left|VCenter" to bit set of Align flags
+
+
+- uint decodeTextFlags(string s);
+
+- parses string like "HotKeys|UnderlineHotKeysWhenAltPressed" to bit set of TextFlag flags
+
+
+- FontFamily decodeFontFamily(string s);
+
+- decode FontFamily item name to value
+
+
+- int decodeLayoutDimension(string s);
+
+- decode layout dimension (FILL_PARENT, WRAP_CONTENT, or just size)
+
+
+- bool loadStyleAttributes(Style style, Element elem, bool allowStates);
+
+- load style attributes from XML element
+
+
+- bool loadTheme(Theme theme, Element doc, int level = 0);
+
+- load theme from XML document
+
+Sample:
+<?xml version="1.0" encoding="utf-8"?>
+<theme id="theme_custom" parent="theme_default">
+ <style id="BUTTON"
+ backgroundImageId="btn_default_small"
+ >
+ </style>
+</theme>
+
+
+
+
+- bool loadTheme(Theme theme, string resourceId, int level = 0);
+
+- load theme from file
+
+
+- Theme loadTheme(string resourceId);
+
+- load theme from XML file (null if failed)
+