component_base.hpp
memory
vector
ftxui/component/captured_mouse.hpp
ftxui/dom/elements.hpp
include/ftxui/component/component.hpp
include/ftxui/component/component_options.hpp
include/ftxui/component/loop.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/container.cpp
src/ftxui/component/dropdown.cpp
src/ftxui/component/hoverable.cpp
src/ftxui/component/input.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
ftxui/component/captured_mouse.hpp
include/ftxui/component/component_base.hpp
ftxui/dom/canvas.hpp
ftxui/dom/deprecated.hpp
ftxui/dom/direction.hpp
ftxui/dom/elements.hpp
ftxui/dom/flexbox_config.hpp
ftxui/dom/linear_gradient.hpp
ftxui/dom/node.hpp
ftxui/dom/requirement.hpp
ftxui/dom/selection.hpp
ftxui/screen/box.hpp
ftxui/screen/color.hpp
ftxui/screen/image.hpp
ftxui/screen/pixel.hpp
ftxui/screen/screen.hpp
ftxui/screen/string.hpp
ftxui/screen/terminal.hpp
ftxui/util/autoreset.hpp
ftxui/util/ref.hpp
cstddef
cstdint
ftxui/dom/take_any_args.hpp
functional
memory
optional
sstream
string
unordered_map
utility
variant
vector
include/ftxui/component/component.hpp
include/ftxui/component/component_base.hpp
include/ftxui/component/component_options.hpp
include/ftxui/component/loop.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
ftxui::ComponentBase
ftxui
ftxui::animation

    //Copyright2020ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #ifndefFTXUI_COMPONENT_BASE_HPP
    #defineFTXUI_COMPONENT_BASE_HPP

    #include<memory>//forunique_ptr
    #include<vector>//forvector

    #include"ftxui/component/captured_mouse.hpp"//forCaptureMouse
    #include"ftxui/dom/elements.hpp"//forElement

    namespaceftxui{

    classDelegate;
    classFocus;
    structEvent;

    namespaceanimation{
    classParams;
    }//namespaceanimation

    classComponentBase;
    usingComponent=std::shared_ptr<ComponentBase>;
    usingComponents=std::vector<Component>;

    ///@briefItimplementrenderingitselfasftxui::Element.Itimplement
    ///keyboardnavigationbyrespondingtoftxui::Event.
    ///@ingroupcomponent
    classComponentBase{
    public:
    explicitComponentBase(Componentschildren)
    :children_(std::move(children)){}
    virtual~ComponentBase();
    ComponentBase()=default;

    //Acomponentisnotcopyable/movable.
    ComponentBase(constComponentBase&)=delete;
    ComponentBase(ComponentBase&&)=delete;
    ComponentBase&operator=(constComponentBase&)=delete;
    ComponentBase&operator=(ComponentBase&&)=delete;

    //Componenthierarchy:
    ComponentBase*Parent()const;
    Component&ChildAt(size_ti);
    size_tChildCount()const;
    intIndex()const;
    voidAdd(Componentchildren);
    voidDetach();
    voidDetachAllChildren();

    //Rendersthecomponent.
    ElementRender();

    //Overridethisfunctionmodifyhow`Render`works.
    virtualElementOnRender();

    //Handlesanevent.
    //Bydefault,reduceonchildrenwithalazyOR.
    //
    //Returnswhethertheeventwashandledornot.
    virtualboolOnEvent(Event);

    //Handleananimationstep.
    virtualvoidOnAnimation(animation::Params&params);

    //Focusmanagement----------------------------------------------------------
    //
    //Ifthiscomponentcontainschildren,thisindicateswhichoneisactive,
    //nullptrifnoneisactive.
    //
    //WesayanelementhasthefocusifthechainofActiveChild()fromthe
    //rootcomponentcontainsthisobject.
    virtualComponentActiveChild();

    //Returntruewhenthecomponentcontainsfocusableelements.
    //ThenonfocusableComponentwillbeskippedwhennavigatingusingthe
    //keyboard.
    virtualboolFocusable()const;

    //Whetherthisistheactivechildofitsparent.
    boolActive()const;
    //Whetheralltheancestorsareactive.
    boolFocused()const;

    //Makethe|child|tobethe"active"one.
    virtualvoidSetActiveChild(ComponentBase*child);
    voidSetActiveChild(Componentchild);

    //Configurealltheancestorstogivefocustothiscomponent.
    voidTakeFocus();

    protected:
    CapturedMouseCaptureMouse(constEvent&event);

    Componentschildren_;

    private:
    ComponentBase*parent_=nullptr;
    boolin_render=false;
    };

    }//namespaceftxui

    #endif/*endofincludeguard:FTXUI_COMPONENT_BASE_HPP*/