aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Platform.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/Platform.h b/include/Platform.h
index 74de63174..6d37799e7 100644
--- a/include/Platform.h
+++ b/include/Platform.h
@@ -333,6 +333,11 @@ public:
};
/**
+ * A simple callback action passing one piece of untyped user data.
+ */
+typedef void (*CallBackAction)(void*);
+
+/**
* Class to hide the details of window manipulation.
* Does not own the window which will normally have a longer life than this object.
*/
@@ -373,7 +378,9 @@ public:
/**
* Listbox management.
*/
+
class ListBox : public Window {
+private:
#if PLAT_GTK
WindowID list;
WindowID scroller;
@@ -383,6 +390,9 @@ class ListBox : public Window {
unsigned int maxItemCharacters;
unsigned int aveCharWidth;
public:
+ CallBackAction doubleClickAction;
+ void *doubleClickActionData;
+public:
ListBox();
virtual ~ListBox();
void Create(Window &parent, int ctrlID);
@@ -398,6 +408,10 @@ public:
int Find(const char *prefix);
void GetValue(int n, char *value, int len);
void Sort();
+ void SetDoubleClickAction(CallBackAction action, void *data) {
+ doubleClickAction = action;
+ doubleClickActionData = data;
+ }
};
/**