```
-عرف أرسل_نداء(
+دالة أرسل_نداء(
طريقة: مؤشر[مـحرف]، عنوان: مؤشر[مـحرف]، ترويسات: مؤشر[مـحرف]، متن: مؤشر[مـحرف]،
- الصلاحية_بالميلي_ثانية: صـحيح، منادى: مغلفة(جـيسون)
+ الصلاحية_بالميلي_ثانية: صـحيح، منادى: مغلفة (جـيسون)
): صـحيح_متكيف؛
-عرف أرسل_نداء(
+دالة أرسل_نداء(
طريقة: مؤشر[مـحرف]، عنوان: مؤشر[مـحرف]، ترويسات: مؤشر[مـحرف]، متن: مؤشر[مـحرف]،
الصلاحية_بالميلي_ثانية: صـحيح
): سـندنا[مـؤجلة[جـيسون]]؛
@@ -494,8 +427,7 @@ function sendRequest (
}
```
-الصيغة الأولى ترجع رمزًا يمكن استخدامه لاحقًا لإلغاء الطلب باستخدام دالة ألغ_نداء.
-
+الصيغة الأولى ترجع رمزًا يمكن استخدامه لاحقًا لإلغاء الطلب باستخدام دالة `ألغ_نداء`.
### ألغ_نداء (cancelRequest)
@@ -511,15 +443,14 @@ function sendRequest (
function cancelRequest (requestId: ArchInt);
```
-تلغي نداءا ارسل باستخدام `أرسل_نداء`. الرمز المطلوب في المعطى هو الرمز المرجع من دالة `أرسل_نداء`.
-
+تلغي نداءً ارسل باستخدام `أرسل_نداء`. الرمز المطلوب في المعطى هو الرمز المرجع من دالة `أرسل_نداء`.
### حمل_خط (loadFont)
```
-عرف حمل_خط(اسم_الخط: مؤشر[مـحرف]، مسار: مؤشر[مـحرف]): سـندنا[مـؤجلة[صـحيح]]؛
+دالة حمل_خط(اسم_الخط: مؤشر[مـحرف]، مسار: مؤشر[مـحرف]): سـندنا[مـؤجلة[صـحيح]]؛
```
@@ -530,20 +461,15 @@ function loadFont (fontName: ptr[Char], url: ptr[Char]): SrdRef[Promise[Int]];
دالة لتحميل خط معين.
-المعطيات:
-
-`اسم_الخط` (`fontName`) اسم اعتباطي لتسمية الخط به. يستخدم هذا الاسم لاحقًا في واجهة المستخدم
-للإشارة إلى هذا الخط.
-
-`مسار` (`url`) المسار الذي يتواجد عليه ملف الخط.
-
+* `اسم_الخط` (`fontName`) اسم اعتباطي لتسمية الخط به. يستخدم هذا الاسم لاحقًا في واجهة المستخدم للإشارة إلى هذا الخط.
+* `مسار` (`url`) المسار الذي يتواجد عليه ملف الخط.
### حمل_بريمج_جافاسكريبت (loadJsScript)
```
-عرف حمل_بريمج_جافاسكريبت(مسار: مؤشر[مـحرف]): سـندنا[مـؤجلة[صـحيح]]؛
+دالة حمل_بريمج_جافاسكريبت(مسار: مؤشر[مـحرف]): سـندنا[مـؤجلة[صـحيح]]؛
```
@@ -554,17 +480,14 @@ function loadJsScript (url: ptr[Char]): SrdRef[Promise[Int]];
دالة تستعمل لتحميل بريمج جافاسكربت. تفيد هذه الدالة في الربط مع مكتبات جافاسكريبت جاهزة.
-المعطيات:
-
-`مسار` (`url`) مسار البريمج.
-
+* `مسار` (`url`) مسار البريمج.
### استدع_دالة_جافاسكريبت (callCustomJsFn)
```
-عرف استدع_دالة_جافاسكريبت(اسم_الدالة: مؤشر[مـحرف]، معطى: مؤشر[مـحرف]): مؤشر[مـحرف]؛
+دالة استدع_دالة_جافاسكريبت(اسم_الدالة: مؤشر[مـحرف]، معطى: مؤشر[مـحرف]): مؤشر[مـحرف]؛
```
@@ -573,25 +496,17 @@ function loadJsScript (url: ptr[Char]): SrdRef[Promise[Int]];
function callCustomJsFn (fnName: ptr[Char], arg: ptr[Char]): ptr[Char];
```
-دالة لاستدعاء دالة جافاسكربت. تفيد في استدعاء دالات جافاسكربت لمكتبات خارجية.
-
-المعطيات:
-
-`اسم_الدالة` (`fnName`) اسم الدالة المراد استدعاءها.
-
-`معطى` (`arg`) المعطيات التي نرغب بتمريرها للدالة.
-
-القيمة المرجعة:
-
-`مؤشر[مـحرف]` (`ptr[Char]`) نتيجة الاستدعاء.
+دالة لاستدعاء دالة جافاسكربت. تفيد في استدعاء دالات جافاسكربت لمكتبات خارجية. تُرجع `مؤشر[مـحرف]` نتيجة الاستدعاء.
+* `اسم_الدالة` (`fnName`) اسم الدالة المراد استدعاءها.
+* `معطى` (`arg`) المعطيات التي نرغب بتمريرها للدالة.
### استدع_دالة_جافاسكريبت_لامتزامنة (callCustomAsyncJsFn)
```
-عرف استدع_دالة_جافاسكريبت_لامتزامنة(اسم_الدالة: مؤشر[مـحرف]، معطى: مؤشر[مـحرف]): سـندنا[مـؤجلة[نـص]]؛
+دالة استدع_دالة_جافاسكريبت_لامتزامنة(اسم_الدالة: مؤشر[مـحرف]، معطى: مؤشر[مـحرف]): سـندنا[مـؤجلة[نـص]]؛
```
@@ -600,25 +515,18 @@ function callCustomJsFn (fnName: ptr[Char], arg: ptr[Char]): ptr[Char];
function callCustomAsyncJsFn (fnName: ptr[Char], arg: ptr[Char]): SrdRef[Promise[String]];
```
-دالة لاستدعاء دالة جافاسكربت لامتزامنة. تفيد في استدعاء دالات لمكتبات خارجية.
-
-المعطيات:
-
-`اسم_الدالة` (`fnName`) اسم الدالة المراد استدعاءها.
-
-`معطى` (`arg`) المعطيات التي نرغب بتمريرها للدالة.
-
-القيمة المرجعة:
-
-`مؤشر[مـحرف]` (`ptr[Char]`) نتيجة الاستدعاء على شكل مـؤجلة و ذلك ﻷن الاستدعاء غير متزامن.
+دالة لاستدعاء دالة جافاسكربت لامتزامنة. تفيد في استدعاء دالات لمكتبات خارجية. تُرجع نتيجة الاستدعاء
+على شكل مؤجلة لأن الاستدعاء غير متزامن.
+* `اسم_الدالة` (`fnName`) اسم الدالة المراد استدعاءها.
+* `معطى` (`arg`) المعطيات التي نرغب بتمريرها للدالة.
### التمس_يقظة_الشاشة (requestWakeLock)
```
-عرف التمس_يقظة_الشاشة(): سـندنا[مـؤجلة[ثـنائي]]؛
+دالة التمس_يقظة_الشاشة(): سـندنا[مـؤجلة[ثـنائي]]؛
```
@@ -630,13 +538,12 @@ function requestWakeLock (): SrdRef[Promise[Bool]];
تلتمس إلغاء قفل الشاشة أثناء تشغيل التطبيق. تُرجع 1 إن نجحت العملية، و 0 إن فشلت العملية
أو كان المتصفح لا يدعم هذه الخاصية.
-
### ألغ_يقظة_الشاشة (exitWakeLock)
```
-عرف ألغ_يقظة_الشاشة(): سـندنا[مـؤجلة[ثـنائي]]؛
+دالة ألغ_يقظة_الشاشة(): سـندنا[مـؤجلة[ثـنائي]]؛
```
@@ -648,13 +555,12 @@ function exitWakeLock (): SrdRef[Promise[Bool]];
تُلغي يقظة الشاشة وتعيد تمكين قفل الشاشة إن وجد. تُرجع 1 إن نجحت العملية، و 0 إن فشلت العملية
أو كان المتصفح لا يدعم هذه الخاصية.
-
### هات_لغات_المستخدم (getUserLanguages)
```
-عرف هات_لغات_المستخدم(): مـصفوفة[نـص]؛
+دالة هات_لغات_المستخدم(): مـصفوفة[نـص]؛
```
@@ -665,13 +571,12 @@ func getUserLanguages(): Array[String];
دالة تعيد تفضيلات اللغات الخاصة بالمستخدم والمحددة في متصفحه.
-
### هات_اللغة_المفضلة (getPreferredLanguage)
```
-عرف هات_اللغة_المفضلة(اللغات_المتوفرة: مـصفوفة[نـص]): نـص؛
+دالة هات_اللغة_المفضلة(اللغات_المتوفرة: مـصفوفة[نـص]): نـص؛
```
@@ -683,17 +588,14 @@ func getPreferredLanguage(availableLangues: Array[String]): String;
دالة تعيد اللغة المفضلة للمستخدم من مجموعة لغات. ترجع هذه الدالة أول لغة من لغات المستخدم المفضلة
تطابق إحدى اللغات المعطاة، فإن لم تجد أرجعت أول لغة من اللغات المعطاة.
-المعطيات:
-
-`اللغات_المتوفرة` (`availableLangues`) اللغات المتوفرة للاختيار بينها.
-
+* `اللغات_المتوفرة` (`availableLangues`) اللغات المتوفرة للاختيار بينها.
### هل_يفضل_نمط_الألوان_الداكن (isDarkColorSchemePreferred)
```
-عرف هل_يفضل_نمط_الألوان_الداكن(): ثـنائي؛
+دالة هل_يفضل_نمط_الألوان_الداكن(): ثـنائي؛
```
@@ -704,13 +606,12 @@ function isDarkColorSchemePreferred (): Bool;
دالة تعيد فيما إذا كان النمط المفضل عند المستخدم هو الألوان الداكنة.
-
### هات_الختم_الزمني (getTimestamp)
```
-عرف هات_الختم_الزمني(): صـحيح[64]؛
+دالة هات_الختم_الزمني(): صـحيح[64]؛
```
@@ -721,7 +622,6 @@ function getTimestamp (): Int[64];
دالة تعيد الختم الزمني الحالي بالميلي ثانية.
-
### هات_التاريخ (getDate)
@@ -738,18 +638,15 @@ function getDate(type: CharsPtr, timestamp: Int[64]): CharsPtr;
ترجع التاريخ بصيغة نصية.
-`نوع` (`type`): تحدد الصيغة النصية المطلوبة. يمكن أن تكون `iso` أو `local_iso` أو `locale` أو سلسلة نصية فارغة.
-
-`الختم_الزمني` (`timestamp`): الختم الزمني الذي نرغب بالحصول على التاريخ له. إن كانت هذه القيمة
--1 فسترجع التاريخ الحالي.
-
+* `نوع` (`type`): تحدد الصيغة النصية المطلوبة. يمكن أن تكون `iso` أو `local_iso` أو `locale` أو سلسلة نصية فارغة.
+* `الختم_الزمني` (`timestamp`): الختم الزمني الذي نرغب بالحصول على التاريخ له. إن كانت هذه القيمة -1 فسترجع التاريخ الحالي.
### ألغ_احتكار_المؤشر (exitPointerLock)
```
-عرف ألغ_احتكار_المؤشر()؛
+دالة ألغ_احتكار_المؤشر()؛
```
@@ -757,15 +654,15 @@ function getDate(type: CharsPtr, timestamp: Int[64]): CharsPtr;
```
function exitPointerLock();
```
-دالة تلغي احتكار المؤشر.
+دالة تلغي احتكار المؤشر.
### ألغ_ملء_الشاشة (exitFullScreen)
```
-عرف ألغ_ملء_الشاشة()؛
+دالة ألغ_ملء_الشاشة()؛
```
@@ -776,13 +673,12 @@ function exitFullScreen();
دالة للخروج من وضع ملء الشاشة.
-
### هات_عدد_المقابض (getGamepadsCount)
```
-عرف هات_عدد_المقابض(): صـحيح؛
+دالة هات_عدد_المقابض(): صـحيح؛
```
@@ -793,13 +689,12 @@ function getGamepadsCount (): Int;
تعيد عدد مقابض اللعب الحالية.
-
### هات_رمز_المقبض (getGamepadId)
```
-عرف هات_رمز_المقبض(دليل_المقبض: صـحيح): مؤشر[مصفوفة[مـحرف]]؛
+دالة هات_رمز_المقبض(دليل_المقبض: صـحيح): مؤشر[مصفوفة[مـحرف]]؛
```
@@ -810,13 +705,12 @@ function getGamepadId (gpIndex: Int): ptr[array[Char]];
دالة تعيد رمز المقبض ذو التسلسل المعطى.
-
### هات_عدد_محاور_المقبض (getGamepadAxesCount)
```
-عرف هات_عدد_محاور_المقبض(دليل_المقبض: صـحيح): صـحيح؛
+دالة هات_عدد_محاور_المقبض(دليل_المقبض: صـحيح): صـحيح؛
```
@@ -827,13 +721,12 @@ function getGamepadAxesCount (gpIndex: Int): Int;
دالة تعيد عدد محاور المقبض ذو التسلسل المعطى.
-
### هات_عدد_أزرار_المقبض (getGamepadButtonsCount)
```
-عرف هات_عدد_أزرار_المقبض(دليل_المقبض: صـحيح): صـحيح؛
+دالة هات_عدد_أزرار_المقبض(دليل_المقبض: صـحيح): صـحيح؛
```
@@ -844,13 +737,12 @@ function getGamepadButtonsCount (gpIndex: Int): Int;
دالة تعيد عدد أزرار المقبض ذو التسلسل المعطى.
-
### هات_قيمة_محور_المقبض (getGamepadAxis)
```
-عرف هات_قيمة_محور_المقبض(دليل_المقبض: صـحيح، دليل_المحور: صـحيح): عـائم؛
+دالة هات_قيمة_محور_المقبض(دليل_المقبض: صـحيح، دليل_المحور: صـحيح): عـائم؛
```
@@ -861,19 +753,15 @@ function getGamepadAxis (gpIndex: Int, axisIndex: Int): Float;
دالة تعيد قيمة محور المقبض ذو التسلسل المعطى.
-المعطيات:
-
-`دليل_المقبض` (`gpIndex`) دليل المقبض.
-
-`دليل_المحور` (`axisIndex`) المحور الذي نريد قيمته.
-
+* `دليل_المقبض` (`gpIndex`) دليل المقبض.
+* `دليل_المحور` (`axisIndex`) المحور الذي نريد قيمته.
### هات_قيمة_زر_المقبض (getGamepadButton)
```
-عرف هات_قيمة_زر_المقبض(دليل_المقبض: صـحيح، دليل_الزر: صـحيح): عـائم؛
+دالة هات_قيمة_زر_المقبض(دليل_المقبض: صـحيح، دليل_الزر: صـحيح): عـائم؛
```
@@ -884,19 +772,15 @@ function getGamepadButton (gpIndex: Int, btnIndex: Int): Float;
دالة تعيد قيمة زر المقبض ذو التسلسل المعطى.
-المعطيات:
-
-`دليل_المقبض` (`gpIndex`) دليل المقبض.
-
-`دليل_الزر` (`btnIndex`) الزر الذي نريد قيمته.
-
+* `دليل_المقبض` (`gpIndex`) دليل المقبض.
+* `دليل_الزر` (`btnIndex`) الزر الذي نريد قيمته.
### أعد_التوجيه (httpRedirect)
```
-عرف أعد_التوجيه(عنوان: مؤشر[مـحرف])؛
+دالة أعد_التوجيه(عنوان: مؤشر[مـحرف])؛
```
@@ -907,17 +791,14 @@ function httpRedirect (address: ptr[Char]);
دالة لإعادة توجيه المتصفح إلى عنوان آخر.
-المعطيات:
-
-`عنوان` (`address`) العنوان الذي نريد إعادة التوجيه إليه.
-
+* `عنوان` (`address`) العنوان الذي نريد إعادة التوجيه إليه.
### اكتب_في_الطرفية (logToConsole)
```
-عرف اكتب_في_الطرفية(رسالة: مؤشر[مـحرف])؛
+دالة اكتب_في_الطرفية(رسالة: مؤشر[مـحرف])؛
```
@@ -928,13 +809,12 @@ function logToConsole (msg: ptr[Char]);
دالة لطباعة رسالة إلى طرفية المتصفح.
-
-## أظهر_نافذة_إشعار (showAlertDialog)
+### أظهر_نافذة_إشعار (showAlertDialog)
```
-عرف أظهر_نافذة_إشعار(رسالة: مؤشر[مـحرف])؛
+دالة أظهر_نافذة_إشعار(رسالة: مؤشر[مـحرف])؛
```
@@ -945,13 +825,12 @@ function showAlertDialog (msg: ptr[Char]);
تظهر نافذة إشعار بالاعتماد على نوافذ الإشعارات الخاصة بالمتصفح.
-
-## أظهر_نافذة_تأكيد (showConfirmDialog)
+### أظهر_نافذة_تأكيد (showConfirmDialog)
```
-عرف أظهر_نافذة_تأكيد(رسالة: مؤشر[مـحرف]): ثـنائي؛
+دالة أظهر_نافذة_تأكيد(رسالة: مؤشر[مـحرف]): ثـنائي؛
```
@@ -962,16 +841,15 @@ function showConfirmDialog (msg: ptr[Char]): Bool;
تظهر نافذة تأكيد بالاعتماد على نوافذ التأكيد الخاصة بالمتصفح. ترجع 1 في حالة تأكيد المستخدم و 0 في حالة الإلغاء.
-
### طابق_نمطا (matchRegex)
```
-عرف طابق_نمطا(نص: مؤشر[مصفوفة[مـحرف]]، نمط: مؤشر[مصفوفة[مـحرف]]، آخر_دليل: سند[صـحيح]): مـصفوفة[نـص]؛
-عرف طابق_نمطا(نص: مؤشر[مصفوفة[مـحرف]]، نمط: مؤشر[مصفوفة[مـحرف]]): مـصفوفة[نـص]؛
-عرف طابق_نمطا(نص: مؤشر[مصفوفة[مـحرف]]، دليل_نمط: صـحيح_متكيف، آخر_دليل: سند[صـحيح]): مـصفوفة[نـص]؛
-عرف طابق_نمطا(نص: مؤشر[مصفوفة[مـحرف]]، نمط: صـحيح_متكيف): مـصفوفة[نـص]؛
+دالة طابق_نمطا(نص: مؤشر[مصفوفة[مـحرف]]، نمط: مؤشر[مصفوفة[مـحرف]]، آخر_دليل: سند[صـحيح]): مـصفوفة[نـص]؛
+دالة طابق_نمطا(نص: مؤشر[مصفوفة[مـحرف]]، نمط: مؤشر[مصفوفة[مـحرف]]): مـصفوفة[نـص]؛
+دالة طابق_نمطا(نص: مؤشر[مصفوفة[مـحرف]]، دليل_نمط: صـحيح_متكيف، آخر_دليل: سند[صـحيح]): مـصفوفة[نـص]؛
+دالة طابق_نمطا(نص: مؤشر[مصفوفة[مـحرف]]، دليل_نمط: صـحيح_متكيف): مـصفوفة[نـص]؛
```
@@ -985,38 +863,17 @@ function matchRegex (str: ptr[array[Char]], regexId: ArchInt): Array[String];
دالة للمطابقة بين نص ونمط (regular expression)، ولها 4 نسخ.
-معطيات النسخة 1:
-
* `نص` (`str`) النص المراد مطابقة نمط معه.
* `نمط` (`regex`) النمط المراد مطابقة النص معه.
* `آخر_دليل` (`lastIndex`) يحدد هذا المتغير الدليل الذي يجب البدء منه في عملية المطابقة التالية.
-
-
-معطيات النسخة 2:
-
-* `نص` (`str`) النص المراد مطابقة نمط معه.
-* `نمط` (`regex`) النمط المراد مطابقة النص معه.
-
-
-معطيات النسخة 3:
-
-* `نص` (`str`) النص المراد مطابقة نمط معه.
-* `دليل_نمط` (`regexId`) معرف النمط المراد مطابقة نمط معه.
-* `آخر_دليل` (`lastIndex`) يحدد هذا المتغير الدليل الذي يجب البدء منه في عملية المطابقة التالية.
-
-
-معطيات النسخة 4:
-
-* `نص` (`str`) النص المراد مطابقة نمط معه.
* `دليل_نمط` (`regexId`) معرف النمط المراد مطابقة نمط معه.
-
### أيوجد_تحديث_للتطبيق (isAppUpdateAvailable)
```
-عرف أيوجد_تحديث_للتطبيق(): ثـنائي؛
+دالة أيوجد_تحديث_للتطبيق(): ثـنائي؛
```
@@ -1028,13 +885,12 @@ function isAppUpdateAvailable (): Bool;
ترجع 1 إن توفر تحديث لتطبيق الويب، أي عندما تُنشر نسخة جديدة منه على الخادم برقم إصدار مختلف في
معطيات مبدل `@تطبيق_ويب` (`@webApp`).
-
### حدث_التطبيق (updateApp)
```
-عرف حدث_التطبيق()؛
+دالة حدث_التطبيق()؛
```
@@ -1045,13 +901,12 @@ function updateApp();
يُحدث التطبيق إلى النسخة التي تم تحميلها في المتصفح. يؤدي استدعاؤها إلى إعادة تحميل الصفحة.
-
### هات_نمط_عرض_التطبيق (getAppDisplayMode)
```
-عرف هات_نمط_عرض_التطبيق(): مؤشر[مـحرف]؛
+دالة هات_نمط_عرض_التطبيق(): مؤشر[مـحرف]؛
```
@@ -1061,17 +916,16 @@ function getAppDisplayMode(): ptr[Char];
```
ترجع النمط الحالي لعرض التطبيق. قيم الإرجاع المحتملة:
-* `browser`: التطبيق يعمل في المتصفح.
-* `twa`: التطبيق يعمل في نمط Trusted Web Activity.
-* `standalone`: التطبيق منصّب على الجهاز.
-
+* \u200F`browser`: التطبيق يعمل في المتصفح.
+* \u200F`twa`: التطبيق يعمل في نمط Trusted Web Activity.
+* \u200F`standalone`: التطبيق منصّب على الجهاز.
### أتوجد_واجهة_تنصيب_للتطبيق (isAppInstallPromptAvailable)
```
-عرف أتوجد_واجهة_تنصيب_للتطبيق(): ثـنائي؛
+دالة أتوجد_واجهة_تنصيب_للتطبيق(): ثـنائي؛
```
@@ -1084,13 +938,12 @@ function isAppInstallPromptAvailable (): Bool;
معلما بالمبدل `@تطبيق_ويب` (`@webApp`) وكان يعمل ببروتوكول HTTPS وكان المتصفح يدعم
تطبيقات PWA ولم يكن التطبيق منصبًا مسبقًا.
-
### اعرض_اجهة_تنصيب_التطبيق (showAppInstallPrompt)
```
-عرف اعرض_اجهة_تنصيب_التطبيق(): ثـنائي؛
+دالة اعرض_اجهة_تنصيب_التطبيق(): ثـنائي؛
```
@@ -1102,13 +955,12 @@ function showAppInstallPrompt(): Bool;
تُعلم النظام بإظهار واجهة تنصيب التطبيق. تُرجع 1 عند نجاح العملية و0 إن لم تكن واجهة التنصيب
متوفرة.
-
### علق_سياق_الصوت (suspendAudioContext)
```
-عرف علق_سياق_الصوت()؛
+دالة علق_سياق_الصوت()؛
```
@@ -1119,13 +971,12 @@ function suspendAudioContext();
تُعلق سياق الصوت مما يؤدي لإلباث جميع الأصوات.
-
### استأنف_سياق_الصوت (resumeAudioContext)
```
-عرف استأنف_سياق_الصوت()؛
+دالة استأنف_سياق_الصوت()؛
```
@@ -1136,4 +987,3 @@ function resumeAudioContext();
يستأنف عمل سياق الصوت. تحتاج لاستدعاء هذه الدالة بعد تغير مرئية التطبيق من غير مرئي إلى مرئي لأن
نظام التشغيل قد يعلق عمل سياق الصوت عند وضع التطبيق في الخلفية (كما هو الحال مع نظام آي أو إس).
-
diff --git a/Doc/global_funcs.en.md b/Doc/global_funcs.en.md
index fb18030..7dfbab1 100644
--- a/Doc/global_funcs.en.md
+++ b/Doc/global_funcs.en.md
@@ -14,7 +14,6 @@ def webPlatformPath: String;
Path to WebPlatform source files.
-
### getBuildDependencies
```
@@ -24,7 +23,6 @@ func getBuildDependencies(): Array[String];
A function that return an array of libraries and packages required to build a binary version of the
application.
-
### createElement
```
@@ -34,14 +32,9 @@ function createElement (type: ptr[Char], name: ptr[Char], parent: ptr[Char]);
Creates an element in the DOM of the browser. This is what widgets use to display themselves in the
browser.
-Parameters:
-
-`type` the type of the component we want to create.
-
-`name` the name of the component we want to create.
-
-`parent` the component we want to add the created component to it.
-
+* `type` the type of the component we want to create.
+* `name` the name of the component we want to create.
+* `parent` the component we want to add the created component to it.
### setElementAttribute
@@ -52,14 +45,9 @@ function setElementAttribute (name: ptr[Char], prop: ptr[Char], value: ptr[Char]
Sets an attribute for a given DOM element. Used by the widgets to set the attributes of
corresponding DOM elements.
-Parameters:
-
-`name` component's name.
-
-`prop` the name of the attribute we want to set its value.
-
-`value` the value of the attribute we want to set
-
+* `name` component's name.
+* `prop` the name of the attribute we want to set its value.
+* `value` the value of the attribute we want to set.
### getElementAttribute
@@ -69,12 +57,8 @@ function getElementAttribute (name: ptr[Char], prop: ptr[Char]): CharsPtr;
Gets an attribute for a given DOM element.
-Parameters:
-
-`name` component's name.
-
-`prop` the name of the attribute we want to retrieve.
-
+* `name` component's name.
+* `prop` the name of the attribute we want to retrieve.
### removeElementAttribute
@@ -84,12 +68,8 @@ function removeElementAttribute (name: ptr[Char], prop: ptr[Char]);
Removes an attribute from a given DOM element.
-Parameters:
-
-`name` component's name.
-
-`prop` the name of the attribute we want to remove.
-
+* `name` component's name.
+* `prop` the name of the attribute we want to remove.
### setStyleRule
@@ -99,14 +79,9 @@ function setStyleRule (name: ptr[Char], selector: ptr[Char], css: ptr[Char])
Sets the body of a style in the browser. Used by styling classes to apply the styles in the browser.
-Parameters:
-
-`name` the name of the rule we want to add.
-
-`selector` the selector responsible for selecting the components to apply the style on them.
-
-`css` the styles of the rule.
-
+* `name` the name of the rule we want to add.
+* `selector` the selector responsible for selecting the components to apply the style on them.
+* `css` the styles of the rule.
### runEventLoop
@@ -117,7 +92,6 @@ function runEventLoop;
Processes the event loop infinitely. The user needs to process the events periodically, otherwise
events won't fire and the app won't respond to user actions.
-
### dispatchEvents
```
@@ -126,7 +100,6 @@ function dispatchEvents;
Process all queued events and returns without waiting for more events.
-
### waitForEvent
```
@@ -135,7 +108,6 @@ function waitForEvent;
Blocks the execution until an event arrives in the queue.
-
### startServer
```
@@ -147,26 +119,18 @@ func startServer [modules: ast_ref = Root] (
A function used to start the server. This function is responsible for discovering UI and backend endpoints to serve
in the server, but it does not handle building the UI files required by the browser to render the UI.
To generate the UI files, use the `buildUiEndpoints` function or the `buildAndStartServer` function.
+Returns a pointer to the server session data, or 0 if the server fails to start. This pointer must later be passed to the
+`stopServer` function.
-Parameters:
-
-`modules`: The modules where endpoint definitions should be searched for. This parameter can refer to a specific module
+* `modules`: The modules where endpoint definitions should be searched for. This parameter can refer to a specific module
or a group of modules, as shown in the example below.
-
-`mainAssetsPath`: The path where the main assets generated by the web platform during UI building are stored. This path
+* `mainAssetsPath`: The path where the main assets generated by the web platform during UI building are stored. This path
must match the one provided to the `buildUiEndpoints` function.
-
-`uiEndpointsPath`: The path where the UI endpoint files generated by the web platform during UI building are stored.
+* `uiEndpointsPath`: The path where the UI endpoint files generated by the web platform during UI building are stored.
This path must match the one provided to the buildUiEndpoints function.
-
-`options`: The server options to be passed to the HTTP server. Refer to the Http library documentation for more details
+* `options`: The server options to be passed to the HTTP server. Refer to the Http library documentation for more details
on available options.
-Return Value:
-
-A pointer to the server session data, or 0 if the server fails to start. This pointer must later be passed to the
-`stopServer` function.
-
Example for creating a server that searches for endpoint definitions in multiple modules:
```
@@ -174,7 +138,6 @@ def serverModules: { Module1, Module2 };
startServer[serverModules](mainAssetsPath, uiEndpointsPath, options);
```
-
### stopServer
```
@@ -183,10 +146,7 @@ func stopServer(serverSession: ptr[ServerSession]);
Stops the server that was started using the `startServer` function.
-Parameters:
-
-`serverSession`: A pointer to the session data received from the startServer function.
-
+* `serverSession`: A pointer to the session data received from the startServer function.
### ServerSession
@@ -194,7 +154,6 @@ A class containing data related to the server session. It includes the following
`httpContext: ptr[Http.Context]`: A pointer to the context that can be used to interact directly with the Http library.
-
### runServer
```
@@ -206,7 +165,6 @@ func runServer [modules: ast_ref = Root] (
Similar to `startServer`, but it starts the server and never returns, keeping the program running to serve requests.
See `startServer` for more details on parameters.
-
### buildAndStartServer
```
@@ -216,7 +174,6 @@ func buildAndStartServer [modules: ast_ref = Root] (options: Array[CharsPtr]): p
Similar to `startServer`, but it builds the UI endpoints before starting the server. This function places the generated
files in a temporary directory. See startServer for more details on parameters and return values.
-
### buildAndRunServer
```
@@ -226,25 +183,16 @@ func buildAndRunServer [modules: ast_ref = Root] (options: Array[CharsPtr]);
Similar to `runServer`, but it builds the UI endpoints before starting the server. This function places the generated
files in a temporary directory. See startServer for more details on parameters.
-
### startTimer
```
function startTimer (duration: Word, cb: closure (Json)): ArchInt;
```
-Starts a timer to call the given closure periodically.
-
-Parameters:
-
-`duration` the duration between two calls of the closure, in microseconds.
-
-`cb` the closure we want to call periodically.
-
-Return value:
-
-`ArchInt` the id of this timer.
+Starts a timer to call the given closure periodically. Returns the id of this timer as an `ArchInt`.
+* `duration` the duration between two calls of the closure, in microseconds.
+* `cb` the closure we want to call periodically.
### stopTimer
@@ -254,10 +202,7 @@ function stopTimer (id: ArchInt);
Stops a periodic timer.
-Parameters:
-
-`id` a unique identifier for the timer we want to stop.
-
+* `id` a unique identifier for the timer we want to stop.
### setTimeout
@@ -265,18 +210,10 @@ Parameters:
function setTimeout (duration: Word, cb: closure (Json)): ArchInt;
```
-Starts a timer which calls the given closure only once.
-
-Parameters:
-
-`duration` the time until executing the closure, in microseconds.
-
-`cb` the closure we want to execute.
-
-Return value:
-
-`ArchInt` the identifier of the timer.
+Starts a timer which calls the given closure only once. Returns the identifier of the timer as an `ArchInt`.
+* `duration` the time until executing the closure, in microseconds.
+* `cb` the closure we want to execute.
### cancelTimeout
@@ -286,10 +223,7 @@ function cancelTimeout (id: ArchInt);
Cancels the one-time timer before it's triggered.
-Parameters:
-
-`id` the unique identifier of the timer we want to stop.
-
+* `id` the unique identifier of the timer we want to stop.
### sendRequest
@@ -320,7 +254,6 @@ The response data is formatted as JSON and has the following structure:
The callback form of this function returns an ID that can later be used to cancel the request using
cancelRequest.
-
### cancelRequest
```
@@ -329,7 +262,6 @@ function cancelRequest (requestId: ArchInt);
Cancels an ongoing request. The provided ID is the ID obtained from sendRequest.
-
### loadFont
```
@@ -338,12 +270,8 @@ function loadFont (fontName: ptr[Char], url: ptr[Char]): SrdRef[Promise[Int]];
A function used to load some font.
-Parameters:
-
-`fontName` A name to give the loaded font. This is used later on to reference this font in the UI.
-
-`url` the path where font file exist.
-
+* `fontName` A name to give the loaded font. This is used later on to reference this font in the UI.
+* `url` the path where font file exist.
### loadJsScript
@@ -354,10 +282,7 @@ function loadJsScript (url: ptr[Char]): SrdRef[Promise[Int]];
A function used to load a JavaScript script. This is useful for integrating with third party JS
libraries.
-Parameters:
-
-`url` script path.
-
+* `url` script path.
### callCustomJsFn
@@ -366,35 +291,22 @@ function callCustomJsFn (fnName: ptr[Char], arg: ptr[Char]): ptr[Char];
```
A function used to call an arbitrary JavaScript function. Useful for calling external libraries.
+Returns `ptr[Char]` the result returned by the called js function.
-Parameters:
-
-`fnName` the name of the function we want to call.
-
-`arg` arguments we want to pass to the js function.
-
-Return value:
-
-`ptr[Char]` the result returned by the called js function.
-
+* `fnName` the name of the function we want to call.
+* `arg` arguments we want to pass to the js function.
### callCustomAsyncJsFn
+
```
function callCustomAsyncJsFn (fnName: ptr[Char], arg: ptr[Char]): SrdRef[Promise[String]];
```
Calls an async JavaScript function. Useful for calling external libraries.
+Returns the result of the call as a promise because the call is async.
-Parameters:
-
-`fnName` the name of the function we want to call.
-
-`arg` arguments we want to pass to the js function.
-
-Return value:
-
-`ptr[Char]` the result of the call as a promise because the call is async.
-
+* `fnName` the name of the function we want to call.
+* `arg` arguments we want to pass to the js function.
### requestWakeLock
@@ -405,7 +317,6 @@ function requestWakeLock (): SrdRef[Promise[Bool]];
Requests disabling screen lock while the app is running. Returns true when successful, 0
when unsuccessful or if the browser does not support this operation.
-
### exitWakeLock
```
@@ -415,7 +326,6 @@ function exitWakeLock (): SrdRef[Promise[Bool]];
Exists the wake lock state. Returns true on success, false on failure or if the browser
does not support this operation.
-
### getUserLanguages
```
@@ -424,7 +334,6 @@ func getUserLanguages(): Array[String];
Returns user language preferences as set in the browser.
-
### getPreferredLanguage
```
@@ -435,10 +344,7 @@ A function that returns the user's preferred language from a set of languages. T
returns the first language from the preferred user languages that matches one of the given
languages. If no match is found, it returns the first language from the given languages.
-Parameters:
-
-`availableLangues` the available languages to select from it.
-
+* `availableLangues` the available languages to select from it.
### isDarkColorSchemePreferred
@@ -448,7 +354,6 @@ function isDarkColorSchemePreferred (): Bool;
Returns whether dark mode is preferred on the user's OS.
-
### getTimestamp
```
@@ -457,7 +362,6 @@ function getTimestamp (): Int[64];
A function used to get the current timestamp, in milliseconds.
-
### getDate
```
@@ -466,11 +370,8 @@ function getDate(type: CharsPtr, timestamp: Int[64]): CharsPtr;
Returns the date as a string.
-`type`: The requested format for the returned string. It can be `iso`, `local_iso`, `locale`, or an empty string.
-
-`timestamp`: The timestamp for which we want the date string. If this is -1 the current timestamp
-will be used.
-
+* `type`: The requested format for the returned string. It can be `iso`, `local_iso`, `locale`, or an empty string.
+* `timestamp`: The timestamp for which we want the date string. If this is -1 the current timestamp will be used.
### exitPointerLock
@@ -480,7 +381,6 @@ function exitPointerLock();
Removes the lock on the pointer.
-
### exitFullScreen
```
@@ -489,7 +389,6 @@ function exitFullScreen();
Exists full screen mode.
-
### getGamepadsCount
```
@@ -498,7 +397,6 @@ function getGamepadsCount (): Int;
Retrieves the number of connected gamepads.
-
### getGamepadId
```
@@ -507,7 +405,6 @@ function getGamepadId (gpIndex: Int): ptr[array[Char]];
Retreives the id of the gamepad with the given index.
-
### getGamepadAxesCount
```
@@ -516,7 +413,6 @@ function getGamepadAxesCount (gpIndex: Int): Int;
Retrieves the number of axes of the gamepad with the given index.
-
### getGamepadButtonsCount
```
@@ -525,7 +421,6 @@ function getGamepadButtonsCount (gpIndex: Int): Int;
Retrieves the number of buttons of the gamepad with the given index.
-
### getGamepadAxis
```
@@ -534,12 +429,8 @@ function getGamepadAxis (gpIndex: Int, axisIndex: Int): Float;
Retrieves the value of given axis on the gamepad with the given index.
-Parameters:
-
-`gpIndex` gamepad index.
-
-`axisIndex` the axis index that we want its value.
-
+* `gpIndex` gamepad index.
+* `axisIndex` the axis index that we want its value.
### getGamepadButton
@@ -549,12 +440,8 @@ function getGamepadButton (gpIndex: Int, btnIndex: Int): Float;
Retrieves the value of some button on the gamepad with the given index.
-Parameters:
-
-`gpIndex` gamepad index.
-
-`btnIndex` the button we want its value.
-
+* `gpIndex` gamepad index.
+* `btnIndex` the button we want its value.
### httpRedirect
@@ -564,10 +451,7 @@ function httpRedirect (address: ptr[Char]);
Performs an HTTP redirect.
-Parameters:
-
-`address` the address we want to redirect to.
-
+* `address` the address we want to redirect to.
### logToConsole
@@ -577,8 +461,7 @@ function logToConsole (msg: ptr[Char]);
Prints some message to the browser's console.
-
-## showAlertDialog
+### showAlertDialog
```
function showAlertDialog (msg: ptr[Char]);
@@ -586,8 +469,7 @@ function showAlertDialog (msg: ptr[Char]);
Displays an alert dialog using the browser's native alert dialogs.
-
-## showConfirmDialog
+### showConfirmDialog
```
function showConfirmDialog (msg: ptr[Char]): Bool;
@@ -596,7 +478,6 @@ function showConfirmDialog (msg: ptr[Char]): Bool;
Shows a confirm dialog using the browser's native confirm dialogs. Returns 1 (true) if the user clicks Ok, and 0 (false)
if the user clicks Cancel.
-
### matchRegex
```
@@ -608,28 +489,10 @@ function matchRegex (str: ptr[array[Char]], regexId: ArchInt): Array[String];
A function used to match between a text and a pattern, and has four versions:
-Version 1 parameters:
-
* `str` the text we want to match it with the pattern.
* `regex` the pattern used for matching.
* `lastIndex` this parameter determine the index that we should start next matching process from it.
-
-Version 2 parameters:
-
-* `str` the text we want to match it with the pattern.
-* `regex` the pattern used for matching.
-
-Version 3 parameters:
-
-* `str` the text we want to match it with the pattern.
* `regexId` the pattern id used for matching.
-* `lastIndex` this parameter determine the index that we should start next matching process from it.
-
-Version 4 parameters:
-
-* `str` the text we want to match it with the pattern.
-* `regexId` the pattern id used for matching.
-
### isAppUpdateAvailable
@@ -640,7 +503,6 @@ function isAppUpdateAvailable (): Bool;
Returns true if an update is available for the app, which is when the version number is updated in
the args of `@webApp` modifier.
-
### updateApp
```
@@ -649,7 +511,6 @@ function updateApp();
Updates the web app to the version that has been loaded into the browser and is awaiting activation.
-
### getAppDisplayMode
```
@@ -661,7 +522,6 @@ Returns the current mode of the web app. The return value can be one of the foll
* `twa`: The app is running as a Trusted Web Activity.
* `standalone`: The app is running as a standalone app.
-
### isAppInstallPromptAvailable
```
@@ -675,7 +535,6 @@ conditions are met:
* The browser supports Progressive Web Apps.
* The app is not already installed.
-
### showAppInstallPrompt
```
@@ -685,7 +544,6 @@ function showAppInstallPrompt(): Bool;
Triggers the system's app installation prompt. Returns 1 if successful, and 0 if no install
prompt is available.
-
### suspendAudioContext
```
@@ -694,7 +552,6 @@ function suspendAudioContext();
Suspends the audio context which results in pausing all sounds.
-
### resumeAudioContext
```
@@ -704,4 +561,3 @@ function resumeAudioContext();
Resumes the operation of the audio context. You need to call this function when the app's visibility
changes from non-visible to visible because the operating system may suspend the audio context when
the app is pushed to the background (as is the case with iOS).
-
diff --git a/Doc/regexp.ar.md b/Doc/regexp.ar.md
index 51bf58c..8b6c86c 100644
--- a/Doc/regexp.ar.md
+++ b/Doc/regexp.ar.md
@@ -10,9 +10,10 @@
```
صنف تـعبير_نمطي {
- عرف هيئ(نص_نمط: مؤشر[مصفوفة[مـحرف]])؛
- عرف حرر(نص: مؤشر[مصفوفة[مـحرف]]، آخر_دليل: سند[صـحيح]): مـصفوفة[نـص]؛
- عرف طابق(نص: مؤشر[مصفوفة[مـحرف]]): مـصفوفة[نـص]؛
+ عملية هذا.هيئ(نص_نمط: مؤشر[مصفوفة[مـحرف]])؛
+ عملية هذا.حرر()؛
+ عملية هذا.طابق(نص: مؤشر[مصفوفة[مـحرف]]، آخر_دليل: سند[صـحيح]): مـصفوفة[نـص]؛
+ عملية هذا.طابق(نص: مؤشر[مصفوفة[مـحرف]]): مـصفوفة[نـص]؛
}
```
@@ -32,18 +33,55 @@ class RegExp {
#### هيئ (initialize)
+
+
+```
+عملية هذا.هيئ(نص_نمط: مؤشر[مصفوفة[مـحرف]])؛
+```
+
+
+
+```
+handler this.initialize(regStr: ptr[array[Char]]);
+```
+
تستعمل لتهيئة غرض بالنمط المطلوب.
#### حرر (release)
+
+
+```
+عملية هذا.حرر()؛
+```
+
+
+
+```
+handler this.release();
+```
+
تستعمل لتحرير المورد المستعمل لهذا الغرض.
#### طابق (match)
+
+
+```
+عملية هذا.طابق(نص: مؤشر[مصفوفة[مـحرف]]، آخر_دليل: سند[صـحيح]): مـصفوفة[نـص]؛
+عملية هذا.طابق(نص: مؤشر[مصفوفة[مـحرف]]): مـصفوفة[نـص]؛
+```
+
+
+
+```
+handler this.match(str: ptr[array[Char]], lastIndex: ref[Int]): Array[String];
+handler this.match(str: ptr[array[Char]]): Array[String];
+```
+
تنفيذ المطابقة.
المعطيات:
* `نص` (`str`) النص الذي نريد مطابقته.
* `آخر_دليل` (`lastIndex`) يحدد هذا المتغير الدليل الذي يجب البدء منه في عملية المطابقة التالية.
-
diff --git a/Doc/regexp.en.md b/Doc/regexp.en.md
index 8797b74..5656e34 100644
--- a/Doc/regexp.en.md
+++ b/Doc/regexp.en.md
@@ -20,18 +20,29 @@ regex on every operation.
#### initialize
+```
+handler this.initialize(regStr: ptr[array[Char]]);
+```
+
Initializes the object with the required pattern.
#### release
+```
+handler this.release();
+```
+
Releases the resource used for this object.
#### match
+```
+handler this.match(str: ptr[array[Char]], lastIndex: ref[Int]): Array[String];
+handler this.match(str: ptr[array[Char]]): Array[String];
+```
Match the expression against the given string.
Parameters:
* `str` The text we want to match.
-* `lastIndex` Returns the index that we should start next matching process from.
-
+* `lastIndex` Returns the index that we should start next matching process from.
\ No newline at end of file
diff --git a/Doc/resources.ar.md b/Doc/resources.ar.md
index 4d42c80..3f536dd 100644
--- a/Doc/resources.ar.md
+++ b/Doc/resources.ar.md
@@ -13,9 +13,9 @@
```
صنف مـورد_صورة {
عرف معرف: صـحيح_متكيف = 0؛
- عرف حمل(مسار: مؤشر[مصفوفة[مـحرف]]): سـندنا[مـؤجلة[صـحيح]]؛
- عرف هيئ_من_مرسم(مرسم: سند[مـورد_مرسم]): سـندنا[مـؤجلة[صـحيح]]؛
- عرف هات_الأبعاد(): أبـعاد؛
+ عملية هذا.حمل(مسار: مؤشر[مصفوفة[مـحرف]]): سـندنا[مـؤجلة[صـحيح]]؛
+ عملية هذا.هيئ_من_مرسم(مرسم: سند[مـورد_مرسم]): سـندنا[مـؤجلة[صـحيح]]؛
+ عملية هذا.هات_الأبعاد(): أبـعاد؛
}
```
@@ -32,14 +32,69 @@ class ImageResource {
مورد صورة يمكن استعماله مع عمليات الصور على مرسم.
-`معرف` (`id`) معرف فريد لتمييز المورد.
+#### معرف (id)
+
+
+
+```
+عرف معرف: صـحيح_متكيف = 0؛
+```
+
+
+
+```
+def id: ArchInt = 0;
+```
+
+معرف فريد لتمييز المورد.
+
+#### حمل (load)
+
+
+
+```
+عملية هذا.حمل(مسار: مؤشر[مصفوفة[مـحرف]]): سـندنا[مـؤجلة[صـحيح]]؛
+```
+
+
+
+```
+handler this.load(u: ptr[array[Char]]): SrdRef[Promise[Int]];
+```
+
+تستعمل هذه الطريقة لتحميل المورد من مسار معطى.
-`حمل` (`load`) تستعمل هذه الطريقة لتحميل المورد من مسار معطى.
+#### هيئ_من_مرسم (initFromCanvas)
-`هيئ_من_مرسم` (`initFromCanvas`) تستعمل هذه الطريقة لتهيئة المورد من مرسم معطى.
+
-`هات_الأبعاد` (`getDimensions`) طريقة تستعمل لمعرفة أبعاد المورد.
+```
+عملية هذا.هيئ_من_مرسم(مرسم: سند[مـورد_مرسم]): سـندنا[مـؤجلة[صـحيح]]؛
+```
+
+
+
+```
+handler this.initFromCanvas(canvas: ref[CanvasResource]): SrdRef[Promise[Int]];
+```
+تستعمل هذه الطريقة لتهيئة المورد من مرسم معطى.
+
+#### هات_الأبعاد (getDimensions)
+
+
+
+```
+عملية هذا.هات_الأبعاد(): أبـعاد؛
+```
+
+
+
+```
+handler this.getDimensions(): Dimensions;
+```
+
+طريقة تستعمل لمعرفة أبعاد المورد.
### مـورد_مرسم (CanvasResource)
@@ -48,8 +103,8 @@ class ImageResource {
```
صنف مـورد_مرسم {
عرف معرف: صـحيح_متكيف = 0؛
- عرف هيئ(عرض: صـحيح، ارتفاع: صـحيح)؛
- عرف غير_الأبعاد(عرض: صـحيح، ارتفاع: صـحيح)؛
+ عملية هذا.هيئ(عرض: صـحيح، ارتفاع: صـحيح)؛
+ عملية هذا.غير_الأبعاد(عرض: صـحيح، ارتفاع: صـحيح)؛
}
```
@@ -64,15 +119,56 @@ class CanvasResource {
```
مرسم منفصل يمكن استعماله لتوليد الصور بشكل ديناميكي. كما هو الحال مع `مـرسم` (`Canvas`)، يوفر هذا
-الصنف مكون (mixin) `رسـم` لتمكين عمليات الرسم. راجع الصنف `رسـم` لمعرفة العمليات الرسومية التي يدعهما
+الصنف مكون (mixin) `رسـم` لتمكين عمليات الرسم. راجع الصنف `رسـم` لمعرفة العمليات الرسومية التي يدعمها
هذا الصنف.
-`معرف` (`id`) معرف فريد لتمييز المورد.
+#### معرف (id)
+
+
-`هيئ` (`init`) دالة لتهيئة مرسم بعرض وارتفاع.
+```
+عرف معرف: صـحيح_متكيف = 0؛
+```
+
+
+
+```
+def id: ArchInt = 0;
+```
-`غير_الأبعاد` (`resize`) دالة لتغيير حجم المرسم إلى العرض والارتفاع المطلوبين.
+معرف فريد لتمييز المورد.
+#### هيئ (init)
+
+
+
+```
+عملية هذا.هيئ(عرض: صـحيح، ارتفاع: صـحيح)؛
+```
+
+
+
+```
+handler this.init(w: Int, h: Int);
+```
+
+دالة لتهيئة مرسم بعرض وارتفاع.
+
+#### غير_الأبعاد (resize)
+
+
+
+```
+عملية هذا.غير_الأبعاد(عرض: صـحيح، ارتفاع: صـحيح)؛
+```
+
+
+
+```
+handler this.resize(w: Int, h: Int);
+```
+
+دالة لتغيير حجم المرسم إلى العرض والارتفاع المطلوبين.
### مـورد_صوت (AudioResource)
@@ -109,28 +205,142 @@ class AudioResource {
handler this.isPlaying(): Bool;
}
```
+
صنف يستعمل من أجل الموارد الصوتية.
-`معرف` (`id`) معرف فريد لتمييز المورد.
+#### معرف (id)
+
+
-`حمل` (`load`) تحمل المورد من المسار المعطى.
+```
+عرف معرف: صـحيح_متكيف = 0؛
+```
+
+
-`شغل` (`play`) تبدأ تشغيل الصوت من بدايته. في حال استدعائها ثانية قبل انتهاء التشغيل السابق
+```
+def id: ArchInt = 0;
+```
+
+معرف فريد لتمييز المورد.
+
+#### حمل (load)
+
+
+
+```
+عملية هذا.حمل(مسار: مؤشر[مصفوفة[مـحرف]]): سـندنا[مـؤجلة[صـحيح]]؛
+```
+
+
+
+```
+handler this.load(u: ptr[array[Char]]): SrdRef[Promise[Int]];
+```
+
+تحمل المورد من المسار المعطى.
+
+#### شغل (play)
+
+
+
+```
+عملية هذا.شغل(تكرار: ثـنائي)؛
+عملية هذا.شغل(تكرار: ثـنائي، أوقف_السابق: ثـنائي)؛
+```
+
+
+
+```
+handler this.play(loop: Bool);
+handler this.play(loop: Bool, stopPrevious: Bool);
+```
+
+تبدأ تشغيل الصوت من بدايته. في حال استدعائها ثانية قبل انتهاء التشغيل السابق
فإن الصوت سيشغل مجددا إلى جانب التشغيل السابق الذي سيستمر حتى انتهائه بشكل طبيعي. النسخة
الثانية من هذه الدالة تستلم معطى `أوقف_السابق` (`stopPrevious`) والذي يسمح للمستخدم
بإيقاف التشغيل السابق قبل تشغيل الصوت من جديد.
-`ألبث` (`pause`) توقف التشغيل عند النقطة الحالية.
+* `تكرار` (`loop`) تحديد فيما إذا كان الوضع هو تكرار للمورد أم يقف عندما ينتهي.
-`استأنف` (`resume`) تكمل التشغيل من النقطة الحالية.
+#### أوقف (stop)
-المعطيات:
+
-* `تكرار` (`loop`) تحديد فيما إذا كان الوضع هو تكرار للمورد أم يقف عندما ينتهي.
+```
+عملية هذا.أوقف()؛
+```
+
+
+
+```
+handler this.stop();
+```
+
+طريقة تستعمل لإيقاف المورد.
+
+#### ألبث (pause)
+
+
-`أوقف` (`stop`) طريقة تستعمل لإيقاف المورد.
+```
+عملية هذا.ألبث()؛
+```
+
+
-`الجهارة` (`volume`) خاصية الصوت، و هنا يمكننا جلبها أو تحديد قيمة لها.
+```
+handler this.pause();
+```
-`أمشتغل` (`isPlaying`) طريقة تستعمل لإختبار فيما إذا كان المورد في وضع التشغيل.
+توقف التشغيل عند النقطة الحالية.
+
+#### استأنف (resume)
+
+
+
+```
+عملية هذا.استأنف()؛
+```
+
+
+
+```
+handler this.resume();
+```
+
+تكمل التشغيل من النقطة الحالية.
+
+#### الجهارة (volume)
+
+
+
+```
+عملية هذا.الجهارة = عـائم؛
+عملية هذا.الجهارة:عـائم؛
+```
+
+
+
+```
+handler this.volume = Float;
+handler this.volume:Float;
+```
+
+خاصية الصوت، يمكن جلبها أو تحديد قيمة لها.
+
+#### أمشتغل (isPlaying)
+
+
+
+```
+عملية هذا.أمشتغل(): ثـنائي؛
+```
+
+
+
+```
+handler this.isPlaying(): Bool;
+```
+طريقة تستعمل لإختبار فيما إذا كان المورد في وضع التشغيل.
diff --git a/Doc/resources.en.md b/Doc/resources.en.md
index 9cacf3c..6d05fde 100644
--- a/Doc/resources.en.md
+++ b/Doc/resources.en.md
@@ -19,14 +19,37 @@ class ImageResource {
An image resource that can be used with image operations on a canvas.
-`id` a unique identifier to distinguish this resource from the others.
+#### id
-`load` this method is used to load the resource from a given path.
+```
+def id: ArchInt = 0;
+```
+
+a unique identifier to distinguish this resource from the others.
+
+#### load
+
+```
+handler this.load(u: ptr[array[Char]]): SrdRef[Promise[Int]];
+```
+
+this method is used to load the resource from a given path.
-`initFromCanvas` This method is used to initialize the resource from a given canvas.
+#### initFromCanvas
-`getDimensions` this method is used to get the resource's dimensions.
+```
+handler this.initFromCanvas(canvas: ref[CanvasResource]): SrdRef[Promise[Int]];
+```
+
+This method is used to initialize the resource from a given canvas.
+
+#### getDimensions
+
+```
+handler this.getDimensions(): Dimensions;
+```
+this method is used to get the resource's dimensions.
### CanvasResource
@@ -42,12 +65,29 @@ An offline canvas that can be used to dynamically generate images. Similar to th
this class inherits the `Drawing` mixin to enable drawing operations. Refer to the `Drawing`
class to learn about the graphical operations supported by this class.
-`id` a unique identifier to distinguish this resource from the others.
+#### id
-`init` a method used to initialize the canvas with a given width and height.
+```
+def id: ArchInt = 0;
+```
+
+a unique identifier to distinguish this resource from the others.
+
+#### init
-`resize` a method used to change the size of the canvas to the given width and height.
+```
+handler this.init(w: Int, h: Int);
+```
+a method used to initialize the canvas with a given width and height.
+
+#### resize
+
+```
+handler this.resize(w: Int, h: Int);
+```
+
+a method used to change the size of the canvas to the given width and height.
### AudioResource
@@ -65,28 +105,76 @@ class AudioResource {
handler this.isPlaying(): Bool;
}
```
+
A class used for audio resources.
-`id` a unique identifier to distinguish this resource from the others.
+#### id
+
+```
+def id: ArchInt = 0;
+```
-`load` loads the resource with the given path.
+a unique identifier to distinguish this resource from the others.
-`play` starts the playback from the beginning. If called again before the previous playback
+#### load
+
+```
+handler this.load(u: ptr[array[Char]]): SrdRef[Promise[Int]];
+```
+
+loads the resource with the given path.
+
+#### play
+
+```
+handler this.play(loop: Bool);
+handler this.play(loop: Bool, stopPrevious: Bool);
+```
+
+starts the playback from the beginning. If called again before the previous playback
is over the sound will be played again alongside the previous playback, which will continue
until the end of the sound buffer. The second version of this method accepts `stopPrevious`
which allows the user to stop the previous playback before starting the new playback.
-`pause` pauses the playback.
+* `loop` determine if the mode is repeating the resource or stopping it when finished.
-`resume` resumes the playback from where it was paused.
+#### stop
-parameters:
+```
+handler this.stop();
+```
-* `loop` determine if the mode is repeating the resource or stopping it when finished.
+a method used to stop the resource.
-`stop` a method used to stop the resource.
+#### pause
-`volume` volume property, used to get or set the audio volume.
+```
+handler this.pause();
+```
-`isPlaying` a method used to check if the resource is playing or not.
+pauses the playback.
+
+#### resume
+
+```
+handler this.resume();
+```
+
+resumes the playback from where it was paused.
+
+#### volume
+
+```
+handler this.volume = Float;
+handler this.volume:Float;
+```
+
+volume property, used to get or set the audio volume.
+
+#### isPlaying
+
+```
+handler this.isPlaying(): Bool;
+```
+a method used to check if the resource is playing or not.
diff --git a/Doc/routing.ar.md b/Doc/routing.ar.md
index 516ccb1..aa4de31 100644
--- a/Doc/routing.ar.md
+++ b/Doc/routing.ar.md
@@ -8,21 +8,21 @@
تدعم هذه المكتبة التوجيه بدون إعادة التحميل عن طريق العناصر التالية من صنف `نـافذة` (`Window`):
-`المسار` (`location`) للحصول على مسار المتصفح الحالي.
+* `المسار` (`location`) للحصول على مسار المتصفح الحالي.
-`ادفع_مسارا` (`pushLocation`) عن طريق هذه الدالة يمكننا إضافة مسار إلى مجموعة المسارات و هذا يؤدي إلى
+* `ادفع_مسارا` (`pushLocation`) عن طريق هذه الدالة يمكننا إضافة مسار إلى مجموعة المسارات و هذا يؤدي إلى
إرسال إشارة `عند_تغير_المسار`.
-`عند_تغير_المسار` (`onLocationChanged`) يمكننا الاستماع لهذه الإشارة لتفقد المسارات و القيام بما يلزم.
+* `عند_تغير_المسار` (`onLocationChanged`) يمكننا الاستماع لهذه الإشارة لتفقد المسارات و القيام بما يلزم.
العناصر المذكورة أعلاه تمكن المستخدم من توفير التوجيه دون إعادة التحميل. لكن بالإضافة لهذه العناصر توفر
مـنصة_ويب العناصر المساعدة التالية لتسهيل العملية:
-`مـوجه` (`Router`) يمكننا من تعريف دالات عكسية لكل مسار تستدعى تلقائيًا عن الانتقال لذلك المسار.
+* `مـوجه` (`Router`) يمكننا من تعريف دالات عكسية لكل مسار تستدعى تلقائيًا عن الانتقال لذلك المسار.
-`مـبدال_توجيه` (`RoutingSwitcher`) يقوم بالتبديل بين العناصر بناء على المسار.
+* `مـبدال_توجيه` (`RoutingSwitcher`) يقوم بالتبديل بين العناصر بناء على المسار.
-`مـكداس_توجيه` (`RoutingStack`) يقوم بتكديس العناصر بناء على المسار.
+* `مـكداس_توجيه` (`RoutingStack`) يقوم بتكديس العناصر بناء على المسار.
يمكن معرفة المزيد عن هذه العناصر في الشرح المفصل لها.
@@ -32,9 +32,9 @@
```
صنف مـوجه {
- عرف مسار(مسار: نـص): سند[مغلف[نـص]]؛
- عرف عند_المسار_المجهول: مغلف[حـمولة_مسار]؛
- عرف أطلق_التوجيه()؛
+ عملية هذا.مسار(مسار: نـص): سند[مغلفة [نـص]]؛
+ عرف عند_المسار_المجهول: مغلفة (حـمولة_مسار)]؛
+ عملية هذا.أطلق_التوجيه()؛
}
```
@@ -50,16 +50,41 @@ class Router {
يسمح هذا الصنف بتحديد مجموعة من المسارات مع دالة عكسية لكل منها تُستدعى عند الانتقال إلى ذلك المسار.
-`مسار` (`route`): تسمح بتحديد تعبير نمطي لمسار وتحديد الدالة العكسية المطلوب تنفيذها عند تطابق
+#### مسار (route)
+
+
+
+```
+عرف مسار(مسار: نـص): سند[مغلفة [نـص]]؛
+```
+
+
+
+```
+handler this.route(r: String): ref[closure(String)];
+```
+
+تسمح بتحديد تعبير نمطي لمسار وتحديد الدالة العكسية المطلوب تنفيذها عند تطابق
المسار الحالي مع التعبير النمطي. تعيد الدالة سندًا للدالة العكسية كي يتمكن المستخدم من تحديد قيمة
تلك الدالة العكسية.
-`عند_المسار_المجهول` (`onUnknownRoute`): تحديد دالة عكسية تُستدعى عند الوصول إلى مسار مجهول.
+#### عند_المسار_المجهول (onUnknownRoute)
-`أطلق_التوجيه` (`triggerRoute`): تُستدعى تلقائيًا عند تغير المسار لتنفيذ الدالات العكسية المطابقة
-للمسار الجديد، ويمكن استدعاؤها يدويًا أيضًا كما الحال عند تحميل الموقع.
+
-## حـمولة_مسار (RoutePayload)
+```
+عرف عند_المسار_المجهول: مغلفة (حـمولة_مسار)؛
+```
+
+
+
+```
+def onUnknownRoute: closure(RoutePayload);
+```
+
+تحديد دالة عكسية تُستدعى عند الوصول إلى مسار مجهول.
+
+### حـمولة_مسار (RoutePayload)
@@ -80,13 +105,56 @@ class RoutePayload {
def params: Array[String];
}
```
+
صنف يحمل المعلومات الضرورية لحمولة المسار.
-`المسار_الكامل` (`fullPath`) المسار الكامل متضمناً مسار المضيف.
+#### المسار_الكامل (fullPath)
-`المسار` (`route`) المسار النسبي، أي المسار ضمن الموقع بدون مسار المضيف.
+
-`المعطيات` (`params`) المعطيات الموجودة في هذه الحمولة.
+```
+عرف المسار_الكامل: نـص؛
+```
+
+
+
+```
+def fullPath: String;
+```
+
+المسار الكامل متضمناً مسار المضيف.
+
+#### المسار (route)
+
+
+
+```
+عرف المسار: نـص؛
+```
+
+
+
+```
+def route: String;
+```
+
+المسار النسبي، أي المسار ضمن الموقع بدون مسار المضيف.
+
+#### المعطيات (params)
+
+
+
+```
+عرف المعطيات: مـصفوفة[نـص]؛
+```
+
+
+
+```
+def params: Array[String];
+```
+
+المعطيات الموجودة في هذه الحمولة.
### مثال
@@ -189,5 +257,3 @@ class ArticleView {
}
}
```
-
-
diff --git a/Doc/routing.en.md b/Doc/routing.en.md
index 47d3083..4390781 100644
--- a/Doc/routing.en.md
+++ b/Doc/routing.en.md
@@ -9,21 +9,21 @@
This library support routing without reloading the page, using the following members of the `Window`
class:
-`location`: Gets the current route from the browser.
+* `location`: Gets the current route from the browser.
-`pushLocation`: Adds a route to a set of routes which emit the `onLocationChanged` signal.
+* `pushLocation`: Adds a route to a set of routes which emit the `onLocationChanged` signal.
-`onLocationChanged` we can listen to this signal to check for route changes and do what is needed.
+* `onLocationChanged` we can listen to this signal to check for route changes and do what is needed.
The mentioned elements above allow the user to provide navigation without reloading. Additionally,
WebPlatform provides the following helper elements to facilitate the process:
-`Router` allows us to associate callbacks to routes. A callback is triggered when the associated
+* `Router` allows us to associate callbacks to routes. A callback is triggered when the associated
route is reached.
-`RoutingSwitcher` switches between views based on route changes.
+* `RoutingSwitcher` switches between views based on route changes.
-`RoutingStack` stacks and unstacks views based on route changes.
+* `RoutingStack` stacks and unstacks views based on route changes.
To learn more about these two classes, you could refer to the next detailed section about each one.
@@ -40,11 +40,23 @@ class Router {
This class allows you to define a set of routes with a callback for each that is called when
transitioning to that route.
-`route`: Allows you to specify a regular expression for a route and define the desired callback
+#### route
+
+```
+handler this.route(r: String): ref[closure(String)];
+```
+
+Allows you to specify a regular expression for a route and define the desired callback
to be executed when the current route matches the regular expression. The function returns a
reference to the callback, allowing the user to set its value.
-`onUnknownRoute`: Specifies a callback that is called when reaching an unknown route.
+#### onUnknownRoute
+
+```
+def onUnknownRoute: closure(RoutePayload);
+```
+
+Specifies a callback that is called when reaching an unknown route.
### RoutePayload
@@ -58,11 +70,29 @@ class RoutePayload {
A class that holds necessary information for route payload.
-`fullPath` the full path including that host path.
+#### fullPath
+
+```
+def fullPath: String;
+```
+
+the full path including that host path.
+
+#### route
+
+```
+def route: String;
+```
-`route` the relative path, which is the path within the host.
+the relative path, which is the path within the host.
-`params` parameters in this payload.
+#### params
+
+```
+def params: Array[String];
+```
+
+parameters in this payload.
### Example
@@ -116,5 +146,4 @@ class ArticleView {
return SrdRef[ArticleView].construct();
}
}
-```
-
+```
\ No newline at end of file
diff --git a/Doc/saferequest.ar.md b/Doc/saferequest.ar.md
index 51ad346..918b197 100644
--- a/Doc/saferequest.ar.md
+++ b/Doc/saferequest.ar.md
@@ -34,12 +34,62 @@ class SafeRequest {
يستخدم هذا الصنف لإرسال نداء HTTP بشكل آمن في حال أرسل النداء من داخل دالة أو صنف معرض للإزالة
من الذاكرة قبل انتهاء النداء. يحتوي هذا الصنف على وظيفة `أرسل` (`send`) لإرسال النداء وهي مشابهة
في تعريفها ومعطياتها للدالة العمومية `أرسل_نداء` لكنها تضمن أمرين:
+
* يتم إرسال نداء واحد فقط في الوقت الواحد، فإن استدعيت `أرسل` مجددا قبل انتهاء النداء السابق
ستمتنع الدالة عن إرسال نداء جديد وسترجع قيمة 0 بدلًا من ذلك.
* عند إزالة الصنف من الذاكرة يُلغي النداء الحالي إن وجد لضمان عدم الولوج إلى عناصر إزيلت من
من الذاكرة قبل اكتمال النداء.
-ترجع دالة `أرسل` قيمة 1 إن تم الإرسال، بغض النظر عن نتيجة الإرسال نفسه.
-الوظيفة `ألغ` (`cancel`) تُلغي النداء الحالي إن وجد فإن لم يوجد ترجع دون فعل شيء. أما الخصلة
-`قيد_الإرسال` (`inProgress`) فترجع 1 إن وجد وقتها نداءٌ لم يكتمل بعد.
+#### أرسل (send)
+
+
+
+```
+عملية هذا.أرسل(
+ طريقة: مؤشر[مـحرف]، عنوان: مؤشر[مـحرف]، ترويسات: مؤشر[مـحرف]، متن: مؤشر[مـحرف]،
+ الصلاحية_بالميلي_ثانية: صـحيح، منادى: مغلفة(جـيسون)
+): ثـنائي؛
+```
+
+
+
+```
+handler this.send (
+ method: ptr[Char], uri: ptr[Char], headers: ptr[Char], body: ptr[Char], timeoutInMs: Int, cb: closure (Json)
+): Bool;
+```
+
+ترجع قيمة 1 إن تم الإرسال، بغض النظر عن نتيجة الإرسال نفسه.
+
+#### ألغ (cancel)
+
+
+
+```
+عملية هذا.ألغ()؛
+```
+
+
+
+```
+handler this.cancel();
+```
+
+تُلغي النداء الحالي إن وجد، فإن لم يوجد ترجع دون فعل شيء.
+
+#### قيد_الإرسال (inProgress)
+
+
+
+```
+عملية هذا.قيد_الإرسال: ثـنائي؛
+```
+
+
+
+```
+handler this.inProgress: Bool;
+```
+
+ترجع 1 إن وجد وقتها نداءٌ لم يكتمل بعد.
diff --git a/Doc/saferequest.en.md b/Doc/saferequest.en.md
index 01d5e10..e700a47 100644
--- a/Doc/saferequest.en.md
+++ b/Doc/saferequest.en.md
@@ -25,8 +25,28 @@ requests, which is similar in definition and parameters to the global `sendReque
* If the class is removed from memory, the current request, if any, is canceled to ensure that no access is made to
elements that have been removed from memory before the request is completed.
-The `send` function returns a value of `true` if the request is sent, regardless of the outcome of the request itself.
+#### send
-The `cancel` function cancels the current request, if any. If no request exists, it returns without performing any
-action. The `inProgress` property returns `true` if there is an ongoing request at the time.
+```
+handler this.send (
+ method: ptr[Char], uri: ptr[Char], headers: ptr[Char], body: ptr[Char], timeoutInMs: Int, cb: closure (Json)
+): Bool;
+```
+
+Returns a value of `true` if the request is sent, regardless of the outcome of the request itself.
+
+#### cancel
+
+```
+handler this.cancel();
+```
+
+Cancels the current request, if any. If no request exists, it returns without performing any action.
+
+#### inProgress
+
+```
+handler this.inProgress: Bool;
+```
+Returns `true` if there is an ongoing request at the time.
diff --git a/Doc/safetimeout.ar.md b/Doc/safetimeout.ar.md
index 50a4ddf..fea1a28 100644
--- a/Doc/safetimeout.ar.md
+++ b/Doc/safetimeout.ar.md
@@ -10,7 +10,7 @@
```
صنف مـؤقت_آمن {
- عملية هذا.ابدأ(مدة: طـبيعي، م: مغلف(جـيسون))؛
+ عملية هذا.ابدأ(مدة: طـبيعي، م: مغلفة (جـيسون))؛
عملية هذا.ألغ()؛
}
```
@@ -26,7 +26,36 @@ class SafeTimeout {
يستخدم هذا الصنف لإنشاء مؤقت آمن يُضمن إلغاؤه تلقائيًا في حال إزالة هذا المؤقت من الذاكرة قبل
انطلاق المؤقت، كما في حالة تعريف المؤقت ضمن صفحة واجهة مستخدم معرضة للإزالة من الذاكرة، مثلا
-عند انتقال المستخدم إلى صفحة أخرى. الوظيفة `ابدأ` (`set`) مشابهة للدالة العمومية
-`ابدأ_المؤقت` (`setTimeout`) مع فارق وحيد وهو أن المؤقت يُلغى تلقائيًا عند إزالة هذا الصنف
-من الذاكرة.
+عند انتقال المستخدم إلى صفحة أخرى.
+#### ابدأ (set)
+
+
+
+```
+عملية هذا.ابدأ(مدة: طـبيعي، م: مغلفة (جـيسون))؛
+```
+
+
+
+```
+handler this.set(duration: Word, cb: closure (Json));
+```
+
+مشابهة للدالة العمومية `ابدأ_المؤقت` (`setTimeout`) مع فارق وحيد وهو أن المؤقت يُلغى تلقائيًا
+عند إزالة هذا الصنف من الذاكرة.
+
+#### ألغ (cancel)
+
+
+
+```
+عملية هذا.ألغ()؛
+```
+
+
+
+```
+handler this.cancel();
+```
+تُلغي النداء الحالي إن وجد، فإن لم يوجد ترجع دون فعل شيء.
\ No newline at end of file
diff --git a/Doc/safetimeout.en.md b/Doc/safetimeout.en.md
index bb6f6e3..db385e2 100644
--- a/Doc/safetimeout.en.md
+++ b/Doc/safetimeout.en.md
@@ -15,8 +15,13 @@ class SafeTimeout {
This class is used to create a safe timer that is automatically canceled if it is removed from memory
before it is triggered. This is particularly useful when the timer is defined within a UI page that
-might be removed from memory, such as when the user navigates to another page.
+might be removed from memory, such as when the user navigates to another page.
+
+#### set
+
+```
+handler this.set(duration: Word, cb: closure (Json));
+```
The `set` function is similar to the global `setTimeout` function, with a single difference: the timer
is automatically canceled when this class is removed from memory.
-
diff --git a/Doc/safetimer.ar.md b/Doc/safetimer.ar.md
index 68279f7..460aa79 100644
--- a/Doc/safetimer.ar.md
+++ b/Doc/safetimer.ar.md
@@ -7,10 +7,9 @@
### مـؤقت_متكرر_آمن (SafeTimer)
-
```
صنف مـؤقت_متكرر_آمن {
- عملية هذا.ابدأ(مدة: طـبيعي، م: مغلف(جـيسون))؛
+ عملية هذا.ابدأ(مدة: طـبيعي، م: مغلفة (جـيسون))؛
عملية هذا.أوقف()؛
}
```
@@ -26,6 +25,36 @@ class SafeTimer {
يستخدم هذا الصنف لإنشاء مؤقت متكرر آمن يُضمن توقفه تلقائيًا في حال إزالة هذا المؤقت من الذاكرة، كما
في حالة تعريف المؤقت ضمن صفحة واجهة مستخدم معرضة للإزالة من الذاكرة، مثلا عند انتقال المستخدم
-إلى صفحة أخرى. الوظيفة `ابدأ` (`start`) مشابهة للدالة العمومية `ابدأ_المؤقت_المتكرر` (`startTimer`)
-مع فارق وحيد وهو أن المؤقت يتوقف تلقائيًا عند إزالة هذا الصنف من الذاكرة.
+إلى صفحة أخرى.
+
+#### ابدأ (start)
+
+
+
+```
+عملية هذا.ابدأ(مدة: طـبيعي، م: مغلفة (جـيسون))؛
+```
+
+
+
+```
+handler this.start(duration: Word, cb: closure (Json));
+```
+مشابهة للدالة العمومية `ابدأ_المؤقت_المتكرر` (`startTimer`) مع فارق وحيد وهو أن المؤقت يتوقف
+تلقائيًا عند إزالة هذا الصنف من الذاكرة.
+
+#### ألغ (cancel)
+
+
+
+```
+عملية هذا.ألغ()؛
+```
+
+
+
+```
+handler this.cancel();
+```
+تُلغي النداء الحالي إن وجد، فإن لم يوجد ترجع دون فعل شيء.
\ No newline at end of file
diff --git a/Doc/safetimer.en.md b/Doc/safetimer.en.md
index 1dd740c..ffa1767 100644
--- a/Doc/safetimer.en.md
+++ b/Doc/safetimer.en.md
@@ -17,6 +17,11 @@ This class is used to create a safe recurring timer that is automatically stoppe
from memory. This is especially useful when the timer is defined within a UI page that might be
removed from memory, such as when the user navigates to another page.
+#### start
+
+```
+handler this.start(duration: Word, cb: closure (Json));
+```
+
The `start` function is similar to the global `startTimer` function, with a single difference: the
timer is automatically stopped when this class is removed from memory.
-
diff --git a/Doc/signals.ar.md b/Doc/signals.ar.md
index c9e908b..b6f7140 100644
--- a/Doc/signals.ar.md
+++ b/Doc/signals.ar.md
@@ -14,12 +14,12 @@
```
صنف إشـارة [صنف_المالك: صنف، صنف_الحمولة: صنف] {
- عرف هذا.اربط(خانة: مغلف(سند[صنف_المالك]، حمولة: سند[صنف_الحمولة]))؛
- عرف هذا.افصل(خانة: مغلف(سند[صنف_المالك]، حمولة: سند[صنف_الحمولة]))؛
- عرف هذا.افصل(معرف: صـحيح)؛
+ عرف هذا.اربط(خانة: مغلفة (سند[صنف_المالك]، حمولة: سند[صنف_الحمولة]))؛
+ عرف هذا.افصل(خانة: مغلفة (سند[صنف_المالك]، حمولة: سند[صنف_الحمولة]))؛
+ عرف هذا.افصل(معرف: صـحيح_متكيف)؛
عرف هذا.هات_عدد_الروابط(): صـحيح؛
عرف هذا.أرسل(المالك: سند[صنف_المالك]، الحمولة: سند[صنف_الحمولة])؛
- عرف هذا.عند_تغير_الارتباطات: مغلفة (عدد_الارتباطات: صـحيح)؛
+ عرف عند_تغير_الارتباطات: مغلفة (عدد_الارتباطات: صـحيح)؛
}
```
@@ -30,7 +30,7 @@ class Signal [ownerType: type, payloadType: type] {
handler this.connect(slot: closure (ref[ownerType], payload: ref[payloadType]));
handler this.disconnect(slot: closure (ref[ownerType], payload: ref[payloadType]));
handler this.disconnect(id: ArchInt);
- handler this.getConnectionCount(): Int;
+ handler this.getConnectionCount (): Int;
handler this.emit(owner: ref[ownerType], payload: ref[payloadType]);
def onConnectionsChanged: closure (connectionCount: Int);
}
@@ -62,27 +62,95 @@ class Signal [ownerType: type, payloadType: type] {
closure (ref[Widget], ref[String]) { ... }
```
-#### الدالات
+#### اربط (connect)
-`اربط` (`connect`) طريقة لربط مغلف مع الإشارة، بحيث عندما يتم إرسال الإشارة يتم استدعاءه و تمرير الحمولة إليه.
+
+
+```
+عرف هذا.اربط(خانة: مغلفة (سند[صنف_المالك]، حمولة: سند[صنف_الحمولة]))؛
+```
+
+
+
+```
+handler this.connect(slot: closure (ref[ownerType], payload: ref[payloadType]));
+```
+
+طريقة لربط مغلف مع الإشارة، بحيث عندما يتم إرسال الإشارة يتم استدعاءه و تمرير الحمولة إليه.
+
+#### افصل (disconnect)
+
+
+
+```
+عرف هذا.افصل(خانة: مغلفة (سند[صنف_المالك]، حمولة: سند[صنف_الحمولة]))؛
+عرف هذا.افصل(معرف: صـحيح_متكيف)؛
+```
-`افصل` (`disconnect`) طريقة لفصل مغلفة تم ربطها بواسطة التابع السابق عن الإشارة.
+
+
+```
+handler this.disconnect(slot: closure (ref[ownerType], payload: ref[payloadType]));
+handler this.disconnect(id: ArchInt);
+```
+
+طريقة لفصل مغلفة تم ربطها بواسطة التابع السابق عن الإشارة.
+
+#### هات_عدد_الروابط (getConnectionCount)
+
+
-`هات_عدد_الروابط` (`getConnectionCount`) طريقة تعيد عدد الروابط للإشارة.
+```
+عرف هذا.هات_عدد_الروابط(): صـحيح؛
+```
+
+
-`أرسل` (`emit`) لإرسال إشارة عبر جميع الارتباطات الحالية لهذه الإشارة.
+```
+handler this.getConnectionCount (): Int;
+```
-`عند_تغير_الارتباطات` (`onConnectionsChanged`) دالة مغلفة تُستدعى عند تغير الارتباطات الحالية سواء بفصل أحد الارتباطات
-أو بإنشاء ارتباط جديد.
+طريقة تعيد عدد الروابط للإشارة.
+#### أرسل (emit)
+
+
+
+```
+عرف هذا.أرسل(المالك: سند[صنف_المالك]، الحمولة: سند[صنف_الحمولة])؛
+```
+
+
+
+```
+handler this.emit(owner: ref[ownerType], payload: ref[payloadType]);
+```
+
+لإرسال إشارة عبر جميع الارتباطات الحالية لهذه الإشارة.
+
+#### عند_تغير_الارتباطات (onConnectionsChanged)
+
+
+
+```
+عرف عند_تغير_الارتباطات: مغلفة (عدد_الارتباطات: صـحيح)؛
+```
+
+
+
+```
+def onConnectionsChanged: closure (connectionCount: Int);
+```
+
+دالة مغلفة تُستدعى عند تغير الارتباطات الحالية سواء بفصل أحد الارتباطات أو بإنشاء ارتباط جديد.
### إشـارة_حدث_دوم (DomEventSignal)
```
-صنف إشـارة_حدث_دوم {
- عرف المبدئي_مكبوح: ثـنائي = خطأ؛
+صنف إشـارة_حدث_دوم [صنف_المالك: صنف، صنف_الحمولة: صنف] {
+ عرف المبدئي_مكبوح: ثـنائي = 0؛
}
```
@@ -96,5 +164,18 @@ class DomEventSignal [ownerType: type, payloadType: type] {
هذا الصنف مشتق من الصنف `إشـارة` (`Signal`) ويستخدم للإشارات القادمة من عناصر المتصفح.
-`المبدئي_مكبوح` (`defaultPrevented`) تحديد فيما إذا كان يجب تنفيذ الفعل الافتراضي أم لا.
+#### المبدئي_مكبوح (defaultPrevented)
+
+
+
+```
+عرف المبدئي_مكبوح: ثـنائي = 0؛
+```
+
+
+
+```
+def defaultPrevented: Bool = false;
+```
+تحديد فيما إذا كان يجب تنفيذ الفعل الافتراضي أم لا.
diff --git a/Doc/signals.en.md b/Doc/signals.en.md
index c6660b9..81bb18c 100644
--- a/Doc/signals.en.md
+++ b/Doc/signals.en.md
@@ -40,21 +40,47 @@ follows:
closure (ref[Widget], ref[String]) { ... }
```
+#### connect
-#### Methods
+```
+handler this.connect(slot: closure (ref[ownerType], payload: ref[payloadType]));
+```
+
+a method to connect a closure to the signal, so that when the signal is emitted the closure is called and the payload is passed to it.
-`connect` a method to connect a closure to the signal, so that when the signal emitted the closure
-called and payload passed to it.
+#### disconnect
-`disconnect` a method used to disconnect a closure connected by the previous method from the signal.
+```
+handler this.disconnect(slot: closure (ref[ownerType], payload: ref[payloadType]));
+handler this.disconnect(id: ArchInt);
+```
-`getConnectionCount` a method that retrieve the number of connections with the signal.
+a method used to disconnect a closure connected by the previous method from the signal.
-`emit` emits the signal through all current connections.
+#### getConnectionCount
-`onConnectionsChanged` a closure to be called when connections change, whether by adding a new connection or removing
-an existing one.
+```
+handler this.getConnectionCount (): Int;
+```
+
+a method that retrieves the number of connections with the signal.
+
+#### emit
+
+```
+handler this.emit(owner: ref[ownerType], payload: ref[payloadType]);
+```
+
+emits the signal through all current connections.
+#### onConnectionsChanged
+
+```
+def onConnectionsChanged: closure (connectionCount: Int);
+```
+
+a closure to be called when connections change, whether by adding a new connection or removing
+an existing one.
### DomEventSignal
@@ -66,5 +92,10 @@ class DomEventSignal [ownerType: type, payloadType: type] {
This class is derived from `Signal` and is used for DOM events.
-`defaultPrevented` Specifies if the default action should be executed or skipped.
+#### defaultPrevented
+
+```
+def defaultPrevented: Bool = false;
+```
+Specifies if the default action should be executed or skipped.
diff --git a/Doc/storage.ar.md b/Doc/storage.ar.md
index 4118605..97ef9a6 100644
--- a/Doc/storage.ar.md
+++ b/Doc/storage.ar.md
@@ -6,6 +6,32 @@
## مـخزن (Storage)
+
+
+```
+صنف مـخزن {
+ عملية هذا.هات_الطول(): صـحيح؛
+ عملية هذا.هات_مفتاحا(فهرس: صـحيح): نـص؛
+ عملية هذا.هات_عنصرا(مفتاح: مـؤشر_محارف): نـص؛
+ عملية هذا.حدد_عنصرا(مفتاح: مـؤشر_محارف، قيمة: مـؤشر_محارف)؛
+ عملية هذا.أزل_عنصرا(مفتاح: مـؤشر_محارف)؛
+ عملية هذا.فرغ()؛
+}
+```
+
+
+
+```
+class Storage {
+ handler this.getLength(): Int;
+ handler this.getKey(index: Int): String;
+ handler this.getItem(key: CharsPtr): String;
+ handler this.setItem(key: CharsPtr, value: CharsPtr);
+ handler this.removeItem(key: CharsPtr);
+ handler this.clear();
+}
+```
+
صنف لتمكين تخزين البيانات في محليا بشكل دائمي أو في الجلسة الحالية.
#### هات_الطول (getLength)
@@ -13,7 +39,7 @@
```
-عرف هات_الطول(): صـحيح؛
+عملية هذا.هات_الطول(): صـحيح؛
```
@@ -29,7 +55,7 @@ handler this.getLength(): Int;
```
-عرف هات_مفتاحا(فهرس: صـحيح): نـص؛
+عملية هذا.هات_مفتاحا(فهرس: صـحيح): نـص؛
```
@@ -45,7 +71,7 @@ handler this.getKey(index: Int): String;
```
-عرف هات_عنصرا(مفتاح: مؤشر[مـحرف]): نـص؛
+عملية هذا.هات_عنصرا(مفتاح: مـؤشر_محارف): نـص؛
```
@@ -61,7 +87,7 @@ handler this.getItem(key: CharsPtr): String;
```
-عرف حدد_عنصرا(مفتاح: مؤشر[مـحرف]، قيمة: مؤشر[مـحرف])؛
+عملية هذا.حدد_عنصرا(مفتاح: مـؤشر_محارف، قيمة: مـؤشر_محارف)؛
```
@@ -77,7 +103,7 @@ handler this.setItem(key: CharsPtr, value: CharsPtr);
```
-عرف أزل_عنصرا(مفتاح: مؤشر[مـحرف])؛
+عملية هذا.أزل_عنصرا(مفتاح: مـؤشر_محارف)؛
```
@@ -93,7 +119,7 @@ handler this.removeItem(key: CharsPtr);
```
-عرف فرغ()؛
+عملية هذا.فرغ()؛
```
@@ -102,5 +128,4 @@ handler this.removeItem(key: CharsPtr);
handler this.clear();
```
-دالة لإفراغ المخزن بشكل كامل.
-
+دالة لإفراغ المخزن بشكل كامل.
\ No newline at end of file
diff --git a/Doc/storage.en.md b/Doc/storage.en.md
index 17d3c85..71b81f7 100644
--- a/Doc/storage.en.md
+++ b/Doc/storage.en.md
@@ -6,6 +6,17 @@
## Storage
+```
+class Storage {
+ handler this.getLength(): Int;
+ handler this.getKey(index: Int): String;
+ handler this.getItem(key: CharsPtr): String;
+ handler this.setItem(key: CharsPtr, value: CharsPtr);
+ handler this.removeItem(key: CharsPtr);
+ handler this.clear();
+}
+```
+
A class used to store information to the session or to local storage in the browser.
#### getLength
@@ -47,7 +58,7 @@ handler this.removeItem(key: CharsPtr);
```
Removes the item stored under the given key.
-ل.
+
#### clear
```
@@ -55,4 +66,3 @@ handler this.clear();
```
Removes all items from the storage.
-
diff --git a/Doc/styling.ar.md b/Doc/styling.ar.md
index 27f79bf..eb3864f 100644
--- a/Doc/styling.ar.md
+++ b/Doc/styling.ar.md
@@ -225,7 +225,6 @@ handler [styleProp: ast] this.remove();
تزيل طرازا محددا لتعيده إلى وضعه المبدئي.
-
### طـقم_طرز (StyleSet)
يمكن هذا الصنف المستخدم من تحديد عدة طرز للضبيطة في حالات مختلفة، كما يسمح بتحديد طرز فروع تلك الضبيطة
@@ -509,10 +508,9 @@ Box({}).{
}
```
-هنا نلاحظ أننا حددنا الابن المباشر الذي له الخاصية icon في أول تطبيق للطرز.
-
-من ثم قمنا بتحديد حالة أن يكون المؤشر فوق العنصر عن طريق تمرير StateSelector.HOVER أيضاً.
+هنا نلاحظ أننا حددنا الابن المباشر الذي له الخاصية `icon` في أول تطبيق للطرز.
+من ثم قمنا بتحديد حالة أن يكون المؤشر فوق العنصر عن طريق تمرير `StateSelector.HOVER` أيضاً.
### تـحريك (Animation)
@@ -520,8 +518,8 @@ Box({}).{
```
صنف تـحريك {
- عرف حدد(مدة_كلية: عـائم، أطرزة: مـصفوفة[طـراز])؛
- عرف حدد(مدة_كلية: عـائم، أطرزة: ربـط[عـائم، طـراز])؛
+ عملية هذا.حدد(مدة_كلية: عـائم، أطرزة: مـصفوفة[طـراز])؛
+ عملية هذا.حدد(مدة_كلية: عـائم، أطرزة: تـطبيق[عـائم، طـراز])؛
}
```
@@ -536,12 +534,27 @@ class Animation {
يستعمل هذا الصنف لإنشاء تحريك لعنصر ما.
-`حدد` (`set`) وظيفة للقيام بتحديد التحريك الذي نريده.
+#### حدد (set)
+
+
+
+```
+عملية هذا.حدد(مدة_كلية: عـائم، أطرزة: مـصفوفة[طـراز])؛
+عملية هذا.حدد(مدة_كلية: عـائم، أطرزة: تـطبيق[عـائم، طـراز])؛
+```
+
+
+
+```
+handler this.set(totalDuration: Float, styles: Array[Style]);
+handler this.set(totalDuration: Float, styles: Map[Float, Style]);
+```
+
+وظيفة للقيام بتحديد التحريك الذي نريده.
هنالك نسختان من هذه الطريقة، واحدة تقبل الأنماط على شكل مصفوفة و الأخرى على شكل تـطبيق تمثل مفاتيحه
الوقت الذي يُطبق فيه الطراز المعرف في القيمة المقابلة لذلك المفتاح.
-
### أبـعاد (Dimensions)
@@ -561,12 +574,40 @@ class Dimensions {
def height: Int;
}
```
+
صنف يحمل معلومات الأبعاد.
-`عرض` (`width`) العرض.
+#### عرض (width)
-`طول` (`height`) الطول.
+
+
+```
+عرف عرض: صـحيح؛
+```
+
+
+
+```
+def width: Int;
+```
+العرض.
+
+#### طول (height)
+
+
+
+```
+عرف طول: صـحيح؛
+```
+
+
+
+```
+def height: Int;
+```
+
+الطول.
### مـستطيل (Rectangle)
@@ -591,8 +632,8 @@ class Rectangle {
def height: Int;
}
```
-صنف يحمل معلومات مستطيل.
+صنف يحمل معلومات مستطيل.
### لـون (Color)
@@ -618,16 +659,72 @@ class Color {
def alpha: Int = 0;
}
```
+
صنف يحمل معلومات اللون.
-`أحمر` (`red`) نسبة اللون الأحمر في اللون.
+#### أحمر (red)
+
+
+
+```
+عرف أحمر: صـحيح = 0؛
+```
+
+
+
+```
+def red: Int;
+```
+
+نسبة اللون الأحمر في اللون.
+
+#### أخضر (green)
+
+
+
+```
+عرف أخضر: صـحيح = 0؛
+```
+
+
+
+```
+def green: Int;
+```
-`أخضر` (`green`) نسبة اللون الأخضر في اللون.
+نسبة اللون الأخضر في اللون.
-`أزرق` (`blue`) نسبة اللون الأزرق في اللون.
+#### أزرق (blue)
-`شفافية` (`alpha`) شفافية اللون.
+
+```
+عرف أزرق: صـحيح = 0؛
+```
+
+
+
+```
+def blue: Int;
+```
+
+نسبة اللون الأزرق في اللون.
+
+#### شفافية (alpha)
+
+
+
+```
+عرف شفافية: صـحيح = 0؛
+```
+
+
+
+```
+def alpha: Int;
+```
+
+شفافية اللون.
### مـسافة (Length)
@@ -635,27 +732,27 @@ class Color {
يقوم هذا الصنف بتعريف العديد من وحدات القياس والتي هي كما يلي:
-`بكسلات` (`px`) عدد البكسلات.
+* `بكسلات` (`px`) عدد البكسلات.
-`نقاط` (`pt`) عدد النقاط.
+* `نقاط` (`pt`) عدد النقاط.
-`مم` (`mm`) عدد الميليمترات
+* `مم` (`mm`) عدد الميليمترات
-`عن` (`vw`) مسافة نسبية بالنسبة لـ 1 بالمئة من عرض نافذة المتصفح.
+* `عن` (`vw`) مسافة نسبية بالنسبة لـ 1 بالمئة من عرض نافذة المتصفح.
-`طن` (`vh`) مسافة نسبية بالنسبة لـ 1 بالمئة من ارتفاع نافذة المتصفح.
+* `طن` (`vh`) مسافة نسبية بالنسبة لـ 1 بالمئة من ارتفاع نافذة المتصفح.
-`بنص` (`vmin`) مسافة نسبية بالنسبة لـ 1 بالمئة من أصغر جانب لنافذة المتصفح.
+* `بنص` (`vmin`) مسافة نسبية بالنسبة لـ 1 بالمئة من أصغر جانب لنافذة المتصفح.
-`بنك` (`vmax`) مسافة نسبية بالنسبة لـ 1 بالمئة من أكبر جانب لنافذة المتصفح.
+* `بنك` (`vmax`) مسافة نسبية بالنسبة لـ 1 بالمئة من أكبر جانب لنافذة المتصفح.
-`حخ` (`em`) مسافة نسبية بالنسبة لحجم الخط للعنصر.
+* `حخ` (`em`) مسافة نسبية بالنسبة لحجم الخط للعنصر.
-`مئوي` (`percent`) نسبة مئوية بالنسبة للعنصر الذي يحتوي العنصر.
+* `مئوي` (`percent`) نسبة مئوية بالنسبة للعنصر الذي يحتوي العنصر.
-`تلقائي` (`auto`) قيمة "auto" من CSS.
+* `تلقائي` (`auto`) قيمة "auto" من CSS.
-`موروث` (`inherit`) قيمة "inherit" من CSS.
+* `موروث` (`inherit`) قيمة "inherit" من CSS.
كل من وحدات القياس هذه دالة تستخدم لإنشاء كائن جديد من صنف `مـسافة` وإعطائه قيمة المسافة الممررة كمعطى للدالة.
القيمة المُرجعة من هذه الدالات من صنف `سـندنا[مـسافة]` (`SrdRef[Length]`).
@@ -675,35 +772,48 @@ Length.pt(50); // Creates an object with value of 50 points.
يحوي الصنف أيضًا على الوظيفة التالية:
-`حول_لنص` (`toString`) طريقة لتحويل معلومات الصتف إلى ترميز نصي.
+#### حول_لنص (toString)
+
+
+```
+عملية هذا.حول_لنص(): نـص؛
+```
+
+
+
+```
+handler this.toString(): String;
+```
+
+طريقة لتحويل معلومات الصتف إلى ترميز نصي.
### مـسافة4 (Length4)
مشابه لـ`مـسافة` (`Length`) ولكن يعرف 4 قيم، قيمة لكل من الاتجاهات الأربعة.
يُعرف هذا الصنف وحدات القياس التالية:
-`بكسلات` (`px`) عدد البكسلات.
+* `بكسلات` (`px`) عدد البكسلات.
-`نقاط` (`pt`) عدد النقاط.
+* `نقاط` (`pt`) عدد النقاط.
-`مم` (`mm`) عدد الميليمترات
+* `مم` (`mm`) عدد الميليمترات
-`عن` (`vw`) مسافة نسبية بالنسبة لـ 1 بالمئة من عرض نافذة المتصفح.
+* `عن` (`vw`) مسافة نسبية بالنسبة لـ 1 بالمئة من عرض نافذة المتصفح.
-`طن` (`vh`) مسافة نسبية بالنسبة لـ 1 بالمئة من ارتفاع نافذة المتصفح.
+* `طن` (`vh`) مسافة نسبية بالنسبة لـ 1 بالمئة من ارتفاع نافذة المتصفح.
-`بنص` (`vmin`) مسافة نسبية بالنسبة لـ 1 بالمئة من أصغر جانب لنافذة المتصفح.
+* `بنص` (`vmin`) مسافة نسبية بالنسبة لـ 1 بالمئة من أصغر جانب لنافذة المتصفح.
-`بنك` (`vmax`) مسافة نسبية بالنسبة لـ 1 بالمئة من أكبر جانب لنافذة المتصفح.
+* `بنك` (`vmax`) مسافة نسبية بالنسبة لـ 1 بالمئة من أكبر جانب لنافذة المتصفح.
-`حخ` (`em`) مسافة نسبية بالنسبة لحجم الخط للعنصر.
+* `حخ` (`em`) مسافة نسبية بالنسبة لحجم الخط للعنصر.
-`مئوي` (`percent`) نسبة مئوية بالنسبة للعنصر الذي يحتوي العنصر.
+* `مئوي` (`percent`) نسبة مئوية بالنسبة للعنصر الذي يحتوي العنصر.
-`تلقائي` ('auto`) قيمة `auto` من CSS.
+* `تلقائي` (`auto`) قيمة `auto` من CSS.
-`موروث` (`inherit`) قيمة "inherit" من CSS.
+* `موروث` (`inherit`) قيمة "inherit" من CSS.
كل من وحدات القياس هذه دالة تستخدم لإنشاء كائن جديد من صنف `مـسافة4` وإعطائه قيم المسافة الممررة
كمعطيات للدالة. القيمة المُرجعة من هذه الدالات من صنف `سـندنا[مـسافة4]` (`SrdRef[Length4]`).
@@ -747,7 +857,6 @@ Length4.pt(10, 20, 30, 40); // Creates an object with value top = 50 points, rig
SrdRef[Length4]().{ alloc()~init(Length.pt(50), Length.px(30)) }
```
-
### انـتقال (Transition)
@@ -757,7 +866,7 @@ SrdRef[Length4]().{ alloc()~init(Length.pt(50), Length.px(30)) }
عرف المدة: عـائم = 0؛
عرف الدالة: نـص؛
عرف التأخير: عـائم = 0؛
- عرف حول_لنص(): نـص؛
+ عملية هذا.حول_لنص(): نـص؛
}
```
@@ -771,16 +880,72 @@ class Transition {
handler this.toString(): String;
}
```
+
صنف يحمل معلومات الانتقال.
-`المدة` (`duration`) مدة الانتقال.
+#### المدة (duration)
+
+
+
+```
+عرف المدة: عـائم = 0؛
+```
+
+
+
+```
+def duration: Float = 0;
+```
+
+مدة الانتقال.
+
+#### الدالة (fn)
+
+
+
+```
+عرف الدالة: نـص؛
+```
+
+
+
+```
+def fn: String;
+```
-`الدالة` (`fn`) اسم دالة الانتقال المطبقة.
+اسم دالة الانتقال المطبقة.
-`التأخير` (`delay`) التأخير في تنفيذ الانتقال.
+#### التأخير (delay)
+
+
-`حول_لنص` (`toString`) طريقة لتحويل معلومات الصنف إلى ترميز نصي.
+```
+عرف التأخير: عـائم = 0؛
+```
+
+
+```
+def delay: Float = 0;
+```
+
+التأخير في تنفيذ الانتقال.
+
+#### حول_لنص (toString)
+
+
+
+```
+عملية هذا.حول_لنص(): نـص؛
+```
+
+
+
+```
+handler this.toString(): String;
+```
+
+طريقة لتحويل معلومات الصنف إلى ترميز نصي.
### تـحول (Transform)
@@ -788,20 +953,20 @@ class Transition {
```
وحدة تـحول {
- عرف ماتركس(أ: عـائم، ب: عـائم، ج: عـائم، د: عـائم، انتقال_س: عـائم، انتقال_ع: عـائم): نـص؛
- عرف ماتركس(
+ دالة ماتركس(أ: عـائم، ب: عـائم، ج: عـائم، د: عـائم، انتقال_س: عـائم، انتقال_ع: عـائم): نـص؛
+ دالة ماتركس(
أ1: عـائم، ب1: عـائم، ج1: عـائم، د1: عـائم،
أ2: عـائم، ب2: عـائم، ج2: عـائم، د2: عـائم،
أ3: عـائم، ب3: عـائم، ج3: عـائم، د3: عـائم،
أ4: عـائم، ب4: عـائم، ج4: عـائم، د4: عـائم
): نـص؛
- عرف دور(درجة: عـائم): نـص؛
- عرف دور(س: عـائم، ع: عـائم، ج: عـائم، درجة: عـائم): نـص؛
- عرف حجم(س: عـائم): نـص؛
- عرف حجم(س: عـائم، ع: عـائم): نـص؛
- عرف حجم(س: عـائم، ع: عـائم، ج: عـائم): نـص؛
- عرف أزح(س: سند[مـسافة]، ع: سند[مـسافة]): نـص؛
- عرف أزح(س: سند[مـسافة]، ع: سند[مـسافة]، ج: سند[مـسافة]): نـص؛
+ دالة دور(درجة: عـائم): نـص؛
+ دالة دور(س: عـائم، ع: عـائم، ج: عـائم، درجة: عـائم): نـص؛
+ دالة حجم(س: عـائم): نـص؛
+ دالة حجم(س: عـائم، ع: عـائم): نـص؛
+ دالة حجم(س: عـائم، ع: عـائم، ج: عـائم): نـص؛
+ دالة أزح(س: سند[مـسافة]، ع: سند[مـسافة]): نـص؛
+ دالة أزح(س: سند[مـسافة]، ع: سند[مـسافة]، ج: سند[مـسافة]): نـص؛
}
```
@@ -825,23 +990,95 @@ module Transform {
func translate(x: ref[Length], y: ref[Length], z: ref[Length]): String;
}
```
+
صنف يحمل معلومات التحول.
-`ماتركس` (`matrix`) طريقة لتعريف مصفوفة التحول.
+#### ماتركس (matrix)
+
+
+
+```
+دالة ماتركس(أ: عـائم، ب: عـائم، ج: عـائم، د: عـائم، انتقال_س: عـائم، انتقال_ع: عـائم): نـص؛
+دالة ماتركس(
+ أ1: عـائم، ب1: عـائم، ج1: عـائم، د1: عـائم،
+ أ2: عـائم، ب2: عـائم، ج2: عـائم، د2: عـائم،
+ أ3: عـائم، ب3: عـائم، ج3: عـائم، د3: عـائم،
+ أ4: عـائم، ب4: عـائم، ج4: عـائم، د4: عـائم
+): نـص؛
+```
+
+
+
+```
+func matrix(a: Float, b: Float, c: Float, d: Float, tx: Float, ty: Float): String;
+func matrix(
+ a1: Float, b1: Float, c1: Float, d1: Float,
+ a2: Float, b2: Float, c2: Float, d2: Float,
+ a3: Float, b3: Float, c3: Float, d3: Float,
+ a4: Float, b4: Float, c4: Float, d4: Float
+): String;
+```
+
+طريقة لتعريف مصفوفة التحول. هنالك نسختان من هذه الطريقة، الأولى تعرف مصفوفة تحول ثنائية الأبعاد
+بينما الثانية تعرفها ثلاثية الأبعاد.
+
+#### دور (rotate)
+
+
+
+```
+دالة دور(درجة: عـائم): نـص؛
+دالة دور(س: عـائم، ع: عـائم، ج: عـائم، درجة: عـائم): نـص؛
+```
+
+
+
+```
+func rotate(deg: Float): String;
+func rotate(x: Float, y: Float, z: Float, deg: Float): String;
+```
+
+طريقة لتطبيق تحول دوران على عنصر. هذه الطريقة لها نسختان، الأولى لتطبيق الدوران في فضاء ثنائي
+البعد، بينما الثانية لتطبيقه في فضاء ثلاثي الأبعاد. في الطريقة الأولى نحتاج فقط الزاوية، بينما
+في الطريقة الثانية نحدد أيضاً شعاع المحور الذي نريد التدوير حوله عبر تحديد مساقطه على المحاور الثلاث.
+
+#### حجم (scale)
+
+
+
+```
+دالة حجم(س: عـائم): نـص؛
+دالة حجم(س: عـائم، ع: عـائم): نـص؛
+دالة حجم(س: عـائم، ع: عـائم، ج: عـائم): نـص؛
+```
+
+
+
+```
+func scale(x: Float): String;
+func scale(x: Float, y: Float): String;
+func scale(x: Float, y: Float, z: Float): String;
+```
-هنالك نسختان من هذه الطريقة، الأولى تعرف مصفوفة تحول ثنائية الأبعاد بينما الثانية تعرفها ثلاثية الأبعاد.
+طريقة لتحجيم الشكل و لها نسختان ثنائية بعد و ثلاثية بعد.
-`دور` (`rotate`) طريقة لتطبيق تحول دوران على عنصر.
+#### أزح (translate)
-هذه الطريقة لها نسختان، الأولى لتطبيق الدوران في فضاء ثنائي البعد، بينما الثانية لتطبيقه في فضاء ثلاثي الأبعاد.
+
-في الطريقة الأولى نحتاج فقط الزاوية، بينما في الطريقة الثانية نحدد أيضاً شعاع المحور الذي نريد التدوير حوله
-عبر تحديد مساقطه على المحاور الثلاث.
+```
+دالة أزح(س: سند[مـسافة]، ع: سند[مـسافة]): نـص؛
+دالة أزح(س: سند[مـسافة]، ع: سند[مـسافة]، ج: سند[مـسافة]): نـص؛
+```
-`حجم` (`scale`) طريقة لتحجيم الشكل و لها نسختان ثنائية بعد و ثلاثية بعد.
+
-`أزح` (`translate`) طريقة لإزاحة شكل و لها نسختان ثنائية بعد و ثلاثية بعد.
+```
+func translate(x: ref[Length], y: ref[Length]): String;
+func translate(x: ref[Length], y: ref[Length], z: ref[Length]): String;
+```
+طريقة لإزاحة شكل و لها نسختان ثنائية بعد و ثلاثية بعد.
### خـلفية (Background)
@@ -857,6 +1094,7 @@ module Transform {
حجم: سند[حـجم_خلفية]
): سـندنا[خـلفية]؛
عملية هذا_الصنف(زاوية: صـحيح، عدد: صـحيح، معطيات: ...أيما): سـندنا[خـلفية]؛
+ عملية هذا_الصنف(ق: نـص): سـندنا[خـلفية]؛
}
```
@@ -884,14 +1122,13 @@ class Background {
يبدأ عندها هذا اللون من المسافة الكلية.
* الدالة الرابعة تنشئ خلفية مهيأة بقيمة نصية.
-
### مـرونة (Flex)
```
صنف مـرونة {
- عرف حول_لنص(): نـص؛
+ عملية هذا.حول_لنص(): نـص؛
}
```
@@ -904,8 +1141,21 @@ class Flex {
```
صنف يحمل معلومات المرونة.
-`حول_لنص` (`toString`) طريقة لتحويل معلومات المرونة إلى ترميز نصي.
+#### حول_لنص (toString)
+
+
+```
+عملية هذا.حول_لنص(): نـص؛
+```
+
+
+
+```
+handler this.toString(): String;
+```
+
+طريقة لتحويل معلومات المرونة إلى ترميز نصي.
### ظـل_صندوق (BoxShadow)
@@ -930,7 +1180,7 @@ class Flex {
نصف_قطر_الانتشار: سـندنا[مـسافة]،
لون: لـون
)؛
- عرف حول_لنص(): نـص؛
+ عملية هذا.حول_لنص(): نـص؛
}
```
@@ -960,8 +1210,21 @@ class BoxShadow {
```
صنف يحمل معلومات الظل لصندوق.
-`حول_لنص` (`toString`) طريقة لتحويل معلومات الظل إلى ترميز نصي.
+#### حول_لنص (toString)
+
+
+
+```
+عملية هذا.حول_لنص(): نـص؛
+```
+
+
+```
+handler this.toString(): String;
+```
+
+طريقة لتحويل معلومات الظل إلى ترميز نصي.
### ظـل_نص (TextShadow)
@@ -977,7 +1240,7 @@ class BoxShadow {
نصف_قطر_الغباشة: سـندنا[مـسافة]،
لون: لـون
)؛
- عرف حول_لنص(): نـص؛
+ عملية هذا.حول_لنص(): نـص؛
}
```
@@ -998,8 +1261,21 @@ class TextShadow {
```
صنف يحمل معلومات الظل لنص.
-`حول_لنص` (`toString`) طريقة لتحويل معلومات الظل إلى ترميز نصي.
+#### حول_لنص (toString)
+
+
+```
+عملية هذا.حول_لنص(): نـص؛
+```
+
+
+
+```
+handler this.toString(): String;
+```
+
+طريقة لتحويل معلومات الظل إلى ترميز نصي.
### مـوقع (Position)
@@ -1010,7 +1286,6 @@ class TextShadow {
* `_مطلق_` (`ABSOLUTE`)
* `_لزج_` (`STICKY`)
-
### فـيض (Overflow)
صنف يحمل قيم الفيض الممكنة على شكل تعدادات.
@@ -1020,14 +1295,12 @@ class TextShadow {
* `_تمرير_` (`SCROLL`)
* `_تلقائي_` (`AUTO`)
-
### فـيض_كتابة (TextOverflow)
صنف يحمل قيم فيض الكتابة الممكنة على شكل تعدادات.
* `_قطع_` (`CLIP`)
* `_نقط_` (`ELLIPSIS`)
-
### إظـهار (Display)
صنف يحمل قيم الإظهار الممكنة على شكل تعدادات.
@@ -1038,7 +1311,6 @@ class TextShadow {
* `_شبكة_` (`GRID`)
* `_مخفي_` (`NONE`)
-
### نـسق (Layout)
صنف يحمل قيم النسق الممكنة على شكل تعدادات.
@@ -1047,7 +1319,6 @@ class TextShadow {
* `_عمود_` (`COLUMN`)
* `_عمود_معكوس_` (`COLUMN_REVERSE`)
-
### لـف_مرونة (FlexWrap)
صنف يحمل قيم لف المرونة الممكنة على شكل تعدادات.
@@ -1055,7 +1326,6 @@ class TextShadow {
* `_لف_` (`WRAP`)
* `_لف_معكوس_` (`WRAP_REVERSE`)
-
### مـحاذاة (Align)
صنف يحمل قيم المحاذاة الممكنة على شكل تعدادات.
@@ -1064,7 +1334,6 @@ class TextShadow {
* `_نهاية_` (`END`)
* `_تمدد_` (`STRETCH`)
-
### مـلء_سطر (Justify)
صنف يحمل قيم ملء السطر الممكنة على شكل تعدادات.
@@ -1076,7 +1345,6 @@ class TextShadow {
* `_مسافة_محيطية_` (`SPACE_AROUND`)
* `_مسافة_متساوية_` (`SPACE_EVENLY`)
-
### مـؤشر (Cursor)
صنف يحمل قيم المؤشر الممكنة على شكل تعدادات.
@@ -1099,7 +1367,6 @@ class TextShadow {
* `_تكبير_` (`ZOOM_IN`)
* `_تصغير_` (`ZOOM_OUT`)
-
### طـراز_إطار (BorderStyle)
صنف يحمل قيم طراز الإطار الممكنة على شكل تعدادات.
@@ -1112,7 +1379,6 @@ class TextShadow {
* `_بلا_` (`NONE`)
* `_مخفي_` (`HIDDEN`)
-
### تـقطيع_كلمات (WordBreak)
صنف يحمل قيم تقطيع الكلمات الممكنة على شكل تعدادات.
@@ -1121,7 +1387,6 @@ class TextShadow {
* `_احتفظ_بالكل_` (`KEEP_ALL`)
* `_قطع_الكلمات_` (`BREAK_WORD`)
-
### مـحرف_مسافة (WhiteSpace)
صنف يحمل قيم التعامل مع محرف المسافة على شكل تعدادات.
@@ -1130,14 +1395,12 @@ class TextShadow {
* `_حرفي_لف_` (`PRE_WRAP`)
* `_حرفي_سطر_` (`PRE_LINE`)
-
### اتـجاه (Direction)
صنف يحمل قيم الاتجاه الممكنة على شكل تعدادات.
* `_من_اليسار_` (`LTR`)
* `_من_اليمين_` (`RTL`)
-
### زخـرفة_نص (TextDecoration)
صنف يحمل قيم زخرفة النص الممكنة على شكل تعدادات.
@@ -1146,7 +1409,6 @@ class TextShadow {
* `_فوق_` (`OVERLINE`)
* `_خلال_` (`LINE_THROUGH`)
-
### طـراز_زخرفة_نص (TextDecorationStyle)
صنف يحمل قيم طراز زخرفة النص الممكنة على شكل تعدادات.
@@ -1156,7 +1418,6 @@ class TextShadow {
* `_مقطع_` (`DASHED`)
* `_متموج_` (`WAVY`)
-
### مـحاذاة_نص (TextAlign)
صنف يحمل قيم محاذاة النص الممكنة على شكل تعدادات.
@@ -1165,7 +1426,6 @@ class TextShadow {
* `_وسط_` (`CENTER`)
* `_املأ_` (`JUSTIFY`)
-
### سـمك_خط (FontWeight)
@@ -1190,7 +1450,6 @@ def FontWeight: {
* `_عادي_` (`NORMAL`)
* `_سميك_` (`BOLD`)
-
### طـوفان (Floating)
صنف يحمل قيم الطوفان الممكنة على شكل تعدادات.
@@ -1198,7 +1457,6 @@ def FontWeight: {
* `_يسار_` (`LEFT`)
* `_يمين_` (`RIGHT`)
-
### مـوقع_خلفية (BackgroundPosition)
تعداد للتحكم بموقع صورة الخلفية عندما لا تطابق أبعاد الصورة أبعاد العنصر الحاوي لها. القيم الممكنة:
@@ -1208,7 +1466,6 @@ def FontWeight: {
* `_فوق_` (`TOP`)
* `_تحت_` (`BOTTOM`)
-
### حـجم_خلفية (BackgroundSize)
تعداد للتحكم بحجم صورة الخلفية عندما لا تطابق أبعاد الصورة أبعاد العنصر الحاوي لها. القيم الممكنة:
diff --git a/Doc/styling.en.md b/Doc/styling.en.md
index d796090..fe07573 100644
--- a/Doc/styling.en.md
+++ b/Doc/styling.en.md
@@ -84,7 +84,7 @@ style type.
* `flexWrap` Determines whether flex items wrap onto multiple lines.
* `justify` The style used to specify how items are placed in a row.
* `align` The style related to aligning an item inside its container.
-* `textAlign` The style related to aligning a text inside its container.
+* `textAlign` The style related to aligning a text inside its container.
* `textDecoration` The style of text decoration.
* `textDecorationStyle` The style of text decoration shape.
* `direction` Item direction.
@@ -153,7 +153,6 @@ handler [styleProp: ast] this.remove();
Removes (unsets) a previously set style.
-
### StyleSet
This class allows the user to define multiple styles for a widget in different states. It also
@@ -328,7 +327,6 @@ Notice that we determine tha direct child that has the class `icon` in the first
Then we determine the state to be hovering with the cursor by passing `StateSelector.HOVER`.
-
### Animation
```
@@ -340,11 +338,16 @@ class Animation {
This class is used to create animation for a component.
-`set` a method to set the animation we want.
+#### set
-There are two versions for this method, one that accepts the styles as an array, the other as map
-where keys represent the time and the value being the style corresponding to that time.
+```
+handler this.set(totalDuration: Float, styles: Array[Style]);
+handler this.set(totalDuration: Float, styles: Map[Float, Style]);
+```
+a method to set the animation we want. There are two versions for this method, one that accepts
+the styles as an array, the other as map where keys represent the time and the value being the
+style corresponding to that time.
### Dimensions
@@ -357,15 +360,26 @@ class Dimensions {
A class that holds dimensions information.
-`width` the width.
+#### width
+
+```
+def width: Int;
+```
+
+the width.
+
+#### height
-`height` the height.
+```
+def height: Int;
+```
+the height.
### Rectangle
```
-class Rectnagle {
+class Rectangle {
def x: Int;
def y: Int;
def width: Int;
@@ -375,7 +389,6 @@ class Rectnagle {
A class that holds a rectangle information.
-
### Color
```
@@ -389,14 +402,37 @@ class Color {
A class that holds color information.
-`red` red channel value.
+#### red
+
+```
+def red: Int;
+```
+
+red channel value.
+
+#### green
+
+```
+def green: Int;
+```
+
+green channel value.
+
+#### blue
+
+```
+def blue: Int;
+```
-`green` green channel value.
+blue channel value.
-`blue` blue channel value.
+#### alpha
-`alpha` the transparency of the color.
+```
+def alpha: Int;
+```
+the transparency of the color.
### Length
@@ -404,27 +440,27 @@ A class that holds distance information.
This class defines the following measuring units:
-`px` number of pixels.
+* `px` number of pixels.
-`pt` number of points.
+* `pt` number of points.
-`mm` distance in millimeters.
+* `mm` distance in millimeters.
-`vw` a relative distance, proportional to 1% of the browser window width.
+* `vw` a relative distance, proportional to 1% of the browser window width.
-`vh` a relative distance, proportional to 1% of the browser window height.
+* `vh` a relative distance, proportional to 1% of the browser window height.
-`vmin` a relative distance, proportional to 1% of the browser window minimum side length.
+* `vmin` a relative distance, proportional to 1% of the browser window minimum side length.
-`vmax` a relative distance, proportional to 1% of the browser window maximum side length.
+* `vmax` a relative distance, proportional to 1% of the browser window maximum side length.
-`em` a relative distance, proportional to text font size.
+* `em` a relative distance, proportional to text font size.
-`percent` a percentage of the container component.
+* `percent` a percentage of the container component.
-`auto` the auto value from CSS.
+* `auto` the auto value from CSS.
-`inherit` the inherit value from CSS.
+* `inherit` the inherit value from CSS.
Each of these units is a function that creates an instance of type `Length` and gives it the
value that was passed as an arg to the function. The return value is of type `SrdRef[Length]`.
@@ -436,35 +472,40 @@ Length.pt(50); // Creates an object with value of 50 points.
Also, it contains the following method:
-`toString` a method to convery class information into a string.
+#### toString
+
+```
+handler this.toString(): String;
+```
+a method to convery class information into a string.
### Length4
Similar to `Length` but with 4 values, one for each direction.
This class defines the following measuring units:
-`px` number of pixels.
+* `px` number of pixels.
-`pt` number of points.
+* `pt` number of points.
-`mm` distance in millimeters.
+* `mm` distance in millimeters.
-`vw` a relative distance, proportional to 1% of the browser window width.
+* `vw` a relative distance, proportional to 1% of the browser window width.
-`vh` a relative distance, proportional to 1% of the browser window height.
+* `vh` a relative distance, proportional to 1% of the browser window height.
-`vmin` a relative distance, proportional to 1% of the browser window minimum side length.
+* `vmin` a relative distance, proportional to 1% of the browser window minimum side length.
-`vmax` a relative distance, proportional to 1% of the browser window maximum side length.
+* `vmax` a relative distance, proportional to 1% of the browser window maximum side length.
-`em` a relative distance, proportional to text font size.
+* `em` a relative distance, proportional to text font size.
-`percent` a percentage of the container component.
+* `percent` a percentage of the container component.
-`auto` the "auto" value from CSS.
+* `auto` the "auto" value from CSS.
-`inherit` the inherit value from CSS.
+* `inherit` the inherit value from CSS.
Each of these units is a function that creates an instance of type `Length4` and gives it the
values that were passed as args to the function. The return value is of type `SrdRef[Length4]`.
@@ -487,7 +528,6 @@ mentioned above:
SrdRef[Length4]().{ alloc()~init(Length.pt(50), Length.px(30)) }
```
-
### Transition
```
@@ -501,14 +541,37 @@ class Transition {
A class that holds transition information.
-`duration` transition duration.
+#### duration
+
+```
+def duration: Float = 0;
+```
-`fn` the name of the applied transition function.
+transition duration.
-`delay` the delay in executing the transition.
+#### fn
-`toString` a method to convert the class information to a string.
+```
+def fn: String;
+```
+
+the name of the applied transition function.
+
+#### delay
+
+```
+def delay: Float = 0;
+```
+
+the delay in executing the transition.
+
+#### toString
+
+```
+handler this.toString(): String;
+```
+a method to convert the class information to a string.
### Transform
@@ -533,21 +596,51 @@ module Transform {
A class that holds transform information.
-`matrix` a method to define transform matrix.
+#### matrix
-There are two versions of this method, the first defines a 2D transform matrix, while the other defines 3D transform matrix.
+```
+func matrix(a: Float, b: Float, c: Float, d: Float, tx: Float, ty: Float): String;
+func matrix(
+ a1: Float, b1: Float, c1: Float, d1: Float,
+ a2: Float, b2: Float, c2: Float, d2: Float,
+ a3: Float, b3: Float, c3: Float, d3: Float,
+ a4: Float, b4: Float, c4: Float, d4: Float
+): String;
+```
+
+a method to define transform matrix. There are two versions of this method, the first defines a
+2D transform matrix, while the other defines 3D transform matrix.
+
+#### rotate
+
+```
+func rotate(deg: Float): String;
+func rotate(x: Float, y: Float, z: Float, deg: Float): String;
+```
+
+a method to apply a rotation transform on a component. There are two versions of this method,
+the first do 2D rotation, while the other defines 3D rotation. In the first method, we need only
+the angle, while in the second we need the axis vector we want to rotate around it by specifying
+its three coordinates.
-`rotate` a method to apply a rotation transform on a component.
+#### scale
-There are two versions of this method, the first do 2D rotation, while the other defines 3D rotation.
+```
+func scale(x: Float): String;
+func scale(x: Float, y: Float): String;
+func scale(x: Float, y: Float, z: Float): String;
+```
-In the first method, we need only the angle, while in the second we need the axis vector we want to rotate around it
-by specifying its three coordinates.
+a method to scale a shape, with two versions 2D and 3D.
-`scale` a method to scale a shape, with two versions 2D and 3D.
+#### translate
-`translate` a method to translate a shape, with two versions 2D and 3D.
+```
+func translate(x: ref[Length], y: ref[Length]): String;
+func translate(x: ref[Length], y: ref[Length], z: ref[Length]): String;
+```
+a method to translate a shape, with two versions 2D and 3D.
### Background
@@ -573,7 +666,6 @@ Describes the properties of an element's background. It has three initializer fu
of the total distance at which that color starts.
* The fourth initializer creates a background that is initialized with a string value.
-
### Flex
```
@@ -584,8 +676,13 @@ class Flex {
A class that holds flex information.
-`toString` a method to convert the class information to a string.
+#### toString
+
+```
+handler this.toString(): String;
+```
+a method to convert the class information to a string.
### BoxShadow
@@ -614,8 +711,13 @@ class BoxShadow {
A class that holds shadow information for a box.
-`toString` a method to convert the class information to a string.
+#### toString
+```
+handler this.toString(): String;
+```
+
+a method to convert the class information to a string.
### TextShadow
@@ -635,8 +737,13 @@ class TextShadow {
A class that holds shadow information for a text.
-`toString` a method to convert the class information to a string.
+#### toString
+```
+handler this.toString(): String;
+```
+
+a method to convert the class information to a string.
### Position
@@ -647,7 +754,6 @@ An enum class that holds possible values for position as enum.
* `ABSOLUTE`
* `STICKY`
-
### Overflow
An enum class that holds possible values for overflow properties.
@@ -657,14 +763,12 @@ An enum class that holds possible values for overflow properties.
* `SCROLL`
* `AUTO`
-
### TextOverflow
An enum class that holds possible values for the textOverflow property.
* `CLIP`
* `ELLIPSIS`
-
### Display
An enum class that holds possible values for display as enum.
@@ -675,7 +779,6 @@ An enum class that holds possible values for display as enum.
* `GRID`
* `NONE`
-
### Layout
An enum class that holds possible values for layout as enum.
@@ -684,7 +787,6 @@ An enum class that holds possible values for layout as enum.
* `COLUMN`
* `COLUMN_REVERSE`
-
### FlexWrap
An enum class that holds possible values for flex-wrap as enum.
@@ -692,7 +794,6 @@ An enum class that holds possible values for flex-wrap as enum.
* `WRAP`
* `WRAP_REVERSE`
-
### Align
An enum class that holds possible values for align as enum.
@@ -701,7 +802,6 @@ An enum class that holds possible values for align as enum.
* `END`
* `STRETCH`
-
### Justify
An enum class that holds possible values for justify as enum.
@@ -713,7 +813,6 @@ An enum class that holds possible values for justify as enum.
* `SPACE_AROUND`
* `SPACE_EVENLY`
-
### Cursor
An enum class that holds possible values for cursor as enum.
@@ -736,7 +835,6 @@ An enum class that holds possible values for cursor as enum.
* `ZOOM_IN`
* `ZOOM_OUT`
-
### BorderStyle
An enum class that holds possible values for border style as enum.
@@ -749,7 +847,6 @@ An enum class that holds possible values for border style as enum.
* `NONE`
* `HIDDEN`
-
### WordBreak
An enum class that holds possible values for word break as enum.
@@ -758,7 +855,6 @@ An enum class that holds possible values for word break as enum.
* `KEEP_ALL`
* `BREAK_WORD`
-
### WhiteSpace
An enum class that holds possible values for the whiteSpace property.
@@ -767,14 +863,12 @@ An enum class that holds possible values for the whiteSpace property.
* `PRE_WRAP`
* `PRE_LINE`
-
### Direction
An enum class that holds possible values for direction as enum.
* `LTR`
* `RTL`
-
### TextDecoration
An enum class that holds possible values for text decoration as enum.
@@ -783,7 +877,6 @@ An enum class that holds possible values for text decoration as enum.
* `OVERLINE`
* `LINE_THROUGH`
-
### TextDecorationStyle
An enum class that holds possible values for text decoration style as enum.
@@ -793,7 +886,6 @@ An enum class that holds possible values for text decoration style as enum.
* `DASHED`
* `WAVY`
-
### TextAlign
An enum class that holds possible values for text align as enum.
@@ -802,7 +894,6 @@ An enum class that holds possible values for text align as enum.
* `CENTER`
* `JUSTIFY`
-
### FontWeight
```
@@ -816,7 +907,6 @@ An enum class that holds possible values for font weight.
* `NORMAL`
* `BOLD`
-
### Floating
An enum class that holds possible values for floating as enum.
@@ -824,17 +914,15 @@ An enum class that holds possible values for floating as enum.
* `LEFT`
* `RIGHT`
-
### BackgroundPosition
An enumeration to control the position of a background image when its dimensions do not match the
dimension of the containing element. Possible values:
-* `CENTER`
-* `RIGHT`
-* `LEFT`
-* `TOP`
-* `BOTTOM`
-
+* `CENTER`
+* `RIGHT`
+* `LEFT`
+* `TOP`
+* `BOTTOM`
### BackgroundSize
@@ -852,4 +940,3 @@ An enumeration for possible scaling algorithms. Possible values:
* `HIGH_QUALITY`
* `PIXELATED`
* `CRISP_EDGES`
-
diff --git a/Doc/ui_endpoints.ar.md b/Doc/ui_endpoints.ar.md
index 47e82eb..ae86d06 100644
--- a/Doc/ui_endpoints.ar.md
+++ b/Doc/ui_endpoints.ar.md
@@ -4,8 +4,6 @@
[[رجوع]](../README.ar.md)
-
-
## إنشاء المنافذ المرئية
يمكن إنشاء منفذ مرئي عن طريق كتابة دالة عادية تقوم بما نريده وإضافة المبدل `@منفذ_مرئي` إليها.
@@ -31,6 +29,8 @@
### مثال
+
+
```
// منفذ بياني لصفحة واجهة مستخدم تمثل صفحة حول
@منفذ_مرئي["/about"]
@@ -62,7 +62,7 @@
}
```
-
+
```
// منفذ بياني لصفحة واجهة مستخدم تمثل صفحة حول
@@ -119,6 +119,3 @@ func about {
* `app_install_prompt`: تُرسل عندما تتوفر واجهة تنصيب التطبيق على الجهاز. يمكن للمستخدم الاستجابة
لهذه الرسالة بإظهار إشعار للمستخدم بإمكانية تنصيب تطبيقه، ومن ثم استدعاء
`اعرض_واجهة_تنصيب_التطبيق` (`showAppInstallPrompt`).
-
-
-
diff --git a/Doc/ui_endpoints.en.md b/Doc/ui_endpoints.en.md
index 0e46012..104c962 100644
--- a/Doc/ui_endpoints.en.md
+++ b/Doc/ui_endpoints.en.md
@@ -86,4 +86,3 @@ are available:
* `app_install_prompt`: Sent when an install prompt is available for the web app. The user can
respond to this message by notifying the user and then calling `showAppInstallPrompt`.
-
diff --git a/Doc/widgets.ar.md b/Doc/widgets.ar.md
index efb00bc..aa7fc31 100644
--- a/Doc/widgets.ar.md
+++ b/Doc/widgets.ar.md
@@ -4,8 +4,6 @@
[[رجوع]](../README.ar.md)
-
-
## الـضبيطات (Widgets)
### ضـبيطة (Widget)
@@ -16,6 +14,8 @@
هذه قائمة الخصال المجردة (abstract properties) التي تعرفها هذه الضبيطة وتُلزم الأصناف المشتقة بتحقيقها.
+
+
```
عملية هذا.معرف: نـص: كمؤشر؛
@@ -26,7 +26,7 @@
عملية هذا.الطراز = سـندنا[طـقم_طرز] كمؤشر؛
```
-
+
```
handler this.id: String as_ptr;
@@ -38,15 +38,58 @@ handler this.style: SrdRef[StyleSet] as_ptr;
handler this.style = SrdRef[StyleSet] as_ptr;
```
+##### معرف (id)
+
+
+
+```
+عملية هذا.معرف: نـص: كمؤشر؛
+```
+
+
+
+```
+handler this.id: String as_ptr;
+```
+
+معرف فريد لتمييز كل ضبيطة عن الأخرى.
+
+##### اسم_الفئة (className)
+
+
+
+```
+عملية هذا.اسم_الفئة: سند[نـص] كمؤشر؛
+عملية هذا.اسم_الفئة = سند_مؤقت[نـص] كمؤشر؛
+```
+
-* `معرف` (`id`): معرف عنصر DOM المقابل لهذه الضبيطة.
+```
+handler this.className: ref[String] as_ptr;
+handler this.className = temp_ref[String] as ptr;
+```
+
+اسم الفئة للضبيطة، وتستعمل لتطبيق طراز تابع لفئة معينة.
+
+##### الطراز (style)
+
+
-* `اسم_الفئة` (`className`): اسم الفئة للضبيطة، وتستعمل لتطبيق طراز تابع لفئة معينة.
+```
+عملية هذا.الطراز: سـندنا[طـقم_طرز] كمؤشر؛
+عملية هذا.الطراز = سـندنا[طـقم_طرز] كمؤشر؛
+```
+
+
+
+```
+handler this.style: SrdRef[StyleSet] as_ptr;
+handler this.style = SrdRef[StyleSet] as_ptr;
+```
-* `الطراز` (`style`): تستخدم لتعديل طقم الطرز المخصص لهذه الضبيطة. يمكن تعيين طقم طرز مشترك مع ضبيطات
- أخرى. في حال محاولة تغيير طقم الطرز الخاص بالضبيطة قبل تعيين طقم طرز لها سيُنشأ طقم طرز تلقائيًا لهذه
- الضبيطة.
+تستخدم لتعديل طقم الطرز المخصص لهذه الضبيطة. يمكن تعيين طقم طرز مشترك مع ضبيطات أخرى. في حال
+محاولة تغيير طقم الطرز الخاص بالضبيطة قبل تعيين طقم طرز لها سيُنشأ طقم طرز تلقائيًا لهذه الضبيطة.
#### الأحداث المجردة
@@ -54,257 +97,255 @@ handler this.style = SrdRef[StyleSet] as_ptr;
##### عند_تغير_الأبعاد (onResize)
+
+
```
عرف عند_تغير_الأبعاد: سند[إشـارة_حدث_دوم[ضـبيطة، صـحيح]] كمؤشر؛
```
-
+
```
def onResize: ref[DomEventSignal[Widget, Int]] as_ptr;
```
-
-
إشارة بأن أبعاد الضبيطة تغيرت. الحمولة مهملة في هذا الحدث.
##### عند_دخول_المؤشر (onMouseEnter)
+
+
```
عرف عند_دخول_المؤشر: سند[إشـارة_حدث_دوم[ضـبيطة، صـحيح]] كمؤشر؛
```
-
+
```
def onMouseEnter: ref[DomEventSignal[Widget, Int]] as_ptr;
```
-
-
إشارة بأن المؤشر دخل المنطقة الخاصة بالضبيطة. الحمولة مهملة في هذا الحدث.
##### عند_خروج_المؤشر (onMouseOut)
+
+
```
عرف عند_خروج_المؤشر: سند[إشـارة_حدث_دوم[ضـبيطة، صـحيح]] كمؤشر؛
```
-
+
```
def onMouseOut: ref[DomEventSignal[Widget, Int]] as_ptr;
```
-
-
إشارة بأن المؤشر خرج من المنطقة الخاصة بالضبيطة. الحملة مهملة في هذا الحدث.
##### عند_بدء_النقرة (onMouseDown)
+
+
```
عرف عند_بدء_النقرة: سند[إشـارة_حدث_دوم[ضـبيطة، حـمولة_زر_المؤشر]] كمؤشر؛
```
-
+
```
def onMouseDown: ref[DomEventSignal[Widget, MouseButtonPayload]] as_ptr;
```
-
-
إشارة بأنه تم بدء النقر بالمؤشر.
##### عند_انتهاء_النقرة (onMouseUp)
+
+
```
عرف عند_انتهاء_النقرة: سند[إشـارة_حدث_دوم[ضـبيطة، حـمولة_زر_المؤشر]] كمؤشر؛
```
-
+
```
def onMouseUp: ref[DomEventSignal[Widget, MouseButtonPayload]] as_ptr;
```
-
-
إشارة بأن النقر انتهى.
##### عند_تحريك_المؤشر (onMouseMove)
+
+
```
عرف عند_تحريك_المؤشر: سند[إشـارة_حدث_دوم[ضـبيطة، حـمولة_تحريك_المؤشر]] كمؤشر؛
```
-
+
```
def onMouseMove: ref[DomEventSignal[Widget, MouseMovePayload]] as_ptr
```
-
-
إشارة بأن المؤشر تحرك.
##### عند_بدء_اللمس (onTouchStart)
+
+
```
عرف عند_بدء_اللمس: سند[إشـارة_حدث_دوم[ضـبيطة، مـصفوفة[حـمولة_لمس]]] كمؤشر؛
```
-
+
```
def onTouchStart: ref[DomEventSignal[Widget, Array[TouchPayload]]] as_ptr;
```
-
-
إشارة بأن اللمس بدأ في الأجهزة ذات شاشات اللمس.
##### عند_انتهاء_اللمس (onTouchEnd)
+
+
```
عرف عند_انتهاء_اللمس: سند[إشـارة_حدث_دوم[ضـبيطة، مـصفوفة[حـمولة_لمس]]] كمؤشر؛
```
-
+
```
def onTouchEnd: ref[DomEventSignal[Widget, Array[TouchPayload]]] as_ptr;
```
-
-
إشارة بأن اللمس انتهى في الأجهزة ذات شاشات اللمس.
##### عند_تحريك_اللمس (onTouchMove)
+
+
```
عرف عند_تحريك_اللمس: سند[إشـارة_حدث_دوم[ضـبيطة، مـصفوفة[حـمولة_لمس]]] كمؤشر؛
```
-
+
```
def onTouchMove: ref[DomEventSignal[Widget, Array[TouchPayload]]] as_ptr;
```
-
-
إشارة بأن موضع اللمس تغيير في الأجهزة ذات شاشات اللمس.
##### عند_الضغط (onClick)
+
+
```
عرف عند_الضغط: سند[إشـارة_حدث_دوم[ضـبيطة، صـحيح]] كمؤشر؛
```
-
+
```
def onClick: ref[DomEventSignal[Widget, Int]] as_ptr;
```
-
-
إشارة بأن ضغطة بزر الفأرة قد حدثت. الحمولة مهملة في هذا الحدث.
#### الوظائف
##### هات_الأبعاد (getDimensions)
+
+
```
دالة هذا.هات_الأبعاد(): أبـعاد؛
```
-
+
```
handler this.getDimensions(): Dimensions;
```
-
-
دالة لجلب الأبعاد الحالية للضبيطة.
##### هات_المستطيل_المحيط (getBoundingRect)
+
+
```
دالة هذا.هات_المستطيل_المحيط(): مـستطيل؛
```
-
+
```
handler this.getBoundingRect(): Rectangle;
```
-
-
دالة لجلب الموقع والأبعاد الحالية للضبيطة نسبة إلى المشهد، أي الزاوية العليا اليسرى من نافذة المتصفح.
##### التمس_احتكار_المؤشر (requestPointerLock)
+
+
```
عملية هذا.التمس_احتكار_المؤشر()؛
```
-
+
```
handler this.requestPointerLock();
```
-
-
طلب احتكار المؤشر. يؤدي هذا لإزالة مؤشر الفأرة مع استمرار الضبيطة باستلام إشعارات تحرك المؤشر.
##### التمس_ملء_الشاشة (requestFullScreen)
+
+
```
عملية هذا.التمس_ملء_الشاشة()؛
```
-
+
```
handler this.requestFullScreen();
```
-
-
طلب الانتقال إلى وضع ملء الشاشة. سيؤدي هذا لتكبير الضبيطة لتملأ الشاشة.
##### مرر_إلى_المرأى (scrollIntoView)
+
+
```
عملية هذا.مرر_إلى_المرأى();
```
-
+
```
handler this.scrollIntoView();
```
-
-
طريقة تسمح بالنزول في الصفحة الحاوية لمجموعة عناصر إلى العنصر الذي استدعى هذه الطريقة ليصبح مرئياً.
-
### ضـبيطة_أساسية (BasicWidget)
هذا الصنف يشتق من `ضـبيطة` (`Widget`) وهو الصنف الأصل لكل الضبيطات الأساسية ويُحقق الخصال والأحداث المشتركة بين كل الضبيطات
الأساسية.
-بالإضافة لتحقيق العمليات المجردة، يضيف هذا الصنف التعريفات التالية:
+بالإضافة لتحقيق العمليات المجردة، يضيف هذا الصنف التعريف التالي:
* `التلميح` (`hint`): `نـص`. خصلة لتحديد نص يُعرض على شكل تلميح عند وقوف مؤشر الفأرة على العنصر.
-
### صـندوق (Box)
يمثل هذا الصنف مساحة مستطيلة الشكل تحوي على ضبيطات أخرى.
@@ -317,18 +358,18 @@ handler this.scrollIntoView();
##### أضف_فروعا (addChildren)
+
+
```
عملية هذا.أضف_فروعا(عدد: صـحيح، فروع: ...سند_مؤقت[سـندنا[ضـبيطة]])؛
```
-
+
```
handler this.addChildren (count: Int, children: ...temp_ref[SrdRef[Widget]]);
```
-
-
طريقة لإضافة فرع جديد أو أكثر ضمن هذا الصنف.
المعطيات:
@@ -339,18 +380,18 @@ handler this.addChildren (count: Int, children: ...temp_ref[SrdRef[Widget]]);
##### احشر_فرعا (insertChild)
+
+
```
عملية هذا.احشر_فرعا (تسلسل: صـحيح، فرع: سـندنا[ضـبيطة])؛
```
-
+
```
handler this.insertChild (index: Int, child: SrdRef[Widget]);
```
-
-
أضف فرعًا جديدًا عند تسلسل محدد.
المعطيات:
@@ -361,18 +402,18 @@ handler this.insertChild (index: Int, child: SrdRef[Widget]);
##### أزل_فروعا (removeChildren)
+
+
```
عملية هذا.أزل_فروعا(عدد: صـحيح، فروع: ...سند_مؤقت[سـندنا[ضـبيطة]])؛
```
-
+
```
handler this.removeChildren (count: Int, children: ...temp_ref[SrdRef[Widget]]);
```
-
-
طريقة لإزالة فرع أو أكثر من الصنف.
المعطيات:
@@ -383,21 +424,20 @@ handler this.removeChildren (count: Int, children: ...temp_ref[SrdRef[Widget]]);
##### أزل_كل_الفروع (removeAllChildren)
+
+
```
عملية هذا.أزل_كل_الفروع()؛
```
-
+
```
handler this.removeAllChildren ();
```
-
-
تزيل كل الفروع المضافة لهذا الصندوق.
-
### مـرسم (Canvas)
يمثل هذه الصنف مساحة تستعمل للرسم بشكل حر.
@@ -417,7 +457,6 @@ handler this.removeAllChildren ();
* `طول_الصورة` (`bitmapHeight`): `سـندنا[مـسافة]` (`SrdRef[Length]`). طول مساحة الرسم التي نريدها.
-
### صـورة (Image)
صنف يمثل صورة.
@@ -426,7 +465,6 @@ handler this.removeAllChildren ();
* `الرابط` (`url`): `نـص` (`String`). رابط الصورة المراد عرضها.
-
### فـيديو Video
صنف يمثل الفيديو
@@ -438,7 +476,6 @@ handler this.removeAllChildren ();
* `التحكمات` (`controls`): `ثنائي` (` bool`). اظهار ازرار التحكم في الفيدو او عدم اظهاررها.
* `التشغيل_التلقائي` (`autoplay`): `ثنائي` (` bool`). تشغيل الفيديو بشكل تلقائي او عدم تشغيله.
-
### مـصدر_فيديو VideoSource
صنف يمثل مصدر الفيديو
@@ -448,7 +485,6 @@ handler this.removeAllChildren ();
* `مصدر` (`src`): `نص` (`String`). مسار مصدر الفيديو.
* `نوع_الفيديو` (`videoType`): `نص` (` String`).نوع الفيديو.
-
### مـسار_فيديو VideoTrack
صنف يمثل مسار الفيديو مثل الترجمة او الدبلجة
@@ -468,8 +504,6 @@ handler this.removeAllChildren ();
* `مصفوفة_مصدر` (`sourceArray`): `مصفوفة [مـصدر_صورة]` (` Array[ImageSource]`). المصادر والحجم الأعظمي للصورة.
-
-
### مـصدر_صورة ImageSource
صنف يمثل مصدر الصورة
@@ -483,34 +517,35 @@ handler this.removeAllChildren ();
##### حدد_الفرع (setChild)
+
+
```
عملية هذا.حدد_الفرع(الفرع: سند_مؤقت[سـندنا[صورة]])؛
```
-
+
```
handler this.setChild (child: temp_ref[SrdRef[Image]]);
```
-
-
تحديد قيمة الفرع.
-
### كـتابة (Text)
صنف لعرض كتابة ثابتة.
#### التهيئة
+
+
```
كـتابة()؛
كـتابة(النص: نـص)؛
كـتابة(الوسم: نـص، النص: نـص)؛
```
-
+
```
Text();
@@ -518,8 +553,6 @@ Text(text: String);
Text(tag: String, text: String);
```
-
-
النسخة الثالثة من دالة التهيئة تستلم نوع الوسم المراد استخدامه لعرض النص. مبدئيًا تستخدم هذه
الضبيطة الوسم span، لكن باستخدام النسخة الثالثة يمكن تحديد وسم مختلف، على سبيل المثال "h1".
@@ -530,7 +563,6 @@ Text(tag: String, text: String);
* `المعرف_المستهدف` (`targetId`): `نـص` (`String`). معرف الغرض الذي يرتبط به هذا النص، أي مثلاً نص
بجانب مربع دخل يوضح أننا نريد اسم المستخدم.
-
### الـزر (Button)
صنف يمثل زر.
@@ -539,27 +571,26 @@ Text(tag: String, text: String);
* `النص` (`text`): `نـص` (`String`). النص الذي نريد عرضه على الزر.
-
### الـزر_الانتقائي (RadioButton)
صنف يمثل زر انتقائي لتحديد خيار واحد من مجموعة خيارات.
#### التهيئة
+
+
```
الـزر_الانتقائي(الاسم: نـص، القيمة: نـص)؛
الـزر_الانتقائي(الاسم: نـص، القيمة: نـص، محدد: ثـنائي)؛
```
-
+
```
RadioButton(name: String, value: String);
RadioButton(name: String, value: String, checked: Bool);
```
-
-
* الشكل الأول ينشئ زر انتقائي بالاسم والقيمة المحددين.
* الشكل الثاني يسمح بتحديد الحالة الابتدائية للتحديد.
@@ -577,34 +608,35 @@ RadioButton(name: String, value: String, checked: Bool);
##### عند_التغيير (onChanged)
+
+
```
عرف عند_التغيير: إشـارة_حدث_دوم[الـزر_الانتقائي، صـحيح]؛
```
-
+
```
def onChanged: DomEventSignal[RadioButton, Int];
```
-
-
يُطلق عند تحديد الزر الانتقائي أو إلغاء تحديده. يُطلق الحدث عندما ينقر المستخدم على الزر الانتقائي أو عندما يتغير التحديد برمجيًا.
-
### صـندوق_تفعيل (CheckBox)
يعرض صندوق تفعيل للخيارات متعددة الاختيار.
#### التهيئة
+
+
```
صـندوق_تفعيل()؛
صـندوق_تفعيل(القيمة: نـص)؛
صـندوق_تفعيل(القيمة: نـص، مفعل: ثـنائي)؛
```
-
+
```
CheckBox();
@@ -612,8 +644,6 @@ CheckBox(value: String);
CheckBox(value: String, checked: Bool);
```
-
-
* الشكل الأول ينشئ صندوق تفعيل فارغ.
* الشكل الثاني ينشئ صندوق تفعيل بالقيمة المحددة.
* الشكل الثالث يسمح بتعيين الحالة المبدئية للتفعيل.
@@ -628,21 +658,20 @@ CheckBox(value: String, checked: Bool);
##### عند_التغيير (onChanged)
+
+
```
عرف عند_التغيير: إشـارة_حدث_دوم[صـندوق_تفعيل، صـحيح]؛
```
-
+
```
def onChanged: DomEventSignal[CheckBox, Int];
```
-
-
يُطلق عند تفعيل صندوق التفعيل أو إلغاء تفعيله. يُطلق الحدث عندما ينقر المستخدم على صندوق التفعيل أو عندما تتغير الحالة برمجيًا.
-
### مـدخل_نـص (TextInput)
صنف يستعمل لإدخال نص، أي مثل مربع نص.
@@ -657,57 +686,56 @@ def onChanged: DomEventSignal[CheckBox, Int];
##### عند_الغيير (onChanged)
+
+
```
عرف عند_الغيير: إشـارة_حدث_دوم[مـدخل_نـص، صـحيح]؛
```
-
+
```
def onChanged: DomEventSignal[TextInput, Int];
```
-
-
يُثار هذا الحدث عند تغير النص المدخل. الحمولة مهملة في هذا الحدث.
##### عند_كبس_مفتاح (onKeyPress)
+
+
```
عرف عند_كبس_مفتاح: إشـارة_حدث_دوم[مـدخل_نـص، نـص]؛
```
-
+
```
def onKeyPress: DomEventSignal[TextInput, String];
```
-
-
يُثار هذا الحدث عند كبس زر في لوحة المفاتيح.
الحمولة: `نـص` (`String`). معرف الزر الذي كُبس.
##### عند_انتهاء_الكبسة (onKeyUp)
+
+
```
عرف عند_انتهاء_الكبسة: إشـارة_حدث_دوم[مـدخل_نـص، نـص]؛
```
-
+
```
def onKeyUp: DomEventSignal[TextInput, String];
```
-
-
يُثار هذا الحدث عند انتهاء كبسة زر في لوحة المفاتيح.
الحمولة: `نـص` (`String`). معرف الزر الذي كُبس.
-
### مـدخل (Input)
صنف عام يستعمل للإدخال.
@@ -726,57 +754,56 @@ def onKeyUp: DomEventSignal[TextInput, String];
##### عند_الغيير (onChanged)
+
+
```
عرف عند_الغيير: إشـارة_حدث_دوم[مـدخل، صـحيح]؛
```
-
+
```
def onChanged: DomEventSignal[Input, Int];
```
-
-
يُثار الحدث عند تغير القيمة المدخلة. الحمولة مهملة في هذا الحدث.
##### عند_كبس_مفتاح (onKeyPress)
+
+
```
عرف عند_كبس_مفتاح: إشـارة_حدث_دوم[مـدخل، نـص]؛
```
-
+
```
def onKeyPress: DomEventSignal[Input, String];
```
-
-
يُثار عند كبس زر على لوحة المفاتيح.
الحمولة: `نـص` (`String`). معرف الزر الذي كُبس.
##### عند_انتهاء_الكبسة (onKeyUp)
+
+
```
عرف عند_انتهاء_الكبسة: إشـارة_حدث_دوم[مـدخل، نـص]؛
```
-
+
```
def onKeyUp: DomEventSignal[Input, String];
```
-
-
يُثار هذا الحدث عند انتهاء كبسة زر في لوحة المفاتيح.
الحمولة: `نـص` (`String`). معرف الزر الذي كُبس.
-
### خيارات (Select)
صنف يمثل عنصر الخيار من متعدد.
@@ -789,55 +816,54 @@ def onKeyUp: DomEventSignal[Input, String];
##### عند_الغيير (onChanged)
+
+
```
عرف عند_الغيير: إشـارة_حدث_دوم[خيارات، صـحيح]؛
```
-
+
```
def onChanged: DomEventSignal[Select, Int];
```
-
-
يُثار عند تغير القيمة المختارة. الحمولة مهملة في هذا الحدث.
#### العمليات
##### هات_القيمة_المختارة (getSelectedValue)
+
+
```
عملية هذا.هات_القيمة_المختارة(): نـص؛
```
-
+
```
handler this.getSelectedValue(): String;
```
-
-
ترجع القيمة الحالية لاختيار المستخدم.
##### اختر_قيمة (selectValue)
+
+
```
عملية هذا.اختر_قيمة(القيمة_الجديدة: نـص)؛
```
-
+
```
handler this.selectValue(newValue: String);
```
-
-
تغيير الخيار الحالي.
-
### ارتباط_تشعبي (Hyperlink)
صنف يمثل ارتباط تشعبي.
@@ -856,81 +882,79 @@ handler this.selectValue(newValue: String);
##### حدد_الفرع (setChild)
+
+
```
عملية هذا.حدد_الفرع(الفرع: سند_مؤقت[سـندنا[ضـبيطة]])؛
```
-
+
```
handler this.setChild (child: temp_ref[SrdRef[Widget]]);
```
-
-
تحديد قيمة الفرع.
-
### مشهد_وثيقة (DocView)
صنف يستعمل لعرض وثيقة من النمط `HTML` أو `ماركداون`.
#### التهيئة
+
+
```
مـشهد_وثيقة()؛
مـشهد_وثيقة(لتنف: نـص)؛
```
-
+
```
DocView();
DocView(html: String);
```
-
-
النسخة الثانية من دالة التهيئة تستلم نص HTML لتهيئة المشهد به.
#### العمليات
##### حدد_لتنف (setHtml)
+
+
```
عملية هذا.حدد_لتنف(لتنف: نـص)؛
```
-
+
```
handler this.setHtml(html: String);
```
-
-
حدد قيمة HTML للمشهد.
##### حدد_ماركداون (setMarkdown)
+
+
```
عملية هذا.حدد_ماركداون(ماركداون: نـص)؛
عملية هذا.حدد_ماركداون(ماركداون: نـص، روابط_في_لسان_جديد: ثـنائي)؛
```
-
+
```
handler this.setMarkdown(md: String);
handler this.setMarkdown(md: String, linksInNewTab: Bool);
```
-
-
تحديدة قيمة ماركداون للمشهد. الصيغة الثانية من هذه الدالة تسمح بتحديد ما إن كانت الروابط تقتح
في لسان جديد أم في نفس اللسان. الصيغة الأولى تفتح الروابط في نفس اللسان.
-
### مـتصفح (Browser)
مساحة لعرض موقع منفصل. تستخدم هذه الضبيطة عنصر iframe في HTML.
@@ -943,25 +967,26 @@ handler this.setMarkdown(md: String, linksInNewTab: Bool);
##### أرسل_رسالة (postMessage)
+
+
```
عملية هذا.أرسل_رسالة(نوع_الرسالة: مـؤشر_محارف، متن_الرسالة: مـؤشر_محارف)؛
```
-
+
```
handler this.postMessage(msgType: CharsPtr, msgBody: CharsPtr);
```
-
-
ترسل رسالة مخصصة إلى نافذة الصفحة المحملة في الـiframe.
-
## أصناف متعلقة
### حـمولة_تحريك_المؤشر (MouseMovePayload)
+
+
```
صنف حـمولة_تحريك_المؤشر {
عرف موقع_س: عـائم؛
@@ -971,7 +996,7 @@ handler this.postMessage(msgType: CharsPtr, msgBody: CharsPtr);
}
```
-
+
```
class MouseMovePayload {
@@ -982,20 +1007,76 @@ class MouseMovePayload {
}
```
+يحمل هذا الصنف معلومات حدث تحريك المؤشر.
+
+#### موقع_س (posX)
+
+
+
+```
+عرف موقع_س: عـائم؛
+```
+
-يحمل هذا الصنف معلومات حدث تحريك المؤشر.
+```
+def posX: Float;
+```
+
+إحداثيات المؤشر على المحور س.
+
+#### موقع_ص (posY)
+
+
+
+```
+عرف موقع_ص: عـائم؛
+```
+
+
+
+```
+def posY: Float;
+```
+
+إحداثيات المؤشر على المحور ص.
+
+#### إزاحة_س (deltaX)
+
+
+
+```
+عرف إزاحة_س: عـائم؛
+```
+
+
+
+```
+def deltaX: Float;
+```
+
+مقدار تحرك المؤشر على المحور س.
-`موقع_س` (`posX`) إحداثيات المؤشر على المحور س.
+#### إزاحة_ص (deltaY)
-`موقع_ص` (`posY`) إحداثيات المؤشر على المحور ص.
+
+
+```
+عرف إزاحة_ص: عـائم؛
+```
-`إزاحة_س` (`deltaX`) مقدار تحرك المؤشر على المحور س.
+
+
+```
+def deltaY: Float;
+```
-`إزاحة_ص` (`deltaY`) مقدار تحرك المؤشر على المحور ص.
+مقدار تحرك المؤشر على المحور ص.
### حـمولة_زر_المؤشر (MouseButtonPayload)
+
+
```
صنف حـمولة_زر_المؤشر {
عرف الزر: صـحيح؛
@@ -1004,7 +1085,7 @@ class MouseMovePayload {
}
```
-
+
```
class MouseButtonPayload {
@@ -1014,36 +1095,79 @@ class MouseButtonPayload {
}
```
+يحمل هذا الصنف معلومات حدث نقر المؤشر.
+
+#### الزر (button)
+
+
+
+```
+عرف الزر: صـحيح؛
+```
+
-يحمل هذا الصنف معلومات حدث نقر المؤشر.
+```
+def button: Int;
+```
+
+الزر الذي تم الضغط عليه.
+
+#### موقع_س (posX)
+
+
+
+```
+عرف موقع_س: عـائم؛
+```
+
+
+
+```
+def posX: Float;
+```
+
+إحداثيات المؤشر على المحور س.
+
+#### موقع_ص (posY)
+
+
-`الزر` (`button`) الزر الذي تم الضغط عليه.
+```
+عرف موقع_ص: عـائم؛
+```
+
+
+
+```
+def posY: Float;
+```
-`موقع_س` (`posX`) إحداثيات المؤشر على المحور س.
+إحداثيات المؤشر على المحور ص.
-`موقع_ص` (`posY`) إحداثيات المؤشر على المحور ص.
### حـمولة_لمس (TouchPayload)
+
+
```
صنف حـمولة_لمس {
- عرف المعرف: نـص؛
- عرف شاشة_س: عـائم؛
- عرف شاشة_ص: عـائم؛
- عرف مشهد_س: عـائم؛
- عرف مشهد_ص: عـائم؛
- عرف وثيقة_س: عـائم؛
- عرف وثيقة_ص: عـائم؛
- عرف نق_س: عـائم؛
- عرف نق_ص: عـائم؛
- عرف الزاوية: عـائم؛
- عرف القوة: عـائم؛
- عرف مغيرة: ثـنائي؛
+ عرف المعرف: نـص؛
+ عرف شاشة_س: عـائم؛
+ عرف شاشة_ص: عـائم؛
+ عرف مشهد_س: عـائم؛
+ عرف مشهد_ص: عـائم؛
+ عرف وثيقة_س: عـائم؛
+ عرف وثيقة_ص: عـائم؛
+ عرف نق_س: عـائم؛
+ عرف نق_ص: عـائم؛
+ عرف الزاوية: عـائم؛
+ عرف القوة: عـائم؛
+ عرف مغيرة: ثـنائي؛
}
```
-
+
```
class TouchPayload {
@@ -1062,42 +1186,202 @@ class TouchPayload {
}
```
-
-
يحمل هذا الصنف معلومات لمسة واحدة من أحد أحداث اللمس. كل حدث من أحداث اللمس يحتوي مصفوفة من هذا
الصنف لتمثيل كافة اللمسات.
-`المعرف` (`identifier`) معرف فريد لتمييز اللمسة الواحدة المستمرة من بين مجموعة من اللمسات في أحداث
-لمس متعاقبة.
+#### المعرف (identifier)
-`شاشة_س` (`screenX`) إحداثيات موقع اللمس على المحور س نسبة لشاشة الجهاز.
+
-`شاشة_ص` (`screenY`) إحداثيات موقع اللمس على المحور ص نسبة لشاشة الجهاز.
+```
+عرف المعرف: نـص؛
+```
-`مشهد_س` (`clientX`) إحداثيات موقع اللمس على المحور س نسبة للمتصفح.
+
-`مشهد_ص` (`clientY`) إحداثيات موقع اللمس على المحور ص نسبة للمتصفح.
+```
+def identifier: String;
+```
-`وثيقة_س` (`pageX`) إحداثيات موقع اللمس على المحور س نسبة للصفحة المعروضة في المتصفح. هذه
-القيمة تضع في الحسبان حالة التمرير للصفحة وتعطيك الإحداثيات كما لو كانت الصفحة ظاهرة بشكل كامل
-على الشاشة.
+معرف فريد لتمييز اللمسة الواحدة المستمرة من بين مجموعة من اللمسات في أحداث لمس متعاقبة.
-`وثيقة_ص` (`pageY`) إحداثيات موقع اللمس على المحور ص نسبة للصفحة المعروضة في المتصفح. هذه
-القيمة تضع في الحسبان حالة التمرير للصفحة وتعطيك الإحداثيات كما لو كانت الصفحة ظاهرة بشكل كامل
-على الشاشة.
+#### شاشة_س (screenX)
-`نق_س` (`radiusX`) نصف القطر على المحور السيني للشكل البيضاوي الأمثل الذي يحوط مساحة اللمس.
+
-`نق_ص` (`radiusY`) نصف القطر على المحور الصادي للشكل البيضاوي الأمثل الذي يحوط مساحة اللمس.
+```
+عرف شاشة_س: عـائم؛
+```
-`الزاوية` (`rotationAngle`) زاوية دوران الشكل البيضاوي الأمثل الذي يحوط مساحة اللمس. الزاوية مع
-عقارب الساعة ووحدة قياسها الدرجات (360 درجة للدورة الكاملة).
+
-`القوة` (`force`) قوة الضغط على الشاشة لهذه اللمسة. تتراوح ما بين 0.0 تمثل لمسا دون أي ضغط و 1.0
-تمثل أقصى قوة ضغط يمكن تحسسها.
+```
+def screenX: Float;
+```
+
+إحداثيات موقع اللمس على المحور س نسبة لشاشة الجهاز.
+
+#### شاشة_ص (screenY)
+
+
+
+```
+عرف شاشة_ص: عـائم؛
+```
+
+
+
+```
+def screenY: Float;
+```
+
+إحداثيات موقع اللمس على المحور ص نسبة لشاشة الجهاز.
+
+#### مشهد_س (clientX)
+
+
+
+```
+عرف مشهد_س: عـائم؛
+```
+
+
+
+```
+def clientX: Float;
+```
+
+إحداثيات موقع اللمس على المحور س نسبة للمتصفح.
+
+#### مشهد_ص (clientY)
+
+
-`مغيرة` (`changed`) يحدد ما إن كانت هذه اللمسة مغيرة أو جديدة في هذا الحدث. تستخدم هذه القيمة
-لمعرفة اللمسات التي تغيرت منذ الحدث السابق.
+```
+عرف مشهد_ص: عـائم؛
+```
+
+
+
+```
+def clientY: Float;
+```
+
+إحداثيات موقع اللمس على المحور ص نسبة للمتصفح.
+
+#### وثيقة_س (pageX)
+
+
+
+```
+عرف وثيقة_س: عـائم؛
+```
+
+
+
+```
+def pageX: Float;
+```
+
+إحداثيات موقع اللمس على المحور س نسبة للصفحة المعروضة في المتصفح. هذه القيمة تضع في الحسبان حالة
+التمرير للصفحة وتعطيك الإحداثيات كما لو كانت الصفحة ظاهرة بشكل كامل على الشاشة.
+
+#### وثيقة_ص (pageY)
+
+
+
+```
+عرف وثيقة_ص: عـائم؛
+```
+```
+def pageY: Float;
+```
+
+إحداثيات موقع اللمس على المحور ص نسبة للصفحة المعروضة في المتصفح. هذه القيمة تضع في الحسبان حالة
+التمرير للصفحة وتعطيك الإحداثيات كما لو كانت الصفحة ظاهرة بشكل كامل على الشاشة.
+
+#### نق_س (radiusX)
+
+
+
+```
+عرف نق_س: عـائم؛
+```
+
+
+
+```
+def radiusX: Float;
+```
+
+نصف القطر على المحور السيني للشكل البيضاوي الأمثل الذي يحوط مساحة اللمس.
+
+#### نق_ص (radiusY)
+
+
+
+```
+عرف نق_ص: عـائم؛
+```
+
+
+
+```
+def radiusY: Float;
+```
+
+نصف القطر على المحور الصادي للشكل البيضاوي الأمثل الذي يحوط مساحة اللمس.
+
+#### الزاوية (rotationAngle)
+
+
+
+```
+عرف الزاوية: عـائم؛
+```
+
+
+
+```
+def rotationAngle: Float;
+```
+
+زاوية دوران الشكل البيضاوي الأمثل الذي يحوط مساحة اللمس. الزاوية مع عقارب الساعة ووحدة قياسها
+الدرجات (360 درجة للدورة الكاملة).
+
+#### القوة (force)
+
+
+
+```
+عرف القوة: عـائم؛
+```
+
+
+
+```
+def force: Float;
+```
+
+قوة الضغط على الشاشة لهذه اللمسة. تتراوح ما بين 0.0 تمثل لمسا دون أي ضغط و 1.0 تمثل أقصى قوة
+ضغط يمكن تحسسها.
+
+#### مغيرة (changed)
+
+
+
+```
+عرف مغيرة: ثـنائي؛
+```
+
+
+
+```
+def changed: Bool;
+```
+
+يحدد ما إن كانت هذه اللمسة مغيرة أو جديدة في هذا الحدث. تستخدم هذه القيمة لمعرفة اللمسات التي
+تغيرت منذ الحدث السابق.
diff --git a/Doc/widgets.en.md b/Doc/widgets.en.md
index 2f67441..34fca26 100644
--- a/Doc/widgets.en.md
+++ b/Doc/widgets.en.md
@@ -24,11 +24,29 @@ handler this.style: SrdRef[StyleSet] as_ptr;
handler this.style = SrdRef[StyleSet] as_ptr;
```
-* `id` a unique identifier to distinguish each widget from the other.
-* `className`: Class name of the widget, used for applying styles by class name.
-* `style`: This property allows updating the style of the widget. You can assign a StyleSet object to it, which
- will be useful in sharing styles between multiple instances of a widget. If you try to update the styles
- without setting a StyleSet upfront it will create a new StyleSet object for this widget and return it.
+##### id
+
+```
+handler this.id: String as_ptr;
+```
+
+A unique identifier to distinguish each widget from the other.
+
+##### className
+
+```
+handler this.id: String as_ptr;
+```
+
+Class name of the widget, used for applying styles by class name.
+
+##### style
+
+```
+handler this.id: String as_ptr;
+```
+
+This property allows updating the style of the widget. You can assign a StyleSet object to it, which will be useful in sharing styles between multiple instances of a widget. If you try to update the styles without setting a StyleSet upfront it will create a new StyleSet object for this widget and return it.
#### Abstract Events
@@ -159,17 +177,15 @@ handler this.scrollIntoView();
Requets the browser to be scrolled to the element on which the method is called.
-
### BasicWidget
The base class of all basic widgets. It implements the operations that are shared between all basic widgets.
-It also adds the following definitions:
+It also adds the following definition:
* `hint`: `String`. A property for setting a string to be displayed as a tooltip when the cursor hovers over
the element.
-
### Box
This class represents a rectangle area that contains other widgets.
@@ -188,10 +204,7 @@ handler this.addChildren (count: Int, children: ...temp_ref[SrdRef[Widget]]);
A method to add a new child or more to this box.
-parameters:
-
* `count` number of children we want to add.
-
* `children` the children we want to add, which are widgets.
##### insertChild
@@ -202,10 +215,7 @@ handler this.insertChild (index: Int, child: SrdRef[Widget]);
Inserts a child at the spefcified index.
-parameters:
-
* `index` The index at which to insert the widget.
-
* `child` the widget to be inserted.
##### removeChildren
@@ -216,10 +226,7 @@ handler this.removeChildren (count: Int, children: ...temp_ref[SrdRef[Widget]]);
A method to remove children from this box.
-parameters:
-
* `count` number of children we want to remove.
-
* `children` the children we want to remove, which are widgets.
##### removeAllChildren
@@ -230,14 +237,13 @@ handler this.removeAllChildren ();
Removes all children of this box.
-
### Canvas
This represents an area to be used for free drawing.
#### Variables
-* `resourceId`: `ArchInt`. a unique identifier to distinguish each canvas from the other.
+* `resourceId`: `ArchInt`. a unique identifier to distinguish each canvas from the other.
#### Mixins
@@ -247,10 +253,8 @@ This represents an area to be used for free drawing.
#### Properties
* `bitmapWidth`: `SrdRef[Length]`. The width of the drawing area.
-
* `bitmapHeight`: `SrdRef[Length]`. The height of the drawing area.
-
### Image
A class that represents an image.
@@ -259,7 +263,6 @@ A class that represents an image.
* `url`: `String`. The URL of the image's source.
-
### Video
A class that represents a video.
@@ -271,7 +274,6 @@ A class that represents a video.
* `controls`: ` bool`. The video have controls button or not.
* `autoplay`: ` bool`. The video will be auto played or not.
-
### VideoSource
A class that represents a video source.
@@ -281,7 +283,6 @@ A class that represents a video source.
* `src`: ` String`. The source of the video.
* `videoType`: ` String`. The type of the video.
-
### VideoTrack
A class that represents a video track like subtitle.
@@ -311,11 +312,8 @@ handler this.setChild (child: temp_ref[SrdRef[Image]]);
Sets the child component of this Picture.
-parameters:
-
* `child` the Image we want displayed inside the Picture.
-
### ImageSource
A class that represents a Picture source.
@@ -325,7 +323,6 @@ A class that represents a Picture source.
* `src`: ` String`. The source of the Image.
* `maxWidth`: ` String`. The max width of the Image.
-
### Text
A class for displaying static text.
@@ -345,11 +342,9 @@ can specify a different tag, like `h1` for example.
#### Properties
* `text`: `String`. The text of this component.
-
* `targetId`: `String`. The identifier of the object that is linked to this text, for example a text
beside text input field that tell us that this text input is for username.
-
### Button
Displays a button.
@@ -358,7 +353,6 @@ Displays a button.
* `text`: `String`. The text we want to show on the button.
-
### RadioButton
Displays a radio button for single-choice selections within a group.
@@ -376,11 +370,8 @@ RadioButton(name: String, value: String, checked: Bool);
#### Properties
* `name`: `String`. The name attribute that groups radio buttons together. Only one radio button with the same name can be selected at a time.
-
* `value`: `String`. The value of this radio button when selected.
-
* `checked`: `Bool`. Whether this radio button is currently selected.
-
* `disabled`: `Bool`. Whether this radio button is disabled.
#### Events
@@ -393,7 +384,6 @@ def onChanged: DomEventSignal[RadioButton, Int];
Gets fired when the radio button is selected or deselected. The event is triggered when the user clicks on the radio button or when the selection changes programmatically.
-
### CheckBox
Displays a checkbox for multiple-choice selections.
@@ -426,7 +416,6 @@ def onChanged: DomEventSignal[CheckBox, Int];
Gets fired when the checkbox is checked or unchecked. The event is triggered when the user clicks on the checkbox or when the state changes programmatically.
-
### TextInput
A text entry box.
@@ -434,7 +423,6 @@ A text entry box.
#### Properties
* `text`: `String`. The entered text.
-
* `placeholder`: `String`. A value that appears before the user enters anything, to clarify what
to enter.
@@ -456,7 +444,6 @@ def onKeyPress: DomEventSignal[TextInput, String];
Gets fired when a key is pressed.
-
##### onKeyUp
```
@@ -465,7 +452,6 @@ def onKeyUp: DomEventSignal[TextInput, String];
Gets fired when we a keypress ends.
-
### Input
A user input field.
@@ -473,11 +459,8 @@ A user input field.
#### Properties
* `text`: `String`. The entered value.
-
* `inputType`: `String`. The type of input values.
-
* `disabled`: `Bool`. Whether the input box is disabled.
-
* `placeholder`: `String`. A value that appears before the user enters anything, to clarify what
to enter.
@@ -507,7 +490,6 @@ def onKeyUp: DomEventSignal[Input, String];
Gets fired when we a keypress ends.
-
### Select
A widget that displays a multi-choice input.
@@ -544,7 +526,6 @@ handler this.selectValue(newValue: String);
Changes the current selection.
-
### Hyperlink
A class that displays a hyperlink.
@@ -552,9 +533,7 @@ A class that displays a hyperlink.
#### Properties
* `url`: `String`. The address of the target page.
-
* `child`: `SrdRef[Widget]`. The widget contained in the hyperlink, like a text or an image.
-
* `newTab`: `Bool`. Determins if the address will be opened in a new tab or the current one.
#### Operations
@@ -567,11 +546,8 @@ handler this.setChild (child: temp_ref[SrdRef[Widget]]);
Sets the child component of this hyperlink.
-parameters:
-
* `child` the widget we want displayed inside the hyperlink.
-
### DocView
A class used to show an HTML or Markdown document.
@@ -606,7 +582,6 @@ handler this.setMarkdown(md: String, linksInNewTab: Bool);
Sets a Markdown document as the scene. The second form allows specifying whether hyperlinks in the
document opens in the same browser tab or a new one. The first form opens links in the same tab.
-
### Browser
An area in which you can view another web page, i.e. an iframe.
@@ -625,7 +600,6 @@ handler this.postMessage(msgType: CharsPtr, msgBody: CharsPtr);
Posts an arbitrary message to the window of the loaded site.
-
## Related Classes
### MouseMovePayload
@@ -641,13 +615,37 @@ class MouseMovePayload {
A class that holds mouse move payload information.
-`posX` cursor x coordinate.
+#### posX
+
+```
+def posX: Float;
+```
+
+cursor x coordinate.
+
+#### posY
+
+```
+def posY: Float;
+```
+
+cursor y coordinate.
+
+#### deltaX
-`posY` cursor y coordinate.
+```
+def deltaX: Float;
+```
+
+the change in position on x axis.
-`deltaX` the change in position on x axis.
+#### deltaY
-`deltaY` the change in position on y axis.
+```
+def deltaY: Float;
+```
+
+the change in position on y axis.
### MouseButtonPayload
@@ -662,12 +660,29 @@ class MouseButtonPayload {
A class that holds mouse button payload information.
-`button` the clicked button.
+#### button
+
+```
+def button: Int;
+```
-`posX` cursor x coordinate.
+the clicked button.
-`posY` cursor y coordinate.
+#### posX
+
+```
+def posX: Float;
+```
+
+cursor x coordinate.
+
+#### posY
+
+```
+def posY: Float;
+```
+cursor y coordinate.
### TouchPayload
@@ -691,36 +706,104 @@ class TouchPayload {
This class carries information of a single touch in a touch event. A touch event has an array of
this type representing all touches happening simultaneously.
-`identifier` A unique identifier to enable differentiating touchs from each other in consecutive
-touch events.
+#### identifier
+
+```
+def identifier: String;
+```
+
+A unique identifier to enable differentiating touchs from each other in consecutive touch events.
+
+#### screenX
+
+```
+def screenX: Float;
+```
+
+The X coordinate of the touch relative to the screen.
+
+#### screenY
+
+```
+def screenY: Float;
+```
+
+The Y coordinate of the touch relative to the screen.
+
+#### clientX
+
+```
+def clientX: Float;
+```
+
+The X coordinate of the touch relative to the browser.
-`screenX` The X coordinate of the touch relative to the screen.
+#### clientY
-`screenY` The Y coordinate of the touch relative to the screen.
+```
+def clientY: Float;
+```
-`clientX` The X coordinate of the touch relative to the browser.
+The Y coordinate of the touch relative to the browser.
-`clientY` The Y coordinate of the touch relative to the browser.
+#### pageX
-`pageX` The X coordinate of the touch relative to the document. This value takes into consideration
+```
+def pageX: Float;
+```
+
+The X coordinate of the touch relative to the document. This value takes into consideration
the scroll status of the page and gives the coordinate as if the entire page is visible on the
screen.
-`pageY` The Y coordinate of the touch relative to the document. This value takes into consideration
+#### pageY
+
+```
+def pageY: Float;
+```
+
+The Y coordinate of the touch relative to the document. This value takes into consideration
the scroll status of the page and gives the coordinate as if the entire page is visible on the
screen.
-`radiusX` The X radius of the ellipse that most closely circumscribes the area of contact with the
-screen.
+#### radiusX
-`radiusY` The Y radius of the ellipse that most closely circumscribes the area of contact with the
-screen.
+```
+def radiusX: Float;
+```
+
+The X radius of the ellipse that most closely circumscribes the area of contact with the screen.
-`rotatoinAngle` The angle (in degrees) that the ellipse described by radiusX and radiusY must be
-rotated, clockwise, to most accurately cover the area of contact between the user and the surface.
+#### radiusY
-`force` The amount of pressure being applied to the surface by the user, as a float between 0.0
+```
+def radiusY: Float;
+```
+
+The Y radius of the ellipse that most closely circumscribes the area of contact with the screen.
+
+#### rotationAngle
+
+```
+def rotationAngle: Float;
+```
+
+The angle (in degrees) that the ellipse described by radiusX and radiusY must be rotated, clockwise,
+to most accurately cover the area of contact between the user and the surface.
+
+#### force
+
+```
+def force: Float;
+```
+
+The amount of pressure being applied to the surface by the user, as a float between 0.0
(no pressure) and 1.0 (maximum pressure).
-`changed` Specifies whether this touch has been changed or added in the current event.
+#### changed
+
+```
+def changed: Bool;
+```
+Specifies whether this touch has been changed or added in the current event.
diff --git a/Doc/window.ar.md b/Doc/window.ar.md
index 3ade6d7..29b3d5c 100644
--- a/Doc/window.ar.md
+++ b/Doc/window.ar.md
@@ -13,7 +13,7 @@
```
-عرف النموذج: نـافذة(0~مثل[مؤشر])؛
+@مشترك عرف النموذج: نـافذة(0~مثل[مؤشر])؛
```