/* 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/layoutmanager.h>

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

namespace Gtk
{

/** A layout manager that places child widgets at fixed positions.
 *
 * Most applications should never use this layout manager; fixed positioning
 * and sizing requires constant recalculations on where children need to be
 * positioned and sized. Other layout managers perform this kind of work
 * internally so that application developers don't need to do it. Specifically,
 * widgets positioned in a fixed layout manager will need to take into account:
 *
 * - Themes, which may change widget sizes.
 *
 * - Fonts other than the one you used to write the app will of course
 *   change the size of widgets containing text; keep in mind that
 *   users may use a larger font because of difficulty reading the
 *   default, or they may be using a different OS that provides different
 *   fonts.
 *
 * - Translation of text into other languages changes its size. Also,
 *   display of non-English text will use a different font in many cases.
 *
 * In addition, `%Gtk::FixedLayout` does not pay attention to text direction and
 * thus may produce unwanted results if your app is run under right-to-left
 * languages such as Hebrew or Arabic. That is: normally GTK will order
 * containers appropriately depending on the text direction, e.g. to put labels
 * to the right of the thing they label when using an RTL language;
 * `%Gtk::FixedLayout` won't be able to do that for you.
 *
 * Finally, fixed positioning makes it kind of annoying to add/remove UI
 * elements, since you have to reposition all the other elements. This is a
 * long-term maintenance problem for your application.
 *
 * @newin{4,20}
 */
class GTKMM_API FixedLayout : public LayoutManager
{
  _CLASS_GOBJECT(FixedLayout, GtkFixedLayout, GTK_FIXED_LAYOUT, LayoutManager, GtkLayoutManager, , , GTKMM_API)
  _DO_NOT_DERIVE_GTYPE dnl// GtkFixedLayout is a final type
  _STRUCT_NOT_HIDDEN

protected:
  _CTOR_DEFAULT

public:
  _WRAP_CREATE()
};

} // namespace Gtk
