Daily Archives: January 2, 2007

Working GUI!

Shocked It works…

I create an instance of each delegator at the beginning of my code, then “register” them with a name. This is the same name as what goes in the XML file.

So you do this:

(first subclass the “Delegator” class, adding the functionality needed for each widget that needs it)

Code:

QuitDelegator d_quitBtn;
LoadDelegator d_loadBtn;

manager.RegisterDelegator (“QuitBtn”, &d_quitBtn);
manager.RegisterDelegator (“LoadBtn”, &d_loadBtn);
manager.LoadGUIDef (“gui-def.xml”);

manager.Run();

And then have XML that looks like

Posted in Programming, Projects | Tagged | Leave a comment

GUI Message Passing

OK, I have a button class. We’ll call it GUIButton. It has an “OnClick()” member that gets called when the button is clicked. Currently this just prints “Clicked!” on the screen.

Imagine I want to put five buttons on the screen to do various things. Where do I put the OnClick() code for each button?

I was thinking of making an instance of GUIButton for each real button I want (QuitButton… Continue reading

Posted in Programming, Projects | Tagged | Leave a comment

Working Layout Manager

It works Smile I can turn an XML file that looks like this

Code:

<?xml version=”1.0″ ?>
<GUI version=”0.1″>
<WINDOW x=”0″ y=”400″ z=”0″ w=”800″ h=”200″ caption=”MainWindow”>
<WINDOW x=”10″ y=”10″ z=”0″ w=”50″ h=”50″ caption=”MainWindow2″>
</WINDOW>
<WINDOW x=”70″ y=”10″ z=”0″ w=”50″ h=”50″ caption=”MainWindow3″>
</WINDOW>
<WINDOW x=”130″ y=”10″ z=”0″ w=”50″ h=”50″ caption=”MainWindow4″>
</WINDOW>
<WINDOW x=”10″ y=”60″ z=”0″ w=”740″ h=”120″ caption=”MainWindow5″>
<WINDOW x=”5″ y=”5″ z=”0″ w=”50″ h=”50″ caption=”MainWindow6″>
</WINDOW>
<WINDOW x=”60″ y=”5″ z=”0″ w=”50″ h=”50″ caption=”MainWindow7″>
</WINDOW>
<WINDOW x=”120″ y=”5″ z=”0″ w=”50″ h=”50″ caption=”MainWindow8″>
</WINDOW>
</WINDOW>
</WINDOW>
</GUI&gt… Continue reading

Posted in Programming, Projects | Tagged | Leave a comment

Test post with geo info

This is a test to see if geo info is recorded…

And it does :)

I have installed the Plug-n-play-google-map plugin on my site. I can now provide links on a fancy Google Map to relevant places. I’m off to Wales on Thursday so I’ll use that as a test.

This site is good for finding lat,lon positions to put in your posts… Continue reading

Posted in Test | Leave a comment