public void EndTimer(Cocoa.Object sender) { if (timer != null) { timer.Stop (); timer = null; } }
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 (); } }
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); }
public TableColumn(Cocoa.Object identifier) : base() { NativeObject = (IntPtr) ObjCMessaging.objc_msgSend (NativeObject, "initWithIdentifier:", typeof (IntPtr), typeof (IntPtr), identifier.NativeObject); }
public void SpeechSynthesizerWillSpeakWordOfString( SpeechSynthesizer aSender, Range aCharacterRange, Cocoa.String aString ) { mSynth.FireEvent_WillSpeak( aCharacterRange, aString ); }
protected void SubscribeToCocoaDelegate( Cocoa.Object aTarget ) { ObjCMessaging.objc_msgSend (NativeObject, "setDelegate:", typeof (void), typeof (System.IntPtr), aTarget.NativeObject ); }
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); }
public bool OutlineViewIsItemExpandable(OutlineView outlineView, Cocoa.Object item) { return OutlineViewNumberOfChildrenOfItem(outlineView,item) > 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; }
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; }
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); }
public void TimerTick(Cocoa.Object sender) { Console.WriteLine ("Timer tick"); RunLoop.Current.Stop (); }
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; }
public void OrderFront(Cocoa.Object aSender) { ObjCMessaging.objc_msgSend (NativeObject, "orderFront:", typeof (void), typeof (IntPtr), aSender.NativeObject); }
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"); }
public Cocoa.Object OutlineViewObjectValueForTableColumnByItem(OutlineView outlineView, TableColumn tableColumn, Cocoa.Object item) { BrowserItem bi = item as BrowserItem; return bi == null ? null : bi.ValueAt(tableColumn.Identifier); }
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); }
public void goBack(Cocoa.Object sender) { WebBackForwardList history = webView.BackForwardList; if (history.BackListCount > 0) { history.GoBack(); loadHistoryItem(history.CurrentItem); } }
public void InterfaceChanged(Cocoa.Object sender) { itsView.Display (); }
protected void FireEvent_WillSpeak( Range aCharacterRange, Cocoa.String aString ) { if( WillSpeak != null ) { WillSpeak( this, aCharacterRange, aString.ToString() ); } }
public void ExpandItem(Cocoa.Object item) { ObjCMessaging.objc_msgSend (NativeObject, "expandItem:", typeof (void), typeof (IntPtr), item.NativeObject); }
public void buttonClick(Cocoa.Object sender) { textBox1.Value = "Button Pushed"; }