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