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.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home