#include "Vaca/BandedDockArea.h"
#include "Vaca/DockBar.h"
#include "Vaca/Frame.h"
#include "Vaca/Point.h"
#include "Vaca/Debug.h"
#include "Vaca/System.h"
#include "Vaca/Pen.h"
Defines | |
#define | FITBOUNDS(x, w) |
#define FITBOUNDS | ( | x, | |||
w | ) |
Value:
if (bounds[barIndex1].intersects(bounds[barIndex2])) { \ /*Point center1 = bounds[barIndex1].getCenter(); \ Point center2 = bounds[barIndex2].getCenter();*/ \ int center1 = di1->offset + di1->size.w/2; \ int center2 = di2->offset + di2->size.w/2; \ \ /* "di1" must be in the left and "di2" in the right */ \ if (center1 < center2) { \ bounds[barIndex2].x = \ bounds[barIndex1].x + bounds[barIndex1].w; \ \ if (bounds[barIndex2].x + bounds[barIndex2].w > \ bandBounds.x + bandBounds.w) \ bounds[barIndex2].x = \ bandBounds.x + bandBounds.w - bounds[barIndex2].w; \ } \ /* "di1" must be in the right and "di2" in the left */ \ else { \ bounds[barIndex2].x = \ bounds[barIndex1].x - bounds[barIndex2].w; \ \ if (bounds[barIndex2].x < bandBounds.x) \ bounds[barIndex2].x = bandBounds.x; \ } \ \ fitBounds(bandIndex, barIndex2, bounds); \ }