]> git.saurik.com Git - wxWidgets.git/commitdiff
Added support for the wxFRAME_FLOAT_ON_PARENT style
authorRobin Dunn <robin@alldunn.com>
Sat, 20 Jan 2007 03:23:43 +0000 (03:23 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 20 Jan 2007 03:23:43 +0000 (03:23 +0000)
Also add a mode for the wxPOPUP_WINDOW style as a temporary hack to
make it easier using a wxFrame as a replacement for wxPopupWindow.
See how it is used in wxStyledTextCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/mac/carbon/toplevel.cpp

index ccc01c125c1938cc6079998e9e263bf18643a31d..edf3a0ad3b45e410897732c1f549cc12ff0f77ed 100644 (file)
@@ -105,6 +105,10 @@ wxMSW
 - Fix lack of spin control update event when control lost focus
 - Corrected drawing of bitmaps for disabled menu items
 
+wxMac
+
+- Added support for the wxFRAME_FLOAT_ON_PARENT style
+
 
 2.8.1
 -----
index 6903a408f8ba15892add8d28f8acc67b250d96f3..bdd38645a125849e8f3c52dd6ce86da68ab68dec 100644 (file)
@@ -929,7 +929,7 @@ bool wxTopLevelWindowMac::Create(wxWindow *parent,
     m_windowId = id == -1 ? NewControlId() : id;
     wxWindow::SetLabel( title ) ;
 
-    MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
+    MacCreateRealWindow( title, pos , size , style , name ) ;
 
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
 
@@ -1110,6 +1110,20 @@ void  wxTopLevelWindowMac::MacCreateRealWindow(
             wclass = kPlainWindowClass ;
         }
     }
+    else if ( HasFlag( wxPOPUP_WINDOW ) )
+    {
+        // TEMPORARY HACK!
+        // Until we've got a real wxPopupWindow class on wxMac make it a
+        // little easier for wxFrame to be used to emulate it and workaround
+        // the lack of wxPopupWindow.
+        if ( HasFlag( wxBORDER_NONE ) )
+            wclass = kHelpWindowClass ;   // has no border
+        else
+            wclass = kPlainWindowClass ;  // has a single line border, it will have to do for now
+        //attr |= kWindowNoShadowAttribute; // turn off the shadow  Should we??
+        group = GetWindowGroupOfClass(    // float above other windows   
+            kFloatingWindowClass) ;
+    }
     else if ( HasFlag( wxCAPTION ) )
     {
         wclass = kDocumentWindowClass ;
@@ -1156,6 +1170,9 @@ void  wxTopLevelWindowMac::MacCreateRealWindow(
     if ( HasFlag(wxSTAY_ON_TOP) )
         group = GetWindowGroupOfClass(kUtilityWindowClass) ;
 
+    if ( HasFlag( wxFRAME_FLOAT_ON_PARENT ) )
+        group = GetWindowGroupOfClass(kFloatingWindowClass) ;
+        
     attr |= kWindowCompositingAttribute;
 #if 0 // wxMAC_USE_CORE_GRAPHICS ; TODO : decide on overall handling of high dpi screens (pixel vs userscale)
     attr |= kWindowFrameworkScaledAttribute;