Wednesday, February 01, 2006

CompFramework and widgets

The c++ framework is starting to take shape. CWidget, and CButton are the newest additions to the CompFramework. Every widget will now inherit the CWidget class. Every CWindow has a function called AddWidget, which takes a pointer to a CWidget object as a parameter. The AddWidget fuction is also in the CWidget class itself, so in theory (I havent actually tested it yet) one should be able to add widgets to widgets. This essentially makes the CWidget class equivilent to BeOS's BView. This function then calls the widgets Create(HANDLE hWnd) function. On its own, in just a plain CWidget object, this function just creates a plain empty skygi window (not a normal window, but a skygi window (which is basically a blank slate for custom widgets)). Classes like CButton override this function to create a skygi button, rather than a blank window. The CWidget also accepts messages via the same hook functions a CWindow uses for messages. So to create a custom widget, all one has to do is subclass CWidget, and override the Redraw, mouse clicked, or whatever they need for the widget. Any extra variables, or flags, etc specific to the custom widget can just be private, or public, or whatever members of the class.

Future plans for CWidget will be to create some drawing functions, like DrawLine, or Blit, or something. Stay tuned.

Monday, January 30, 2006

The CompFramework

I was going to get going on resuming work on TelnetPortal, when I realized.. "This code frigging sucks". So I was going to start over, and recode it to be cleaner, and figured that if I was going to do that, I want to do it in C++ instead of C. So I got started, and realized that THAT code would be much cleaner if I had some sort of C++ api to work with. Enter the CompFramework. I started working on it last night, and so far it has two classes: CApplication, and CWindow.

To make an application with a main window requires very little right now:
class SomeApp: public CApplication {
public:
SomeApp(string title, int top, int left, int width, int height);
}

SomeApp::SomeApp(string title, int top, int left, int width, int height:
:CApplication(title, top, left, width, height)
{}

int main() {
SomeApp s;
s.Show();
s.Run();
}

CApplication inherits a CWindow, and to deal with messages, one just overrides CWindows MessageReceived function, and treats it like a normal skygi callback.

My plan is to start out with basic elements such as a Button class, a TextField class, Maybe some sort of c++ wrapper for sockets, and Basically anything I think I will need for telnet portal.

Stay tuned for updates.

Monday, January 23, 2006

No native skyos

Welp, looks like its back to vmware for me. Got my new system set up, and skyos is a no-go. So, as soon as I get that done, and some misc homework, work will resume on telnet portal.

Friday, January 20, 2006

Issues with skyos

I have not been able to boot any recent versions of skyos, so not much has been done. I was however, for some reason able to boot an alpha released just before beta 9, but not beta 9 itself. As a result, I noticed that the crashing problem seems to be resolved. So, as of beta 9, no more crashing. Soon I will be getting a new system that should (hopefully) be able to boot beta 9, or other recent alphas, and get going on telnet portal again. The main thing that I am going to add is the main part of the telnet client, which includes connecting to remote telnet servers. So, stay tuned :)

P.S: here is an updated screenshot, with all of the bugfixes I mentioned in the initial post. It was taken quite a while ago, and is in the skyos forums as well:

Telnet portal, showing off scaling, and misc rendering fixes.

Tuesday, September 27, 2005

TelnetPortal

TelnetPortal is a project to create a high quality graphical (as in GUI, not as in the absence of ASCII characters) telnet client for SkyOS. Features currently implemented are text scaling (Text size adjusts based on the size of the window, and the selected text resolution to emulate), address book, nearly full support for ANSI codes, reading an ANSI file from the hard drive and displaying it in either standard mode, or scaling mode, and finally the PROPER display of the IBM extended character set ;).

This is the most recent screen shot of TelnetPortal, taken about a month ago. A lot has changed since then, such as the extra space between each line of text being removed, the random improperly placed characters are fixed, etc. I am having some issues with crashes when some files are read from the hard drive, etc, which is why I don't have a more recent screen shot. When I get these crashes fixed, I will possibly make kind of a pre-alpha release.