samples/sample1/sample.rb in wxruby3-shapes-0.9.0.pre.beta.3 vs samples/sample1/sample.rb in wxruby3-shapes-0.9.5

- old
+ new

@@ -15,11 +15,11 @@ end def initialize(title) super(nil, Wx::StandardID::ID_ANY, title, size: [800,600]) - self.icon = Wx::Icon(:sample) + self.icon = Wx::Icon(:logo) # initialize event types @event_type_info = { Wx::SF::EVT_SF_SHAPE_LEFT_DOWN => "Shape was clicked by LMB (wxEVT_SF_SHAPE_LEFT_DOWN )", Wx::SF::EVT_SF_SHAPE_LEFT_DCLICK => "Shape was double-clicked by LMB (wxEVT_SF_SHAPE_LEFT_DOWN )", @@ -200,27 +200,27 @@ end def on_shape_handle_event(event) if @log_menu.is_checked(ID::MenuLogHandleEvent) hnd_type =case event.handle.type - when Wx::SF::Shape::Handle::LEFTTOP + when Wx::SF::Shape::Handle::TYPE::LEFTTOP "left-top" - when Wx::SF::Shape::Handle::TOP + when Wx::SF::Shape::Handle::TYPE::TOP "top" - when Wx::SF::Shape::Handle::RIGHTTOP + when Wx::SF::Shape::Handle::TYPE::RIGHTTOP "right-top" - when Wx::SF::Shape::Handle::LEFT + when Wx::SF::Shape::Handle::TYPE::LEFT "left" - when Wx::SF::Shape::Handle::RIGHT + when Wx::SF::Shape::Handle::TYPE::RIGHT "right" - when Wx::SF::Shape::Handle::LEFTBOTTOM + when Wx::SF::Shape::Handle::TYPE::LEFTBOTTOM "left-bottom" - when Wx::SF::Shape::Handle::BOTTOM + when Wx::SF::Shape::Handle::TYPE::BOTTOM "bottom" - when Wx::SF::Shape::Handle::RIGHTBOTTOM + when Wx::SF::Shape::Handle::TYPE::RIGHTBOTTOM "right-bottom" - when Wx::SF::Shape::Handle::LINECTRL + when Wx::SF::Shape::Handle::TYPE::LINECTRL "line-control" else '' end @@ -246,10 +246,10 @@ def on_shape_child_drop_event(event) if @log_menu.is_checked(ID::MenuLogChildDropEvent) @text_log.append_text("%s, Shape ID: %d, Child ID: %d\n" % [ @event_type_info[event.get_event_type], event.get_id, - event.get_child_shape.get_id]) + event.get_child_shape.object_id]) end end def on_line_finished(event) event.get_shape.add_style(Wx::SF::Shape::STYLE::EMIT_EVENTS) if event.get_shape