From 4cf9a3b8fe91cc0b43d0cbab51cf02c7b1f8d60d Mon Sep 17 00:00:00 2001 From: qwertfisch Date: Mon, 19 Nov 2012 21:25:24 +0000 Subject: KeyBuddy2: ein neuer Ansatz eines Layouttools, ähnlich zu NeoVars, aber in C++ geschrieben MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.neo-layout.org@2431 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- windows/keybuddy2/src/keyButton.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 windows/keybuddy2/src/keyButton.h (limited to 'windows/keybuddy2/src/keyButton.h') diff --git a/windows/keybuddy2/src/keyButton.h b/windows/keybuddy2/src/keyButton.h new file mode 100644 index 0000000..38e9484 --- /dev/null +++ b/windows/keybuddy2/src/keyButton.h @@ -0,0 +1,25 @@ +#ifndef _KeyBuddy2_keyButton_h_ +#define _KeyBuddy2_keyButton_h_ + +// custom button class, that is extended by simulated pushes and releases +class keyButton:public Button{ +public: + int finger; // for which finger is this button? (determines the drawing color) + void simDown(){ + if(IsReadOnly() || !IsEnabled() || IsPush()) return; + KeyPush(); + Sync(); + } + void simUp(){ + if(!IsPush()) return; + FinishPush(); + Sync(); + } + bool isPushed(){ + return IsPush(); + } + void LeftDown(Point, dword){}; // overwrite mouse action so buttons do not react to clicking + void LeftUp(Point, dword){}; +}; + +#endif -- cgit v1.2.3