13 #include <CoreGraphics/CoreGraphics.h> 16 #include "IGraphicsCoreText.h" 19 BEGIN_IGRAPHICS_NAMESPACE
29 void SetBundleID(
const char* bundleID) { mBundleID.Set(bundleID); }
31 void* OpenWindow(
void* pWindow)
override;
32 void CloseWindow()
override;
33 bool WindowIsOpen()
override;
34 void PlatformResize(
bool parentHasResized)
override;
35 void AttachPlatformView(
const IRECT& r,
void* pView)
override;
36 void RemovePlatformView(
void* pView)
override;
38 void HideMouseCursor(
bool hide,
bool lock)
override;
39 void MoveMouseCursor(
float x,
float y)
override;
40 ECursor SetMouseCursor(ECursor cursorType)
override;
42 void GetMouseLocation(
float& x,
float&y)
const override;
44 void DoCursorLock(
float x,
float y,
float& prevX,
float& prevY);
46 EMsgBoxResult ShowMessageBox(
const char* str,
const char* caption, EMsgBoxType type, IMsgBoxCompletionHanderFunc completionHandler)
override;
47 void ForceEndUserEdit()
override;
49 const char* GetPlatformAPIStr()
override;
51 void UpdateTooltips()
override;
53 bool RevealPathInExplorerOrFinder(WDL_String& path,
bool select)
override;
54 void PromptForFile(WDL_String& fileName, WDL_String& path, EFileAction action,
const char* ext)
override;
55 void PromptForDirectory(WDL_String& dir)
override;
56 bool PromptForColor(
IColor& color,
const char* str, IColorPickerHandlerFunc func)
override;
58 bool OpenURL(
const char* url,
const char* msgWindowTitle,
const char* confirmMsg,
const char* errMsgOnFailure)
override;
60 void* GetWindow()
override;
62 const char* GetBundleID()
override {
return mBundleID.Get(); }
63 static int GetUserOSVersion();
65 bool GetTextFromClipboard(WDL_String& str)
override;
66 bool SetTextInClipboard(
const char* str)
override;
68 float MeasureText(
const IText& text,
const char* str,
IRECT& bounds)
const override;
71 void CreatePlatformImGui()
override;
74 void CreatePlatformTextEntry(
int paramIdx,
const IText& text,
const IRECT& bounds,
int length,
const char* str)
override;
76 void PointToScreen(
float& x,
float& y)
const;
77 void ScreenToPoint(
float& x,
float& y)
const;
79 PlatformFontPtr LoadPlatformFont(
const char* fontID,
const char* fileNameOrResID)
override;
80 PlatformFontPtr LoadPlatformFont(
const char* fontID,
const char* fontName, ETextStyle style)
override;
81 PlatformFontPtr LoadPlatformFont(
const char* fontID,
void* pData,
int dataSize)
override;
82 void CachePlatformFont(
const char* fontID,
const PlatformFontPtr& font)
override;
84 void RepositionCursor(CGPoint point);
85 void StoreCursorPosition();
87 void* mView =
nullptr;
88 void* mImGuiView =
nullptr;
89 CGPoint mCursorLockPosition;
94 END_IGRAPHICS_NAMESPACE
Used to manage a rectangular area, independent of draw class/platform.
Used for choosing a drawing backend.
Used to manage color data, independent of draw class/platform.
IGraphics platform class for macOS.
An editor delegate base class for a SOMETHING that uses IGraphics for it's UI.
IText is used to manage font and text/text entry style for a piece of text on the UI...