Class: Toybox::WatchUi::Menu2InputDelegate

Inherits:
Lang::Object show all

Overview

Menu2InputDelegate responds to a Menu2 selection.

This class should be extended to handle selected Menu2 items.

Examples:

using Toybox.WatchUi;
using Toybox.System;

class MyMenu2InputDelegate extends WatchUi.Menu2InputDelegate {
    function initialize() {
        Menu2InputDelegate.initialize();
    }

    function onSelect(item) {
        System.println(item.getId());
    }
}

See Also:

Since:

  • 3.0.0

Instance Method Summary collapse

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Instance Method Details

onBackObject

A Menu2 Back key was pressed. If this method is not overridden, it will pop the active view.

Since:

  • 3.0.0


14872
14873
# File 'Monkeybrains.rb', line 14872

def onBack()
end

onDoneObject

A Menu2 Done item was selected. This method is only triggered by a CheckboxMenu If this method is not overridden, it will pop the active view.

Since:

  • 3.0.0


14880
14881
# File 'Monkeybrains.rb', line 14880

def onDone()
end

onFooterObject

A CustomMenu footer was selected.

This method is triggered on products with touch input when the user selects the footer area of a CustomMenu. This method is only triggered by a CustomMenu.

Since:

  • 3.0.0


14912
14913
# File 'Monkeybrains.rb', line 14912

def onFooter()
end

onSelect(item) ⇒ Object

A Menu2 MenuItem was selected.

Parameters:

Since:

  • 3.0.0


14866
14867
# File 'Monkeybrains.rb', line 14866

def onSelect(item)
end

onTitleObject

A CustomMenu title was selected.

This method is triggered on products with touch input when the user selects the title area of a CustomMenu. This method is only triggered by a CustomMenu.

Since:

  • 3.0.0


14903
14904
# File 'Monkeybrains.rb', line 14903

def onTitle()
end

onWrap(key) ⇒ Object

A Menu2 is preparing to wrap.

This method is triggered on button-based products when the user attempts to navigate off the end of a menu. If this method returns false the list will not wrap to the opposite end. If this method is not overridden, it will return true and allow the menu to wrap.

Parameters:

Since:

  • 3.0.0


14894
14895
# File 'Monkeybrains.rb', line 14894

def onWrap(key)
end