Added fl (frame layout) to wxWindows, from source tidied by Hans Van Leemputten <Hansvl@softhome.net>.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2001-07-24 15:27:12 +00:00
parent 3c85ada9db
commit 8e08b761b0
109 changed files with 21049 additions and 4 deletions

View File

@@ -0,0 +1,87 @@
/////////////////////////////////////////////////////////////////////////////
// Name: No names yet.
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 02/10/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __ROWLAYOUTPL_G__
#define __ROWLAYOUTPL_G__
#ifdef __GNUG__
#pragma interface "rowlayoutpl.h"
#endif
#include "wx/fl/controlbar.h"
/*
* Simple implementation of plugin, which handles row-layouting
* requests sent from Frame Layout
*/
class cbRowLayoutPlugin : public cbPluginBase
{
DECLARE_DYNAMIC_CLASS( cbRowLayoutPlugin )
protected:
cbDockPane* mpPane; // is set up temorarely, while handling event
protected:
// not-fixed-bars layouting related helpers
void FitBarsToRange( int from, int till, cbBarInfo* pTheBar, cbRowInfo* pRow );
void RelayoutNotFixedBarsAround( cbBarInfo* pTheBar, cbRowInfo* pRow );
void MinimzeNotFixedBars( cbRowInfo* pRow, cbBarInfo* pBarToPreserve );
int GetRowFreeSpace( cbRowInfo* pRow );
void RecalcLengthRatios( cbRowInfo* pRow );
void ApplyLengthRatios( cbRowInfo* pRow );
void ExpandNotFixedBars( cbRowInfo* pRow );
void AdjustLengthOfInserted( cbRowInfo* pRow, cbBarInfo* pTheBar );
void DetectBarHandles( cbRowInfo* pRow );
void CheckIfAtTheBoundary( cbBarInfo* pTheBar, cbRowInfo& rowInfo );
// row-layouting helpers (simulate "bar-friction")
int CalcRowHeight( cbRowInfo& row );
void LayoutItemsVertically( cbRowInfo& row );
void StickRightSideBars( cbBarInfo* pToBar );
void SlideLeftSideBars ( cbBarInfo* pTheBar );
void SlideRightSideBars( cbBarInfo* pTheBar );
void ShiftLeftTrashold ( cbBarInfo* pTheBar, cbRowInfo& row );
void ShiftRightTrashold( cbBarInfo* pTheBar, cbRowInfo& row );
void InsertBefore( cbBarInfo* pBeforeBar,
cbBarInfo* pTheBar,
cbRowInfo& row
);
void DoInsertBar( cbBarInfo* pTheBar, cbRowInfo& row );
public:
cbRowLayoutPlugin(void);
cbRowLayoutPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
// event handlers
void OnResizeRow ( cbResizeRowEvent& event );
void OnInsertBar ( cbInsertBarEvent& event );
void OnRemoveBar ( cbRemoveBarEvent& event );
void OnLayoutRow ( cbLayoutRowEvent& event );
void OnLayoutRows( cbLayoutRowsEvent& event );
DECLARE_EVENT_TABLE()
};
#endif /* __ROWLAYOUTPL_G__ */