GithubHelp home page GithubHelp logo

pa-0 / ahk.v1-2.richcode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from g33kdude/richcode.ahk

0.0 0.0 0.0 45 KB

A wrapper around a RichEdit control to provide code editing features.

License: MIT License

AutoHotkey 100.00%

ahk.v1-2.richcode's Introduction

RichCode.ahk

A wrapper around a RichEdit control to provide code editing features.

Using

Create an instance of the RichCode class, passing it a Settings array whose members are as listed below. As a second, optional parameter you can pass control options to be used in the Gui, Add command.

See Examples/Demo.ahk for more advanced usage.

class RichCode({"TabSize": 4     ; Width of a tab in characters
	, "Indent": "`t"             ; What text to insert on indent
	, "FGColor": 0xRRGGBB        ; Foreground (text) color
	, "BGColor": 0xRRGGBB        ; Background color
	, "Font"                     ; Font to use
	: {"Typeface": "Courier New" ; Name of the typeface
		, "Size": 12             ; Font size in points
		, "Bold": False}         ; Bold weight (True/False)
	, "WordWrap": False          ; Whether to enable WordWrap
	
	
	; Whether to use the highlighter, or leave it as plain text
	, "UseHighlighter": True
	
	; Delay after typing before the highlighter is run
	, "HighlightDelay": 200
	
	; The highlighter function (FuncObj or name)
	; to generate the highlighted RTF. It will be passed
	; two parameters, the first being this settings array
	; and the second being the code to be highlighted
	, "Highlighter": Func("HighlightAHK")
	
	; The colors to be used by the highlighter function.
	; This is currently used only by the highlighter, not at all by the
	; RichCode class. As such, the RGB ordering is by convention only.
	; You can add as many colors to this array as you want.
	, "Colors"
	: {"Comments": 0xRRGGBB
		, "Functions": 0xRRGGBB
		, "Numbers": 0xRRGGBB,
		, "Strings": 0xRRGGBB}})

ahk.v1-2.richcode's People

Contributors

g33kdude avatar lintalist avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.