Euphoria
eu::window Namespace Reference

Namespaces

 imgui
 

Classes

struct  App
 
struct  CanvasConfig
 
struct  Canvas
 
struct  Engine
 
struct  SdlLogger
 
struct  SdlOpenglContext
 
struct  SdlLibrary
 
struct  SdlWindow
 
struct  SdlTimer
 

Typedefs

using CreateAppFunction = std::function< std::unique_ptr< App >() >
 
using Colors = std::array< ImU32, 10 >
 

Enumerations

enum class  Corner {
  top_left = 0 , top_right = 1 , bottom_left = 2 , bottom_right = 3 ,
  center = 4
}
 

Functions

int run_app (int argc, char **argv, const std::string &window_title, CreateAppFunction create_app)
 
void react_to_canvas_scroll_events (Canvas *canvas)
 
void react_to_canvas_zoom_events (Canvas *canvas, const CanvasConfig &cc)
 
std::string get_base_path ()
 
std::string get_preference_path ()
 
ImVec2 con (const vec2f &v)
 
vec2f con (const ImVec2 &v)
 
core::Key to_key (SDL_Keysym key)
 
core::MouseButton to_key (SDL_MouseButtonEvent mb)
 
void generic_log (SDL_LogPriority prio, const std::string &str)
 
constexpr ImU32 from_oc_to_dear_imgui_color (open_color::Hex h)
 
constexpr Colors from_oc_to_dear_imgui_color (open_color::Hexs h)
 
void setup_sdl_open_gl_attributes ()
 
void enable_char_event (bool enable)
 

Variables

constexpr ImU32 oc_white = from_oc_to_dear_imgui_color(open_color::white )
 
constexpr ImU32 oc_black = from_oc_to_dear_imgui_color(open_color::black )
 
constexpr Colors oc_gray = from_oc_to_dear_imgui_color(open_color::gray )
 
constexpr Colors oc_red = from_oc_to_dear_imgui_color(open_color::red )
 
constexpr Colors oc_pink = from_oc_to_dear_imgui_color(open_color::pink )
 
constexpr Colors oc_grape = from_oc_to_dear_imgui_color(open_color::grape )
 
constexpr Colors oc_violet = from_oc_to_dear_imgui_color(open_color::violet )
 
constexpr Colors oc_indigo = from_oc_to_dear_imgui_color(open_color::indigo )
 
constexpr Colors oc_blue = from_oc_to_dear_imgui_color(open_color::blue )
 
constexpr Colors oc_cyan = from_oc_to_dear_imgui_color(open_color::cyan )
 
constexpr Colors oc_teal = from_oc_to_dear_imgui_color(open_color::teal )
 
constexpr Colors oc_green = from_oc_to_dear_imgui_color(open_color::green )
 
constexpr Colors oc_lime = from_oc_to_dear_imgui_color(open_color::lime )
 
constexpr Colors oc_yellow = from_oc_to_dear_imgui_color(open_color::yellow )
 
constexpr Colors oc_orange = from_oc_to_dear_imgui_color(open_color::orange )
 

Typedef Documentation

◆ Colors

using eu::window::Colors = typedef std::array<ImU32, 10>

Definition at line 8 of file open_color.imgui.h.

◆ CreateAppFunction

using eu::window::CreateAppFunction = typedef std::function < std::unique_ptr<App> () >

Definition at line 33 of file app.h.

Enumeration Type Documentation

◆ Corner

enum eu::window::Corner
strong
Enumerator
top_left 
top_right 
bottom_left 
bottom_right 
center 

Definition at line 31 of file imgui_extra.h.

Function Documentation

◆ con() [1/2]

vec2f eu::window::con ( const ImVec2 &  v)

Definition at line 34 of file imgui_extra.cc.

◆ con() [2/2]

ImVec2 eu::window::con ( const vec2f v)

Definition at line 27 of file imgui_extra.cc.

◆ enable_char_event()

void eu::window::enable_char_event ( bool  enable)

Definition at line 61 of file sdlwindow.cc.

◆ from_oc_to_dear_imgui_color() [1/2]

constexpr ImU32 eu::window::from_oc_to_dear_imgui_color ( open_color::Hex  h)
constexpr

Definition at line 10 of file open_color.imgui.h.

◆ from_oc_to_dear_imgui_color() [2/2]

constexpr Colors eu::window::from_oc_to_dear_imgui_color ( open_color::Hexs  h)
constexpr

Definition at line 26 of file open_color.imgui.h.

◆ generic_log()

void eu::window::generic_log ( SDL_LogPriority  prio,
const std::string &  str 
)

Definition at line 24 of file log.cc.

◆ get_base_path()

std::string eu::window::get_base_path ( )

Definition at line 8 of file filesystem.cc.

◆ get_preference_path()

std::string eu::window::get_preference_path ( )

Definition at line 24 of file filesystem.cc.

◆ react_to_canvas_scroll_events()

void eu::window::react_to_canvas_scroll_events ( Canvas canvas)

Definition at line 125 of file canvas.cc.

◆ react_to_canvas_zoom_events()

void eu::window::react_to_canvas_zoom_events ( Canvas canvas,
const CanvasConfig cc 
)

Definition at line 134 of file canvas.cc.

◆ run_app()

int eu::window::run_app ( int  argc,
char **  argv,
const std::string &  window_title,
CreateAppFunction  create_app 
)

Definition at line 40 of file app.cc.

◆ setup_sdl_open_gl_attributes()

void eu::window::setup_sdl_open_gl_attributes ( )

Definition at line 10 of file sdllibrary.cc.

◆ to_key() [1/2]

core::Key eu::window::to_key ( SDL_Keysym  key)

Definition at line 8 of file key.cc.

◆ to_key() [2/2]

core::MouseButton eu::window::to_key ( SDL_MouseButtonEvent  mb)

Definition at line 255 of file key.cc.

Variable Documentation

◆ oc_black

constexpr ImU32 eu::window::oc_black = from_oc_to_dear_imgui_color(open_color::black )
constexpr

Definition at line 39 of file open_color.imgui.h.

◆ oc_blue

constexpr Colors eu::window::oc_blue = from_oc_to_dear_imgui_color(open_color::blue )
constexpr

Definition at line 46 of file open_color.imgui.h.

◆ oc_cyan

constexpr Colors eu::window::oc_cyan = from_oc_to_dear_imgui_color(open_color::cyan )
constexpr

Definition at line 47 of file open_color.imgui.h.

◆ oc_grape

constexpr Colors eu::window::oc_grape = from_oc_to_dear_imgui_color(open_color::grape )
constexpr

Definition at line 43 of file open_color.imgui.h.

◆ oc_gray

constexpr Colors eu::window::oc_gray = from_oc_to_dear_imgui_color(open_color::gray )
constexpr

Definition at line 40 of file open_color.imgui.h.

◆ oc_green

constexpr Colors eu::window::oc_green = from_oc_to_dear_imgui_color(open_color::green )
constexpr

Definition at line 49 of file open_color.imgui.h.

◆ oc_indigo

constexpr Colors eu::window::oc_indigo = from_oc_to_dear_imgui_color(open_color::indigo )
constexpr

Definition at line 45 of file open_color.imgui.h.

◆ oc_lime

constexpr Colors eu::window::oc_lime = from_oc_to_dear_imgui_color(open_color::lime )
constexpr

Definition at line 50 of file open_color.imgui.h.

◆ oc_orange

constexpr Colors eu::window::oc_orange = from_oc_to_dear_imgui_color(open_color::orange )
constexpr

Definition at line 52 of file open_color.imgui.h.

◆ oc_pink

constexpr Colors eu::window::oc_pink = from_oc_to_dear_imgui_color(open_color::pink )
constexpr

Definition at line 42 of file open_color.imgui.h.

◆ oc_red

constexpr Colors eu::window::oc_red = from_oc_to_dear_imgui_color(open_color::red )
constexpr

Definition at line 41 of file open_color.imgui.h.

◆ oc_teal

constexpr Colors eu::window::oc_teal = from_oc_to_dear_imgui_color(open_color::teal )
constexpr

Definition at line 48 of file open_color.imgui.h.

◆ oc_violet

constexpr Colors eu::window::oc_violet = from_oc_to_dear_imgui_color(open_color::violet )
constexpr

Definition at line 44 of file open_color.imgui.h.

◆ oc_white

constexpr ImU32 eu::window::oc_white = from_oc_to_dear_imgui_color(open_color::white )
constexpr

Definition at line 38 of file open_color.imgui.h.

◆ oc_yellow

constexpr Colors eu::window::oc_yellow = from_oc_to_dear_imgui_color(open_color::yellow )
constexpr

Definition at line 51 of file open_color.imgui.h.