summaryrefslogtreecommitdiff
path: root/CalculatorButton.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2007-12-20 00:39:33 +0000
committerMatt Turner <mattst88@gmail.com>2007-12-20 00:39:33 +0000
commit7f01dceac3c6f5be7c6745baf14c4b0d092aa31f (patch)
treea8bc8c92fd3c9d61a17e2afaf8e8bdab4f210a66 /CalculatorButton.cpp
Create branch to allow shortcuts for buttons. Partial rewrite :(CalculatorButton
git-svn-id: svn://mattst88.com/svn/calculator/branches/CalculatorButton@9 40705d3a-cdd4-446d-8ced-669f9f7342eb
Diffstat (limited to 'CalculatorButton.cpp')
-rw-r--r--CalculatorButton.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/CalculatorButton.cpp b/CalculatorButton.cpp
new file mode 100644
index 0000000..59fcfe3
--- /dev/null
+++ b/CalculatorButton.cpp
@@ -0,0 +1,24 @@
+#include "CalculatorButton.h"
+
+CalculatorButton::CalculatorButton( Window * pParent,
+ const Rect rFrame,
+ const String &pLabel,
+ unsigned int nWindowLayoutFlags,
+ unsigned int uiVKey)
+{
+ pButton = new Button(pParent, rFrame, pLabel, nWindowLayoutFlags);
+
+ Shortcut pShortcut(pButton, uiVKey, 0, KEY_QUAL_NONE);
+ pShortcut.Fire.Connect(this, &CalculatorButton::OnClicked);
+}
+
+CalculatorButton::CalculatorButton( Window * pParent,
+ const Rect rFrame,
+ const String &pLabel,
+ unsigned int nWindowLayoutFlags)
+{
+ pButton = new Button(pParent, rFrame, pLabel, nWindowLayoutFlags);
+}
+
+void CalculatorButton::OnClicked() {
+}