00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099 #ifndef INC_DOCKBAR
00100 #define INC_DOCKBAR
00101
00102 #include "list.h"
00103
00104
00105 class OILChildBar;
00106
00108
00110
00111
00112
00113 typedef enum
00114 {
00115 DOCKBAR_LEFT,
00116 DOCKBAR_RIGHT,
00117 DOCKBAR_TOP,
00118 DOCKBAR_BOTTOM,
00119 DOCKBAR_FLOAT,
00120 NUM_DOCKBARS,
00121 DOCKBAR_INVALID = 4000
00122 } DockBarType;
00123
00124
00125 typedef enum
00126 {
00127 LARGE_CONTROLS=37,
00128 SMALL_CONTROLS=29
00129 } ControlSizes;
00130
00131 #define MAX_SLOTS 8
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146 class KernelBarPos : public CCObject
00147 {
00148 public:
00149 KernelBarPos(){Slot=0;Position=0;Dock=DOCKBAR_TOP;};
00150 KernelBarPos( const KernelBarPos &other)
00151 {
00152 Slot=other.Slot;
00153 Position=other.Position;
00154 Dock=other.Dock;
00155 }
00156 void operator = ( const KernelBarPos &other)
00157 {
00158 Slot=other.Slot;
00159 Position=other.Position;
00160 Dock=other.Dock;
00161 }
00162 union {
00163 INT32 Slot;
00164 INT32 x;
00165 };
00166 union {
00167 INT32 Position;
00168 INT32 y;
00169 };
00170 DockBarType Dock;
00171 };
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186 PORTNOTE("other","Removed OILDockingBar - CControlBar usage switched for wxToolBar")
00187 class OILDockingBar : public wxToolBar
00188 {
00189
00190 public:
00191 OILDockingBar();
00192
00193
00194 protected:
00195 DockBarType DockType;
00196 List ChildBars;
00197 ControlSizes ControlSize;
00198 wxWindow *Parent;
00199 BOOL HasBigControls;
00200
00201 public:
00202 private:
00203
00204
00205 public:
00206 virtual ~OILDockingBar();
00207 virtual BOOL PlaceBar(wxWindow* hdialogbar ,wxPoint here, wxSize size = wxSize(0,0))=0;
00208 virtual BOOL PlaceBar(wxWindow* hdialogbar ,KernelBarPos BarPos, wxSize size = wxSize(0,0))=0;
00209 virtual BOOL ReleaseBar(wxWindow* hdialog,BOOL DoTidy)=0;
00210 KernelBarPos * GetBarPos(wxWindow* hWnd);
00211 KernelBarPos * GetBarPos(StringBase * Name);
00212 wxRect GetBarRect(StringBase * Name);
00213 wxRect GetBarRect(wxWindow* hWnd);
00214 BOOL SetNewHWnd(wxWindow* OldHWnd,wxWindow* NewwHWnd);
00215 virtual void SetBigControlState(BOOL Big);
00216 wxWindow* IsScreenPointInBar(wxPoint pnt);
00217 BOOL IsBigControls();
00218 virtual BOOL DeleteBars() =0;
00219 virtual wxSize GetBarSize () = 0;
00220 #ifdef _DEBUG
00221 virtual void AssertValid() const;
00222 PORTNOTE("other", "Removed OILDockingBar::Dump" )
00223 #ifndef EXCLUDE_FROM_XARALX
00224 virtual void Dump(CDumpContext& dc) const;
00225 #endif
00226 void Dump_List();
00227 #endif
00228
00229 protected:
00230 DECLARE_DYNAMIC_CLASS( OILDockingBar )
00231 DECLARE_EVENT_TABLE()
00232
00233 PORTNOTE("other", "Removed OILDockingBar::OnUpdateCmdUI" )
00234 #ifndef EXCLUDE_FROM_XARALX
00235 void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler) ;
00236 #endif
00237
00238
00239
00240
00241 BOOL RemoveBar(OILChildBar * ThisBar);
00242
00243 OILChildBar * IsBarInList(wxWindow* hWnd);
00244 OILChildBar * IsBarInList(StringBase * Name);
00245 static OILDockingBar * ChangedDock;
00246 static BOOL DoRecalc;
00247 private:
00248
00249 };
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264 PORTNOTE("other","Removed OILFixedDockingBar - OILDockingBar usage")
00265 class OILFixedDockingBar : public OILDockingBar
00266 {
00267
00268 public:
00269 OILFixedDockingBar();
00270 BOOL Create( wxWindow* pParentWnd,
00271 DockBarType ReqType,UINT32 id =0);
00272
00273
00274 public:
00275 private:
00276 INT32 NoOfSlots;
00277 INT32 SlotSize[MAX_SLOTS];
00278 UINT32 MaxPos;
00279 wxSize DockSize;
00280 wxPoint Position;
00281
00282 static BOOL allowTidyBars;
00283
00284
00285 public:
00286
00287 BOOL PlaceBar(wxWindow* hdialogbar ,wxPoint here, wxSize size = wxSize(0,0));
00288 BOOL PlaceBar(wxWindow* hdialogbar ,KernelBarPos BarPos, wxSize size = wxSize(0,0));
00289 BOOL PlaceBarAt(wxWindow* hdialogbar ,KernelBarPos BarPos);
00290 BOOL ReleaseBar(wxWindow* hdialog,BOOL DoTidy);
00291 void AppendToSlot(INT32 SlotNo,wxPoint * here);
00292 BOOL IsScreenPointInDock(wxPoint here);
00293 BOOL IsScreenRectInDock(wxRect BarRect);
00294 void GetDockScreenRect(wxRect * BarRect);
00295 void SetBigControlState(BOOL Big);
00296 void BarPosToClient(KernelBarPos Pos,wxPoint * Point);
00297 void BarPosToScreen(KernelBarPos Pos,wxPoint * Point);
00298 INT32 PointToSlot(wxPoint* ThisPoint);
00299 INT32 PointToPosition(wxPoint* ThisPoint);
00300 void TidySlots();
00301 void CheckAndCorrectOverlap();
00302 wxSize GetBarSize () { return (DockSize); }
00303 BOOL SetSlotSize(INT32 SlotNo, INT32 NewSize);
00304
00305 BOOL DeleteBars();
00306 PORTNOTE("other", "Removed OILDockingBar::RepositionWindow" )
00307 #ifndef EXCLUDE_FROM_XARALX
00308 void RepositionWindow(AFX_SIZEPARENTPARAMS FAR* lpLayout,
00309 wxWindow* wxWindow*, LPCRECT lpRect);
00310 #endif
00311
00312 static void DoNotTidyBars () { allowTidyBars = FALSE; }
00313 static void AllowTidyBars () { allowTidyBars = TRUE; }
00314
00315 #ifdef _DEBUG
00316 virtual void AssertValid() const;
00317 PORTNOTE("other", "Removed OILDockingBar::Dump" )
00318 #ifndef EXCLUDE_FROM_XARALX
00319 virtual void Dump(CDumpContext& dc) const;
00320 void Dump_List();
00321 #endif
00322 #endif
00323 protected:
00324
00325 wxBrush BackBrush;
00326
00327 virtual void DoPaint(wxDC* pDC);
00328
00329 DECLARE_DYNAMIC_CLASS( OILFixedDockingBar )
00330 DECLARE_EVENT_TABLE()
00331
00332
00333
00334
00335
00336
00337 private:
00338 INT32 TotalSlotSizes(INT32 Slot = -1);
00339 void SetSize(wxRect LayoutRect,wxRect * rect);
00340 INT32 GetIntersectPercent(OILChildBar * ThisBar);
00341 void PutInSlot(wxPoint * position, INT32 Size);
00342 BOOL ShiftBarPos(wxPoint * position,INT32 amount);
00343 BOOL ShiftBarSlot(wxPoint * position, INT32 NoSlots);
00344 BOOL CanShuffleForward(OILChildBar * Start,OILChildBar * End,INT32 amount);
00345 BOOL DoShuffleForward(OILChildBar * Start,OILChildBar * End,INT32 amount);
00346 BOOL CanShuffleBackward(OILChildBar * Start,OILChildBar * End,INT32 amount);
00347 BOOL DoShuffleBackward(OILChildBar * Start,OILChildBar * End,INT32 amount);
00348 void InsertSlot(INT32 SlotNo, INT32 NewSize = -1);
00349 void RemoveSlot(INT32 SlotNo);
00350 INT32 CountSlots();
00351 void PositionBar(OILChildBar * ThisBar);
00352 BOOL PlaceBarInSlot(OILChildBar * ThisBar,INT32 Slot);
00353 BOOL PlaceGalleryInSlot(OILChildBar * ThisBar,INT32 Slot);
00354 BOOL InsertBarInList(OILChildBar * ThisBar);
00355 OILChildBar * IsPointInBar(wxPoint ThisPoint);
00356 OILChildBar * GetSlotHead(INT32 SlotNo);
00357 OILChildBar * GetOverLap(OILChildBar * ThisBar,INT32 SlotNo,
00358 INT32 * ForwardOverlap,INT32 * BackwardOverlap);
00359 BOOL GetGalleryOverLap(OILChildBar* ThisBar,INT32 SlotNo,
00360 INT32 * ForwardOverlap,INT32 * BackwardOverlap,
00361 OILChildBar** ppPrevious, OILChildBar** ppNext);
00362 };
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378 PORTNOTE("other","Removed OILFloaters - OILDockingBar usage")
00379 #ifndef EXCLUDE_FROM_XARALX
00380 class OILFloaters : public OILDockingBar
00381 {
00382 DECLARE_DYNAMIC(OILFloaters)
00383
00384
00385 public:
00386 OILFloaters();
00387 BOOL Create(CWnd* pParentWnd);
00388
00389
00390 public:
00391 private:
00392 SIZE DockSize;
00393
00394
00395
00396 public:
00397 BOOL PlaceBar(wxWindow* hdialogbar ,wxPoint here, wxSize size = wxSize(0,0));
00398 BOOL PlaceBar(wxWindow* hdialogbar ,KernelBarPos BarPos, wxSize size = wxSize(0,0));
00399 BOOL ReleaseBar(wxWindow* hdialog,BOOL DoTidy);
00400 void SetBigControlState(BOOL Big);
00401 virtual BOOL DeleteBars();
00402 BOOL RecreateBarsAfterSettingChange();
00403 SIZE GetBarSize () { return (DockSize); }
00404 #ifdef _DEBUG
00405 virtual void AssertValid() const;
00406 virtual void Dump(CDumpContext& dc) const;
00407 void Dump_List();
00408 #endif
00409
00410 protected:
00411
00412
00413
00414
00415 DECLARE_MESSAGE_MAP()
00416
00417 private:
00418 BOOL InsertBarInList(OILChildBar * ThisBar);
00419 };
00420 #endif
00421
00422 #endif