updated my OS C++ GUI

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
flash
Member
Member
Posts: 29
Joined: Sun Feb 04, 2007 6:33 am

updated my OS C++ GUI

Post by flash »

Hi, I'm writing a big C++ library now! Like .Net and Java, it is named System. When I program a UI form, System.GUI help do it.

Many pictures of my os are shown at:
http://picasaweb.google.com/gdxxhg/SGOS/

This is code of hello.cpp(Unicode characters are removed):

Code: Select all

#include <System.h>
using namespace System;

class Button3: public Button{
public:
	Button3(BaseWindow* parent):Button( parent, string("..."), 0 ){}
	virtual int OnMouseUp(int button, Point* p ){
		MessageBox::Show(string("..."),
			string("..."));
		Button::OnMouseUp(button,p);
	} 
};

class Button1: public Button{
public:
	Button1(BaseWindow* parent):Button( parent, string("..."), 0 ){}
	virtual int OnMouseUp(int button, Point* p ){
		MessageBox::Show(string("...
string("...");
		Button::OnMouseUp(button,p);
	} 
};


class Button2: public Button{
public:
	Button2(BaseWindow* parent):Button( parent, string("..."), 0 ){}
	virtual int OnMouseUp(int button, Point* p ){
		MessageBox::Show(string("...\n\
Mail:[email protected]"), string(".."));
		Button::OnMouseUp(button,p);
	} 
};



class MainForm: public Form{
private:
	Button3* button3;
	Button1* button1;
	Button2* button2;
public:
	MainForm():Form( (BaseWindow*)0, string("C++ test"), 0 ){
	}
	virtual ~MainForm(){
		Application::Exit();
	}
	
	int Init(){
		Move( 100, 200, 400, 350 );
		button3 = new Button3(GetClient());
		button3->Move( 20, 20 );
		button1 = new Button1(GetClient());
		button1->Move( 20, 50 );
		button2 = new Button2(GetClient());
		button2->Move( 20, 80 );
	}
		
};


extern "C" int Entry()
{ 
	MainForm *frmMain = new MainForm();
	frmMain->Init();
	Application::Run(frmMain);
}


Attachments
hello.exe
hello.exe
c++.JPG (53.6 KiB) Viewed 1806 times
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Cool! Great work! I'd like to see someone follow the English .Net and Java naming convention in C++ (System.GUI.Button) rather than cryptic myGUI.Cmpnts.Wdgts.Btn.

I'm afraid to say; I won't be able to work on my OS for a while (I didn't know a better place to mention this). I have soo much work to do for Dream Build Play.

I'm not in it for the prize, but first prize is $10,000, second prize is $5,000 and they both get a PC. And the top 19 winners each get an Xbox 360 and several other Microsoft things.
My OS is Perception.
anon19287473
Member
Member
Posts: 97
Joined: Thu Mar 15, 2007 2:27 pm

Post by anon19287473 »

Wow... good work. Can't wait to see where your OS goes!
Post Reply