summary refs log tree commit diff stats
path: root/compiler/procfind.nim
Commit message (Expand)AuthorAgeFilesLines
* prepare for the enforcement of `std` prefix (#22873)ringabout2023-10-291-1/+3
* Fix forward declarations in shadow scope contexts (#15386)Clyybber2020-09-221-2/+10
* Fix forward declaration issues in template/macro context (#15091)Clyybber2020-07-291-44/+1
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-18/+17
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-2/+2
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-4/+4
* Remove duplicate line number from 'invalid forward declaration' error (#11966)nc-x2019-08-171-2/+2
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-2/+2
* make tests green againAndreas Rumpf2018-05-181-1/+1
* pragmas compiles againAndreas Rumpf2018-05-111-8/+6
* fixes #6393Andreas Rumpf2018-04-211-6/+1
* fixes #5161Araq2016-12-301-1/+1
* compiler: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-041-11/+11
* Fix #1561Varriount2014-10-291-1/+7
* Merge branch 'devel' of https://github.com/Araq/Nimrod into bigbreakAraq2014-10-041-2/+9
|\
| * Fixes #1529Clay Sweetser2014-10-011-2/+9
* | Nimrod renamed to NimAraq2014-08-281-1/+1
|/
* 'nil' as a statement is deprecated, use an empty 'discard' insteadAraq2014-01-191-1/+1
* proc redefinition search based on the type system instead of on sloppy AST ma...Zahary Karadjov2013-12-301-1/+25
* Merge branch 'upstream' into develZahary Karadjov2013-12-291-1/+1
|\
| * towards support for composite type classes such as seq[Number] and SquareMatr...Zahary Karadjov2013-12-271-1/+1
* | case consistency: cs:partial bootstraps on windowsAraq2013-12-291-3/+3
* | case consistency part 4Araq2013-12-271-5/+5
* | case consistency part 1Araq2013-12-271-5/+5
|/
* merged the persistent scopes work with the delayed proc compilation strategyZahary Karadjov2013-05-121-2/+3
|\
| * added a ``noforward`` pragma that enables a new compilation strategyZahary Karadjov2013-05-111-1/+2
* | final fixes giving us a working compilerZahary Karadjov2013-05-121-8/+8
|/
* fixes #304Araq2013-03-181-25/+34
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
* implemented AST based overloadingAraq2012-12-061-2/+2
* improved support for typedesc valuesZahary Karadjov2012-09-251-1/+2
* borrow works with genericsAraq2012-08-061-41/+29
* make idetools output full pathsAraq2012-08-051-0/+7
* made compiler more robust for idetools supportAraq2012-07-301-0/+2
* year 2012 for most copyright headersAraq2012-01-021-1/+1
* compilation cache: various bugfixes; works for the compiler itselfAraq2011-10-271-7/+8
* big repo cleanupAraq2011-04-121-0/+83
#fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
-- Simple immediate-mode buttons with (currently) just an onpress1 handler for
-- the left button.
--
-- Buttons can nest in principle, though I haven't actually used that yet.
--
-- Don't rely on the order in which handlers are run. Within any widget, all
-- applicable button handlers will run. If _any_ of them returns true, the
-- event will continue to propagate elsewhere in the widget.

-- draw button and queue up event handlers
function button(State, name, params)
  if params.bg then
    love.graphics.setColor(params.bg.r, params.bg.g, params.bg.b, params.bg.a)
    love.graphics.rectangle('fill', params.x,params.y, params.w,params.h, 5,5)
  end
  if params.icon then params.icon(params) end
  table.insert(State.button_handlers, params)
end

-- process button event handlers
function mouse_press_consumed_by_any_button(State, x, y, mouse_button)
  local button_pressed = false
  local consume_press = true
  for _,ev in ipairs(State.button_handlers) do
    if x>ev.x and x<ev.x+ev.w and y>ev.y and y<ev.y+ev.h then
      if ev.onpress1 and mouse_button == 1 then
        button_pressed = true
        if ev.onpress1() then
          consume_press = false
        end
      end
    end
  end
  return button_pressed and consume_press
end