iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
IGraphicsWeb Class Referencefinal

IGraphics platform class for the web. More...

#include <IGraphicsWeb.h>

Inheritance diagram for IGraphicsWeb:
[legend]

Classes

class  FileFont
 
class  Font
 
class  MemoryFont
 

Public Member Functions

 IGraphicsWeb (IGEditorDelegate &dlg, int w, int h, int fps, float scale, val canvas=val::undefined())
 Constructor. More...
 
val GetCanvas () const
 Get the canvas element for this instance. More...
 
bool IsInShadowDOM () const
 Check if this instance is running inside Shadow DOM. More...
 
void DrawResize () override
 
void PostResize () override
 
const char * GetPlatformAPIStr () override
 
void HideMouseCursor (bool hide, bool lock) override
 
void MoveMouseCursor (float x, float y) override
 
ECursor SetMouseCursor (ECursor cursorType) override
 
void GetMouseLocation (float &x, float &y) const override
 
void ForceEndUserEdit () override
 
void * OpenWindow (void *pParent) override
 
void CloseWindow () override
 
void * GetWindow () override
 
bool WindowIsOpen () override
 
bool GetTextFromClipboard (WDL_String &str) override
 
bool SetTextInClipboard (const char *str) override
 
void UpdateTooltips () override
 
EMsgBoxResult ShowMessageBox (const char *str, const char *title, EMsgBoxType type, IMsgBoxCompletionHandlerFunc completionHandler) override
 
void PromptForFile (WDL_String &filename, WDL_String &path, EFileAction action, const char *ext, IFileDialogCompletionHandlerFunc completionHandler) override
 
void PromptForDirectory (WDL_String &path, IFileDialogCompletionHandlerFunc completionHandler) override
 
bool PromptForColor (IColor &color, const char *str, IColorPickerHandlerFunc func) override
 
bool OpenURL (const char *url, const char *msgWindowTitle, const char *confirmMsg, const char *errMsgOnFailure) override
 
bool PlatformSupportsMultiTouch () const override
 

Static Public Member Functions

static void OnMainLoopTimer ()
 

Public Attributes

double mPrevX = 0.
 
double mPrevY = 0.
 

Protected Member Functions

IPopupMenuCreatePlatformPopupMenu (IPopupMenu &menu, const IRECT bounds, bool &isAsync) override
 
void CreatePlatformTextEntry (int paramIdx, const IText &text, const IRECT &bounds, int length, const char *str) override
 

Detailed Description

IGraphics platform class for the web.

Definition at line 39 of file IGraphicsWeb.h.

Constructor & Destructor Documentation

◆ IGraphicsWeb()

IGraphicsWeb::IGraphicsWeb ( IGEditorDelegate dlg,
int  w,
int  h,
int  fps,
float  scale,
val  canvas = val::undefined() 
)

Constructor.

Parameters
dlgThe editor delegate
wWidth in logical pixels
hHeight in logical pixels
fpsFrames per second (0 = use default)
scaleDraw scale
canvasOptional canvas element. If undefined, falls back to document.getElementById("canvas")

Definition at line 429 of file IGraphicsWeb.cpp.

◆ ~IGraphicsWeb()

IGraphicsWeb::~IGraphicsWeb ( )

Definition at line 555 of file IGraphicsWeb.cpp.

Member Function Documentation

◆ CloseWindow()

void IGraphicsWeb::CloseWindow ( )
inlineoverride

Definition at line 73 of file IGraphicsWeb.h.

◆ CreatePlatformPopupMenu()

IPopupMenu * IGraphicsWeb::CreatePlatformPopupMenu ( IPopupMenu menu,
const IRECT  bounds,
bool &  isAsync 
)
overrideprotected

Definition at line 824 of file IGraphicsWeb.cpp.

◆ CreatePlatformTextEntry()

void IGraphicsWeb::CreatePlatformTextEntry ( int  paramIdx,
const IText text,
const IRECT bounds,
int  length,
const char *  str 
)
overrideprotected

Definition at line 758 of file IGraphicsWeb.cpp.

◆ DrawResize()

void IGraphicsWeb::DrawResize ( )
override

Definition at line 836 of file IGraphicsWeb.cpp.

◆ ForceEndUserEdit()

void IGraphicsWeb::ForceEndUserEdit ( )
inlineoverride

Definition at line 71 of file IGraphicsWeb.h.

◆ GetCanvas()

val IGraphicsWeb::GetCanvas ( ) const
inline

Get the canvas element for this instance.

Definition at line 56 of file IGraphicsWeb.h.

◆ GetMouseLocation()

void IGraphicsWeb::GetMouseLocation ( float &  x,
float &  y 
) const
override

Definition at line 653 of file IGraphicsWeb.cpp.

◆ GetPlatformAPIStr()

const char * IGraphicsWeb::GetPlatformAPIStr ( )
inlineoverride

Definition at line 64 of file IGraphicsWeb.h.

◆ GetTextFromClipboard()

bool IGraphicsWeb::GetTextFromClipboard ( WDL_String &  str)
inlineoverride

Definition at line 76 of file IGraphicsWeb.h.

◆ GetWindow()

void * IGraphicsWeb::GetWindow ( )
inlineoverride

Definition at line 74 of file IGraphicsWeb.h.

◆ HideMouseCursor()

void IGraphicsWeb::HideMouseCursor ( bool  hide,
bool  lock 
)
override

Definition at line 596 of file IGraphicsWeb.cpp.

◆ IsInShadowDOM()

bool IGraphicsWeb::IsInShadowDOM ( ) const
inline

Check if this instance is running inside Shadow DOM.

Definition at line 59 of file IGraphicsWeb.h.

◆ MoveMouseCursor()

void IGraphicsWeb::MoveMouseCursor ( float  x,
float  y 
)
inlineoverride

Definition at line 67 of file IGraphicsWeb.h.

◆ OnMainLoopTimer()

void IGraphicsWeb::OnMainLoopTimer ( )
static

Definition at line 660 of file IGraphicsWeb.cpp.

◆ OpenURL()

bool IGraphicsWeb::OpenURL ( const char *  url,
const char *  msgWindowTitle,
const char *  confirmMsg,
const char *  errMsgOnFailure 
)
override

Definition at line 829 of file IGraphicsWeb.cpp.

◆ OpenWindow()

void * IGraphicsWeb::OpenWindow ( void *  pParent)
override

Definition at line 561 of file IGraphicsWeb.cpp.

◆ PlatformSupportsMultiTouch()

bool IGraphicsWeb::PlatformSupportsMultiTouch ( ) const
inlineoverride

Definition at line 86 of file IGraphicsWeb.h.

◆ PostResize()

void IGraphicsWeb::PostResize ( )
override

Definition at line 861 of file IGraphicsWeb.cpp.

◆ PromptForColor()

bool IGraphicsWeb::PromptForColor ( IColor color,
const char *  str,
IColorPickerHandlerFunc  func 
)
override

Definition at line 740 of file IGraphicsWeb.cpp.

◆ PromptForDirectory()

void IGraphicsWeb::PromptForDirectory ( WDL_String &  path,
IFileDialogCompletionHandlerFunc  completionHandler 
)
override

Definition at line 727 of file IGraphicsWeb.cpp.

◆ PromptForFile()

void IGraphicsWeb::PromptForFile ( WDL_String &  filename,
WDL_String &  path,
EFileAction  action,
const char *  ext,
IFileDialogCompletionHandlerFunc  completionHandler 
)
override

Definition at line 715 of file IGraphicsWeb.cpp.

◆ SetMouseCursor()

ECursor IGraphicsWeb::SetMouseCursor ( ECursor  cursorType)
override

Definition at line 627 of file IGraphicsWeb.cpp.

◆ SetTextInClipboard()

bool IGraphicsWeb::SetTextInClipboard ( const char *  str)
inlineoverride

Definition at line 77 of file IGraphicsWeb.h.

◆ ShowMessageBox()

EMsgBoxResult IGraphicsWeb::ShowMessageBox ( const char *  str,
const char *  title,
EMsgBoxType  type,
IMsgBoxCompletionHandlerFunc  completionHandler 
)
override

Definition at line 684 of file IGraphicsWeb.cpp.

◆ UpdateTooltips()

void IGraphicsWeb::UpdateTooltips ( )
inlineoverride

Definition at line 78 of file IGraphicsWeb.h.

◆ WindowIsOpen()

bool IGraphicsWeb::WindowIsOpen ( )
inlineoverride

Definition at line 75 of file IGraphicsWeb.h.

Member Data Documentation

◆ mPrevX

double IGraphicsWeb::mPrevX = 0.

Definition at line 90 of file IGraphicsWeb.h.

◆ mPrevY

double IGraphicsWeb::mPrevY = 0.

Definition at line 91 of file IGraphicsWeb.h.


The documentation for this class was generated from the following files: