widgets just do not get created

10 views
Skip to first unread message

rox

unread,
Aug 15, 2011, 7:34:43 AM8/15/11
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?

rox

unread,
Aug 15, 2011, 8:15:01 AM8/15/11
to Berkelium
Actually everything works just fine. Turns out windows key codes do
not match berkelium mouse button numbers quite well. If anyone has
similar issues - be careful. Windows input needs more handling!
Reply all
Reply to author
Forward
0 new messages