13#include <CoreGraphics/CoreGraphics.h>
16#include "IGraphicsCoreText.h"
19BEGIN_IGRAPHICS_NAMESPACE
29 void SetBundleID(
const char* bundleID) { mBundleID.Set(bundleID); }
30 void SetAppGroupID(
const char* appGroupID) { mAppGroupID.Set(appGroupID); }
32 void* OpenWindow(
void* pWindow)
override;
33 void CloseWindow()
override;
34 bool WindowIsOpen()
override;
35 void PlatformResize(
bool parentHasResized)
override;
36 void AttachPlatformView(
const IRECT& r,
void* pView)
override;
37 void RemovePlatformView(
void* pView)
override;
38 void HidePlatformView(
void* pView,
bool hide)
override;
40 void HideMouseCursor(
bool hide,
bool lock)
override;
41 void MoveMouseCursor(
float x,
float y)
override;
42 ECursor SetMouseCursor(ECursor cursorType)
override;
44 void GetMouseLocation(
float& x,
float&y)
const override;
46 void DoCursorLock(
float x,
float y,
float& prevX,
float& prevY);
48 EMsgBoxResult ShowMessageBox(
const char* str,
const char* title, EMsgBoxType type, IMsgBoxCompletionHandlerFunc completionHandler)
override;
49 void ForceEndUserEdit()
override;
51 const char* GetPlatformAPIStr()
override;
53 void UpdateTooltips()
override;
55 bool RevealPathInExplorerOrFinder(WDL_String& path,
bool select)
override;
56 void PromptForFile(WDL_String& fileName, WDL_String& path, EFileAction action,
const char* ext, IFileDialogCompletionHandlerFunc completionHandler)
override;
57 void PromptForDirectory(WDL_String& dir, IFileDialogCompletionHandlerFunc completionHandler)
override;
58 bool PromptForColor(
IColor& color,
const char* str, IColorPickerHandlerFunc func)
override;
60 bool OpenURL(
const char* url,
const char* msgWindowTitle,
const char* confirmMsg,
const char* errMsgOnFailure)
override;
62 void* GetWindow()
override;
64 const char* GetBundleID()
const override {
return mBundleID.Get(); }
65 const char* GetAppGroupID()
const override {
return mAppGroupID.Get(); }
66 static int GetUserOSVersion();
68 bool GetTextFromClipboard(WDL_String& str)
override;
69 bool SetTextInClipboard(
const char* str)
override;
70 bool SetFilePathInClipboard(
const char* path)
override;
72 bool InitiateExternalFileDragDrop(
const char* path,
const IRECT& iconBounds)
override API_AVAILABLE(macos(10.13));
74 float MeasureText(
const IText& text,
const char* str,
IRECT& bounds)
const override;
76 EUIAppearance GetUIAppearance()
const override;
80 void CreatePlatformTextEntry(
int paramIdx,
const IText& text,
const IRECT& bounds,
int length,
const char* str)
override;
82 void ActivateGLContext()
override;
83 void DeactivateGLContext()
override;
86 void PointToScreen(
float& x,
float& y)
const;
87 void ScreenToPoint(
float& x,
float& y)
const;
89 PlatformFontPtr LoadPlatformFont(
const char* fontID,
const char* fileNameOrResID)
override;
90 PlatformFontPtr LoadPlatformFont(
const char* fontID,
const char* fontName, ETextStyle style)
override;
91 PlatformFontPtr LoadPlatformFont(
const char* fontID,
void* pData,
int dataSize)
override;
92 void CachePlatformFont(
const char* fontID,
const PlatformFontPtr& font)
override;
94 void RepositionCursor(CGPoint point);
95 void StoreCursorPosition();
97 void* mView =
nullptr;
98 CGPoint mCursorLockPosition;
99 WDL_String mBundleID, mAppGroupID;
103END_IGRAPHICS_NAMESPACE
Used for choosing a drawing backend.
An editor delegate base class that uses IGraphics for the UI.
IGraphics platform class for macOS.
Used to manage color data, independent of draw class/platform.
Used to manage a rectangular area, independent of draw class/platform.
IText is used to manage font and text/text entry style for a piece of text on the UI,...