00001
00018 #ifndef INC_MGUI_DLGSELECTMULTI_H
00019 #define INC_MGUI_DLGSELECTMULTI_H
00020
00021 #ifndef INC_MGUI_DLGSHELL_H
00022 #include <mgui/dlgshell.h>
00023 #endif
00024
00025 #ifndef INC_MGUI_LISTITEM_H
00026 #include <mgui/listitem.h>
00027 #endif
00028
00029 namespace MGUI {
00030
00032 class DLG_SELECT_MULTI : public DLGSHELL {
00033 public:
00034
00036 explicit DLG_SELECT_MULTI (
00037 const MISTRING& dlgtitle,
00038 HELPID helpid = HELPID__None
00039 );
00040
00042 DLG_SELECT_MULTI (
00043 const MISTRING& dlgtitle,
00044 const MISTRING& prompt,
00045 HELPID helpid = HELPID__None
00046 );
00047
00049 ~DLG_SELECT_MULTI (
00050 );
00051
00053 void AddChoice (
00054 MGUI::ID id,
00055 const MISTRING& string,
00056 bool selected,
00057 bool canchange = true
00058 );
00059
00061 bool IsSelectedID (
00062 MGUI::ID id
00063 ) const;
00064
00065 private:
00066 #ifndef GENERATING_DOXYGEN_OUTPUT
00067 class CHOICE {
00068 public:
00069 CHOICE (const MISTRING& string, ID id, bool isSelected, bool isChangable)
00070 : m_string(string), m_id(id), m_isSelected(isSelected), m_isChangable(isChangable) { }
00071
00072 ID GetID () const { return (m_id); }
00073 const MISTRING& GetString () const { return (m_string); }
00074 bool IsChangable () const { return (m_isChangable); }
00075 bool IsSelected () const { return (m_isSelected); }
00076
00077 private:
00078 MISTRING m_string;
00079 ID m_id;
00080 bool m_isSelected;
00081 bool m_isChangable;
00082 };
00083
00084 MILIST<CHOICE> m_ChoiceList;
00085 CTRL_LABEL m_PromptLabel;
00086 CTRL_TOGGLEBUTTON *m_Toggles;
00087 MISTRING m_PromptString;
00088
00089 virtual ERRVALUE v_CreateContent ();
00090 #endif // GENERATING_DOXYGEN_OUTPUT
00091 };
00092
00093
00094 }
00095
00096 #endif // INC_MGUI_DLGSELECTMULTI_H