00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef INC_MI32_EDITMENU_H
00027 #define INC_MI32_EDITMENU_H
00028
00029 #ifdef X_NATIVE
00030 #ifndef INC_MI32_TEXTED_H
00031 #include <mi32/texted.h>
00032 #endif
00033
00034
00035 struct MENUITEM;
00036 struct BUTTONITEM;
00037
00038 #endif
00039
00040 #ifndef INC_MI32_DELEGATE_H
00041 #include <mi32/delegate.h>
00042 #endif
00043
00044 namespace MGUI {
00045 class CTRL_EDIT_BASE;
00046 class MENU;
00047 class MENU_EDIT;
00048 }
00049
00050 class MISTRING;
00051
00052
00053 class EDITMENU {
00054 public:
00055
00056 enum FLAGS {
00057 FLAG_None = 0x0000,
00058 FLAG_NoSearch = 0x0001,
00059 FLAG_NoReplace = 0x0002,
00060 FLAG_NoInsertFile = 0x0004,
00061 FLAG_AllowFormat = 0x0008
00062 };
00063
00064 EDITMENU();
00065 EDITMENU(const EDITMENU&);
00066 virtual ~EDITMENU();
00067
00068 void Cut();
00069 void Copy();
00070 void Paste();
00071 void Clear();
00072
00073 #ifdef X_NATIVE
00074
00075 void AddCallbacks (Widget xetext);
00076
00077
00078
00079 void SetWYSIWYG (bool value);
00080 void SetWYSIWYGEnabled (bool value);
00081
00082 const BUTTONITEM* CreateButtonItems (
00083 FLAGS flags,
00084 void (*undofunc)(Widget, void*) = 0,
00085 void* undodata = 0
00086 );
00087
00088 const MENUITEM* CreateMenuItems (
00089 FLAGS flags,
00090 void (*undofunc)(Widget, void*) = 0,
00091 void* undodata = 0,
00092 Widget shell = 0
00093 );
00094
00095 static void RegisterTextWidget (Widget);
00096 static EDITMENU* AddPopupEditMenu (Widget);
00097 #endif
00098
00099 void SetCurrentCtrl (
00100 MGUI::CTRL_EDIT_BASE* EditCtrl
00101 );
00102
00103 #ifdef X_NATIVE
00104 void SetCurrentWidget (
00105 Widget widget
00106 );
00107 #endif
00108
00109 void PopupInsertCharDialog (
00110 MGUI::CTRL_EDIT_BASE& EditCtrl
00111 );
00112
00113 private:
00114
00115 class PRIV;
00116 PRIV* m_Priv;
00117
00118 friend class MGUI::MENU_EDIT;
00119 };
00120
00121 #ifndef GENERATING_DOXYGEN_OUTPUT
00122 DEFINE_ENUM_OP_BITWISE(EDITMENU::FLAGS)
00123 #endif
00124
00125 #endif