DragonFly On-Line Manual Pages

Search: Section:  


nx::current(3)                                                  nx::current(3)

______________________________________________________________________________

NAME

nx::current - Return information about the method callstack

SYNOPSIS

current ?option? ______________________________________________________________________________

DESCRIPTION

current ?option? This introspection command provides information about various details, to be identified using option, on the callstack. The command is invoked from a method body. If option is not provided, nx::current will default to option object (see below). nx::current operates on the Tcl callstack and is aware of NX- specific callstack and stackframe details. option can be any of the following: o activelevel returns the actual callstack level which calls into the currently executing method directly. This activelevel might correspond the callinglevel, but this is not necessarily the case. The activelevel also includes intermediate calls, such as nx::next invocations. The level is reported as an absolute level number (# followed by a digit) to be directly used as the first argument to uplevel or upvar. o args returns the list of argument values passed into the currently executing method implementation. o calledclass returns the name of the class that provides the method implementation to which the intercepted method call is to be redirected (only available from within filter methods). o calledmethod returns the original method name requested by intercepted method call (only available from within filter methods). o callingclass returns the name of the class which provides the method implementation calling into the currently executing method. See also callingobject. o callinglevel resolves the callstack level of the originating invocation of the currently executing method implementation. Callstack levels introduced by method interception (e.g., filters) and by method combination (nx::next) are ignored. The level is reported as an absolute level number (# followed by a digit) to be directly used as the first argument to uplevel or upvar. See also activelevel. o callingobject returns the name of the object which is calling into the currently executing method. See also callingclass. o class returns the name of the class providing the currently executing method implementation. The returned method-providing class may be different to the class of the current object. If called from within a method implementation provided by the current object itself, an empty string is returned. o filterreg returns the object (class) on which the currently executing method was registered as a filter method (only available from within filter methods). o isnextcall will return 1, if the currently executing method implementation was invoked via nx::next; 0 otherwise. o method returns the name of the currently executing method. If an ensemble-method call, the name of the bottom-most ("leaf") method is returned. o methodpath returns the combined name of the currently executing method (including all ensemble levels) in an ensemble-method call. Otherwise, for a regular method call, the result corresponds to the result of option method. o nextmethod returns the name of the next most specific method implementation to be called when invoking nx::next. o object gives the name of the object on which the currently executing method implementation is evaluated.

COPYRIGHT

Copyright (c) 2014 Stefan Sobernig <stefan.sobernig@wu.ac.at>, Gustaf Neumann <gustaf.neumann@wu.ac.at>; available under the Creative Commons Attribution 3.0 Austria license (CC BY 3.0 AT). current 2.0 nx::current(3) mitem_current(3X) mitem_current(3X)

NAME

mitem_current - set and get current_menu_item

SYNOPSIS

#include <menu.h> int set_current_item(MENU *menu, ITEM *item); ITEM *current_item(const MENU *menu); int set_top_row(MENU *menu, int row); int top_row(const MENU *menu); int item_index(const ITEM *item);

DESCRIPTION

The function set_current_item sets the current item (the item on which the menu cursor is positioned). current_item returns a pointer to the current item in the given menu. The function set_top_row sets the top row of the menu to show the given row (the top row is initially 0, and is reset to this value whenever the O_ROWMAJOR option is toggled). The item leftmost on the given row becomes current. The function top_row returns the number of the top menu row being displayed. The function item_index returns the (zero-origin) index of item in the menu's item pointer list.

RETURN VALUE

current_item returns a pointer (which may be NULL). It does not set errno. top_row and item_index return ERR (the general curses error value) if their menu parameter is NULL. set_current_item and set_top_row return one of the following: E_OK The routine succeeded. E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. E_BAD_STATE Routine was called from an initialization or termination function. E_NOT_CONNECTED No items are connected to the menu. E_SYSTEM_ERROR System error occurred (see errno(3)).

SEE ALSO

curses(3X), menu(3X).

NOTES

The header file <menu.h> automatically includes the header file <curses.h>.

PORTABILITY

These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. The SVr4 menu library documentation specifies the top_row and index_item error value as -1 (which is the value of ERR).

AUTHORS

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. mitem_current(3X)

Search: Section: