summary refs log tree commit diff stats
path: root/lib/packages/docutils/highlite.nim
Commit message (Collapse)AuthorAgeFilesLines
* lib/packages/docutils - Dropped 'T' from typespdw2015-06-041-29/+32
|
* breaking change: 'concept' is now a keyword and used instead of 'generic'Araq2015-03-231-222/+224
|
* destuctors are experimental; 'func' is now a keywordAraq2014-12-101-1/+2
|
* implements 'defer'Araq2014-12-041-2/+3
|
* support nimrod as an alias for nim for compatibility (nimforum!)Araq2014-09-171-4/+4
|
* renamefestAraq2014-08-231-1/+1
|
* the big renamefest: first stepsAraq2014-08-221-9/+9
|
* 'lambda' is no keyword anymoreAraq2014-08-081-1/+1
|
* new concurrency model: first steps; shared is not a keyword anymoreAraq2014-04-141-2/+4
|
* added an overload for highlight.initGeneralTokenizer that accepts a cstring.Charlie Barto2014-02-261-3/+4
| | | | I use this when calling the highlighter from C#.
* Punctation -> punctuation.EXetoC2014-01-291-4/+4
|
* 'nil' as a statement is deprecated, use an empty 'discard' insteadAraq2014-01-191-2/+2
|
* case consistency: next stepsAraq2013-12-291-1/+1
|
* case consistency part 4Araq2013-12-271-3/+3
|
* bugfix: keywords are sortedAraq2013-12-051-1/+1
|
* Adds highlite to tests suite.Grzegorz Adam Hankiewicz2013-06-181-1/+1
|
* Adds previous slurping as runnable testcase.Grzegorz Adam Hankiewicz2013-06-181-1/+14
|
* Replaces relative file slurping with hardcoded array.Grzegorz Adam Hankiewicz2013-06-181-1/+11
|
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
|
* Moved packages to lib directory.Dominik Picheta2013-02-251-0/+537
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 */
icon = {}

function icon.insert_drawing(button_params)
  local x,y = button_params.x, button_params.y
  App.color(Icon_color)
  love.graphics.rectangle('line', x,y, 12,12)
  love.graphics.line(x,y+6, x+12,y+6)
  love.graphics.line(x+6,y, x+6,y+12)
end

function icon.hyperlink_decoration(button_params)
  local x,y = button_params.x, button_params.y
  -- hack: set the hyperlink color so that caller can draw the text of the
  -- hyperlink in the same color
  App.color(Hyperlink_decoration_color)
  love.graphics.line(x,y+Editor_state.line_height, x+button_params.w,y+Editor_state.line_height)
end

function icon.freehand(x, y)
  love.graphics.line(x+4,y+7,x+5,y+5)
  love.graphics.line(x+5,y+5,x+7,y+4)
  love.graphics.line(x+7,y+4,x+9,y+3)
  love.graphics.line(x+9,y+3,x+10,y+5)
  love.graphics.line(x+10,y+5,x+12,y+6)
  love.graphics.line(x+12,y+6,x+13,y+8)
  love.graphics.line(x+13,y+8,x+13,y+10)
  love.graphics.line(x+13,y+10,x+14,y+12)
  love.graphics.line(x+14,y+12,x+15,y+14)
  love.graphics.line(x+15,y+14,x+15,y+16)
end

function icon.line(x, y)
  love.graphics.line(x+4,y+2, x+16,y+18)
end

function icon.manhattan(x, y)
  love.graphics.line(x+4,y+20, x+4,y+2)
  love.graphics.line(x+4,y+2, x+10,y+2)
  love.graphics.line(x+10,y+2, x+10,y+10)
  love.graphics.line(x+10,y+10, x+18,y+10)
end

function icon.polygon(x, y)
  love.graphics.line(x+8,y+2, x+14,y+2)
  love.graphics.line(x+14,y+2, x+18,y+10)
  love.graphics.line(x+18,y+10, x+10,y+18)
  love.graphics.line(x+10,y+18, x+4,y+12)
  love.graphics.line(x+4,y+12, x+8,y+2)
end

function icon.rectangle(x, y)
  love.graphics.line(x+4,y+8, x+4,y+16)
  love.graphics.line(x+4,y+16, x+16,y+16)
  love.graphics.line(x+16,y+16, x+16,y+8)
  love.graphics.line(x+16,y+8, x+4,y+8)
end

function icon.square(x, y)
  love.graphics.line(x+6,y+6, x+6,y+16)
  love.graphics.line(x+6,y+16, x+16,y+16)
  love.graphics.line(x+16,y+16, x+16,y+6)
  love.graphics.line(x+16,y+6, x+6,y+6)
end

function icon.circle(x, y)
  love.graphics.circle('line', x+10,y+10, 8)
end