Dart Documentationdock_spawnSplitterBar

SplitterBar Class

Constructors

Code new SplitterBar(IDockContainer previousContainer, IDockContainer nextContainer, bool stackedVertical) #

SplitterBar(this.previousContainer, this.nextContainer, this.stackedVertical) {
  barElement = new DivElement();
  barElement.classes.add(stackedVertical ? "splitbar-horizontal" : "splitbar-vertical");

  mouseMovedHandler = onMouseMoved;
  mouseDownHandler = onMouseDown;
  mouseUpHandler = onMouseUp;
  
  barElement.on.mouseDown.add(mouseDownHandler);
}

Methods

Code void onMouseDown(MouseEvent e) #

void onMouseDown(MouseEvent e) {
  _startDragging(e);
}

Code void onMouseMoved(MouseEvent e) #

void onMouseMoved(MouseEvent e) {
  int dx = e.x - previousMouseEvent.x;
  int dy = e.y - previousMouseEvent.y;
  _performDrag(dx, dy);
  previousMouseEvent = e;
}

Code void onMouseUp(MouseEvent e) #

void onMouseUp(MouseEvent e) {
  _stopDragging(e);
}

Fields

Code DivElement barElement #

DivElement barElement;

Code int minPanelSize #

int minPanelSize = 50;

Code var mouseDownHandler #

var mouseDownHandler;

Code var mouseMovedHandler #

var mouseMovedHandler;

Code var mouseUpHandler #

var mouseUpHandler;

Code IDockContainer nextContainer #

IDockContainer nextContainer;

Code IDockContainer previousContainer #

IDockContainer previousContainer;

Code MouseEvent previousMouseEvent #

MouseEvent previousMouseEvent;

Code bool stackedVertical #

bool stackedVertical;