<commit_before># encoding: utf-8

# The Fidgit GUI framework for Gosu.
module Fidgit
  class << self
    attr_accessor :debug_mode
  end

  self.debug_mode = false

  def self.debug_mode?; debug_mode; end

  # An element within the GUI environment.
  # @abstract
  class Element
    include Event

    event :left_mouse_button
    event :holding_left_mouse_button
    event :released_left_mouse_button
    event :clicked_left_mouse_button
    
    event :right_mouse_button
    event :holding_right_mouse_button
    event :released_right_mouse_button
    event :clicked_right_mouse_button

    event :middle_mouse_button
    event :holding_middle_mouse_button
    event :released_middle_mouse_button
    event :clicked_middle_mouse_button
    
    event :mouse_wheel_up
    event :mouse_wheel_down

    event :enter
    event :hover
    event :leave

    DEFAULT_SCHEMA_FILE = File.expand_path(File.join(__FILE__, '..', '..', '..', '..', 'config', 'default_schema.yml'))

    VALID_ALIGN_H = [:left, :center, :right, :fill]
    VALID_ALIGN_V = [:top, :center, :bottom, :fill]

    attr_reader :z, :tip, :padding_top, :padding_right, :padding_bottom, :padding_left,
                :align_h, :align_v, :parent, :border_thickness, :font

    attr_accessor :background_color

    def x; rect.x; end
    def x=(value); rect.x = value; end

    def y; rect.y; end
    def y=(value); rect.y = value; end

    # Width not including border.
    def width; rect.width; end
    def width=(value); rect.width = [[value, @width_range.max].min, @width_range.min].max; end
    def min_width; @width_range.min; end<commit_msg>Allowed Element#tip=<commit_after># encoding: utf-8

# The Fidgit GUI framework for Gosu.
module Fidgit
  class << self
    attr_accessor :debug_mode
  end

  self.debug_mode = false

  def self.debug_mode?; debug_mode; end

  # An element within the GUI environment.
  # @abstract
  class Element
    include Event

    event :left_mouse_button
    event :holding_left_mouse_button
    event :released_left_mouse_button
    event :clicked_left_mouse_button
    
    event :right_mouse_button
    event :holding_right_mouse_button
    event :released_right_mouse_button
    event :clicked_right_mouse_button

    event :middle_mouse_button
    event :holding_middle_mouse_button
    event :released_middle_mouse_button
    event :clicked_middle_mouse_button
    
    event :mouse_wheel_up
    event :mouse_wheel_down

    event :enter
    event :hover
    event :leave

    DEFAULT_SCHEMA_FILE = File.expand_path(File.join(__FILE__, '..', '..', '..', '..', 'config', 'default_schema.yml'))

    VALID_ALIGN_H = [:left, :center, :right, :fill]
    VALID_ALIGN_V = [:top, :center, :bottom, :fill]

    attr_reader :z, :tip, :padding_top, :padding_right, :padding_bottom, :padding_left,
                :align_h, :align_v, :parent, :border_thickness, :font

    attr_accessor :background_color
    attr_writer :tip

    def x; rect.x; end
    def x=(value); rect.x = value; end

    def y; rect.y; end
    def y=(value); rect.y = value; end

    # Width not including border.
    def width; rect.width; end
    def width=(value); rect.width = [[value, @width_range.max].min, @width_range.min].max; end
    def min_width; @width_range.min; end
{'fraction_non_alphanumeric': 0.10061538461538462, 'fraction_numerical': 0.0006153846153846154, 'mean_word_length': 3.5027700831024933, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5500729', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1070, 'n_words': 266}