Skip to content
This repository has been archived by the owner on May 23, 2021. It is now read-only.

Commit

Permalink
Add waveshaper's dpf files
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesaulniers committed Feb 27, 2018
1 parent 6a26ce4 commit 0b60d1c
Show file tree
Hide file tree
Showing 13 changed files with 1,317 additions and 1,014 deletions.
2 changes: 1 addition & 1 deletion dgl/Base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// Define namespace

#ifndef DGL_NAMESPACE
# define DGL_NAMESPACE DGL
# define DGL_NAMESPACE SPOONIE_DGL
#endif

#define START_NAMESPACE_DGL namespace DGL_NAMESPACE {
Expand Down
79 changes: 64 additions & 15 deletions dgl/Window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class Window
1 means visible and unchecked.
2 means visible and checked.
*/
struct Buttons {
struct Buttons
{
uint listAllFiles;
uint showHidden;
uint showPlaces;
Expand All @@ -73,9 +74,9 @@ class Window
};
#endif // DGL_FILE_BROWSER_DISABLED

explicit Window(Application& app);
explicit Window(Application& app, Window& parent);
explicit Window(Application& app, intptr_t parentId);
explicit Window(Application &app);
explicit Window(Application &app, Window &parent);
explicit Window(Application &app, intptr_t parentId);
virtual ~Window();

void show();
Expand All @@ -102,18 +103,66 @@ class Window
void setSize(uint width, uint height);
void setSize(Size<uint> size);

const char* getTitle() const noexcept;
void setTitle(const char* title);
const char *getTitle() const noexcept;
void setTitle(const char *title);

void setTransientWinId(uintptr_t winId);

Application& getApp() const noexcept;
Application &getApp() const noexcept;
intptr_t getWindowId() const noexcept;

void addIdleCallback(IdleCallback* const callback);
void removeIdleCallback(IdleCallback* const callback);

protected:
void addIdleCallback(IdleCallback *const callback);
void removeIdleCallback(IdleCallback *const callback);

//fork-----------------
enum CursorStyle
{
Default,
Pointer,
Grab,
Grabbing,
Text,
NW_SE_Resize
};

/**
Show the mouse cursor.
*/
void showCursor() noexcept;

/**
Hide the mouse cursor.
*/
void hideCursor() noexcept;

/**
Get the position of the cursor relative to the window's origin.
*/
const Point<int> getCursorPos() const noexcept;

/**
Confine the mouse cursor to a rectangular area in the window. The rectangle is endpoint-inclusive.
*/
void clipCursor(Rectangle<int> rect) const noexcept;

void clipCursor(Widget* const widget) const noexcept;

/**
Set the cursor free after calling clipCursor.
*/
void unclipCursor() const noexcept;

/**
Set the position of the cursor in the window.
*/
void setCursorPos(int x, int y) noexcept;
void setCursorPos(const Point<int>& pos) noexcept;
void setCursorPos(Widget* const widget) noexcept;

void setCursorStyle(CursorStyle style) noexcept;
//---------------------

protected:
virtual void onDisplayBefore();
virtual void onDisplayAfter();
virtual void onReshape(uint width, uint height);
Expand All @@ -123,16 +172,16 @@ class Window
virtual void fileBrowserSelected(const char* filename);
#endif

private:
private:
struct PrivateData;
PrivateData* const pData;
PrivateData *const pData;
friend class Application;
friend class Widget;
friend class StandaloneWindow;
friend class DISTRHO_NAMESPACE::UIExporter;

virtual void _addWidget(Widget* const widget);
virtual void _removeWidget(Widget* const widget);
virtual void _addWidget(Widget *const widget);
virtual void _removeWidget(Widget *const widget);
void _idle();

bool handlePluginKeyboard(const bool press, const uint key);
Expand Down
Empty file added dgl/src/Cursor.cpp
Empty file.
Loading

0 comments on commit 0b60d1c

Please sign in to comment.