From e8728ed15c2ede9279f46812519f831031675057 Mon Sep 17 00:00:00 2001 From: Juan Pablo Caram Date: Fri, 7 Mar 2014 15:43:54 -0500 Subject: [PATCH] Added Measuring tool. --- .gitignore | 2 - FlatCAM.py | 194 ++---- FlatCAM.ui | 1851 ++++++++++++++++++++++++++-------------------------- 3 files changed, 986 insertions(+), 1061 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b99ed7ba..00000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -flatcam.sublime* -.nfs* \ No newline at end of file diff --git a/FlatCAM.py b/FlatCAM.py index 772406a2..3a10da4d 100644 --- a/FlatCAM.py +++ b/FlatCAM.py @@ -641,6 +641,7 @@ class App: self.progress_bar = self.builder.get_object("progressbar") self.progress_bar.set_show_text(True) self.units_label = self.builder.get_object("label_units") + self.toolbar = self.builder.get_object("toolbar_main") # White (transparent) background on the "Options" tab. self.builder.get_object("vp_options").override_background_color(Gtk.StateType.NORMAL, @@ -658,19 +659,11 @@ class App: self.builder.connect_signals(self) #### Make plot area #### - # self.figure = None - # self.axes = None - # self.canvas = None - # self.setup_plot() self.plotcanvas = PlotCanvas(self.grid) self.plotcanvas.mpl_connect('button_press_event', self.on_click_over_plot) self.plotcanvas.mpl_connect('motion_notify_event', self.on_mouse_move_over_plot) self.plotcanvas.mpl_connect('key_press_event', self.on_key_over_plot) - # self.axes = self.plotcanvas.axes # TODO: Just for testing - # self.figure = self.plotcanvas.figure # TODO: Just for testing - # self.canvas = self.plotcanvas.canvas # TODO: Just for testing - self.setup_tooltips() #### DATA #### @@ -721,9 +714,17 @@ class App: self.plot_mousemove_subscribers = {} ## Tools ## - # self.measure = Measurement(self.axes, self.plot_click_subscribers, - # self.plot_mousemove_subscribers, - # lambda: self.canvas.queue_draw()) + self.measure = Measurement(self.builder.get_object("box39"), self.plotcanvas.axes, + self.plot_click_subscribers, self.plot_mousemove_subscribers) + # Toolbar icon + # TODO: Where should I put this? Tool should have a method to add to toolbar? + meas_ico = Gtk.Image.new_from_file('share/measure32.png') + measure = Gtk.ToolButton.new(meas_ico, "") + measure.connect("clicked", self.measure.toggle_active) + measure.set_tooltip_markup("Measure Tool: Enable/disable tool.\n" + + "Click on point to set reference.\n" + + "(Click on plot and hit m)") + self.toolbar.insert(measure, -1) #### Initialization #### self.load_defaults() @@ -757,49 +758,48 @@ class App: self.window.show_all() def setup_toolbar(self): - toolbar = self.builder.get_object("toolbar_main") # Zoom fit zf_ico = Gtk.Image.new_from_file('share/zoom_fit32.png') zoom_fit = Gtk.ToolButton.new(zf_ico, "") zoom_fit.connect("clicked", self.on_zoom_fit) zoom_fit.set_tooltip_markup("Zoom Fit.\n(Click on plot and hit 1)") - toolbar.insert(zoom_fit, -1) + self.toolbar.insert(zoom_fit, -1) # Zoom out zo_ico = Gtk.Image.new_from_file('share/zoom_out32.png') zoom_out = Gtk.ToolButton.new(zo_ico, "") zoom_out.connect("clicked", self.on_zoom_out) zoom_out.set_tooltip_markup("Zoom Out.\n(Click on plot and hit 2)") - toolbar.insert(zoom_out, -1) + self.toolbar.insert(zoom_out, -1) # Zoom in zi_ico = Gtk.Image.new_from_file('share/zoom_in32.png') zoom_in = Gtk.ToolButton.new(zi_ico, "") zoom_in.connect("clicked", self.on_zoom_in) zoom_in.set_tooltip_markup("Zoom In.\n(Click on plot and hit 3)") - toolbar.insert(zoom_in, -1) + self.toolbar.insert(zoom_in, -1) # Clear plot cp_ico = Gtk.Image.new_from_file('share/clear_plot32.png') clear_plot = Gtk.ToolButton.new(cp_ico, "") clear_plot.connect("clicked", self.on_clear_plots) clear_plot.set_tooltip_markup("Clear Plot") - toolbar.insert(clear_plot, -1) + self.toolbar.insert(clear_plot, -1) # Replot rp_ico = Gtk.Image.new_from_file('share/replot32.png') replot = Gtk.ToolButton.new(rp_ico, "") replot.connect("clicked", self.on_toolbar_replot) replot.set_tooltip_markup("Re-plot all") - toolbar.insert(replot, -1) + self.toolbar.insert(replot, -1) # Delete item del_ico = Gtk.Image.new_from_file('share/delete32.png') delete = Gtk.ToolButton.new(del_ico, "") delete.connect("clicked", self.on_delete) delete.set_tooltip_markup("Delete selected\nobject.") - toolbar.insert(delete, -1) + self.toolbar.insert(delete, -1) def setup_obj_classes(self): """ @@ -824,7 +824,7 @@ class App: self.tree_select = self.tree.get_selection() self.signal_id = self.tree_select.connect("changed", self.on_tree_selection_changed) renderer = Gtk.CellRendererText() - column = Gtk.TreeViewColumn("Title", renderer, text=0) + column = Gtk.TreeViewColumn("Objects", renderer, text=0) self.tree.append_column(column) self.builder.get_object("box_project").pack_start(self.tree, False, False, 1) @@ -862,45 +862,6 @@ class App: """ self.info_label.set_text(text) - # def zoom(self, factor, center=None): - # """ - # Zooms the plot by factor around a given - # center point. Takes care of re-drawing. - # - # :param factor: Number by which to scale the plot. - # :type factor: float - # :param center: Coordinates [x, y] of the point around which to scale the plot. - # :type center: list - # :return: None - # """ - # xmin, xmax = self.axes.get_xlim() - # ymin, ymax = self.axes.get_ylim() - # width = xmax - xmin - # height = ymax - ymin - # - # if center is None: - # center = [(xmin + xmax) / 2.0, (ymin + ymax) / 2.0] - # - # # For keeping the point at the pointer location - # relx = (xmax - center[0]) / width - # rely = (ymax - center[1]) / height - # - # new_width = width / factor - # new_height = height / factor - # - # xmin = center[0] - new_width * (1 - relx) - # xmax = center[0] + new_width * relx - # ymin = center[1] - new_height * (1 - rely) - # ymax = center[1] + new_height * rely - # - # for name in self.stuff: - # self.stuff[name].axes.set_xlim((xmin, xmax)) - # self.stuff[name].axes.set_ylim((ymin, ymax)) - # self.axes.set_xlim((xmin, xmax)) - # self.axes.set_ylim((ymin, ymax)) - # - # self.canvas.queue_draw() - def build_list(self): """ Clears and re-populates the list of objects in currently @@ -998,7 +959,7 @@ class App: self.tree_select.select_iter(iter) # Need to return False such that GLib.idle_add - # or .timeout_add do not repear. + # or .timeout_add do not repeat. return False def new_object(self, kind, name, initialize): @@ -1106,61 +1067,6 @@ class App: except: return None - # def adjust_axes(self, xmin, ymin, xmax, ymax): - # """ - # Adjusts axes of all plots while maintaining the use of the whole canvas - # and an aspect ratio to 1:1 between x and y axes. The parameters are an original - # request that will be modified to fit these restrictions. - # - # :param xmin: Requested minimum value for the X axis. - # :type xmin: float - # :param ymin: Requested minimum value for the Y axis. - # :type ymin: float - # :param xmax: Requested maximum value for the X axis. - # :type xmax: float - # :param ymax: Requested maximum value for the Y axis. - # :type ymax: float - # :return: None - # """ - # m_x = 15 # pixels - # m_y = 25 # pixels - # width = xmax - xmin - # height = ymax - ymin - # try: - # r = width / height - # except: - # print "ERROR: Height is", height - # return - # Fw, Fh = self.canvas.get_width_height() - # Fr = float(Fw) / Fh - # x_ratio = float(m_x) / Fw - # y_ratio = float(m_y) / Fh - # - # if r > Fr: - # ycenter = (ymin + ymax) / 2.0 - # newheight = height * r / Fr - # ymin = ycenter - newheight / 2.0 - # ymax = ycenter + newheight / 2.0 - # else: - # xcenter = (xmax + ymin) / 2.0 - # newwidth = width * Fr / r - # xmin = xcenter - newwidth / 2.0 - # xmax = xcenter + newwidth / 2.0 - # - # for name in self.stuff: - # if self.stuff[name].axes is None: - # continue - # self.stuff[name].axes.set_xlim((xmin, xmax)) - # self.stuff[name].axes.set_ylim((ymin, ymax)) - # self.stuff[name].axes.set_position([x_ratio, y_ratio, - # 1 - 2 * x_ratio, 1 - 2 * y_ratio]) - # self.axes.set_xlim((xmin, xmax)) - # self.axes.set_ylim((ymin, ymax)) - # self.axes.set_position([x_ratio, y_ratio, - # 1 - 2 * x_ratio, 1 - 2 * y_ratio]) - # - # self.canvas.queue_draw() - def load_defaults(self): """ Loads the aplication's default settings from defaults.json into @@ -1372,7 +1278,7 @@ class App: for obj in self.stuff: combo.append_text(obj) - def versionCheck(self): + def versionCheck(self, *args): """ Checks for the latest version of the program. Alerts the user if theirs is outdated. This method is meant to be run @@ -1989,9 +1895,6 @@ class App: :return: None """ - # xmin, xmax = self.axes.get_xlim() - # ymin, ymax = self.axes.get_ylim() - # self.adjust_axes(xmin, ymin, xmax, ymax) self.plotcanvas.auto_adjust_axes() def on_row_activated(self, widget, path, col): @@ -2788,45 +2691,69 @@ class App: class Measurement: - def __init__(self, axes, click_subscibers, move_subscribers, update=None): + def __init__(self, container, axes, click_subscibers, move_subscribers, update=None): self.update = update + self.container = container + self.frame = None + self.label = None self.axes = axes self.click_subscribers = click_subscibers self.move_subscribers = move_subscribers self.point1 = None self.point2 = None self.active = False - self.at = None # AnchoredText object on plot + # self.at = None # AnchoredText object on plot - def toggle_active(self): - if self.active: + def toggle_active(self, *args): + if self.active: # Deactivate self.active = False self.move_subscribers.pop("meas") self.click_subscribers.pop("meas") - self.at.remove() + # self.at.remove() + self.container.remove(self.frame) if self.update is not None: self.update() return False - else: + else: # Activate + print "DEBUG: Activating Measurement Tool..." self.active = True self.click_subscribers["meas"] = self.on_click self.move_subscribers["meas"] = self.on_move + self.frame = Gtk.Frame() + self.frame.set_margin_right(5) + self.frame.set_margin_top(3) + align = Gtk.Alignment() + align.set(0, 0.5, 0, 0) + align.set_padding(4, 4, 4, 4) + self.label = Gtk.Label() + self.label.set_label("Measuring tool...") + align.add(self.label) + self.frame.add(align) + self.frame.set_size_request(200, 30) + self.frame.set_hexpand(True) + self.container.pack_end(self.frame, False, True, 1) + self.frame.show_all() + align.show_all() + self.label.show_all() + self.container.queue_draw() return True def on_move(self, event): - try: - self.at.remove() - except: - pass + # try: + # self.at.remove() + # except: + # pass if self.point1 is None: - self.at = AnchoredText("Click on a reference point...") + # self.at = AnchoredText("Click on a reference point...") + self.label.set_label("Click on a reference point...") else: dx = event.xdata - self.point1[0] dy = event.ydata - self.point1[1] d = sqrt(dx**2 + dy**2) - self.at = AnchoredText("D = %.4f\nD(x) = %.4f\nD(y) = %.4f" % (d, dx, dy), - loc=2, prop={'size': 14}, frameon=False) - self.axes.add_artist(self.at) + # self.at = AnchoredText("D = %.4f\nD(x) = %.4f\nD(y) = %.4f" % (d, dx, dy), + # loc=2, prop={'size': 14}, frameon=False) + self.label.set_label("D = %.4f D(x) = %.4f D(y) = %.4f" % (d, dx, dy)) + # self.axes.add_artist(self.at) if self.update is not None: self.update() @@ -2837,6 +2764,7 @@ class Measurement: else: self.point2 = copy.copy(self.point1) self.point1 = (event.xdata, event.ydata) + self.on_move(event) class PlotCanvas: @@ -2877,7 +2805,7 @@ class PlotCanvas: self.canvas.set_can_focus(True) # For key press # Attach to parent - self.container.attach(self.canvas, 0, 0, 600, 400) + self.container.attach(self.canvas, 0, 0, 600, 400) # TODO: Height and width are num. columns?? # Events self.canvas.mpl_connect('motion_notify_event', self.on_mouse_move) diff --git a/FlatCAM.ui b/FlatCAM.ui index bfb08c02..ef716d78 100644 --- a/FlatCAM.ui +++ b/FlatCAM.ui @@ -57,16 +57,6 @@ THE SOFTWARE. - - True - False - gtk-open - - - True - False - gtk-page-setup - True False @@ -107,6 +97,908 @@ THE SOFTWARE. False gtk-open + + True + False + gtk-open + + + True + False + gtk-page-setup + + + True + False + gtk-info + + + False + + + True + True + never + in + + + True + False + + + True + False + 5 + 5 + 5 + 5 + vertical + + + True + False + 6 + 3 + Double-Sided PCB Tool + + + + + + False + True + 0 + + + + + True + False + 3 + 3 + + + True + False + 1 + 3 + Bottom Layer: + + + 0 + 0 + 1 + 1 + + + + + 200 + True + False + start + 0 + 1 + + + 1 + 0 + 1 + 1 + + + + + True + False + 1 + 3 + Mirror Axis: + + + 0 + 1 + 1 + 1 + + + + + True + False + 10 + + + X + True + True + False + 0 + True + True + + + False + True + 0 + + + + + Y + True + True + False + 0 + True + rb_mirror_x + + + False + True + 1 + + + + + 1 + 1 + 1 + 1 + + + + + True + False + 1 + 3 + Axis location: + + + 0 + 2 + 1 + 1 + + + + + True + False + 10 + + + Point + True + True + False + 0 + True + True + + + + False + True + 0 + + + + + Box + True + True + False + 0 + True + rb_mirror_point + + + False + True + 1 + + + + + 1 + 2 + 1 + 1 + + + + + True + False + 1 + 3 + Point/Box: + + + 0 + 3 + 1 + 1 + + + + + True + False + vertical + + + + + + 1 + 3 + 1 + 1 + + + + + True + False + 1 + 3 + Algnmt holes: + + + 0 + 4 + 1 + 1 + + + + + True + True + + + + 1 + 4 + 1 + 1 + + + + + True + False + 1 + 3 + Drill diam.: + + + 0 + 5 + 1 + 1 + + + + + True + True + + True + + + 1 + 5 + 1 + 1 + + + + + False + True + 1 + + + + + True + False + end + 6 + 3 + + + Create Alignment Drill + 120 + True + True + True + end + + + + + False + False + 4 + 0 + + + + + Create Mirror + 120 + True + True + True + end + + + + + False + False + 4 + 1 + + + + + False + True + 2 + + + + + + + + + + + + + + + + + + + + + + + False + + + True + True + never + in + + + True + False + + + True + False + 5 + 5 + 5 + 5 + vertical + + + True + False + + + True + False + share/drill32.png + + + False + True + 0 + + + + + True + False + 3 + Excellon Object + + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + False + 3 + Name: + + + False + True + 0 + + + + + True + True + + True + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + 0 + 3 + Plot Options: + + + + + + False + True + 2 + + + + + Plot + True + True + False + 0 + True + True + + + + False + True + 3 + + + + + Solid + True + True + False + 0 + True + + + False + True + 4 + + + + + Multi-colored + True + True + False + 0 + True + + + False + True + 5 + + + + + Update Plot + True + True + True + + + + + False + True + 6 + + + + + True + False + 5 + 0 + 3 + Create CNC Job: + + + + + + False + True + 7 + + + + + True + False + 2 + 4 + + + True + True + + True + + + + 1 + 0 + 1 + 1 + + + + + True + True + + True + + + + 1 + 1 + 1 + 1 + + + + + True + True + + True + + + + 1 + 2 + 1 + 1 + + + + + True + False + 1 + Drill Z: + + + 0 + 0 + 1 + 1 + + + + + True + False + 1 + Travel Z: + + + 0 + 1 + 1 + 1 + + + + + True + False + 1 + Feed rate: + + + 0 + 2 + 1 + 1 + + + + + True + False + 1 + Tools: + + + 0 + 3 + 1 + 1 + + + + + True + False + + + True + True + + True + + + False + True + 0 + + + + + Choose + True + True + True + + + + + False + True + 1 + + + + + 1 + 3 + 1 + 1 + + + + + False + True + 8 + + + + + Generate + True + True + True + + + + + False + True + 9 + + + + + True + False + 3 + 0 + 3 + Scale: + + + + + + False + True + 10 + + + + + True + False + 3 + 3 + 3 + + + True + False + 1 + Factor: + + + False + True + 0 + + + + + True + True + + 1.0 + True + + + False + True + 1 + + + + + False + True + 11 + + + + + Scale + True + True + True + + + + + False + True + 12 + + + + + True + False + 3 + 0 + 3 + Offset: + + + + + + False + True + 13 + + + + + True + False + 3 + 3 + 3 + + + True + False + 1 + Offset Vector: + + + False + True + 0 + + + + + True + True + + (0.0, 0.0) + True + + + False + True + 1 + + + + + False + True + 14 + + + + + Offset + True + True + True + + + + + False + True + 15 + + + + + + + + + + + + + + + + + + False @@ -1660,366 +2552,6 @@ this object. - - False - - - True - True - never - in - - - True - False - - - True - False - 5 - 5 - 5 - 5 - vertical - - - True - False - 6 - 3 - Double-Sided PCB Tool - - - - - - False - True - 0 - - - - - True - False - 3 - 3 - - - True - False - 1 - 3 - Bottom Layer: - - - 0 - 0 - 1 - 1 - - - - - 200 - True - False - start - 0 - 1 - - - 1 - 0 - 1 - 1 - - - - - True - False - 1 - 3 - Mirror Axis: - - - 0 - 1 - 1 - 1 - - - - - True - False - 10 - - - X - True - True - False - 0 - True - True - - - False - True - 0 - - - - - Y - True - True - False - 0 - True - rb_mirror_x - - - False - True - 1 - - - - - 1 - 1 - 1 - 1 - - - - - True - False - 1 - 3 - Axis location: - - - 0 - 2 - 1 - 1 - - - - - True - False - 10 - - - Point - True - True - False - 0 - True - True - - - - False - True - 0 - - - - - Box - True - True - False - 0 - True - rb_mirror_point - - - False - True - 1 - - - - - 1 - 2 - 1 - 1 - - - - - True - False - 1 - 3 - Point/Box: - - - 0 - 3 - 1 - 1 - - - - - True - False - vertical - - - - - - 1 - 3 - 1 - 1 - - - - - True - False - 1 - 3 - Algnmt holes: - - - 0 - 4 - 1 - 1 - - - - - True - True - - - - 1 - 4 - 1 - 1 - - - - - True - False - 1 - 3 - Drill diam.: - - - 0 - 5 - 1 - 1 - - - - - True - True - - True - - - 1 - 5 - 1 - 1 - - - - - False - True - 1 - - - - - True - False - end - 6 - 3 - - - Create Alignment Drill - 120 - True - True - True - end - - - - - False - False - 4 - 0 - - - - - Create Mirror - 120 - True - True - True - end - - - - - False - False - 4 - 1 - - - - - False - True - 2 - - - - - - - - - - - - - - - - - - - - - False @@ -2411,533 +2943,6 @@ this object. - - False - - - True - True - never - in - - - True - False - - - True - False - 5 - 5 - 5 - 5 - vertical - - - True - False - - - True - False - share/drill32.png - - - False - True - 0 - - - - - True - False - 3 - Excellon Object - - - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - False - 3 - Name: - - - False - True - 0 - - - - - True - True - - True - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - 0 - 3 - Plot Options: - - - - - - False - True - 2 - - - - - Plot - True - True - False - 0 - True - True - - - - False - True - 3 - - - - - Solid - True - True - False - 0 - True - - - False - True - 4 - - - - - Multi-colored - True - True - False - 0 - True - - - False - True - 5 - - - - - Update Plot - True - True - True - - - - - False - True - 6 - - - - - True - False - 5 - 0 - 3 - Create CNC Job: - - - - - - False - True - 7 - - - - - True - False - 2 - 4 - - - True - True - - True - - - - 1 - 0 - 1 - 1 - - - - - True - True - - True - - - - 1 - 1 - 1 - 1 - - - - - True - True - - True - - - - 1 - 2 - 1 - 1 - - - - - True - False - 1 - Drill Z: - - - 0 - 0 - 1 - 1 - - - - - True - False - 1 - Travel Z: - - - 0 - 1 - 1 - 1 - - - - - True - False - 1 - Feed rate: - - - 0 - 2 - 1 - 1 - - - - - True - False - 1 - Tools: - - - 0 - 3 - 1 - 1 - - - - - True - False - - - True - True - - True - - - False - True - 0 - - - - - Choose - True - True - True - - - - - False - True - 1 - - - - - 1 - 3 - 1 - 1 - - - - - False - True - 8 - - - - - Generate - True - True - True - - - - - False - True - 9 - - - - - True - False - 3 - 0 - 3 - Scale: - - - - - - False - True - 10 - - - - - True - False - 3 - 3 - 3 - - - True - False - 1 - Factor: - - - False - True - 0 - - - - - True - True - - 1.0 - True - - - False - True - 1 - - - - - False - True - 11 - - - - - Scale - True - True - True - - - - - False - True - 12 - - - - - True - False - 3 - 0 - 3 - Offset: - - - - - - False - True - 13 - - - - - True - False - 3 - 3 - 3 - - - True - False - 1 - Offset Vector: - - - False - True - 0 - - - - - True - True - - (0.0, 0.0) - True - - - False - True - 1 - - - - - False - True - 14 - - - - - Offset - True - True - True - - - - - False - True - 15 - - - - - - - - - - - - - - - - - - 600 400 @@ -3254,6 +3259,16 @@ to application defaults. + + + Check for updates... + True + False + image16 + False + + + @@ -4882,44 +4897,28 @@ defaults. - + True False - GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SMOOTH_SCROLL_MASK + vertical - - 25 + True False - True - True + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SMOOTH_SCROLL_MASK + + + + + + - 0 - 1 - 1 - 1 + False + True + 0 - - - 25 - True - False - True - vertical - True - - - 1 - 0 - 1 - 1 - - - - -