3 namespace System
.Windows
.Forms
{
8 internal class SWFGtkConv
{
10 private SWFGtkConv(){}
12 public static MouseEventArgs
MouseUpDownArgs (Gdk
.EventButton ev
){
13 uint boton
= ev
.button
;
16 case 1: btn
= MouseButtons
.Left
;
18 case 2: btn
= MouseButtons
.Middle
;
20 case 3: btn
= MouseButtons
.Right
;
23 //FIXME : Does it work? I've a typical wheelmouse.
24 case 4: btn
= MouseButtons
.XButton1
;
26 case 5: btn
= MouseButtons
.XButton2
;
29 btn
= MouseButtons
.None
;
34 case Gdk
.EventType
.ButtonRelease
:
35 case Gdk
.EventType
.ButtonPress
: clicks
= 1;
37 case Gdk
.EventType
.TwoButtonPress
:
38 case Gdk
.EventType
.ThreeButtonPress
: clicks
= 2;
44 MouseEventArgs ret
= new MouseEventArgs
45 (btn
, clicks
, (int)ev
.x
, (int)ev
.y
, 0);
49 // TODO: && is a literal &
50 public static string AccelString (string st
){
51 //return st.Replace("_", "__").Replace ("&", "_");
52 String s
= st
.Replace ("_", "__");
58 if ((i
< (s
.Length
-1)) && (s
[i
+1] == '&')){
76 // Font not implemented.
78 public static Pango
.FontDescription
Font (System
.Drawing
.Font f
){
79 FontDescription ret
= new FontDescription();
80 //ret.Weight = (f.Bold) ? Pango.Weight.Bold : Pango.Weight.Normal;
81 //ret.Family = f.FontFamily.Name;
82 //ret.Style = (f.Italic) ? Pango.Style.Italic : Pango.Style.Normal;