]>
git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/fl/rowlayoutpl.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: cbRowLayoutPlugin header.
4 // Author: Aleksandras Gluchovas
8 // Copyright: (c) Aleksandras Gluchovas
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __ROWLAYOUTPL_G__
13 #define __ROWLAYOUTPL_G__
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "rowlayoutpl.h"
19 #include "wx/fl/controlbar.h"
22 Simple implementation of a plugin which handles row layout
23 requests sent from a frame layout.
26 class cbRowLayoutPlugin
: public cbPluginBase
28 DECLARE_DYNAMIC_CLASS( cbRowLayoutPlugin
)
30 cbDockPane
* mpPane
; // is set up temporarily, while handling event
33 // Internal helper relating to not-fixed-bars layout.
34 void FitBarsToRange( int from
, int till
, cbBarInfo
* pTheBar
, cbRowInfo
* pRow
);
36 // Internal helper relating to not-fixed-bars layout.
37 void RelayoutNotFixedBarsAround( cbBarInfo
* pTheBar
, cbRowInfo
* pRow
);
39 // Internal helper relating to not-fixed-bars layout.
40 void MinimzeNotFixedBars( cbRowInfo
* pRow
, cbBarInfo
* pBarToPreserve
);
42 // Internal helper relating to not-fixed-bars layout.
43 int GetRowFreeSpace( cbRowInfo
* pRow
);
46 // Internal helper relating to not-fixed-bars layout.
47 void RecalcLengthRatios( cbRowInfo
* pRow
);
49 // Internal helper relating to not-fixed-bars layout.
50 void ApplyLengthRatios( cbRowInfo
* pRow
);
52 // Internal helper relating to not-fixed-bars layout.
53 void ExpandNotFixedBars( cbRowInfo
* pRow
);
55 // Internal helper relating to not-fixed-bars layout.
56 void AdjustLengthOfInserted( cbRowInfo
* pRow
, cbBarInfo
* pTheBar
);
59 // Internal helper relating to not-fixed-bars layout.
60 void DetectBarHandles( cbRowInfo
* pRow
);
62 // Internal helper relating to not-fixed-bars layout.
63 void CheckIfAtTheBoundary( cbBarInfo
* pTheBar
, cbRowInfo
& rowInfo
);
66 // Row layout helper simulating bar 'friction'.
67 int CalcRowHeight( cbRowInfo
& row
);
69 // Row layout helper simulating bar 'friction'.
70 void LayoutItemsVertically( cbRowInfo
& row
);
73 // Row layout helper simulating bar 'friction'.
74 void StickRightSideBars( cbBarInfo
* pToBar
);
77 // Row layout helper simulating bar 'friction'.
78 void SlideLeftSideBars ( cbBarInfo
* pTheBar
);
80 // Row layout helper simulating bar 'friction'.
81 void SlideRightSideBars( cbBarInfo
* pTheBar
);
84 // Row layout helper simulating bar 'friction'.
85 void ShiftLeftTrashold ( cbBarInfo
* pTheBar
, cbRowInfo
& row
);
87 // Row layout helper simulating bar 'friction'.
88 void ShiftRightTrashold( cbBarInfo
* pTheBar
, cbRowInfo
& row
);
91 // Insert the bar before the given row.
92 void InsertBefore( cbBarInfo
* pBeforeBar
,
97 // Insert the bar before the given row.
98 void DoInsertBar( cbBarInfo
* pTheBar
, cbRowInfo
& row
);
101 // Default constructor.
102 cbRowLayoutPlugin(void);
104 // Constructor taking frame layout pane and pane mask.
105 cbRowLayoutPlugin( wxFrameLayout
* pPanel
, int paneMask
= wxALL_PANES
);
107 // Responds to row resize event.
108 void OnResizeRow ( cbResizeRowEvent
& event
);
110 // Responds to bar insertion event.
111 void OnInsertBar ( cbInsertBarEvent
& event
);
113 // Responds to bar removal event.
114 void OnRemoveBar ( cbRemoveBarEvent
& event
);
116 // Responds to row layout event.
117 void OnLayoutRow ( cbLayoutRowEvent
& event
);
119 // Responds to rows layout event.
120 void OnLayoutRows( cbLayoutRowsEvent
& event
);
122 DECLARE_EVENT_TABLE()
125 #endif /* __ROWLAYOUTPL_G__ */