00001 #ifndef LIST_DIALOG_CLASS
00002 #define LIST_DIALOG_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "mfc_dll.h"
00019
00020 #include <basis/object_base.h>
00021 #include <basis/portable.h>
00022
00023
00024 class byte_array;
00025 class list_dialog_implementation;
00026 class string_array;
00027
00029
00030 class MFC_EXTENSIONS_CLASS_STYLE list_dialog : public CDialog
00031 {
00032 public:
00033 list_dialog(CWnd *parent = NIL,
00034 const istring &title = istring::empty_string(), bool on_top = true);
00035 virtual ~list_dialog();
00036 IMPLEMENT_CLASS_NAME("list_dialog");
00037
00038 int add_string(const istring &to_add, bool enabled = true);
00040
00041 int get_current(istring &selection);
00043
00044 protected:
00045 DECLARE_MESSAGE_MAP()
00046 virtual BOOL OnInitDialog();
00047 afx_msg void OnSelchangeTypesListbox();
00048 virtual void OnOK();
00049 afx_msg void OnDblClkListbox();
00050 virtual void DoDataExchange(CDataExchange* ddx_ptr);
00051
00052 private:
00053 istring *_title;
00054 bool _on_top;
00055 int _selection_indy;
00056 int _last_selection_indy;
00057 string_array *_list_items;
00058 byte_array *_enabled_items;
00059 list_dialog_implementation *_implementation;
00060 };
00061
00062 #endif
00063