/*
  This file is part of KDDockWidgets.

  SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
  Author: Sérgio Martins <sergio.martins@kdab.com>

  SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

  Contact KDAB at <info@kdab.com> for commercial licensing options.
*/

part of kddockwidgets;

// Floating windows and tab groups have titlebars
abstract class ItemWithTitleBar {
  // called when close button on the titlebar is clicked
  void close();
}

class TitleBar {
  String title = "";
  bool isExplicitlyHidden = false;
  final ItemWithTitleBar _itemWithTitleBar;

  TitleBar(ItemWithTitleBar itemWithTitleBar, {this.title = ""})
      : _itemWithTitleBar = itemWithTitleBar {}

  void onCloseClicked() {
    _itemWithTitleBar.close();
  }

  void onFloatClicked() {}

  void onMouseEvent(PointerEvent ev) {}
}
