private void OnButtonRelease (object obj, GtkSharp.ButtonReleaseEventArgs args) 
		{
			if (gotmousedown) { // It should
				TextAreaClick();
			}
			gotmousedown = false;
			mousedownpos = new Point(-1, -1);
		}
		static void SetDefaultSortFunc_cb (IntPtr inst, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, GLib.DestroyNotify destroy)
		{
			try {
				ITreeSortableImplementor __obj = GLib.Object.GetObject (inst, false) as ITreeSortableImplementor;
				GtkSharp.TreeIterCompareFuncInvoker sort_func_invoker = new GtkSharp.TreeIterCompareFuncInvoker (sort_func, user_data, destroy);
				__obj.DefaultSortFunc = sort_func_invoker.Handler;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}
Example #3
0
		static extern void gtk_tree_view_column_set_cell_data_func(IntPtr raw, IntPtr cell_renderer, GtkSharp.TreeCellDataFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy);
Example #4
0
 static extern void gtk_builder_connect_signals_full(IntPtr raw, GtkSharp.BuilderConnectFuncNative func, IntPtr user_data);
Example #5
0
		static extern void gtk_tree_selection_selected_foreach(IntPtr raw, GtkSharp.TreeSelectionForeachFuncNative func, IntPtr data);
Example #6
0
		static extern void gtk_container_foreach(IntPtr raw, GtkSharp.CallbackNative cb, IntPtr callback_data);
Example #7
0
		static extern uint gtk_key_snooper_install (GtkSharp.KeySnoopFuncNative snooper, IntPtr func_data);
Example #8
0
		static extern void gtk_menu_popup(IntPtr raw, IntPtr parent_menu_shell, IntPtr parent_menu_item, GtkSharp.MenuPositionFuncNative func, IntPtr data, uint button, uint activate_time);
		static void SetSortFunc_cb (IntPtr inst, GtkSharp.RecentSortFuncNative sort_func, IntPtr sort_data, GLib.DestroyNotify data_destroy)
		{
			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				GtkSharp.RecentSortFuncInvoker sort_func_invoker = new GtkSharp.RecentSortFuncInvoker (sort_func, sort_data, data_destroy);
				__obj.SortFunc = sort_func_invoker.Handler;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}
Example #10
0
		static extern void gtk_print_job_send(IntPtr raw, GtkSharp.PrintJobCompleteFuncNative cb, IntPtr user_data, GLib.DestroyNotify dnotify);
        void ExposeHandler(object obj, GtkSharp.ExposeEventArgs args)
        {
            Gdk.Rectangle grect = args.Event.area;
            System.Drawing.Rectangle drect = new System.Drawing.Rectangle(grect.x, grect.y, grect.width, grect.height);

            if (grect.width == 0 || grect.height == 0) {
                return;
            }
            /*
            if (updateMargin != null) {
                updateMargin.Paint(e.Graphics, updateMargin.DrawingPosition);
                return;
            }
            */
            if (this.motherTextEditorControl.IsInUpdate) {
                return;
            }
            int currentXPos = 0;
            int currentYPos = 0;
            bool adjustScrollBars = false;

            System.Drawing.Rectangle clipRectangle = drect;

            GdkWindow.BeginPaintRect(grect);

            /*
            if (this.TextEditorProperties.UseAntiAliasedFont) {
                GdkWindow.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            } else {
                GdkWindow.TextRenderingHint = TextRenderingHint.SystemDefault;
            }*/

            foreach (AbstractMargin margin in leftMargins) {
                if (margin.IsVisible) {
                    System.Drawing.Rectangle marginRectangle =
                        new System.Drawing.Rectangle(currentXPos ,
                                         currentYPos,
                                         margin.Size.Width,
                                         GdkWindow.Size.Height - currentYPos);
                    if (marginRectangle != margin.DrawingPosition) {
                        adjustScrollBars = true;
                        margin.DrawingPosition = marginRectangle;
                    }
                    currentXPos += margin.DrawingPosition.Width;
                    if (clipRectangle.IntersectsWith(marginRectangle)) {
                        marginRectangle.Intersect(clipRectangle);
                        margin.Paint(GdkWindow, marginRectangle);
                    }
                }
            }

            System.Drawing.Rectangle textViewArea = new System.Drawing.Rectangle(currentXPos, currentYPos, GdkWindow.Size.Width - 2, GdkWindow.Size.Height - 2);
            if (textViewArea != textView.DrawingPosition) {
                adjustScrollBars = true;
                textView.DrawingPosition = textViewArea;
            }
            if (clipRectangle.IntersectsWith(textViewArea)) {
                textViewArea.Intersect(clipRectangle);
                textView.Paint(GdkWindow, textViewArea);
            }

            if (adjustScrollBars) {
                this.motherTextAreaControl.AdjustScrollBars(null, null);
            }
            Caret.UpdateCaretPosition();

            this.GdkWindow.EndPaint ();
        }
        protected void OnKeyPress(object o, GtkSharp.KeyPressEventArgs e)
        {
            #if GTK
            e.RetVal = true;
            /*if (KeyEventHandler != null) {
                if (KeyEventHandler((char)e.Event.Key)) {
                    return;
                }
            }*/

            if (ExecuteDialogKey(e.Event)) {
                return;
            }
            #else
            base.OnKeyPress(e);
            #endif
            SimulateKeyPress(e.Event.Key);
        }
Example #13
0
		static extern void gtk_action_group_set_translate_func(IntPtr raw, GtkSharp.TranslateFuncNative func, IntPtr data, GLib.DestroyNotify notify);
Example #14
0
		static extern void gtk_assistant_set_forward_page_func(IntPtr raw, GtkSharp.AssistantPageFuncNative page_func, IntPtr data, GLib.DestroyNotify destroy);
Example #15
0
		static extern void gtk_tree_model_foreach(IntPtr raw, GtkSharp.TreeModelForeachFuncNative func, IntPtr user_data);
Example #16
0
		static extern void gtk_enumerate_printers (GtkSharp.PrinterFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy, bool wait);
Example #17
0
		static extern void gtk_menu_attach_to_widget(IntPtr raw, IntPtr attach_widget, GtkSharp.MenuDetachFuncNative detacher);
		/*
		private void OnMotionNotifyEvent(object o, MotionNotifyEventArgs args) {
			DateTime start = DateTime.Now;
			//if (args.Event.time < last_draw) {
			//    return;
			//}
		}
		*/
#endif

#if GTK		
		void OnMotionNotify(object sender, GtkSharp.MotionNotifyEventArgs args)
Example #19
0
		static extern void gtk_menu_popup_for_device(IntPtr raw, IntPtr device, IntPtr parent_menu_shell, IntPtr parent_menu_item, GtkSharp.MenuPositionFuncNative func, IntPtr data, GLib.DestroyNotify destroy, uint button, uint activate_time);
		private void OnButtonPress (object obj, GtkSharp.ButtonPressEventArgs args)
Example #21
0
		static extern void gtk_text_tag_table_foreach(IntPtr raw, GtkSharp.TextTagTableForeachNative func, IntPtr data);
Example #22
0
		static extern void gtk_icon_view_selected_foreach(IntPtr raw, GtkSharp.IconViewForeachFuncNative func, IntPtr data);
Example #23
0
		static extern void gtk_tree_selection_set_select_function(IntPtr raw, GtkSharp.TreeSelectionFuncNative func, IntPtr data, GLib.DestroyNotify destroy);
Example #24
0
		static void SetCellDataFunc_cb (IntPtr inst, IntPtr cell, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy)
		{
			try {
				ICellLayoutImplementor __obj = GLib.Object.GetObject (inst, false) as ICellLayoutImplementor;
				GtkSharp.CellLayoutDataFuncInvoker func_invoker = new GtkSharp.CellLayoutDataFuncInvoker (func, func_data, destroy);
				__obj.SetCellDataFunc (GLib.Object.GetObject(cell) as Gtk.CellRenderer, func_invoker.Handler);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}
Example #25
0
		static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int sort_column_id, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, GLib.DestroyNotify destroy);
Example #26
0
		static extern void gtk_accel_map_foreach_unfiltered(IntPtr data, GtkSharp.AccelMapForeachNative foreach_func);
Example #27
0
		static extern void gtk_recent_chooser_set_sort_func(IntPtr raw, GtkSharp.RecentSortFuncNative sort_func, IntPtr sort_data, GLib.DestroyNotify data_destroy);
Example #28
0
		static extern void gtk_file_filter_add_custom(IntPtr raw, int needed, GtkSharp.FileFilterFuncNative func, IntPtr data, GLib.DestroyNotify notify);
Example #29
0
		static extern void gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy);
Example #30
0
		static extern void gtk_print_settings_foreach(IntPtr raw, GtkSharp.PrintSettingsFuncNative func, IntPtr user_data);