Giter VIP home page Giter VIP logo

gtkregextester's Introduction

gtkregextester (GTK Regex Tester)

A tool to test regular expressions against target strings for Linux operating systems (or any system that supports GTK 3).

Synposis:

Aside from being useful, this code showcases several poorly-documented features of GTK 3 that may be of interest to some. Namely:

  1. the API to implement custom drawing (including geometry management and invoking libcairo)
  2. how to set attributes on widgets that are ignored by the CSS styler (letter-spacing, for example)
  3. which properties are allowed on what widget and how to write an XML UI definition file
  4. examples of queueing draw operations on a widget manually to keep all widgets up-to-date

The most interesting take-away is probably this: the GtkStyleProvider in the form of a CSS styler works very poorly. For serious applications, using libpango is a must. Also, for anyone who wishes to implement anything beyond the most basic user interfaces, custom drawing (and associated libcairo) is another must. Therefore, the GTK 3 documentation is as good as useless beyond being a reference for function declarations, signal declarations, and property lists.

Usage:

Type a regular expression into the top text widget. The status box will turn green for valid regular expressions (as defined by POSIX) and red for invalid regular expressions.

Type a target string into the bottom box. All matches, as computed by regexec, will be highlighted in a green box with a blue border. The empty string is never matched.

TODO:

  • Add a list view that allows saving regular expressions of interest. Allow output to a text file.
  • Add a Java mode which runs a Java program in daemon mode that tests regular expressions as defined in java.util.regex.
  • Write a custom regcomp--one that does not allow nonsense regular expressions like "ab+*".

Screenshot

gtkregextester's People

Contributors

kodekote avatar

Stargazers

 avatar

Watchers

 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.