/* Copyright (C) 2025 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/layoutchild.h>
#include <gskmm/transform.h>
#include <gtk/gtk.h>

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

namespace Gtk
{
/** Layout properties for children of Gtk::FixedLayout.
 *
 * %Gtk::FixedLayoutChild instances are created by Gtk::FixedLayout.
 * To create or get a %Gtk::FixedLayoutChild instance, call Gtk::LayoutManager::get_layout_child()
 * from a Gtk::FixedLayout instance.
 * @code
 * Glib::RefPtr<Gtk::LayoutChild> layout_child =
 *   fixed_layout->get_layout_child(child);
 * Glib::RefPtr<Gtk::FixedLayoutChild> fixed_layout_child =
 *   std::dynamic_pointer_cast<Gtk::FixedLayoutChild>(layout_child);
 * if (fixed_layout_child)
 *   // Do something with fixed_layout_child
 * @endcode
 *
 * @newin{4,20}
 */
class GTKMM_API FixedLayoutChild : public LayoutChild
{
  _CLASS_GOBJECT(FixedLayoutChild, GtkFixedLayoutChild, GTK_FIXED_LAYOUT_CHILD, LayoutChild, GtkLayoutChild, , , GTKMM_API)
  _DO_NOT_DERIVE_GTYPE dnl// GtkFixedLayoutChild is a final type
  _STRUCT_NOT_HIDDEN

protected:
  /** Default constructor.
   *
   * There is no create() method that corresponds to this constructor.
   * To create or get a %Gtk::FixedLayoutChild instance, call Gtk::LayoutManager::get_layout_child()
   * from a Gtk::FixedLayout instance.
   */
  _CTOR_DEFAULT

public:
  // No create() method. Use Gtk::LayoutManager::get_layout_child().

  // A Gsk::Transform is immutable. There's no significant difference between
  // a Gsk::Transform and a const Gsk::Transform.
  _WRAP_METHOD(void set_transform(const Glib::RefPtr<const Gsk::Transform>& transform),
    gtk_fixed_layout_child_set_transform)
  _WRAP_METHOD(Glib::RefPtr<Gsk::Transform> get_transform() const,
    gtk_fixed_layout_child_get_transform, refreturn)

  _WRAP_PROPERTY("transform", Glib::RefPtr<Gsk::Transform>)

  // There are no signals or vfuncs.
};

} // namespace Gtk
