Question:
How implement a custom wxSciter
control properly and correctly place it inside standard wxWidgets controls?
(so it can behave like a browser window)
SOLVED:
I got it solved after provided suggestions with:
class NativeWindow : public wxNativeWindow
{
public:
explicit NativeWindow(wxWindow* parent)
: wxNativeWindow()
{
GtkWidget* widget = SAPI()->SciterCreateWindow(SW_CHILD, NULL, NULL, NULL, this->GetHandle());
g_object_ref_sink(widget);
// remove Sciter's GTK top-level container
// to prevent "Can't set a parent on widget which has a parent"
gtk_container_remove(GTK_CONTAINER(gwindow(widget)), widget);
SAPI()->SciterLoadFile(widget, WSTR("http://linux.org.ru/"));
(void)Create(parent, wxID_ANY, widget);
}
virtual ~NativeWindow()
{
Disown();
}
};