]> Dogcows Code - chaz/openbox/commitdiff
beginnings of button class
authorMarius Nita <marius@cs.pdx.edu>
Mon, 11 Nov 2002 03:47:12 +0000 (03:47 +0000)
committerMarius Nita <marius@cs.pdx.edu>
Mon, 11 Nov 2002 03:47:12 +0000 (03:47 +0000)
otk/button.cc [new file with mode: 0644]
otk/button.hh [new file with mode: 0644]

diff --git a/otk/button.cc b/otk/button.cc
new file mode 100644 (file)
index 0000000..c88fc70
--- /dev/null
@@ -0,0 +1,31 @@
+#include "button.hh"
+
+namespace otk {
+
+OtkButton::OtkButton(OtkWidget *parent)
+  : OtkWidget(parent), _text(""), _pressed(false),
+    _unfocus_tx(OtkWidget::getStyle()->getButtonUnfocus())
+{
+}
+
+OtkButton::~OtkButton()
+{
+
+}
+
+void OtkButton::setText(const std::string &text)
+{
+  std::string a = text;
+}
+
+void OtkButton::press(void)
+{
+
+}
+
+void OtkButton::release(void)
+{
+
+}
+
+}
diff --git a/otk/button.hh b/otk/button.hh
new file mode 100644 (file)
index 0000000..2fa8e7d
--- /dev/null
@@ -0,0 +1,34 @@
+#include "widget.hh"
+#include "style.hh"
+#include "texture.hh"
+//#include "pixmap.hh"
+
+namespace otk {
+
+class OtkButton : public OtkWidget {
+
+public:
+
+  OtkButton(OtkWidget *parent);
+  ~OtkButton();
+
+  inline const std::string &getText(void) const { return _text; }
+  void setText(const std::string &text);
+
+  //inline const OtkPixmap &getPixmap(void) const { return _pixmap; }
+  //void setPixmap(const OtkPixmap &pixmap);
+
+  inline bool isPressed(void) const { return _pressed; }
+  void press(void);
+  void release(void);
+
+private:
+
+  std::string _text;
+  //OtkPixmap _pixmap;
+  bool _pressed;
+  BTexture *_unfocus_tx;
+
+};
+
+}
This page took 0.027905 seconds and 4 git commands to generate.