Empirical
1.1.5

Getting Started

  • Built With Empirical Gallery
  • Quick Start Guides

Using Empirical

  • Evolution tools
  • Documentation for Systematics
  • Systematics
  • Taxon Specifics
  • General Systematics Data
  • Using the Systematics Manager
  • emp.hpp
  • General Purpose Debugging Tools
  • Bits
  • Compiler
  • Config
  • Control
  • Data Collection and Recording Tools
  • Data structures
  • Debug
  • Deprecated
  • Evolve
  • Functional
  • Games
  • Geometry
  • Hardware
  • In_progress
  • IO
  • Matching
  • Math
  • Meta
  • Polyfill
  • Prefab
    • API
      • Card.hpp
      • CodeBlock.hpp
      • Collapse.hpp
      • CommentBox.hpp
      • ConfigPanel.hpp
      • FontAwesomeIcon.hpp
      • LoadingIcon.hpp
      • LoadingModal.hpp
      • Modal.hpp
        • Modal
      • ReadoutPanel.hpp
      • ToggleSwitch.hpp
      • ValueBox.hpp
  • Scholar
  • Serialize
  • Testing
  • Text
  • Other Tools
  • Web Tools (for use with Emscripten)

Bibliography

  • Bibliography

Contributing to Empirical

  • Empirical Development Practices
  • Getting started with Empirical development
  • Coding guidelines and review checklist
  • Guidelines for AI-Assisted Development
  • Empirical Documentation Documentation
  • Guide to Testing in Empirical
Empirical
  • Prefab
  • Modal.hpp

Modal.hpp

Wraps a Bootstrap modal.

This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2021 Michigan State University MIT Software license; see doc/LICENSE.md

Defines

INCLUDE_EMP_PREFAB_MODAL_HPP_GUARD
class Modal : public Div
#include <Modal.hpp>

Use Modal class to add a Bootstrap style pop-up modal to your web app.

Public Functions

inline Modal(const std::string &id = "")
template<typename T>
inline void AddHeaderContent(T val)

Add content to the header section of the modal Content can be of any type

template<typename T>
inline void AddBodyContent(T val)

Add content to the body section of the modal Content can be of any type

template<typename T>
inline void AddFooterContent(T val)

Add content to the footer section of the modal Content can be of any type

inline void AddClosingX()

Adds an X button in the upper right corner of the modal so user can close it Should be called after all desired header content is added Best practice is to call this method, unless a close button is added somewhere else in the modal using AddButton()

inline void AddButton(Button &btn)

Add properties to a button element to make it open and close the modal. The button can then be added to the modal to close it or anywhere else in the web app to trigger the modal to open

inline void SetBackground(const std::string color)

Overrides SetBackground() in WidgetFacet so that the color will make the background of the modal change as expected.

Private Members

Div modal_dialog
Div modal_content
Div modal_header
Div modal_body
Div modal_footer
Previous Next

© Copyright 2015-2023, Charles Ofria.

Built with Sphinx using a theme provided by Read the Docs.