flexbox_config.hpp
include/ftxui/dom/elements.hpp
src/ftxui/dom/flexbox.cpp
src/ftxui/dom/flexbox_config.cpp
src/ftxui/dom/flexbox_helper.cpp
src/ftxui/dom/flexbox_helper.hpp
src/ftxui/dom/paragraph.cpp
include/ftxui/component/component.hpp
include/ftxui/component/component_base.hpp
include/ftxui/component/component_options.hpp
include/ftxui/component/loop.hpp
include/ftxui/dom/elements.hpp
include/ftxui/dom/flexbox_config.hpp
include/ftxui/dom/table.hpp
src/ftxui/component/button.cpp
src/ftxui/component/catch_event.cpp
src/ftxui/component/checkbox.cpp
src/ftxui/component/collapsible.cpp
src/ftxui/component/component.cpp
src/ftxui/component/component_fuzzer.cpp
src/ftxui/component/component_options.cpp
src/ftxui/component/container.cpp
src/ftxui/component/dropdown.cpp
src/ftxui/component/hoverable.cpp
src/ftxui/component/input.cpp
src/ftxui/component/loop.cpp
src/ftxui/component/maybe.cpp
src/ftxui/component/menu.cpp
src/ftxui/component/modal.cpp
src/ftxui/component/radiobox.cpp
src/ftxui/component/renderer.cpp
src/ftxui/component/resizable_split.cpp
src/ftxui/component/screen_interactive.cpp
src/ftxui/component/slider.cpp
src/ftxui/component/util.cpp
src/ftxui/component/window.cpp
src/ftxui/dom/automerge.cpp
src/ftxui/dom/blink.cpp
src/ftxui/dom/bold.cpp
src/ftxui/dom/border.cpp
src/ftxui/dom/canvas.cpp
src/ftxui/dom/clear_under.cpp
src/ftxui/dom/color.cpp
src/ftxui/dom/composite_decorator.cpp
src/ftxui/dom/dbox.cpp
src/ftxui/dom/dim.cpp
src/ftxui/dom/flex.cpp
src/ftxui/dom/flexbox.cpp
src/ftxui/dom/flexbox_config.cpp
src/ftxui/dom/flexbox_helper.cpp
src/ftxui/dom/flexbox_helper.hpp
src/ftxui/dom/focus.cpp
src/ftxui/dom/frame.cpp
src/ftxui/dom/gauge.cpp
src/ftxui/dom/graph.cpp
src/ftxui/dom/gridbox.cpp
src/ftxui/dom/hbox.cpp
src/ftxui/dom/hyperlink.cpp
src/ftxui/dom/inverted.cpp
src/ftxui/dom/italic.cpp
src/ftxui/dom/linear_gradient.cpp
src/ftxui/dom/node_decorator.cpp
src/ftxui/dom/node_decorator.hpp
src/ftxui/dom/paragraph.cpp
src/ftxui/dom/reflect.cpp
src/ftxui/dom/scroll_indicator.cpp
src/ftxui/dom/selection.cpp
src/ftxui/dom/selection_style.cpp
src/ftxui/dom/separator.cpp
src/ftxui/dom/size.cpp
src/ftxui/dom/spinner.cpp
src/ftxui/dom/strikethrough.cpp
src/ftxui/dom/table.cpp
src/ftxui/dom/text.cpp
src/ftxui/dom/underlined.cpp
src/ftxui/dom/underlined_double.cpp
src/ftxui/dom/util.cpp
src/ftxui/dom/vbox.cpp
ftxui::FlexboxConfig
ftxui

    //Copyright2021ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #ifndefFTXUI_DOM_FLEXBOX_CONFIG_HPP
    #defineFTXUI_DOM_FLEXBOX_CONFIG_HPP

    /*
    ThisreplicatetheCSSflexboxmodel.
    Seeguidefordocumentation:
    https://css-tricks.com/snippets/css/a-guide-to-flexbox/
    */

    namespaceftxui{

    structFlexboxConfig{
    ///Thisestablishesthemain-axis,thusdefiningthedirectionflexitemsare
    ///placedintheflexcontainer.Flexboxis(asidewrapping)single-direction
    ///layoutconcept.Thinkofflexitemsasprimarilylayingouteitherin
    ///horizontalrowsorverticalcolumns.
    enumclassDirection{
    Row,///<Flexitemsarelaidoutinarow.
    RowInversed,///<Flexitemsarelaidoutinarow,butinreverseorder.
    Column,///<Flexitemsarelaidoutinacolumn.
    ColumnInversed///<Flexitemsarelaidoutinacolumn,butinreverse
    ///<order.
    };
    Directiondirection=Direction::Row;

    ///Bydefault,flexitemswillalltrytofitontooneline.Youcanchange
    ///thatandallowtheitemstowrapasneededwiththisproperty.
    enumclassWrap{
    NoWrap,///<Flexitemswillalltrytofitontooneline.
    Wrap,///<Flexitemswillwrapontomultiplelines.
    WrapInversed,///<Flexitemswillwrapontomultiplelines,butinreverse
    ///<order.
    };
    Wrapwrap=Wrap::Wrap;

    ///Thisdefinesthealignmentalongthemainaxis.Ithelpsdistributeextra
    ///freespaceleftoverwheneitheralltheflexitemsonalineare
    ///inflexible,orareflexiblebuthavereachedtheirmaximumsize.Italso
    ///exertssomecontroloverthealignmentofitemswhentheyoverflowthe
    ///line.
    enumclassJustifyContent{
    ///Itemsarealignedtothestartofflexbox'sdirection.
    FlexStart,
    ///Itemsarealignedtotheendofflexbox'sdirection.
    FlexEnd,
    ///Itemsarecenteredalongtheline.
    Center,
    ///Itemsarestretchedtofilltheline.
    Stretch,
    ///Itemsareevenlydistributedintheline;firstitemisonthestart
    //line,lastitemontheendline
    SpaceBetween,
    ///Itemsareevenlydistributedinthelinewithequalspacearoundthem.
    ///Notethatvisuallythespacesaren’tequal,sincealltheitemshave
    ///equalspaceonbothsides.Thefirstitemwillhaveoneunitofspace
    ///againstthecontaineredge,buttwounitsofspacebetweenthenextitem
    ///becausethatnextitemhasitsownspacingthatapplies.
    SpaceAround,
    ///Itemsaredistributedsothatthespacingbetweenanytwoitems(andthe
    ///spacetotheedges)isequal.
    SpaceEvenly,
    };
    JustifyContentjustify_content=JustifyContent::FlexStart;

    ///Thisdefinesthedefaultbehaviorforhowflexitemsarelaidoutalong
    ///thecrossaxisonthecurrentline.Thinkofitasthejustify-content
    ///versionforthecross-axis(perpendiculartothemain-axis).
    enumclassAlignItems{
    FlexStart,///<itemsareplacedatthestartofthecrossaxis.
    FlexEnd,///<itemsareplacedattheendofthecrossaxis.
    Center,///<itemsarecenteredalongthecrossaxis.
    Stretch,///<itemsarestretchedtofillthecrossaxis.
    };
    AlignItemsalign_items=AlignItems::FlexStart;

    //Thisalignsaflexcontainer’slineswithinwhenthereisextraspacein
    //thecross-axis,similartohowjustify-contentalignsindividualitems
    //withinthemain-axis.
    enumclassAlignContent{
    FlexStart,///<itemsareplacedatthestartofthecrossaxis.
    FlexEnd,///<itemsareplacedattheendofthecrossaxis.
    Center,///<itemsarecenteredalongthecrossaxis.
    Stretch,///<itemsarestretchedtofillthecrossaxis.
    SpaceBetween,///<itemsareevenlydistributedinthecrossaxis.
    SpaceAround,///<temsevenlydistributedwithequalspacearoundeach
    ///<line.
    SpaceEvenly,///<itemsareevenlydistributedinthecrossaxiswithequal
    ///<spacearoundthem.
    };
    AlignContentalign_content=AlignContent::FlexStart;

    intgap_x=0;
    intgap_y=0;

    //Constructorpattern.Forchaineduselike:
    //```
    //FlexboxConfig()
    //.Set(FlexboxConfig::Direction::Row)
    //.Set(FlexboxConfig::Wrap::Wrap);
    //```
    FlexboxConfig&Set(FlexboxConfig::Direction);
    FlexboxConfig&Set(FlexboxConfig::Wrap);
    FlexboxConfig&Set(FlexboxConfig::JustifyContent);
    FlexboxConfig&Set(FlexboxConfig::AlignItems);
    FlexboxConfig&Set(FlexboxConfig::AlignContent);
    FlexboxConfig&SetGap(intgap_x,intgap_y);
    };

    }//namespaceftxui

    #endif//FTXUI_DOM_FLEXBOX_CONFIG_HPP