rox
unread,Aug 15, 2011, 7:34:43 AM8/15/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Berkelium
There must be some issue in my code i assume, since in examples events
for widgets get invoked.. I was wondering if there is any special
setup needed. Im making new library and integrating it into ogre
rendering engine by the way.
my setup is fairly simple:
initialization:
if(!Berkelium::init(Berkelium::FileString::empty()))
throw std::exception("Webification of your application failed.");
_webifyCtxMain = Berkelium::Context::create();
then setting up window:
WebView::WebView(int x, int y) : _x(x), _y(y), _changed(false)
{
_buffer = new BGRAbuffer(x, y);
_window = Berkelium::Window::create(_webifyCtxMain);
_window->setDelegate(this);
_window->resize(x, y);
_window->setTransparent(true);
}
WebView is defined as:
class WebView : Berkelium::WindowDelegate, Lockable
{
public:
~WebView(void);
virtual void onPaint(Berkelium::Window *win, const unsigned char
*sourceBuffer, const Berkelium::Rect &sourceBufferRect, size_t
numCopyRects, const Berkelium::Rect *copyRects, int dx, int dy, const
Berkelium::Rect &scrollRect);
virtual void onWidgetCreated(Berkelium::Window *win,
Berkelium::Widget *newWidget, int zIndex);
virtual void onWidgetPaint(Berkelium::Window *wnd, Berkelium::Widget
*wgt, const unsigned char* src, const Berkelium::Rect &srcRect, size_t
numCopyRects, const Berkelium::Rect *copyRects, int dx, int dy, const
Berkelium::Rect &scrollRect);
virtual void onWidgetDestroyed(Berkelium::Window *win,
Berkelium::Widget *wid);
<....................>
};
multiple inheritance does not cause problem, i tested without it too.
onPaint gets called just fine by the way.
any ideas why this would not work?