Store pointer to owning wxWindow in wxPizza widget
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c12822fec7
commit
55ca41b1ea
@ -21,7 +21,7 @@ struct WXDLLIMPEXP_CORE wxPizza
|
||||
enum { BORDER_STYLES =
|
||||
wxBORDER_SIMPLE | wxBORDER_RAISED | wxBORDER_SUNKEN | wxBORDER_THEME };
|
||||
|
||||
static GtkWidget* New(long windowStyle = 0);
|
||||
static GtkWidget* New(long windowStyle, void *owner);
|
||||
static GType type();
|
||||
void move(GtkWidget* widget, int x, int y);
|
||||
void scroll(int dx, int dy);
|
||||
@ -33,6 +33,7 @@ struct WXDLLIMPEXP_CORE wxPizza
|
||||
int m_scroll_y;
|
||||
int m_border_style;
|
||||
bool m_is_scrollable;
|
||||
void *m_owner;
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_PIZZA_H_
|
||||
|
@ -133,7 +133,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style )
|
||||
g_signal_connect (m_widget, "delete_event",
|
||||
G_CALLBACK (gtk_dialog_delete_callback), this);
|
||||
|
||||
m_wxwindow = wxPizza::New(m_windowStyle);
|
||||
m_wxwindow = wxPizza::New(m_windowStyle, this);
|
||||
gtk_widget_show( m_wxwindow );
|
||||
|
||||
gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow );
|
||||
|
@ -552,7 +552,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
|
||||
gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget );
|
||||
|
||||
// m_wxwindow is the client area
|
||||
m_wxwindow = wxPizza::New();
|
||||
m_wxwindow = wxPizza::New(0,this);
|
||||
gtk_widget_show( m_wxwindow );
|
||||
gtk_container_add( GTK_CONTAINER(m_mainWidget), m_wxwindow );
|
||||
|
||||
|
@ -282,10 +282,11 @@ GType wxPizza::type()
|
||||
return type;
|
||||
}
|
||||
|
||||
GtkWidget* wxPizza::New(long windowStyle)
|
||||
GtkWidget* wxPizza::New(long windowStyle,void* owner)
|
||||
{
|
||||
GtkWidget* widget = GTK_WIDGET(g_object_new(type(), NULL));
|
||||
wxPizza* pizza = WX_PIZZA(widget);
|
||||
pizza->m_owner = owner;
|
||||
pizza->m_backing_window = NULL;
|
||||
pizza->m_scroll_x = 0;
|
||||
pizza->m_scroll_y = 0;
|
||||
|
@ -2113,7 +2113,7 @@ bool wxWindowGTK::Create( wxWindow *parent,
|
||||
#endif
|
||||
|
||||
|
||||
m_wxwindow = wxPizza::New(m_windowStyle);
|
||||
m_wxwindow = wxPizza::New(m_windowStyle,this);
|
||||
#ifndef __WXUNIVERSAL__
|
||||
if (HasFlag(wxPizza::BORDER_STYLES))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user