diff options
author | Pierre Ossman <ossman@cendio.se> | 2011-05-17 09:36:04 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2011-05-17 09:36:04 +0000 |
commit | 0c41e1d057f0425c2687b87da4272f8eafb70ba4 (patch) | |
tree | 98b271dfc99c0833959d6c52f0efbb90e48ba1af /vncviewer/OptionsDialog.h | |
parent | 17fca55bc93139554e9259e78e9bad39d846141d (diff) | |
download | tigervnc-0c41e1d057f0425c2687b87da4272f8eafb70ba4.tar.gz tigervnc-0c41e1d057f0425c2687b87da4272f8eafb70ba4.zip |
Add a callback mechanism to the options dialog so that other parts of vncviewer
can pick up on changes.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4421 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer/OptionsDialog.h')
-rw-r--r-- | vncviewer/OptionsDialog.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vncviewer/OptionsDialog.h b/vncviewer/OptionsDialog.h index cb18bcd5..ea958595 100644 --- a/vncviewer/OptionsDialog.h +++ b/vncviewer/OptionsDialog.h @@ -19,12 +19,16 @@ #ifndef __OPTIONSDIALOG_H__ #define __OPTIONSDIALOG_H__ +#include <map> + #include <FL/Fl_Window.H> #include <FL/Fl_Group.H> #include <FL/Fl_Check_Button.H> #include <FL/Fl_Round_Button.H> #include <FL/Fl_Int_Input.H> +typedef void (OptionsCallback)(void*); + class OptionsDialog : public Fl_Window { protected: OptionsDialog(); @@ -33,6 +37,9 @@ protected: public: static void showDialog(void); + static void addCallback(OptionsCallback *cb, void *data = NULL); + static void removeCallback(OptionsCallback *cb); + void show(void); protected: @@ -55,6 +62,8 @@ protected: static void handleOK(Fl_Widget *widget, void *data); protected: + static std::map<OptionsCallback*, void*> callbacks; + /* Compression */ Fl_Check_Button *autoselectCheckbox; |