/* 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 <glibmm/object.h>
#include <gtkmm/constrainttarget.h>
#include <gtkmm/constraint.h>
#include <gtk/gtk.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)

namespace Gtk
{

 /** An invisible constraint target.
 *
 * A %ConstraintGuide is an invisible layout element that can be
 * used by widgets inside a Gtk::ConstraintLayout as a source or a target
 * of a Gtk::Constraint. Guides can be used like guidelines or as
 * flexible space.
 *
 * Unlike a Gtk::Widget, a %Gtk::ConstraintGuide will not be drawn.
 *
 * @newin{3,96}
 */
class GTKMM_API ConstraintGuide : public Glib::Object, public ConstraintTarget
{
  _CLASS_GOBJECT(ConstraintGuide, GtkConstraintGuide, GTK_CONSTRAINT_GUIDE, Glib::Object, GObject, , , GTKMM_API)
  _IMPLEMENTS_INTERFACE(ConstraintTarget)
  _DO_NOT_DERIVE_GTYPE dnl// GtkConstraintGuide 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_min_size(int width, int height), gtk_constraint_guide_set_min_size)
  _WRAP_METHOD(void get_min_size(int& width, int& height) const, gtk_constraint_guide_get_min_size)
  _WRAP_METHOD(void set_nat_size(int width, int height), gtk_constraint_guide_set_nat_size)
  _WRAP_METHOD(void get_nat_size(int& width, int& height) const, gtk_constraint_guide_get_nat_size)
  _WRAP_METHOD(void set_max_size(int width, int height), gtk_constraint_guide_set_max_size)
  _WRAP_METHOD(void get_max_size(int& width, int& height) const, gtk_constraint_guide_get_max_size)
  _WRAP_METHOD(void set_strength(Constraint::Strength strength), gtk_constraint_guide_set_strength)
  _WRAP_METHOD(Constraint::Strength get_strength() const, gtk_constraint_guide_get_strength)
  _WRAP_METHOD(void set_name(const Glib::ustring& name), gtk_constraint_guide_set_name)
  _WRAP_METHOD(Glib::ustring get_name() const, gtk_constraint_guide_get_name)

  _WRAP_PROPERTY("min-width", int)
  _WRAP_PROPERTY("min-height", int)
  _WRAP_PROPERTY("nat-width", int)
  _WRAP_PROPERTY("nat-height", int)
  _WRAP_PROPERTY("max-width", int)
  _WRAP_PROPERTY("max-height", int)
  _WRAP_PROPERTY("strength", Constraint::Strength)
  _WRAP_PROPERTY("name", Glib::ustring)
};

} // namespace Gtk
