From 1c22e6a7aa5a776bc4fb2982826aa53d171a2d5f Mon Sep 17 00:00:00 2001 From: Luca Padovani Date: Wed, 12 Feb 2003 13:08:21 +0000 Subject: [PATCH] * bind of method get_drawing_area * currently the test doesn't do anything with it --- helm/DEVEL/lablgtkmathview/gMathView.ml | 1 + helm/DEVEL/lablgtkmathview/gMathView.mli | 1 + helm/DEVEL/lablgtkmathview/gtkMathView.ml | 2 ++ helm/DEVEL/lablgtkmathview/ml_gtk_mathview.c | 1 + helm/DEVEL/lablgtkmathview/test/test.ml | 10 ++++++++++ 5 files changed, 15 insertions(+) diff --git a/helm/DEVEL/lablgtkmathview/gMathView.ml b/helm/DEVEL/lablgtkmathview/gMathView.ml index fd505f1dc..23197b227 100644 --- a/helm/DEVEL/lablgtkmathview/gMathView.ml +++ b/helm/DEVEL/lablgtkmathview/gMathView.ml @@ -134,6 +134,7 @@ class math_view_skel obj = object method get_vadjustment = new GData.adjustment (MathView.get_vadjustment obj) method get_buffer = MathView.get_buffer obj method get_frame = new GBin.frame (MathView.get_frame obj) + method get_drawing_area = new GMisc.drawing_area (MathView.get_drawing_area obj) method set_font_size = MathView.set_font_size obj method get_font_size = MathView.get_font_size obj method set_anti_aliasing = MathView.set_anti_aliasing obj diff --git a/helm/DEVEL/lablgtkmathview/gMathView.mli b/helm/DEVEL/lablgtkmathview/gMathView.mli index d8a5dd616..5b9fdc803 100644 --- a/helm/DEVEL/lablgtkmathview/gMathView.mli +++ b/helm/DEVEL/lablgtkmathview/gMathView.mli @@ -61,6 +61,7 @@ class math_view_skel : method get_font_manager_type : [ `font_manager_gtk | `font_manager_t1] method get_font_size : int method get_frame : GBin.frame + method get_drawing_area : GMisc.drawing_area method get_hadjustment : GData.adjustment method get_height : int method get_log_verbosity : int diff --git a/helm/DEVEL/lablgtkmathview/gtkMathView.ml b/helm/DEVEL/lablgtkmathview/gtkMathView.ml index 4af1ae782..394d97e14 100644 --- a/helm/DEVEL/lablgtkmathview/gtkMathView.ml +++ b/helm/DEVEL/lablgtkmathview/gtkMathView.ml @@ -83,6 +83,8 @@ module MathView = struct "ml_gtk_math_view_get_buffer" external get_frame : [>`math_view] obj -> Gtk.frame obj = "ml_gtk_math_view_get_frame" + external get_drawing_area : [>`math_view] obj -> Gtk.drawing_area obj = + "ml_gtk_math_view_get_drawing_area" external set_font_size : [>`math_view] obj -> int -> unit = "ml_gtk_math_view_set_font_size" external get_font_size : [>`math_view] obj -> int = diff --git a/helm/DEVEL/lablgtkmathview/ml_gtk_mathview.c b/helm/DEVEL/lablgtkmathview/ml_gtk_mathview.c index 1f6b19b9f..f6906b416 100644 --- a/helm/DEVEL/lablgtkmathview/ml_gtk_mathview.c +++ b/helm/DEVEL/lablgtkmathview/ml_gtk_mathview.c @@ -109,6 +109,7 @@ ML_1 (gtk_math_view_get_hadjustment, GtkMathView_val, Val_GtkWidget) ML_1 (gtk_math_view_get_vadjustment, GtkMathView_val, Val_GtkWidget) ML_1 (gtk_math_view_get_buffer, GtkMathView_val, Val_GdkPixmap) ML_1 (gtk_math_view_get_frame, GtkMathView_val, Val_GtkWidget) +ML_1 (gtk_math_view_get_drawing_area, GtkMathView_val, Val_GtkWidget) ML_2 (gtk_math_view_set_font_size, GtkMathView_val, Int_val, Unit) ML_1 (gtk_math_view_get_font_size, GtkMathView_val, Val_int) ML_2 (gtk_math_view_set_anti_aliasing, GtkMathView_val, Bool_val, Unit) diff --git a/helm/DEVEL/lablgtkmathview/test/test.ml b/helm/DEVEL/lablgtkmathview/test/test.ml index 0e8eca5cf..4df59756e 100644 --- a/helm/DEVEL/lablgtkmathview/test/test.ml +++ b/helm/DEVEL/lablgtkmathview/test/test.ml @@ -345,6 +345,14 @@ let get_element_at mathview () = flush stdout ;; +let get_drawing_area mathview () = + begin + let da = mathview#get_drawing_area in + print_string ("don't know what to do with the drawing area\n") + end ; + flush stdout +;; + (* Widget creation *) let main_window = GWindow.window ~title:"GtkMathView test" () in let vbox = GPack.vbox ~packing:main_window#add () in @@ -380,6 +388,7 @@ let button_get_transparency = GButton.button ~label:"get_transparency" ~packing: let button_set_transparency = GButton.button ~label:"set_transparency" ~packing:(table#attach ~left:1 ~top:5) () in let button_load_dom = GButton.button ~label:"load from DOM" ~packing:(table#attach ~left:2 ~top:5) () in let button_get_element_at = GButton.button ~label:"get_element_at" ~packing:(table#attach ~left:3 ~top:5) () in +let button_get_drawing_area = GButton.button ~label:"get_drawing_area" ~packing:(table#attach ~left:4 ~top:5) () in (* Signals connection *) ignore(button_gtk#connect#clicked (activate_gtk mathview)) ; ignore(button_load#connect#clicked (load_uri mathview)) ; @@ -413,6 +422,7 @@ ignore(mathview#connect#selection_changed (selection_changed mathview)); ignore(mathview#connect#element_over (element_over mathview)) ; ignore(button_load_dom#connect#clicked (load_doc mathview)) ; ignore(button_get_element_at#connect#clicked (get_element_at mathview)) ; +ignore(button_get_drawing_area#connect#clicked (get_drawing_area mathview)) ; (* Main Loop *) main_window#show () ; GMain.Main.main () -- 2.39.2