Last change
on this file since 251 was
231,
checked in by pinsard, 17 years ago
|
improvements/corrections of some *.pro headers
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
783 bytes
|
Rev | Line | |
---|
[2] | 1 | ;+ |
---|
| 2 | ; |
---|
[150] | 3 | ; @file_comments |
---|
[231] | 4 | ; Find, from an Id of widget, the Id of the widget which is |
---|
[2] | 5 | ; "the top-level base" (i.e., it has no parent) |
---|
| 6 | ; |
---|
[150] | 7 | ; categories |
---|
| 8 | ; widget |
---|
[231] | 9 | ; |
---|
[150] | 10 | ; @param WIDGET_ID |
---|
| 11 | ; This argument should be the widget ID of the |
---|
[2] | 12 | ; widget for which information is desired. |
---|
| 13 | ; |
---|
[150] | 14 | ; @returns |
---|
| 15 | ; The Id of the widget which is "the top-level base" |
---|
[2] | 16 | ; |
---|
[150] | 17 | ; @history |
---|
[157] | 18 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
[150] | 19 | ; 22/9/1999 |
---|
[2] | 20 | ; |
---|
[150] | 21 | ; @version |
---|
| 22 | ; $Id$ |
---|
[2] | 23 | ; |
---|
| 24 | ;- |
---|
[231] | 25 | ; |
---|
[150] | 26 | FUNCTION findtopid, WIDGET_ID |
---|
[114] | 27 | ; |
---|
| 28 | compile_opt idl2, strictarrsubs |
---|
| 29 | ; |
---|
[150] | 30 | id = long(WIDGET_ID) |
---|
[2] | 31 | ; exist = widget_info(id, /managed) |
---|
| 32 | ; if exist EQ 0 then return, -1 |
---|
| 33 | topid = id |
---|
| 34 | topid2 = id |
---|
| 35 | while topid2 NE 0 do begin |
---|
| 36 | topid = topid2 |
---|
| 37 | topid2 = widget_info(topid2, /parent) |
---|
| 38 | endwhile |
---|
| 39 | return, long(topid) |
---|
| 40 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.