Class: Fidgit::ToolTip
- Defined in:
- lib/fidgit/elements/tool_tip.rb
Constant Summary
Constants inherited from TextLine
Fidgit::TextLine::VALID_JUSTIFICATION
Constants inherited from Element
Element::DEFAULT_SCHEMA_FILE, Element::VALID_ALIGN_H, Element::VALID_ALIGN_V
Instance Attribute Summary
Attributes inherited from TextLine
Attributes inherited from Element
#align_h, #align_v, #background_color, #border_thickness, #font, #padding_bottom, #padding_left, #padding_right, #padding_top, #parent, #tip, #z
Instance Method Summary collapse
- #hit?(x, y) ⇒ Boolean
-
#initialize(options = {}, &block) ⇒ ToolTip
constructor
A new instance of ToolTip.
- #x=(value) ⇒ Object
- #y=(value) ⇒ Object
Methods inherited from TextLine
#draw_foreground, #min_width, #text, #text=, #to_s
Methods inherited from Element
#default, #drag?, #draw, #draw_frame, #draw_rect, #enabled=, #enabled?, #height, #height=, #max_height, #max_width, #min_height, #min_width, new, original_new, #outer_height, #outer_width, #recalc, schema, #to_s, #update, #width, #width=, #with, #x, #y
Methods included from Event
#events, included, new_event_handlers, #publish, #subscribe, #unsubscribe
Constructor Details
#initialize(options = {}, &block) ⇒ ToolTip
Returns a new instance of ToolTip.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fidgit/elements/tool_tip.rb', line 13 def initialize( = {}, &block) = { z: Float::INFINITY, background_color: default(:background_color), border_color: default(:border_color), text: '', }.merge! super([:text], ) end |
Instance Method Details
#hit?(x, y) ⇒ Boolean
7 |
# File 'lib/fidgit/elements/tool_tip.rb', line 7 def hit?(x, y); false; end |
#x=(value) ⇒ Object
5 |
# File 'lib/fidgit/elements/tool_tip.rb', line 5 def x=(value); super(value); recalc; value; end |
#y=(value) ⇒ Object
6 |
# File 'lib/fidgit/elements/tool_tip.rb', line 6 def y=(value); super(value); recalc; value; end |