# dropdown_type.h

    00001 /* $Id: dropdown_type.h 11857 2008-01-15 00:48:14Z rubidium $ */
    00002
    00003 #ifndef WIDGETS_DROPDOWN_TYPE_H
    00004 #define WIDGETS_DROPDOWN_TYPE_H
    00005
    00006 #include "../window_type.h"
    00007 #include <list>
    00008
    00013 class DropDownListItem {
    00014 public:
    00015   int result;
    00016   bool masked;
    00017
    00018   DropDownListItem(int result, bool masked) : result(result), masked(masked) {}
    00019   virtual ~DropDownListItem() {}
    00020   virtual StringID String() const;
    00021 };
    00022
    00026 class DropDownListStringItem : public DropDownListItem {
    00027 public:
    00028   StringID string;
    00029
    00030   DropDownListStringItem(StringID string, int result, bool masked) : DropDownListItem(result, masked), string(string) {}
    00031   virtual ~DropDownListStringItem() {}
    00032
    00033   StringID String() const;
    00034 };
    00035
    00039 class DropDownListParamStringItem : public DropDownListStringItem {
    00040 public:
    00041   uint64 decode_params[10];
    00042
    00043   DropDownListParamStringItem(StringID string, int result, bool masked) : DropDownListStringItem(string, result, masked) {}
    00044   virtual ~DropDownListParamStringItem() {}
    00045
    00046   StringID String() const;
    00047   void SetParam(uint index, uint64 value) { decode_params[index] = value; }
    00048 };
    00049
    00053 typedef std::list<DropDownListItem *> DropDownList;
    00054
    00064 void ShowDropDownList(Window *w, DropDownList *list, int selected, int button);
    00065
    00066 #endif /* WIDGETS_DROPDOWN_TYPE_H */