/* Copyright (C) 2019 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

#include <gtkmm/layoutmanager.h>
#include <gtkmm/enums.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/layoutmanager_p.h)

namespace Gtk
{
class GTKMM_API Widget;

/** A centering layout.
 *
 * A %Gtk::CenterLayout is a layout manager that manages up to three children.
 * The start widget is allocated at the start of the layout (left in LRT
 * layouts and right in RTL ones), and the end widget at the end.
 *
 * The center widget is centered regarding the full width of the layout.
 *
 * @newin{3,96}
 */
class GTKMM_API CenterLayout : public LayoutManager
{
  _CLASS_GOBJECT(CenterLayout, GtkCenterLayout, GTK_CENTER_LAYOUT, LayoutManager, GtkLayoutManager, , , GTKMM_API)
  _DO_NOT_DERIVE_GTYPE dnl// GtkCenterLayout is a final type
  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
  _STRUCT_NOT_HIDDEN

protected:
  _CTOR_DEFAULT

public:
  _WRAP_CREATE()

  _WRAP_METHOD(void set_orientation(Orientation orientation), gtk_center_layout_set_orientation)
  _WRAP_METHOD(Orientation get_orientation() const, gtk_center_layout_get_orientation)

  _WRAP_METHOD(void set_baseline_position(BaselinePosition baseline_position), gtk_center_layout_set_baseline_position)
  _WRAP_METHOD(BaselinePosition get_baseline_position() const, gtk_center_layout_get_baseline_position)

  _WRAP_METHOD(void set_start_widget(Widget* widget), gtk_center_layout_set_start_widget)
  _WRAP_METHOD(Widget* get_start_widget(), gtk_center_layout_get_start_widget)
  _WRAP_METHOD(const Widget* get_start_widget() const, gtk_center_layout_get_start_widget, constversion)

  _WRAP_METHOD(void set_center_widget(Widget* widget), gtk_center_layout_set_center_widget)
  _WRAP_METHOD(Widget* get_center_widget(), gtk_center_layout_get_center_widget)
  _WRAP_METHOD(const Widget* get_center_widget() const, gtk_center_layout_get_center_widget, constversion)

  _WRAP_METHOD(void set_end_widget(Widget* widget), gtk_center_layout_set_end_widget)
  _WRAP_METHOD(Widget* get_end_widget(), gtk_center_layout_get_end_widget)
  _WRAP_METHOD(const Widget* get_end_widget() const, gtk_center_layout_get_end_widget, constversion)

  _WRAP_METHOD(void set_shrink_center_last(bool shrink_center_last = true), gtk_center_layout_set_shrink_center_last)
  _WRAP_METHOD(bool get_shrink_center_last() const, gtk_center_layout_get_shrink_center_last)

  _WRAP_PROPERTY("shrink-center-last", bool)

  // There are no signals or vfuncs.
};

} // namespace Gtk
