Berkelium Widget Events?

EthanB

26-01-2011 00:49:47

Is there a way to get events from the Berkelium Widget?

I need to get the current URL that the browser is at and display it in the url bar, but I see no way to do this because there is no BerkeliumWidget member in the MyGUI namespace.

EDIT: I've managed to do it by adding an eventChangeProperty to the onAddressBarChanged delgate.

If anyone else needed to do this, this is how:

Open BerkeliumWidget.h
Find the onAddressBarChanged delgate, it will look like this:
virtual void onAddressBarChanged(Berkelium::Window *win, Berkelium::URLString newURL) {}

Change it to:


virtual void onAddressBarChanged(Berkelium::Window *win, Berkelium::URLString newURL)
{
eventChangeProperty( this, "URL", std::string( newURL.mData ) );
}


Compile it and now create an eventChangeProperty delgate for your berkelium widget, _key will be "URL" and _value will the the url.

Altren

26-01-2011 09:25:57

I think I'll include this into BerkeliumPlugin.

EthanB

27-01-2011 02:26:00

I had one more question, Is there a way to export the plugin's functions some how?

I also need to utilize the goBack() and goForward() functions.