Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-07

I'll have some code for you in an hour or 2

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael A. Hess

Greetings,

Hey Cliff you wanted to see what I am doing with the signal processing and callback stuff.

Well I have most of it integrated. I am working at a fever pitch on recoding TControl (controls.pp), TForm (forms.pp), and TButton (buttons.pp). I have to modify TControl because it is the base of all other components. I picked TForm because it isn't that complicated and the same for TButton since it is a normal component.

What I have done is totally removed any reference to gtk from the code. Everything from widget creation to widget callbacks is done in GUIAPI.pp. It has a class called TGUIAPI which controls all interaction between the class library and the widget set being used. What this will mean is that the only piece of code that will need to be rewritten for a different API will be the GUIAPI.pp file. When you link your program you will use the GUIAPI unit of your choice and that is the API that the application will use. Simple.

I am going to do just a little more coding tonight and then I'll send you a sample of what I am doing. I'll send it private email this shouldn't be committed to CVS until alot more work is done. That is of course assuming that anyone wants this to be committed. :-)

The code I'll be sending probably won't compile and work yet because there are still some interactions that need to be addressed to get everything working.

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com

Reply by email

Michael A. Hess
to Shane Miller: Send it to me also. I have also seperated all the gtk code but I'm interested in your…
Shane Miller wrote
Send it to me also. I have also seperated all the gtk code but I'm interested in your approach. Sounds similiar to mine.

Well yes and no. We are both separating it but I am taking a little different tack. The way mine is going everything that has to do with the interface is found all within one file, guiapi.pp. For every API, be it GTK, Qt, Xlib, etc. you will have one guiapi file. Then depending on which API you want to use, that is the file you link against. You don't have to change a thing in your code not a single #ifdef just link with a different unit that has the same name.

The only file that even has to do any linking against this alternate file is the controls.pp file which has TControl. I am working it so that it is the only class that even interfaces with the API.

Using the messaging built into FPC every component defines it's own callbacks within it's own class definition. This means the it will be much easier to inherit a class to build a new component.

I'll send you a copy of the email I sent Cliff but as I told him please be aware that this is totally in progress. Somethings will look unfinished, well... because they are. :-)

Talk at you later,

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com

Reply by email

Shane Miller

Send it to me also. I have also seperated all the gtk code but I'm interested in your approach. Sounds similiar to mine.

Shane

Earlier message 47 lines
-----Original Message----- From: Michael A. Hess To: Lazarus-List Date: Monday, July 05, 1999 4:14 PM Subject: [lazarus] I'll have some code for you in an hour or 2 >Greetings, > >Hey Cliff you wanted to see what I am doing with the signal processing >and callback stuff. > >Well I have most of it integrated. I am working at a fever pitch on >recoding TControl (controls.pp), TForm (forms.pp), and TButton >(buttons.pp). I have to modify TControl because it is the base of all >other components. I picked TForm because it isn't that complicated and >the same for TButton since it is a normal component. > >What I have done is totally removed any reference to gtk from the code. >Everything from widget creation to widget callbacks is done in >GUIAPI.pp. It has a class called TGUIAPI which controls all interaction >between the class library and the widget set being used. What this will >mean is that the only piece of code that will need to be rewritten for a >different API will be the GUIAPI.pp file. When you link your program you >will use the GUIAPI unit of your choice and that is the API that the >application will use. Simple. > >I am going to do just a little more coding tonight and then I'll send >you a sample of what I am doing. I'll send it private email this >shouldn't be committed to CVS until alot more work is done. That is of >course assuming that anyone wants this to be committed. :-) > >The code I'll be sending probably won't compile and work yet because >there are still some interactions that need to be addressed to get >everything working. > >-- >==== Programming my first best destiny! ==== > >Michael A. Hess Miracle Concepts, Inc. > http://www.miraclec.com > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Cliff Baeseman

Ok maybe I can fill in any missing pieces.

I am not opposed to is bleeding edge development and the best ideas go.

We probably will end up with some mixture of the code but it's all for the better.

Cliff

Earlier message 47 lines
-----Original Message----- From: Michael A. Hess To: Lazarus-List Date: Monday, July 05, 1999 6:15 PM Subject: [lazarus] I'll have some code for you in an hour or 2 >Greetings, > >Hey Cliff you wanted to see what I am doing with the signal processing >and callback stuff. > >Well I have most of it integrated. I am working at a fever pitch on >recoding TControl (controls.pp), TForm (forms.pp), and TButton >(buttons.pp). I have to modify TControl because it is the base of all >other components. I picked TForm because it isn't that complicated and >the same for TButton since it is a normal component. > >What I have done is totally removed any reference to gtk from the code. >Everything from widget creation to widget callbacks is done in >GUIAPI.pp. It has a class called TGUIAPI which controls all interaction >between the class library and the widget set being used. What this will >mean is that the only piece of code that will need to be rewritten for a >different API will be the GUIAPI.pp file. When you link your program you >will use the GUIAPI unit of your choice and that is the API that the >application will use. Simple. > >I am going to do just a little more coding tonight and then I'll send >you a sample of what I am doing. I'll send it private email this >shouldn't be committed to CVS until alot more work is done. That is of >course assuming that anyone wants this to be committed. :-) > >The code I'll be sending probably won't compile and work yet because >there are still some interactions that need to be addressed to get >everything working. > >-- >==== Programming my first best destiny! ==== > >Michael A. Hess Miracle Concepts, Inc. > http://www.miraclec.com > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email