Click here to Skip to main content
6,595,854 members and growing! (19,338 online)
Email Password   helpLost your password?
Development Lifecycle » Code Generation » General     Beginner License: The Code Project Open License (CPOL)

RAD C++ Integrated Development Environment

By Ali Imran Khan Shirani

RAD Tool for C++ Developers, Code Generator
C++, Windows (Win2K, WinXP, Win2003), Win32, Dev, Design
Posted:7 Jun 2008
Views:17,479
Bookmarked:22 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
15 votes for this article.
Popularity: 4.39 Rating: 3.73 out of 5
3 votes, 20.0%
1

2
2 votes, 13.3%
3
1 vote, 6.7%
4
9 votes, 60.0%
5
Project Examples are included in the ZIP package in folder 'projects'

Introduction

RAD Studio Screenshot RAD Studio (aka RAD C++ IDE) is a tool designed specifically to rapid up the development process without hassle of running heavy Integrated Development Environments. RAD Studio concentrates on highly increased level of ease, by provision of inplace GUI Designer as well as event handlers attachment within the IDE. It also lessens the burden by writing event handlers for a range of controls, from normal button upto very sophisticated Grid control. Very first time when it was planned, it was started for gcc-mingw compiler. It is completely based on RAD C++ GUI Library which is now ported to Microsoft Visual C++ too.

Background

Basic Idea was HIGHLY INCREASED LEVEL OF EASE for C++ developers. What RAD Studio produces as code is compilable with DEV C++ without any problem (if v1.2.4 radc++.h and libradc++.a are present in the dev c++ installation folder)

Using the code

If you start reading the source code you may be lost, becuase to read the code you first must have good grip over the RAD C++ GUI Library itself. So better is user the applciation itself. Secondly if anyone is interested in reviewing the code, is welcomed to ask questions wherever needed. Backbone of RADStudio is RAD C++ GUI Library ofcourse, but files denv.h dform.h and dcontrol.h are very good example of creating your very own dialog designer whih may be utilized in your commercial applciations too.

The code that RADStudio produces is really simple enough to understand, since RAD C++ Library itself concentrates upon level of ease. Here is a small example of a Dialog / Form designed in RADStudio and then code exported as custom framework: Screenshot of a simple form created in RAD Studio

//Header file for Form1 - Form1.h
FormProcedure CForm1_Procedure(FormProcArgs);

class CForm1 : public Form {

	public:
		Button	Button20;
		TextBox	TextBox21;


		//constructor

				CForm1();

		//Form events

		void	onClose(CForm1 &me);
		void	onFocus(CForm1 &me);
		void	onLeftClick(CForm1 &me, int mouseX, int mouseY);
		void	onLoad(CForm1 &me);
		void	onMouseMove(CForm1 &me, int mouseX, int mouseY);
		void	onRefresh(CForm1 &me);
		void	onResize(CForm1 &me, int newWidth, int newHeight);
		void	onRightClick(CForm1 &me, int mouseX, int mouseY);


		//Controls' events

		void	Button20_onClick(CForm1 &parent,Button &me);
		void	TextBox21_onChange(CForm1 &parent, TextBox &me, String newText);


};		

//And corrosponding cpp file for Form1 - Form1.cpp
CForm1::CForm1() : Form("Form 1",95,127,400,210,RCP_SIMPLE,True,True,False,False,True,_window(HWND_DESKTOP),False,0) {
	Button20.create("Button 20",AUTO_ID,238,98,100,25,*this,True,True,False,False);
	
	TextBox21.create("TextBox 21",AUTO_ID,28,98,200,25,*this,True,True,False,False,WS_EX_CLIENTEDGE);
	

	this->procedure=CForm1_Procedure;

	SetWindowLong(hwnd,GWL_USERDATA,(LONG)this);
	this->onLoad(*this);
}
FormProcedure CForm1_Procedure(FormProcArgs) {
	CForm1 *FRM = reinterpret_cast  (GetWindowLong(hwnd,GWL_USERDATA));
	ON_COMMAND_BY(FRM->Button20) FRM->Button20_onClick(*FRM,FRM->Button20);
	ON_TEXT_CHANGED(FRM->TextBox21) FRM->TextBox21_onChange(*FRM,FRM->TextBox21,FRM->TextBox21.getText());
	ON_CLOSE() FRM->onClose(*FRM);
	ON_FOCUS() FRM->onFocus(*FRM);
	ON_LEFT_CLICK() FRM->onLeftClick(*FRM,_xmouse,_ymouse);
	
	ON_MOUSEMOVE() FRM->onMouseMove(*FRM,_xmouse,_ymouse);
	ON_PAINT() FRM->onRefresh(*FRM);
	ON_RESIZE() FRM->onResize(*FRM,FRM->getWidth(),FRM->getHeight());
	ON_RIGHT_CLICK() FRM->onRightClick(*FRM,_xmouse,_ymouse);

	return 0;
}

/* implementation of event handlers and developer's code */
void CForm1::Button20_onClick(CForm1 &parent,Button &me){
/* Code when button is clicked. */
}
void CForm1::TextBox21_onChange(CForm1 &parent, TextBox &me, String newText){
/* Code when text is changed. */
}
/* implementation of event handlers and developer's code */
void CForm1::onClose(CForm1 &me) {
/* [X] Code when form is closed . */
Application.close(); //remove this line if it is not main form of application
}
void CForm1::onFocus(CForm1 &me) {
/* When form receives focus */
}
void CForm1::onLeftClick(CForm1 &me, int mouseX, int mouseY) {
/* When left mouse button is clicked */
}
void CForm1::onLoad(CForm1 &me) {
/* Code when for is very first time loaded. */
}
void CForm1::onMouseMove(CForm1 &me, int mouseX, int mouseY) {
/* When mouse cursor moves over surface of form */
}
void CForm1::onRefresh(CForm1 &me) {
/* When surface of form is redrawn */
}
void CForm1::onResize(CForm1 &me, int newWidth, int newHeight) {
/* Code when form is resized. */
}
void CForm1::onRightClick(CForm1 &me, int mouseX, int mouseY) {
/* When right mouse button is clicked */
}

//Main program file
#define PROJECT_NAME "RAD C++ Studio Project"
#include 

enum __BOOL { False=0, True=1 };//IDE specific

/* Globals go here which are accessible throughout application code */

#include "Form1.h"


CForm1 Form1;


#include "Form1.cpp"


rad_main()

rad_end()

Furthermore

It also produces plain C style code that will be too easy for a moderate level C developer to understand, whih means, the framework in the code is not created.

Compiling RAD Studio generated Code

RAD Studio is not integrated with any compiler yet, but the code it produces does compile. Easy things First, Please first obtain a copy of DEV C++ from www.bloodshed.net. Install it. Now obtain RAD C++ GUI Library 1.2.4 DevPak from radcpp.com's main page and install that too. Now start rad c++ open your GUI project you saved, and export throught menus 'Export' -> 'Framework Classes', it will popup folder chooser, you select a folder you want to write project file and code files to, and hit ok. Now open RADCPP_Project.dev compile and run, enjoy the ease.

Point of Interest

Interesting thing is, RAD Studio is continously being developed and enhanced, and being made compatible with different c++ compilers time to time, for now what it generates is what exactly it is built upon (i.e. rad c++ gui library). The Library behind it is being updated time ot time, and is planned to be ported to X11-Linux environment as well as Mac OSX. So that we finally will have a free of cost full-fledged IDE for C++ developers to develope GUI applciations rapidly and cross-platform.

Important

It is still under-process. WHY? becuase I have been concentrating upon completion of RAD C++ GUI Library. A little more effort that I will put in it, will make it full-fledged IDE. In general it does not crash, but if it is crashed, please notify me by posting message to this article so that I can fix it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Ali Imran Khan Shirani


Member
CEO CliXint Technologies www.clixint.com
Programming: C/C++, WINAPI, PHP/MySQL, GLUT, Javascript, ActionScript, HTML.
Modeling & animation : Maya - Modelling, Character Rigging & Animation, Publishing Video Tutorials.
Occupation: CEO
Company: CliXint Technologies
Location: Pakistan Pakistan

Other popular Code Generation articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 8 of 8 (Total in Forum: 8) (Refresh)FirstPrevNext
GeneralIs this a joke? PinmemberBernard Gressing12:24 10 Nov '08  
GeneralRe: Is this a joke? PinmemberAli Imran Khan Shirani13:17 26 Nov '08  
GeneralRe: Is this a joke? Pinmemberjoeyrowe4:43 21 Feb '09  
GeneralRe: Is this a joke? Pinmemberm.capurso6:10 1 Mar '09  
GeneralCool! PinmemberMember 418052612:27 3 Jul '08  
GeneralVery good... another software too.. Pinmembermarcosvelasco8:53 11 Jun '08  
QuestionHow much time did this take you to write? Pinmemberjcipriani14:40 10 Jun '08  
GeneralFormatting... PinmemberMladen Jankovic15:06 7 Jun '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 7 Jun 2008
Editor:
Copyright 2008 by Ali Imran Khan Shirani
Everything else Copyright © CodeProject, 1999-2009
Web21 | Advertise on the Code Project