Last change
on this file since 114 was
114,
checked in by smasson, 18 years ago
|
new compilation options (compile_opt idl2, strictarrsubs) in each routine
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.3 KB
|
Line | |
---|
1 | ;------------------------------------------------------------ |
---|
2 | ;------------------------------------------------------------ |
---|
3 | ;------------------------------------------------------------ |
---|
4 | ;+ |
---|
5 | ; NAME: findtopid |
---|
6 | ; |
---|
7 | ; PURPOSE: retrouve a partir d''un Id de widget l'Id du widget qui est |
---|
8 | ; "the top-level base" (i.e., it has no parent) |
---|
9 | ; |
---|
10 | ; CATEGORY: aide pour les widgets |
---|
11 | ; |
---|
12 | ; CALLING SEQUENCE: res=findtopid(Widget_ID) |
---|
13 | ; |
---|
14 | ; INPUTS: Widget_ID: this argument should be the widget ID of the |
---|
15 | ; widget for which information is desired. |
---|
16 | ; |
---|
17 | ; KEYWORD PARAMETERS: |
---|
18 | ; |
---|
19 | ; OUTPUTS: l'Id du widget qui est "the top-level base" |
---|
20 | ; |
---|
21 | ; COMMON BLOCKS: |
---|
22 | ; |
---|
23 | ; SIDE EFFECTS: |
---|
24 | ; |
---|
25 | ; RESTRICTIONS: |
---|
26 | ; |
---|
27 | ; EXAMPLE: |
---|
28 | ; |
---|
29 | ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
30 | ; 22/9/1999 |
---|
31 | ;- |
---|
32 | ;------------------------------------------------------------ |
---|
33 | ;------------------------------------------------------------ |
---|
34 | ;------------------------------------------------------------ |
---|
35 | FUNCTION findtopid, identite |
---|
36 | ; |
---|
37 | compile_opt idl2, strictarrsubs |
---|
38 | ; |
---|
39 | id = long(identite) |
---|
40 | ; exist = widget_info(id, /managed) |
---|
41 | ; if exist EQ 0 then return, -1 |
---|
42 | topid = id |
---|
43 | topid2 = id |
---|
44 | while topid2 NE 0 do begin |
---|
45 | topid = topid2 |
---|
46 | topid2 = widget_info(topid2, /parent) |
---|
47 | endwhile |
---|
48 | return, long(topid) |
---|
49 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.