Empirical
Namespaces | Macros | Functions
emfunctions.h File Reference

Specialized, useful function for Empirical. More...

#include <functional>
#include "../tools/alert.h"
#include "../tools/string_utils.h"
#include "JSWrap.h"

Go to the source code of this file.

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 

Macros

#define AlertVar(VAR)   emp::Alert(std::string(#VAR) + std::string("=") + std::to_string(VAR))
 

Functions

static void emp::DelayCall (const std::function< void()> &in_fun, int delay)
 Call a function after a specified amount of time. More...
 
static void emp::OnResize (const std::function< void()> &in_fun)
 Provide a function to call whenever a window's size changes (no arguments). More...
 
static void emp::OnResize (const std::function< void(int, int)> &in_fun)
 Provide a function to call whenever a window's size changes (new size as arguments) More...
 
double emp::GetTime ()
 Get the current time, as provided by the web browser. More...
 
int emp::GetWindowInnerWidth ()
 Determine with width of the current window. More...
 
int emp::GetWindowInnerHeight ()
 Determine with height of the current window. More...
 
static void emp::SetBackgroundColor (const std::string color)
 Set the background color of this web page. More...
 
static void emp::SetColor (const std::string color)
 
static void emp::SetCursor (const char *type)
 
static void emp::OpenWindow (const std::string &url)
 
static std::string emp::text2html (const std::string &text)
 

Detailed Description

Specialized, useful function for Empirical.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2015-2017

Macro Definition Documentation

#define AlertVar (   VAR)    emp::Alert(std::string(#VAR) + std::string("=") + std::to_string(VAR))