@@ -978,24 +978,11 @@ const ZONE_SIZE = 10;
978978/**
979979 * #PopupResizeHandler:
980980 * @short_description : Class that allows an applet to be resized using the mouse.
981- * @inhibit_resizing (Boolean): Set to true to prevent resizing
981+ * @inhibit_resizing (Boolean): Set to true to prevent resizing from starting.
982982 * @resizingInProgress (Boolean): True when resizing is in progress
983- *
984- * Parameters -
985- * actor: The actor to be resized
986- * get_orientation: Function that returns the current orientation of the applet. (St.Side)
987- * resized_callback: Function that is called while resizing is in progress with the new width
988- * and height as parameters. This function should actually change the applet size. This is
989- * also called once when resizing has ended (resizingInProgress == false) so that the
990- * applet can store the final size instead of doing so continuously whilst resizing
991- * is in progress.
992- * get_user_width: Function that returns the current applet width. This is called only
993- * when resizing begins so does not have to return the correct width while resizing is in
994- * progress. Note: This value does not necessarily have to be the applet width. It could
995- * be the width of a container inside the applet used for sizing the applet.
996- * get_user_height: As get_user_width but for height
997983 *
998- * Example -
984+ * Example usage:
985+ * ```
999986 * this.menu = new Applet.AppletPopupMenu(this, this.orientation);
1000987 * this.settings.bind("popup-width", "popup_width");
1001988 * this.settings.bind("popup-height", "popup_height");
@@ -1015,8 +1002,23 @@ const ZONE_SIZE = 10;
10151002 * this.menu.actor.set_width(this.popup_width * global.ui_scale);
10161003 * this.menu.actor.set_height(this.popup_height * global.ui_scale);
10171004 * }
1005+ * ```
10181006 */
10191007var PopupResizeHandler = class PopupResizeHandler {
1008+ /**
1009+ * constructor:
1010+ * @actor (ClutterActor): The actor to be resized
1011+ * @get_orientation (Function): Function that returns the current orientation of the applet. (St.Side)
1012+ * @resized_callback (Function): Function that is called while resizing is in progress with the new
1013+ * width and height as parameters. This function should actually change the applet size. This is
1014+ * also called once when resizing has ended (resizingInProgress == false) so that the applet
1015+ * can store the final size instead of doing so continuously whilst resizing is in progress.
1016+ * @get_user_width (Function): Function that returns the current applet width. This function is not
1017+ * called while resizing is in progress so it only has to return the correct width when resizing is
1018+ * not in progress. Note: This value does not necessarily have to be the applet width. It could
1019+ * be the width of a container inside the applet used for sizing the applet.
1020+ * @get_user_height (Function): As get_user_width but for height
1021+ */
10201022 constructor ( actor , get_orientation , resized_callback , get_user_width , get_user_height ) {
10211023 this . actor = actor ;
10221024 this . _get_orientation = get_orientation ;
0 commit comments