This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MewK's profile picture

[1.3] RWTK: Redworks Toolkit (WIP) [Please Discuss!]

Started by MewK, 05 March 2012 - 08:49 AM
MewK #1
Posted 05 March 2012 - 09:49 AM
The Redworks Toolkit is an API currently in development for future use in the Redworks add-on. It is designed to write GUI-driven application based on an event-loop like other well known frameworks (AWT, Swing, .NET, etc). The basic idea is to divide your logic into several event handlers which gives your code a clean structure. However on top of the application framework the RWTK will provide functions for all aspects of programming. Right now the following packages are implemented or planned:

Package: rwtk_app
Status: Implemented
This package provides the main class for all rwtk-applications to handle the event loop, the event handling and the layer management.

Package: rwtk_app_config
Status: Implemented
This package provides a function to load custom config files and a function to save them.

Package: rwtk_app_layer
Status: Implemented
This package provides the main layer class for all rwtk-applications. It supports frames, menu-bars and title-bars.

Package: rwtk_app_layer_dialog
Status: Planned
This package will provide implementations of standard dialogs: choice-dialog (with a list of available options), input dialog (with one or more input fields).

Package: rwtk_core
Status: Implemented
This package contains some basic functions used for the OO- patterns.

Package: rwtk_draw
Status: WIP
This package contains some functions to draw ASCII-bases shapes to the screen.

Package: rwtk_game
Status: Not ported yet
A direct port of the Redworks game-lib.

Package: rwtk_redbundle
Status:Not ported
A direct port of the Redworks redbundle-lib.

Package: rwtk_string
Status: Not ported yet
A direct port of the tomass’ StringUtils-lib.

Package: rwtk_turtle
Status: Planned (any suggestions?)
Hopefully a direct port of an existing and proper turtle-lib.

The latest Version of the Redworks Toolkit can be found on GitHub. Please feel free to watch at the source code, and provide feedback. I’m aware that a lot of functionality is missing at the moment. The goal however is to make this API the defacto standard for serious application development in ComputerCraft. To achieve that, I need your help though.
Next week I’ll post the first version of the API documentation and a step by step tutorial about how to build your own GUI-based application using the rwtk-app-framework.

Source code:



Function list:




PS: If you are a library author and you think your library should be part of the rwtk, please contact me. I absolutely want to make this API as complete as possible. I will however remove duplicates and or merge functions to provide a bigger functionality.
tommyroyall #2
Posted 05 March 2012 - 01:05 PM
Hey dude, I'm going to be in the hospital today so maybe later or tomorrow I can catch you. I was working with FuzzyPurp and I made a beginning of the draw library. I still need to de-bug it, but overall it's working. Also, I can mod MineDwarf and mix it in with MidCraft Commander to add a mouse with clickable functions :3.
FuzzyPurp #3
Posted 05 March 2012 - 02:27 PM
Nice :unsure:/>/>
Wolvan #4
Posted 07 March 2012 - 08:20 AM
If you need help in Programming… I want to dot it. I could port you something if you need it or I could try to write rwtk_app_layer_dialog

I could also add a wireless commands api with rednet if you want this. I have rewritten Dirkus7's Wireless Turtle and I could add something like this with a add custom command dialog
MewK #5
Posted 08 March 2012 - 12:52 AM
If you need help in Programming… I want to dot it. I could port you something if you need it or I could try to write rwtk_app_layer_dialog

thats sadly one of those things i have to write on my own to be perfectly compatible with my app-system. but as soon as i have the basics and a proper example done you could add more widgets. i can tell you more about that later.

I could also add a wireless commands api with rednet if you want this. I have rewritten Dirkus7's Wireless Turtle and I could add something like this with a add custom command dialog

sounds interesting. can you tell more about that idea? and can you implement it as a library/API? actually im aware that the whole networking part is missing right now. so feel free to work on that subject.
Wolvan #6
Posted 08 March 2012 - 05:47 PM
If you need help in Programming… I want to dot it. I could port you something if you need it or I could try to write rwtk_app_layer_dialog

thats sadly one of those things i have to write on my own to be perfectly compatible with my app-system. but as soon as i have the basics and a proper example done you could add more widgets. i can tell you more about that later.

I could also add a wireless commands api with rednet if you want this. I have rewritten Dirkus7's Wireless Turtle and I could add something like this with a add custom command dialog

sounds interesting. can you tell more about that idea? and can you implement it as a library/API? actually im aware that the whole networking part is missing right now. so feel free to work on that subject.

Rednet always was a little bit difficult to understand and I (Yeah I know how that sounds) have gathered much experience with rednet. I could do something like a remote controll API or something like this. Or I could create an API that helps you send messages. Do you already have a thing for adding maybe databases? We could create a chat API. The only thing: I don't know how to create APIs :mellow:/>/> But I can programm well just give me a short explaining
FuzzyPurp #7
Posted 06 April 2012 - 10:02 PM
Where are you, my friend?
CoolisTheName007 #8
Posted 02 November 2012 - 11:28 AM
I read the first part of the rtwK_app and it seems that your way of catching events does not allow events with more than 3 parameters, what limits user defined events.
Am I right in this?