diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-03-21 18:42:39 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-03-21 18:42:39 +0000 |
| commit | a52a6d96d701c993896f276e4198003317632aaf (patch) | |
| tree | be2f51e6a433d1fdf9a7c8248b343cb3f6297212 /otk/messagedialog.hh | |
| parent | a36c7543d4eedaa9e10bfd9f4d9b81279b1bb7e6 (diff) | |
rm the old code including the .pys and the c++ shit
Diffstat (limited to 'otk/messagedialog.hh')
| -rw-r--r-- | otk/messagedialog.hh | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/otk/messagedialog.hh b/otk/messagedialog.hh deleted file mode 100644 index 81894624..00000000 --- a/otk/messagedialog.hh +++ /dev/null @@ -1,66 +0,0 @@ -// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- -#ifndef __messagedialog_hh -#define __messagedialog_hh - -#include "widget.hh" -#include "ustring.hh" - -#include <vector> - -namespace otk { - -class Button; -class Label; - -class DialogButton { - ustring _label; - bool _default; -public: - DialogButton(ustring label) : _label(label), _default(false) - {} - DialogButton(ustring label, bool def) : _label(label), _default(def) - {} - inline const ustring& label() const { return _label; } - inline const bool& isDefault() const { return _default; } - - bool operator==(const DialogButton &o) const { return _label == o._label; } - bool operator!=(const DialogButton &o) const { return!(_label == o._label); } -}; - -class MessageDialog : public Widget { -public: - MessageDialog(int screen, EventDispatcher *ed, ustring title, - ustring caption); - MessageDialog(EventDispatcher *ed, ustring title, ustring caption); - MessageDialog(Widget *parent, ustring title, ustring caption); - virtual ~MessageDialog(); - - virtual void addButton(const DialogButton &b); - - virtual const DialogButton& run(); - - virtual void show(); - virtual void hide(); - virtual void focus(); - - virtual const DialogButton& result() const { return _result; } - virtual void setResult(const DialogButton &result) { _result = result; } - - virtual void keyPressHandler(const XKeyEvent &e); - virtual void clientMessageHandler(const XClientMessageEvent &e); - -private: - void init(const ustring &title, const ustring &caption); - -protected: - std::vector<Button *> _button_widgets; - Label *_label; - Widget *_button_holder; - KeyCode _return; - KeyCode _escape; - DialogButton _result; -}; - -} - -#endif // __messagedialog_hh |
