Re: Redy 1.0.a1 released!
- Posted by ryanj Dec 15, 2014
- 4142 views
Status update:
The next step is to get RedyCode working, and that requires a powerful text editor library. This library will be the main new feature of the next release of Redy.
This library, gui/objects/textedit.e, will be the first real demonstration of what the canvas widget class can do. It is categorized as a "canvas object" library, which means it is specifically designed to control a canvas widget to present what you could think of as a "custom widget". This ability to create your own custom graphical controls or editors using the canvas widget class is one of the most important features of Redy.
I am designing it to be able to do word wrap, syntax highlighting for several file types, context-sensitive help, intelligent word/block completion, search/replace, spell checking, redo/undo, several editing modes, and formatted text rendering mode. I am using Euphoria's multitasking abilities and some optimization methods to handle large files efficiently and without locking up the application. This will take a long time to complete, but basic functionality should work in the next few weeks.
This library handles multiple instances of text editors. Basically, you create containers, and then tell the textedit.e library to create text editor instances, then to show selected instances in canvas widgets, by specifying the canvas widget name and parent container name. Here's a little snapshot of the test app:
without warning global constant App_Name = "Redy - textedit.e test", App_Version = "1.0.a1" include gui/gui.e as gui include gui/objects/textedit.e as txte include std/task.e include std/text.e include std/pretty.e include std/utils.e include std/sequence.e procedure gui_event(object evwidget, object evtype, object evdata) --switch evwidget do --end switch end procedure procedure start() gui:wcreate({ {"name", "winMain"}, {"class", "window"}, {"title", App_Name}, {"visible", 1}, {"size", {640, 480}}, {"position", {0, 0}} }) gui:wcreate({ {"name", "cntMain"}, {"parent", "winMain"}, {"class", "container"}, {"orientation", "horizontal"}, {"sizemode_x", "expand"}, {"sizemode_y", "expand"} }) gui:wcreate({ {"name", "cntLeft"}, {"parent", "cntMain"}, {"class", "container"}, {"orientation", "vertical"}, {"sizemode_x", "expand"}, {"sizemode_y", "expand"} }) gui:wcreate({ {"name", "divVerticalSplit"}, {"parent", "cntMain"}, {"class", "divider"}, {"attach", "cntLeft"} }) gui:wcreate({ {"name", "cntRight"}, {"parent", "cntMain"}, {"class", "container"}, {"orientation", "vertical"}, {"sizemode_x", "expand"}, {"sizemode_y", "expand"} }) txte:create({ {"name", "txt1"}, {"label", "Text Editor 1"}, {"text", { "Lorem ipsum dolor sit amet consectetuer commodo et malesuada sapien Sed. Dui sollicitudin lacinia laoreet Curabitur tristique tempus Sed malesuada Curabitur ante. Aliquam lacus convallis tellus laoreet nibh iaculis gravida habitant Aliquam auctor. Magna pretium id Aenean eros nec nulla pulvinar urna magna ut. Scelerisque nibh malesuada risus dolor lacus Curabitur justo dignissim elit Morbi. Semper convallis magna eget mauris." }} }) txte:create({ {"name", "txt2"}, {"label", "Text Editor 2"}, {"text", { "Redy is an open source project written in the Euphoria programming language which is easy to learn. Its use of simple English words rather than punctuation enables you to quickly read the source code and understand it. It uses dynamic variables called sequences to store data of any size and complexity without dealing with pointers, structures, or data types. It is an extremely fast interpreted language, and can be translated to C and compiled to run even faster.", "Redy is a system of Euphoria libraries and programs designed according to specific standards to make it easy to write Euphoria programs. Its main feature is a Graphical User Interface library that is written from scratch in pure Euphoria code to take full advantage of Euphoria's syntax features with minimal overhead. This unique GUI hides the complexities of low-level operating-system-specific APIs with a system of widgets which are specially designed to be extremely easy to use. Additionally, Redy provides an Integrated Development Environment called RedyCode that makes it very easy to write, debug, document, and distibute programs in the Euphoria language." }} }) txte:show("txt1", "canLeftEdit", "cntLeft") txte:show("txt2", "canRightEdit", "cntRight") end procedure gui:start(routine_id("start"), routine_id("gui_event"))