module Boleite::GUI::Widget::Contracts

Defined in:

boleite/gui/widget.cr

Constant Summary

CLASS_DATA = ClassData(Boleite::GUI::Widget).new
CONTRACTED_METHODS = ["name()", "allocation()", "input()", "repaint?()", "name=(name)", "visible=(visible)", "enabled=(enabled)", "mouse_enter()", "mouse_leave()", "mouse_over()", "left_click()", "right_click()", "state_change()", "pulse()", "initialize()", "visible?()", "enabled?()", "clear_repaint()", "mark_dirty()", "has_mouse_focus?()", "position()", "position=(pos)", "move(pos)", "absolute_position()", "absolute_allocation()", "size()", "size=(size)", "parent=(parent)", "parent=(val : Nil)", "parent()", "on_state_change()", "on_mouse_enter()", "on_mouse_leave()"] of _
CONTRACTS = {:next_def => nil, def parent=(parent) @parent = WeakRef(Widget).new(parent) state_change.emit end => [{:requires, "self.parent.nil? || (parent == nil)", do self.parent.nil? || (parent == nil) end}, {:requires, "parent != self", do parent != self end}]} of _ => _
IGNORED_METHODS = ["finalize", "contract_pre_parentassign", "contract_post_parentassign", "contract_requires_parentassign", "contract_ensures_parentassign"] of _
INVARIANTS = [] of _

Class Method Summary

Macro Summary

Class Method Detail

def self.on_assert_fail(condition, type) #

[View source]
def self.on_contract_fail(contract, condition, type, method) #

[View source]

Macro Detail

macro add_contract(stage, str, &test) #

[View source]
macro add_invariant(str, &test) #

[View source]
macro ignore_method(method) #

[View source]