7fd59977 |
1 | /*********************************************************************** |
2 | |
3 | FONCTION : |
4 | ---------- |
5 | File OpenGl_togl_pickid.c : |
6 | |
7 | |
8 | REMARQUES: |
9 | ---------- |
10 | |
11 | HISTORIQUE DES MODIFICATIONS : |
12 | -------------------------------- |
13 | xx-xx-xx : xxx ; Creation. |
14 | 03-03-98 : CAL ; Modification des structures CALL_DEF_GROUP et STRUCTURE |
15 | |
16 | ************************************************************************/ |
17 | |
18 | /*----------------------------------------------------------------------*/ |
19 | /* |
20 | * Includes |
21 | */ |
22 | |
23 | #include <OpenGl_tgl_all.hxx> |
24 | #include <InterfaceGraphic_Graphic3d.hxx> |
25 | #include <OpenGl_tgl.hxx> |
26 | #include <OpenGl_tgl_funcs.hxx> |
27 | #include <OpenGl_tgl_utilgr.hxx> |
28 | |
29 | /*----------------------------------------------------------------------*/ |
30 | |
31 | void EXPORT |
32 | call_togl_pickid |
33 | ( |
34 | CALL_DEF_GROUP * agroup |
35 | ) |
36 | { |
37 | call_func_open_struct( agroup->Struct->Id ); |
38 | call_func_set_elem_ptr( 0 ); |
39 | call_func_set_elem_ptr_label( agroup->LabelBegin ); |
40 | if( agroup->PickId.IsDef ) |
41 | { |
42 | if( agroup->PickId.IsSet ) |
43 | { |
44 | call_func_offset_elem_ptr( 1 ); |
45 | call_func_set_edit_mode( CALL_PHIGS_EDIT_REPLACE ); |
46 | } |
47 | else |
48 | call_func_set_edit_mode( CALL_PHIGS_EDIT_INSERT ); |
49 | |
50 | call_func_set_pick_id( agroup->PickId.Value ); |
51 | } |
52 | else |
53 | { |
54 | if( agroup->PickId.IsSet ) |
55 | { |
56 | call_func_offset_elem_ptr( 1 ); |
57 | call_func_del_elem(); |
58 | } |
59 | } |
60 | call_func_close_struct(); |
61 | |
62 | return; |
63 | } |