]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/app.cpp
don't set minimal column width, it should be possible to set it even to 0 if desired...
[wxWidgets.git] / src / x11 / app.cpp
index 31772d616a27272b4aa4718f064a32bb6a387ae8..9f070313554942ecdb7bc547c12699e23ae598f0 100644 (file)
@@ -6,13 +6,9 @@
 // Created:     17/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Created:     17/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "app.h"
-#endif
-
 #include "wx/frame.h"
 #include "wx/app.h"
 #include "wx/utils.h"
 #include "wx/frame.h"
 #include "wx/app.h"
 #include "wx/utils.h"
@@ -46,8 +42,8 @@
 
 extern wxList wxPendingDelete;
 
 
 extern wxList wxPendingDelete;
 
-wxHashTable *wxWidgetHashTable = NULL;
-wxHashTable *wxClientWidgetHashTable = NULL;
+wxWindowHash *wxWidgetHashTable = NULL;
+wxWindowHash *wxClientWidgetHashTable = NULL;
 
 static bool g_showIconic = FALSE;
 static wxSize g_initialSize = wxDefaultSize;
 
 static bool g_showIconic = FALSE;
 static wxSize g_initialSize = wxDefaultSize;
@@ -203,8 +199,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
     wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
 #endif
 
     wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
 #endif
 
-    wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
-    wxClientWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
+    wxWidgetHashTable = new wxWindowHash;
+    wxClientWidgetHashTable = new wxWindowHash;
 
     return true;
 }
 
     return true;
 }
@@ -446,16 +442,15 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
             if (event->update.utype == GR_UPDATE_SIZE)
 #endif
             {
             if (event->update.utype == GR_UPDATE_SIZE)
 #endif
             {
-                if (win->IsTopLevel())
+                wxTopLevelWindow *tlw = wxDynamicCast(win, wxTopLevelWindow);
+                if ( tlw )
                 {
                 {
-                    wxTopLevelWindow *tlw = (wxTopLevelWindow*) win;
                     tlw->SetConfigureGeometry( XConfigureEventGetX(event), XConfigureEventGetY(event),
                         XConfigureEventGetWidth(event), XConfigureEventGetHeight(event) );
                 }
 
                     tlw->SetConfigureGeometry( XConfigureEventGetX(event), XConfigureEventGetY(event),
                         XConfigureEventGetWidth(event), XConfigureEventGetHeight(event) );
                 }
 
-                if (win->IsTopLevel() && win->IsShown())
+                if ( tlw && tlw->IsShown() )
                 {
                 {
-                    wxTopLevelWindowX11 *tlw = (wxTopLevelWindowX11 *) win;
                     tlw->SetNeedResizeInIdle();
                 }
                 else
                     tlw->SetNeedResizeInIdle();
                 }
                 else
@@ -467,7 +462,6 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
                 }
             }
             return FALSE;
                 }
             }
             return FALSE;
-            break;
         }
 #if !wxUSE_NANOX
         case PropertyNotify:
         }
 #if !wxUSE_NANOX
         case PropertyNotify:
@@ -692,7 +686,9 @@ bool wxApp::OnInitGui()
 
 #include <pango/pango.h>
 #include <pango/pangox.h>
 
 #include <pango/pango.h>
 #include <pango/pangox.h>
-#include <pango/pangoxft.h>
+#ifdef HAVE_PANGO_XFT
+    #include <pango/pangoxft.h>
+#endif
 
 PangoContext* wxApp::GetPangoContext()
 {
 
 PangoContext* wxApp::GetPangoContext()
 {
@@ -702,7 +698,7 @@ PangoContext* wxApp::GetPangoContext()
 
     Display *xdisplay = (Display*) wxApp::GetDisplay();
 
 
     Display *xdisplay = (Display*) wxApp::GetDisplay();
 
-#if 1
+#ifdef HAVE_PANGO_XFT
     int xscreen = DefaultScreen(xdisplay);
     static int use_xft = -1;
     if (use_xft == -1)
     int xscreen = DefaultScreen(xdisplay);
     static int use_xft = -1;
     if (use_xft == -1)