]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/fl/controlbar.cpp
APplied patch [ 705301 ] Don't send event for wxSplitter::Unsplit
[wxWidgets.git] / contrib / src / fl / controlbar.cpp
index 85e428ecf63da62691b861d9f9a77c89ff217bb1..6d6a930fdce1af14ef086e1c2eda22b8e9eb6cfa 100644 (file)
@@ -674,7 +674,7 @@ BarArrayT& wxFrameLayout::GetBars()
 
 void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
 {
-    if ( newState == wxCBAR_FLOATING && !mFloatingOn )
+    if ( newState == wxCBAR_FLOATING && !(mFloatingOn && pBar->mFloatingOn))
 
         return;
 
@@ -824,7 +824,7 @@ void wxFrameLayout::ApplyBarProperties( cbBarInfo* pBar )
 
 void wxFrameLayout::RepositionFloatedBar( cbBarInfo* pBar )
 {
-    if ( !mFloatingOn ) return;
+    if ( !(mFloatingOn && pBar->mFloatingOn)) return;
 
     wxNode* pNode = mFloatedFrames.First();
 
@@ -871,7 +871,8 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
     }
     else
     {                   
-        if ( !mFloatingOn ) return;
+        if ( !(mFloatingOn && pBar->mFloatingOn) )
+          return;
 
         // float it
 
@@ -896,7 +897,9 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
         pMiniFrm->Create( &GetParentFrame(), -1, pBar->mName, 
                           wxPoint( 50,50 ),
                           wxSize ( 0, 0  ),
-                          wxFRAME_FLOAT_ON_PARENT  |  wxFRAME_TOOL_WINDOW
+                          wxFRAME_FLOAT_ON_PARENT |
+                          wxFRAME_TOOL_WINDOW |
+                          wxFRAME_NO_TASKBAR
                         );
 
         pMiniFrm->SetClient( pBar->mpBarWnd );
@@ -974,7 +977,7 @@ void wxFrameLayout::RemoveBar( cbBarInfo* pBarInfo )
             return;
         }
     }
-    wxFAIL_MSG("bar info should be present in the list of all bars of all panes");
+    wxFAIL_MSG(wxT("bar info should be present in the list of all bars of all panes"));
 }
 
 bool wxFrameLayout::LocateBar( cbBarInfo* pBarInfo, 
@@ -1153,6 +1156,9 @@ void wxFrameLayout::PositionPanes()
 
 void wxFrameLayout::OnSize( wxSizeEvent& event )
 {
+    mpFrame->ProcessEvent( event );
+    event.Skip( FALSE ); // stop its progpagation
+
     if ( event.GetEventObject() == (wxObject*) mpFrame )
     {
         GetUpdatesManager().OnStartChanges();
@@ -1478,7 +1484,7 @@ void wxFrameLayout::OnIdle( wxIdleEvent& event )
 
     if ( !focus && mCheckFocusWhenIdle )
     {
-        wxMessageBox( "Hi, no more focus in this app!" );
+        wxMessageBox(wxT("Hi, no more focus in this app!"));
 
         mCheckFocusWhenIdle = FALSE;
         //ShowFloatedWindows( FALSE );
@@ -2060,6 +2066,43 @@ cbCommonPaneProperties::cbCommonPaneProperties(void)
       mResizeHandleSize( 4 )
 {}
 
+cbCommonPaneProperties::cbCommonPaneProperties(const cbCommonPaneProperties& props)
+
+    : wxObject(),
+      mRealTimeUpdatesOn    (props.mRealTimeUpdatesOn),
+      mOutOfPaneDragOn      (props.mOutOfPaneDragOn),
+      mExactDockPredictionOn(props.mExactDockPredictionOn),
+      mNonDestructFrictionOn(props.mNonDestructFrictionOn),
+      mShow3DPaneBorderOn   (props.mShow3DPaneBorderOn),
+      mBarFloatingOn        (props.mBarFloatingOn),
+      mRowProportionsOn     (props.mRowProportionsOn),
+      mColProportionsOn     (props.mColProportionsOn),
+      mBarCollapseIconsOn   (props.mBarCollapseIconsOn),
+      mBarDragHintsOn       (props.mBarDragHintsOn),
+
+      mMinCBarDim(props.mMinCBarDim),
+      mResizeHandleSize(props.mResizeHandleSize)
+{}
+
+cbCommonPaneProperties& cbCommonPaneProperties::operator=(const cbCommonPaneProperties& props)
+{
+    mRealTimeUpdatesOn     = props.mRealTimeUpdatesOn;
+    mOutOfPaneDragOn       = props.mOutOfPaneDragOn;
+    mExactDockPredictionOn = props.mExactDockPredictionOn;
+    mNonDestructFrictionOn = props.mNonDestructFrictionOn;
+    mShow3DPaneBorderOn    = props.mShow3DPaneBorderOn;
+    mBarFloatingOn         = props.mBarFloatingOn;
+    mRowProportionsOn      = props.mRowProportionsOn;
+    mColProportionsOn      = props.mColProportionsOn;
+    mBarCollapseIconsOn    = props.mBarCollapseIconsOn;
+    mBarDragHintsOn        = props.mBarDragHintsOn;
+    
+    mMinCBarDim            = props.mMinCBarDim;
+    mResizeHandleSize      = props.mResizeHandleSize;
+
+    return *this;
+}
+
 /***** Implementation for class cbRowInfo *****/
 
 IMPLEMENT_DYNAMIC_CLASS( cbRowInfo, wxObject )
@@ -2085,9 +2128,9 @@ IMPLEMENT_DYNAMIC_CLASS( cbBarInfo, wxObject )
 cbBarInfo::cbBarInfo(void)
 
     : mpRow( NULL ),
-
       mpNext( NULL ),
-      mpPrev( NULL )
+      mpPrev( NULL ),
+      mFloatingOn( TRUE )
 {}
 
 cbBarInfo::~cbBarInfo()
@@ -2973,7 +3016,7 @@ int cbDockPane::GetRowIndex( cbRowInfo* pRow )
             return i;
     }
 
-    wxFAIL_MSG("Row must be present to call cbDockPane::GetRowIndex()");
+    wxFAIL_MSG(wxT("Row must be present to call cbDockPane::GetRowIndex()"));
 
     return 0;
 }
@@ -3021,7 +3064,7 @@ bool cbDockPane::MatchesMask( int paneMask )
         case FL_ALIGN_RIGHT  : thisMask = FL_ALIGN_RIGHT_PANE; break;
 
         default:
-            wxFAIL_MSG("Bad FL alignment type detected in cbDockPane::MatchesMask()");
+            wxFAIL_MSG(wxT("Bad FL alignment type detected in cbDockPane::MatchesMask()"));
     }
 
     return ( thisMask & paneMask ) != 0;