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
 
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 548 of file IGraphicsWeb.cpp.

Member Function Documentation

◆ CloseWindow()

void IGraphicsWeb::CloseWindow ( )
inlineoverride

Definition at line 72 of file IGraphicsWeb.h.

◆ CreatePlatformPopupMenu()

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

Definition at line 817 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 751 of file IGraphicsWeb.cpp.

◆ DrawResize()

void IGraphicsWeb::DrawResize ( )
override

Definition at line 829 of file IGraphicsWeb.cpp.

◆ ForceEndUserEdit()

void IGraphicsWeb::ForceEndUserEdit ( )
inlineoverride

Definition at line 70 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 646 of file IGraphicsWeb.cpp.

◆ GetPlatformAPIStr()

const char * IGraphicsWeb::GetPlatformAPIStr ( )
inlineoverride

Definition at line 63 of file IGraphicsWeb.h.

◆ GetTextFromClipboard()

bool IGraphicsWeb::GetTextFromClipboard ( WDL_String &  str)
inlineoverride

Definition at line 75 of file IGraphicsWeb.h.

◆ GetWindow()

void * IGraphicsWeb::GetWindow ( )
inlineoverride

Definition at line 73 of file IGraphicsWeb.h.

◆ HideMouseCursor()

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

Definition at line 589 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 66 of file IGraphicsWeb.h.

◆ OnMainLoopTimer()

void IGraphicsWeb::OnMainLoopTimer ( )
static

Definition at line 653 of file IGraphicsWeb.cpp.

◆ OpenURL()

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

Definition at line 822 of file IGraphicsWeb.cpp.

◆ OpenWindow()

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

Definition at line 554 of file IGraphicsWeb.cpp.

◆ PlatformSupportsMultiTouch()

bool IGraphicsWeb::PlatformSupportsMultiTouch ( ) const
inlineoverride

Definition at line 85 of file IGraphicsWeb.h.

◆ PromptForColor()

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

Definition at line 733 of file IGraphicsWeb.cpp.

◆ PromptForDirectory()

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

Definition at line 720 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 708 of file IGraphicsWeb.cpp.

◆ SetMouseCursor()

ECursor IGraphicsWeb::SetMouseCursor ( ECursor  cursorType)
override

Definition at line 620 of file IGraphicsWeb.cpp.

◆ SetTextInClipboard()

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

Definition at line 76 of file IGraphicsWeb.h.

◆ ShowMessageBox()

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

Definition at line 677 of file IGraphicsWeb.cpp.

◆ UpdateTooltips()

void IGraphicsWeb::UpdateTooltips ( )
inlineoverride

Definition at line 77 of file IGraphicsWeb.h.

◆ WindowIsOpen()

bool IGraphicsWeb::WindowIsOpen ( )
inlineoverride

Definition at line 74 of file IGraphicsWeb.h.

Member Data Documentation

◆ mPrevX

double IGraphicsWeb::mPrevX = 0.

Definition at line 89 of file IGraphicsWeb.h.

◆ mPrevY

double IGraphicsWeb::mPrevY = 0.

Definition at line 90 of file IGraphicsWeb.h.


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