Subversion Repositories wimsdev

Rev

Rev 6833 | Rev 8278 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6833 Rev 8277
Line 6... Line 6...
6
slib_wims_version=4.01
6
slib_wims_version=4.01
7
!exit
7
!exit
8
 
8
 
9
:proc
9
:proc
10
slib_out=
10
slib_out=
-
 
11
 
11
!reset slib_text,slib_color,slib_width,slib_height,slib_option
12
!reset slib_text,slib_color,slib_width,slib_height,slib_option,bubbleOpts,slib_stylesheet,slib_tripos
12
!distribute items $wims_read_parm into slib_text,slib_color,slib_width,slib_height,slib_option
13
!distribute items $wims_read_parm into slib_text,slib_color,slib_width,slib_height,slib_option
-
 
14
 
13
!default slib_width=250
15
slib_width=$[$slib_width]
14
!default slib_height=$[$slib_width/3]
16
!!default slib_height=$[$slib_width/3]
-
 
17
slib_height=$[$slib_height]
-
 
18
!if $slib_width>0
-
 
19
    slib_width=width:$(slib_width)px;
-
 
20
!else
-
 
21
    !reset slib_width
-
 
22
!endif
-
 
23
!if $slib_height>0
-
 
24
    slib_height=height:$(slib_height)px;
-
 
25
!else
-
 
26
    !reset slib_height
-
 
27
!endif
-
 
28
 
15
!default slib_color=antiquewhite
29
!default slib_color=antiquewhite
-
 
30
slib_tripos=!getopt triangle in $slib_option
-
 
31
!default slib_tripos=btm-left
-
 
32
slib_num=!getopt number in $slib_option
-
 
33
!default slib_num=!randint 1,1000
16
slib_text=!declosing $slib_text
34
slib_text=!declosing $slib_text
17
 
35
 
-
 
36
!if rectangle notwordof $slib_option
18
slib_p=$[$slib_width]
37
 bubbleOpts=$bubbleOpts round
-
 
38
 !if btm-right iswordof $slib_tripos
19
slib_q=$[$slib_height]
39
    slib_tripos=btm-right-in
20
slib_ajust=30
40
 !endif
-
 
41
!endif
-
 
42
 
21
slib_t=$[($slib_p-3*$slib_ajust)/2]
43
!if border iswordof $slib_option
-
 
44
 bubbleOpts=$bubbleOpts border
-
 
45
!endif
-
 
46
 
-
 
47
!if noshadow notwordof $slib_option
22
taille de la minipage
48
 bubbleOpts=$bubbleOpts shadow
-
 
49
!endif
23
 
50
 
-
 
51
slib_stylesheet = <style type="text/css">\
-
 
52
#bubble_$slib_num{background-color: $slib_color;}\
-
 
53
#bubble_$slib_num.triangle:not(.btm-left):after{border-top-color:   $slib_color;}\
24
!!slib_text=!replace internal &#36;&#36; by $$$$$ in $slib_text
54
#bubble_$slib_num.triangle.left-in:after{       border-right-color: $slib_color;}\
-
 
55
#bubble_$slib_num.triangle.btm-left:after{      border-left-color:  $slib_color;}\
-
 
56
#bubble_$slib_num.triangle.btm-left-in:after{   border-left-color:  $slib_color;}\
-
 
57
#bubble_$slib_num.triangle.btm-right-in:after{  border-right-color: $slib_color;}\
-
 
58
#bubble_$slib_num.triangle.btm-right:after{     border-right-color: $slib_color;}\
-
 
59
#bubble_$slib_num.triangle.right-in:after{      border-left-color:  $slib_color;}\
-
 
60
</style>
-
 
61
 
-
 
62
 
-
 
63
slib_out=$slib_stylesheet\
-
 
64
<div id="bubble_$slib_num" class="inline talk-bubble triangle $slib_tripos $bubbleOpts"\
-
 
65
style="$slib_width$slib_height">\
-
 
66
    <div class="talktext">\
-
 
67
     <p>$slib_text</p>\
-
 
68
    </div>\
-
 
69
 </div>
-
 
70
 
25
 
71
 
26
!read oef/teximg.phtml \begin{minipage}{$slib_t pt}\centering{ $slib_text }\end{minipage}
-
 
27
 
-
 
28
slib_dialog=$ins_filename
-
 
29
!if rectangle iswordof $slib_option
-
 
30
 slib_out=xrange -20,$slib_width\
-
 
31
  yrange -20,$slib_height\
-
 
32
  frectangle 0,0,$slib_width,$slib_height,$slib_color\
-
 
33
  ftriangle -20,-20,0,$slib_t,0,0,$slib_color\
-
 
34
  copy ($slib_width-$[$slib_p])/2+$slib_ajust,($slib_height+$slib_q/2)/2,-1,-1,-1,-1,$slib_dialog
-
 
35
!else
-
 
36
slib_out=xrange -10,$slib_width\
-
 
37
  yrange -10,$slib_height\
-
 
38
  fellipse $slib_width/2,$slib_height/2,$[$slib_p],$[$slib_q],$slib_color\
-
 
39
  ftriangle -10,-10,($slib_width-$[$slib_p])/2,$slib_height/2,($slib_width-$[$slib_p])/2+$slib_ajust,$slib_height/2-10,$slib_color\
-
 
40
  copy ($slib_width-$[$slib_p])/2+$slib_ajust,($slib_height+$slib_q/2)/2,-1,-1,-1,-1,$slib_dialog
-
 
41
!endif
-
 
42
!set insdraw_size=$slib_width,$slib_height
-
 
43
!insdraw $slib_out
-
 
44
 
72
 
45
slib_out=<img src="$ins_url" alt="" />
-