X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1cfc49711752c96a6bf5df51ad0ff8905b50bf81..10c508ef3cfbbb0bf36151f4aafad8edca511a8a:/src/gtk/renderer.cpp diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index 9ce5074138..fa562f68c6 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -33,7 +33,6 @@ #endif #include -#include "wx/gtk/win_gtk.h" // ---------------------------------------------------------------------------- // wxRendererGTK: our wxRendererNative implementation @@ -182,6 +181,41 @@ wxRendererGTK::GetTreeWidget() return s_tree; } +// used elsewhere +GtkWidget *GetEntryWidget() +{ + static GtkWidget *s_entry = NULL; + static GtkWidget *s_window = NULL; + + if ( !s_entry ) + { + s_window = gtk_window_new( GTK_WINDOW_POPUP ); + gtk_widget_realize( s_window ); + s_entry = gtk_entry_new(); + gtk_container_add( GTK_CONTAINER(s_window), s_entry ); + gtk_widget_realize( s_entry ); + } + + return s_entry; +} + +// used elsewhere +GtkWidget *GetScrolledWidget() +{ + static GtkWidget *s_entry = NULL; + static GtkWidget *s_window = NULL; + + if ( !s_entry ) + { + s_window = gtk_window_new( GTK_WINDOW_POPUP ); + gtk_widget_realize( s_window ); + s_entry = gtk_scrolled_window_new( NULL, NULL); + gtk_container_add( GTK_CONTAINER(s_window), s_entry ); + gtk_widget_realize( s_entry ); + } + + return s_entry; +} // This one just gets the button used by the column header. Although it's // still a gtk_button the themes will typically differentiate and draw them @@ -378,21 +412,17 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win, if ( isVert ) { - int h = win->GetClientSize().GetHeight(); - rect.x = position; rect.y = 0; rect.width = full_size; - rect.height = h; + rect.height = size.y; } else // horz { - int w = win->GetClientSize().GetWidth(); - rect.x = 0; rect.y = position; rect.height = full_size; - rect.width = w; + rect.width = size.x; } int x_diff = 0;