Beispiel #1
0
 public void EndTimer(Cocoa.Object sender)
 {
     if (timer != null) {
         timer.Stop ();
         timer = null;
     }
 }
Beispiel #2
0
 public void StartTimer(Cocoa.Object sender)
 {
     if (timer == null) {
         timer = new Timer ();
         timer.Interval = 0.0; //0.025;
         timer.Tick += new ActionHandler (itsView.ViewTick);
         timer.Start ();
     }
 }
Beispiel #3
0
 public void BeginSheet(Cocoa.Window docWindow, OpenPanelHandler modalDelegate, System.IntPtr contextInfo)
 {
     if (modalDelegate == null)
         throw new ArgumentNullException ("modalDelegate");
     Cocoa.Object target = (Cocoa.Object) modalDelegate.Target;
     MethodInfo method = modalDelegate.Method;
     string selector = method.Name;
     foreach (ExportAttribute export_attribute in Attribute.GetCustomAttributes (method, typeof (ExportAttribute))) {
         if (export_attribute.Selector != null)
             selector = export_attribute.Selector;
     }
     ObjCMessaging.objc_msgSend (NativeObject, "beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:", typeof (void), typeof (System.IntPtr), IntPtr.Zero, typeof (System.IntPtr), IntPtr.Zero, typeof (System.IntPtr), IntPtr.Zero, typeof (System.IntPtr), (docWindow == null) ? IntPtr.Zero : docWindow.NativeObject, typeof (System.IntPtr), target.NativeObject, typeof (System.IntPtr), ObjCMethods.sel_getUid (selector), typeof (System.IntPtr), contextInfo);
 }
Beispiel #4
0
 public TableColumn(Cocoa.Object identifier)
     : base()
 {
     NativeObject = (IntPtr) ObjCMessaging.objc_msgSend (NativeObject, "initWithIdentifier:", typeof (IntPtr), typeof (IntPtr), identifier.NativeObject);
 }
Beispiel #5
0
 public void SpeechSynthesizerWillSpeakWordOfString( SpeechSynthesizer aSender, Range aCharacterRange, Cocoa.String aString )
 {
     mSynth.FireEvent_WillSpeak( aCharacterRange, aString );
 }
Beispiel #6
0
 protected void SubscribeToCocoaDelegate( Cocoa.Object aTarget )
 {
     ObjCMessaging.objc_msgSend (NativeObject, "setDelegate:", typeof (void), typeof (System.IntPtr), aTarget.NativeObject );
 }
Beispiel #7
0
 public void EndSheet(Cocoa.Window sheet, int returnCode)
 {
     if (sheet == null)
         throw new ArgumentNullException ("sheet");
     ObjCMessaging.objc_msgSend (NativeObject, "endSheet:returnCode:", typeof (void), typeof (System.IntPtr), sheet.NativeObject, typeof (int), returnCode);
 }
Beispiel #8
0
 public bool OutlineViewIsItemExpandable(OutlineView outlineView, Cocoa.Object item)
 {
     return OutlineViewNumberOfChildrenOfItem(outlineView,item) > 0;
 }
Beispiel #9
0
 public bool validateMenuItem(Cocoa.Object sender)
 {
     MenuItem item = (MenuItem) sender;
     //		if (item.Action.Equals("goBack:")) return webView.canGoBack;
     //		if (item.Action.Equals("goForward:")) return webView.canGoForward;
     return true;
 }
Beispiel #10
0
 public BrowserItem OutlineViewChildOfItem(OutlineView outlineView, int index, Cocoa.Object item)
 {
     BrowserItem bi = item as BrowserItem;
     if (bi != null)
     bi = bi.ItemAt(index);
     else
     bi = (BrowserItem)items[index];
     return bi;
 }
Beispiel #11
0
 public void UserDidSearch(Cocoa.Object sender)
 {
     string value = searchBox.Value;
     int index=indexBrowser.SelectedRowInColumn (0);
     if (value != null) {
     Console.WriteLine ("Searching for {0}", value);
     index = IndexDataSource.FindClosest(value);
     }
     indexBrowser.SelectRowInColumn (index, 0);
 }
Beispiel #12
0
 public void TimerTick(Cocoa.Object sender)
 {
     Console.WriteLine ("Timer tick");
     RunLoop.Current.Stop ();
 }
Beispiel #13
0
        public URLRequest RequestHandler(WebView sender, Cocoa.Object identifier, URLRequest initialRequest, URLResponse urlResponse, WebDataSource datasource)
        {
            //		if ( ((URL)(initialRequest.urL)).relativeString.ToString().IndexOf("http://monodoc/load?") == 0) {
            // FIXME
            if (initialRequest.URL.AbsoluteString.IndexOf ("http://monodoc/load?") == 0) {
            string url = initialRequest.URL.AbsoluteString.Replace("http://monodoc/load?", "");
            string content = "";
            if (url.StartsWith ("edit:")) {
            //				XmlNode edit_node = EditingUtils.GetNodeFromUrl (url, help_tree);
            //				Console.WriteLine (edit_node.InnerXml);
            }

            Node n;
            try {
                content = help_tree.RenderUrl(url, out n);
            } catch (Exception e) {
                content = "Exception Rendering the requested URL: " + e;
            }
            if(content != null && !content.Equals("")) {
                content=content.Replace("a href='", "a href='http://monodoc/load?");
                content=content.Replace("a href=\"", "a href=\"http://monodoc/load?");
                webView.Render (content);
                addHistoryItem(url);
            }
            return null;
            }
            return initialRequest;
        }
Beispiel #14
0
 public void OrderFront(Cocoa.Object aSender)
 {
     ObjCMessaging.objc_msgSend (NativeObject, "orderFront:", typeof (void), typeof (IntPtr), aSender.NativeObject);
 }
Beispiel #15
0
 public int OutlineViewNumberOfChildrenOfItem(OutlineView outlineView, Cocoa.Object item)
 {
     BrowserItem bi = item as BrowserItem;
     int count = bi != null ? bi.Count : help_tree.Nodes.Count;
     return count;
 }
 public void FinishLoading(Cocoa.Notification notification)
 {
     Console.WriteLine("Form Loaded");
 }
Beispiel #17
0
        public Cocoa.Object OutlineViewObjectValueForTableColumnByItem(OutlineView outlineView, TableColumn tableColumn, Cocoa.Object item)
        {
            BrowserItem bi = item as BrowserItem;

            return bi == null ? null : bi.ValueAt(tableColumn.Identifier);
        }
Beispiel #18
0
 public void ViewTick(Cocoa.Object sender)
 {
     xrotate += 1.0f; if (xrotate > 350.0f) { xrotate = 0.0f; }
     yrotate += 1.0f; if (yrotate > 350.0f) { yrotate = 0.0f; }
     zrotate += 1.0f; if (zrotate > 350.0f) { zrotate = 0.0f; }
     zoom += zoomdelta; if (zoom > 4.9f) { zoomdelta = -0.1f; } if (zoom < 0.2f) { zoomdelta = 0.1f; }
     #if RECTANGLE
     color1 = SetColor ();
     color2 = SetColor ();
     color3 = SetColor ();
     color4 = SetColor ();
     #endif
     Draw (viewFrame);
 }
Beispiel #19
0
 public void goBack(Cocoa.Object sender)
 {
     WebBackForwardList history = webView.BackForwardList;
     if (history.BackListCount > 0) {
     history.GoBack();
     loadHistoryItem(history.CurrentItem);
     }
 }
Beispiel #20
0
 public void InterfaceChanged(Cocoa.Object sender)
 {
     itsView.Display ();
 }
Beispiel #21
0
 protected void FireEvent_WillSpeak( Range aCharacterRange, Cocoa.String aString )
 {
     if( WillSpeak != null )
     {
         WillSpeak( this, aCharacterRange, aString.ToString() );
     }
 }
Beispiel #22
0
 public void ExpandItem(Cocoa.Object item)
 {
     ObjCMessaging.objc_msgSend (NativeObject, "expandItem:", typeof (void), typeof (IntPtr), item.NativeObject);
 }
Beispiel #23
0
 public void buttonClick(Cocoa.Object sender)
 {
     textBox1.Value = "Button Pushed";
 }