Browse Source

Expose get/setIgnoringKeyRepeat in Window class

Fixes #15
pull/83/head
falkTX 6 years ago
parent
commit
1770a175bd
2 changed files with 26 additions and 2 deletions
  1. +4
    -2
      dgl/Window.hpp
  2. +22
    -0
      dgl/src/Window.cpp

+ 4
- 2
dgl/Window.hpp View File

@@ -98,8 +98,6 @@ public:
bool isResizable() const noexcept;
void setResizable(bool yesNo);

void setGeometryConstraints(uint width, uint height, bool aspect);

uint getWidth() const noexcept;
uint getHeight() const noexcept;
Size<uint> getSize() const noexcept;
@@ -109,11 +107,15 @@ public:
const char* getTitle() const noexcept;
void setTitle(const char* title);

void setGeometryConstraints(uint width, uint height, bool aspect);
void setTransientWinId(uintptr_t winId);

double getScaling() const noexcept;
void setScaling(double scaling) noexcept;

bool getIgnoringKeyRepeat() const noexcept;
void setIgnoringKeyRepeat(bool ignore) noexcept;

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



+ 22
- 0
dgl/src/Window.cpp View File

@@ -710,6 +710,18 @@ struct Window::PrivateData {

// -------------------------------------------------------------------

bool getIgnoringKeyRepeat() const noexcept
{
return fView->ignoreKeyRepeat;
}

void setIgnoringKeyRepeat(bool ignore) noexcept
{
puglIgnoreKeyRepeat(fView, ignore);
}

// -------------------------------------------------------------------

void addWidget(Widget* const widget)
{
fWidgets.push_back(widget);
@@ -1333,6 +1345,16 @@ void Window::setScaling(double scaling) noexcept
pData->setScaling(scaling);
}

bool Window::getIgnoringKeyRepeat() const noexcept
{
return pData->getIgnoringKeyRepeat();
}

void Window::setIgnoringKeyRepeat(bool ignore) noexcept
{
pData->setIgnoringKeyRepeat(ignore);
}

Application& Window::getApp() const noexcept
{
return pData->fApp;


Loading…
Cancel
Save