iPlug2 - C++ Audio Plug-in Framework
IGraphicsLinux.h
1 /*
2  ==============================================================================
3 
4  This file is part of the iPlug 2 library. Copyright (C) the iPlug 2 developers.
5 
6  See LICENSE.txt for more info.
7 
8  ==============================================================================
9 */
10 
11 #pragma once
12 
13 #include "IGraphics_select.h"
14 
15 BEGIN_IPLUG_NAMESPACE
16 BEGIN_IGRAPHICS_NAMESPACE
17 
21 class IGraphicsLinux final : public IGRAPHICS_DRAW_CLASS
22 {
23 public:
24  IGraphicsLinux(IGEditorDelegate& dlg, int w, int h, int fps, float scale);
25  virtual ~IGraphicsLinux);
26 
27  void* OpenWindow(void* pWindow) override;
28  void CloseWindow() override;
29  bool WindowIsOpen() override;
30  void PlatformResize(bool parentHasResized) override;
31 
32  void HideMouseCursor() override;
33  void ShowMouseCursor() override;
34 
35  EMsgBoxResult ShowMessageBox(const char* str, const char* caption, EMsgBoxType type, IMsgBoxCompletionHanderFunc completionHandler) override;
36  void ForceEndUserEdit() override;
37 
38  const char* GetPlatformAPIStr() override;
39 
40  void UpdateTooltips() override;
41 
42  bool RevealPathInExplorerOrFinder(WDL_String& path, bool select) override;
43  void PromptForFile(WDL_String& fileName, WDL_String& path, EFileAction action, const char* ext, IColorPickerHandlerFunc func) override;
44  bool PromptForColor(IColor& color, const char* str) override;
45 
46  bool OpenURL(const char* url, const char* msgWindowTitle, const char* confirmMsg, const char* errMsgOnFailure) override;
47 
48  static int GetUserOSVersion();
49  bool GetTextFromClipboard(WDL_String& str) override;
50  bool SetTextInClipboard(const char* str) override { return false; } // TODO
51 
52 protected:
53  IPopupMenu* CreatePlatformPopupMenu(const IPopupMenu& menu, IRECT& bounds) override;
54  void CreatePlatformTextEntry(int paramIdx, const IText& text, const IRECT& bounds, int length, const char* str) override;
55 }
56 
57 END_IGRAPHICS_NAMESPACE
58 END_IPLUG_NAMESPACE
Used to manage a rectangular area, independent of draw class/platform.
Used for choosing a drawing backend.
IGraphics platform class for linux.
Used to manage color data, independent of draw class/platform.
An editor delegate base class for a SOMETHING that uses IGraphics for it's UI.
A class for setting the contents of a pop up menu.
IText is used to manage font and text/text entry style for a piece of text on the UI...